Function at 0x479560
Capabilities:
Get local ipv4 addresses
Get socket information
Send data
Send data on socket
Send http request
Set socket configuration

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
test rcx, rcx
mov r12, rcx
je 0x479695
mov byte [rcx + 0x178], 1
movzx eax, byte [rcx + 0x179]
mov rdi, 0xffffffffffffffff
test al, al
je 0x4796a2
mov rcx, qword [r12 + 0xc8]
test rcx, rcx
je 0x4796ba
mov eax, dword [r12 + 0xf0]
test eax, eax
je 0x479681
xor r13d, r13d
lea rsi, [0x004cdd8f]
mov rbx, qword [sym.imp.WS2_32.dll_send]
mov rbp, qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x4795e9
mov rcx, qword [r12 + 0xc8]
mov eax, dword [r12 + 0xf0]
add r13d, 1
cmp eax, r13d
jbe 0x479655
mov eax, r13d
imul rax, rax, 0x1e8
add rcx, rax
mov byte [rcx + 0x178], 1
mov rcx, qword [r12 + 0xc8]
add rax, rcx
cmp qword [rax + 0x168], 0xffffffffffffffff
je 0x4795d8
xor r9d, r9d
mov rcx, qword [rax + 0x170]
mov r8d, 1
mov rdx, rsi
call rbx
test eax, eax
jg 0x4795d0
call rbp
cmp eax, 0x2733
je 0x4795d0
lea r9, str.Failed_to_signal_shutdown_via_inter_thread_communication_channel.
mov r8d, 0x189a
lea rdx, str.T:_Bin_prep_mhd_src_libmicrohttpd_0.9.58_src_microhttpd_daemon.c
mov rcx, qword [0x004e5ae0]
call qword [0x004e5ae8]
test eax, eax
je 0x479681
xor ebx, ebx
mov eax, ebx
add ebx, 1
imul rax, rax, 0x1e8
add rcx, rax
call sym.xmrig.exe_MHD_stop_daemon
cmp dword [r12 + 0xf0], ebx
mov rcx, qword [r12 + 0xc8]
ja 0x47965b
call sub.msvcrt.dll_free
cmp qword [r12 + 0xc0], 0
je 0x479730
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rdi, qword [rcx + 0x158]
mov rcx, qword [r12 + 0xc8]
test rcx, rcx
jne 0x4795a6
mov eax, dword [r12 + 0x194]
test al, 8
je 0x479783
test ah, 0x20
jne 0x479801
cmp qword [r12 + 0x168], 0xffffffffffffffff
je 0x479704
xor r9d, r9d
mov rcx, qword [r12 + 0x170]
mov r8d, 1
lea rdx, [0x004cdd8f]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x4797cf
mov rcx, qword [r12 + 0xf8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x47983e
mov rcx, qword [r12 + 0xf8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x47978b
cmp rdi, 0xffffffffffffffff
je 0x479747
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
jne 0x47981d
mov rcx, qword [r12 + 0x1a8]
call sub.msvcrt.dll_free
mov rbx, qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea rcx, [r12 + 0x1b0]
call rbx
lea rcx, [r12 + 0x108]
call rbx
mov rcx, r12
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sub.msvcrt.dll_free
mov rcx, r12
call fcn.00475cb0
mov rcx, qword [r12 + 0x168]
cmp rcx, 0xffffffffffffffff
je 0x4797bc
mov rbx, qword [sym.imp.WS2_32.dll_closesocket]
call rbx
test eax, eax
mov rcx, qword [r12 + 0x170]
jne 0x47985f
call rbx
test eax, eax
jne 0x479861
lea rcx, [r12 + 0x130]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x479686
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x479704
lea r9, str.Failed_to_signal_shutdown_via_inter_thread_communication_channel
mov r8d, 0x18c1
lea rdx, str.T:_Bin_prep_mhd_src_libmicrohttpd_0.9.58_src_microhttpd_daemon.c
mov rcx, qword [0x004e5ae0]
call qword [0x004e5ae8]
mov rcx, r12
call fcn.00474af0
test byte [r12 + 0x194], 8
je 0x47978b
jmp 0x4796d3
lea r9, str.Close_socket_failed._n
mov r8d, 0x18f3
lea rdx, str.T:_Bin_prep_mhd_src_libmicrohttpd_0.9.58_src_microhttpd_daemon.c
mov rcx, qword [0x004e5ae0]
call qword [0x004e5ae8]
lea r9, str.Failed_to_join_a_thread_n
mov r8d, 0x18d3
lea rdx, str.T:_Bin_prep_mhd_src_libmicrohttpd_0.9.58_src_microhttpd_daemon.c
mov rcx, qword [0x004e5ae0]
call qword [0x004e5ae8]
call rbx
lea r9, str.Failed_to_destroy_ITC._n
mov r8d, 0x18de
lea rdx, str.T:_Bin_prep_mhd_src_libmicrohttpd_0.9.58_src_microhttpd_daemon.c
mov rcx, qword [0x004e5ae0]
call qword [0x004e5ae8]
nop
nop dword [rax]
nop word cs:[rax + rax]