So, i downloaded the binary. Here are some details before moving forward:
revbinary: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=2f0bc3cfa6ec6a297f58ae75f8802bd1b5ef7162, not stripped
linux-vdso.so.1 (0x00007fffec358000)
libmariadb.so.3 => /lib/x86_64-linux-gnu/libmariadb.so.3 (0x00007f1d76fbe000)
libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f1d76cd2000)
libzip.so.4 => /lib/x86_64-linux-gnu/libzip.so.4 (0x00007f1d76cb7000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1d76af2000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1d76ad0000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1d76ab3000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1d76aab000)
libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f1d768e1000)
libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f1d768ce000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1d7703c000)
libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f1d7679a000)
libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f1d76779000)
libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f1d765f5000)
libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f1d765df000)
libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x00007f1d7659f000)
libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x00007f1d76556000)
libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f1d764d3000)
libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007f1d764c7000)
So, as you can see it depends upon libcrypto.so
which is i think openssl library. Now debugging a a function called from main, named process_data
has this code as ghidra gave with some modification: process_data_code
Now, i know upto md5 part that it get data from message table and stores a row....... So, i came to md5sum part, its passing the variables to md5sum but i dont know what are the functions of md5sum parameters. If it were libc functions like snprintf or fputs i could see manpage or try googling but it didnt give me nice results. This stackoverflow answer
says the first parameter is password, second is length of password and third is some weird shit. So, if you see the code you will get md5sum has 4 parameters
md5sum(random_mysql_rows_bufarray,mysql_rows_buffer_length & 0xffffffff, filename_ofvarlocal, mysql_rows_buffer_length & 0xffffffff);
Also, that answer says md5sum having 4 parameter isnt openssl md5. I just want to figure out what is the function of those 4 parameters in md5sum. Also if you could explain what is the weird & 0xfffffff
thing then it would be great! Here's the binary : reverse binary
Yeah, md5sum takes 4 parameter, got it.