Function at 0x47a5a0
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x128
mov r13, qword [rsp + 0x190]
lea r12, [rsp + 0x1a0]
mov ebx, ecx
mov ebp, ecx
and ebx, 0x4202
mov r14d, edx
mov rsi, r8
mov rdi, r9
mov qword [rsp + 0x60], r12
mov dword [rsp + 0x58], 1
mov qword [rsp + 0x68], 0
jne 0x47ab48
mov eax, ecx
or ah, 0x24
test ch, 0x80
cmovne ebp, eax
test r13, r13
je 0x47ab48
mov eax, ebp
and eax, 0x240
cmp eax, 0x240
je 0x47ab48
mov edx, ebp
and edx, 0x204
cmp edx, 0x204
je 0x47ab48
mov edx, ebp
and edx, 0x4c
cmp edx, 0x40
je 0x47ab48
test ebp, 0x10000
je 0x47a657
test eax, eax
jne 0x47ab48
test bpl, 4
je 0x47ab85
or ebp, 0x40
mov edx, 0x1e8
mov ecx, 1
call sub.msvcrt.dll_calloc
test rax, rax
mov r15, rax
je 0x47ab48
mov rax, 0xffffffffffffffff
mov rdx, qword [rsp + 0x198]
mov dword [r15 + 0x194], ebp
mov qword [r15 + 0x158], rax
shr ebp, 5
mov qword [r15 + 0x60], rsi
mov qword [r15 + 0x170], rax
mov qword [r15 + 0x168], rax
lea rsi, [0x00476150]
lea rax, [0x00476140]
and ebp, 1
mov qword [r15 + 0x68], rdi
movabs rdi, 0x7fe00000000
mov qword [r15 + 8], rdx
mov dword [r15 + 0x160], 0
mov dword [r15 + 0x19c], ebp
mov word [r15 + 0x198], r14w
mov qword [r15], r13
mov qword [r15 + 0xd8], 0x8000
mov qword [r15 + 0xe0], 0x400
mov qword [r15 + 0xa0], rsi
mov qword [r15 + 0x180], rdi
mov qword [r15 + 0x188], 0
mov dword [r15 + 0x1e4], 0x7fffffff
mov qword [r15 + 0xb0], rax
call qword [sym.imp.msvcrt.dll___iob_func]
add rax, 0x60
mov qword [r15 + 0xb8], rax
mov eax, dword [r15 + 0x194]
mov edx, eax
and edx, 0xc
cmp edx, 4
je 0x47ab62
mov edx, eax
and dh, 0xfb
test al, 8
jne 0x47ab7b
mov dword [r15 + 0x194], edx
lea rdx, [rsp + 0x68]
mov qword [r15 + 0x1d8], 0
mov qword [r15 + 0x1a0], 0
mov dword [r15 + 0x1e0], 4
mov r8, r12
mov rcx, r15
call fcn.004773c0
cmp eax, 1
jne 0x47ab40
test byte [r15 + 0x195], 4
je 0x47a7b2
mov esi, dword [r15 + 0xf0]
test esi, esi
je 0x47ab00
mov r8d, dword [r15 + 0x1e0]
test r8d, r8d
je 0x47a7fc
lea rax, [r8 + r8*8]
movabs rdx, 0xd79435e50d79435f
lea rcx, [r8 + rax*2]
shl rcx, 3
mov rax, rcx
mul rdx
shr rdx, 7
cmp r8, rdx
jne 0x47add0
call sub.msvcrt.dll_malloc
test rax, rax
mov qword [r15 + 0x1a8], rax
je 0x47b119
lea r13, [r15 + 0x1b0]
mov edx, 0x10
mov rbp, qword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
mov rcx, r13
call rbp
test eax, eax
je 0x47afc0
mov ecx, dword [r15 + 0x194]
test cl, 8
jne 0x47a838
mov r11d, dword [r15 + 0xf0]
test r11d, r11d
jne 0x47ac10
mov r12, qword [r15 + 0x158]
cmp r12, 0xffffffffffffffff
je 0x47ac90
cmp word [r15 + 0x198], 0
jne 0x47a8d0
test byte [r15 + 0x195], 1
jne 0x47a8d0
lea rdx, [rsp + 0xa0]
xor eax, eax
mov ecx, 0x10
mov dword [rsp + 0x5c], pe_nt_image_headers64
lea r8, [rsp + 0x5c]
mov rdi, rdx
rep stosq qword [rdi], rax
mov rcx, r12
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x47ae50
movzx eax, word [rsp + 0xa0]
cmp ax, 2
je 0x47aff0
cmp ax, 0x17
je 0x47aff0
cmp ax, 1
je 0x47a8c2
lea rdx, str.Unknown_address_family__n
mov rcx, r15
call fcn.0047b4a0
xor edx, edx
mov word [r15 + 0x198], dx
nop dword [rax]
mov rcx, r12
call fcn.0047ce30
test eax, eax
je 0x47aba0
lea r14, [r15 + 0x108]
mov edx, 0x10
mov rcx, r14
call rbp
test eax, eax
je 0x47ada0
mov edi, dword [r15 + 0xf0]
test edi, edi
je 0x47acd0
mov eax, dword [r15 + 0x194]
and eax, 0x108
cmp eax, 8
jne 0x47ab4b
mov ecx, edi
mov esi, dword [r15 + 0x184]
imul rcx, rcx, 0x1e8
call sub.msvcrt.dll_malloc
test rax, rax
mov rcx, rax
mov qword [r15 + 0xc8], rax
je 0x47aabc
mov eax, esi
xor edx, edx
mov qword [rsp + 0x38], r13
div edi
lea rdi, [r15 + 0x1f0]
mov qword [rsp + 0x40], r12
mov r13, r15
mov qword [rsp + 0x48], r14
mov r12, rdi
mov dword [rsp + 0x30], eax
add eax, 1
mov dword [rsp + 0x34], edx
mov r15d, eax
jmp 0x47a9fe
mov qword [r14 + 0x170], 0xffffffffffffffff
mov qword [r14 + 0x168], 0xffffffffffffffff
cmp dword [rsp + 0x34], ebx
mov eax, dword [rsp + 0x30]
lea rsi, [r14 + 0x130]
mov edx, 0x10
mov rcx, rsi
cmova eax, r15d
mov dword [r14 + 0x184], eax
call rbp
test eax, eax
je 0x47b0ac
mov rdx, qword [r13 + 0xe8]
lea rcx, [r14 + 0xf8]
lea r8, [0x00479250]
mov r9, r14
call fcn.0047c140
test eax, eax
je 0x47b0d2
add ebx, 1
cmp ebx, dword [r13 + 0xf0]
jae 0x47b111
mov rcx, qword [r13 + 0xc8]
mov r9d, ebx
mov rax, qword [r13]
mov rsi, r13
imul r9, r9, 0x1e8
lea r14, [rcx + r9]
lea rdi, [r14 + 8]
mov qword [r14], rax
mov rcx, r14
mov rax, qword [r12 - 0x10]
and rdi, 0xfffffffffffffff8
sub rcx, rdi
sub rsi, rcx
add ecx, 0x1e8
mov qword [r14 + 0x1e0], rax
shr ecx, 3
rep movsq qword [rdi], qword [rsi]
mov qword [r14 + 0xc0], r13
mov dword [r14 + 0xf0], 0
mov qword [r14 + 0xc8], 0
test byte [r13 + 0x195], 4
je 0x47a980
lea rcx, [r14 + 0x168]
mov edx, 1
call fcn.0047ca90
test eax, eax
jne 0x47a996
mov r15, r13
mov r12, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
mov r13, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.0047c1a0
lea rdx, str.Failed_to_create_worker_inter_thread_communication_channel:__s_n
mov r8, rax
mov rcx, r15
call fcn.0047b4a0
test ebx, ebx
jne 0x47b258
cmp r12, 0xffffffffffffffff
je 0x47aad3
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
jne 0x47b273
mov rcx, r14
mov rbx, qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
call rbx
mov rcx, qword [r15 + 0xc8]
test rcx, rcx
je 0x47ac26
call sub.msvcrt.dll_free
jmp 0x47ac26
lea rcx, [r15 + 0x168]
mov edx, 1
call fcn.0047ca90
test eax, eax
jne 0x47a7b2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.0047c1a0
lea rdx, str.Failed_to_create_inter_thread_communication_channel:__s_n
mov r8, rax
mov rcx, r15
call fcn.0047b4a0
nop dword [rax + rax]
mov rcx, r15
call sub.msvcrt.dll_free
xor r15d, r15d
mov rax, r15
add rsp, 0x128
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, str.Warning:_MHD_USE_THREAD_PER_CONNECTION_must_be_used_only_with_MHD_USE_INTERNAL_POLLING_THREAD._Flag_MHD_USE_INTERNAL_POLLING_THREAD_was_added._Consider_setting_MHD_USE_INTERNAL_POLLING_THREAD_explicitly._n
mov rcx, r15
call fcn.0047b4a0
mov eax, dword [r15 + 0x194]
or eax, 8
or ah, 4
mov edx, eax
jmp 0x47a758
mov eax, ebp
or eax, 0x40
test bpl, 8
cmovne ebp, eax
jmp 0x47a657
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.0047c1a0
lea rdx, str.Failed_to_set_nonblocking_mode_on_listening_socket:__s_n
mov r8, rax
mov rcx, r15
call fcn.0047b4a0
test byte [r15 + 0x195], 2
jne 0x47abd8
mov eax, dword [r15 + 0xf0]
test eax, eax
je 0x47a8e0
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x47adc0
lea r9, str.Close_socket_failed._n
mov r8d, 0x16d4
lea rdx, str.T:_Bin_prep_mhd_src_libmicrohttpd_0.9.58_src_microhttpd_daemon.c
mov rcx, qword [0x004e5ae0]
call qword [0x004e5ae8]
nop word [rax + rax]
lea rdx, str.MHD_thread_pooling_only_works_with_MHD_USE_INTERNAL_POLLING_THREAD_n
mov rcx, r15
call fcn.0047b4a0
mov rbx, qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rcx, qword [r15 + 0x1a8]
call sub.msvcrt.dll_free
mov rcx, r13
call rbx
mov rcx, qword [r15 + 0x168]
cmp rcx, 0xffffffffffffffff
je 0x47ab40
mov rbx, qword [sym.imp.WS2_32.dll_closesocket]
call rbx
test eax, eax
mov rcx, qword [r15 + 0x170]
jne 0x47b26c
call rbx
test eax, eax
je 0x47ab40
lea r9, str.Failed_to_destroy_ITC._n
mov r8d, 0x17dd
lea rdx, str.T:_Bin_prep_mhd_src_libmicrohttpd_0.9.58_src_microhttpd_daemon.c
mov rcx, qword [0x004e5ae0]
call qword [0x004e5ae8]
nop dword [rax + rax]
test ch, 1
je 0x47ae74
lea r14, [r15 + 0x108]
mov edx, 0x10
mov rcx, r14
call rbp
test eax, eax
jne 0x47a8f9
lea rdx, str.MHD_failed_to_initialize_IP_connection_limit_mutex_n
mov rcx, r15
call fcn.0047b4a0
jmp 0x47adc0
lea rsi, [r15 + 0x130]
mov edx, 0x10
mov rcx, rsi
call rbp
test eax, eax
je 0x47adf0
mov eax, dword [r15 + 0x194]
and eax, 0x108
cmp eax, 8
jne 0x47ab4b
mov edi, dword [r15 + 0xf0]
test edi, edi
jne 0x47a91d
mov rdx, qword [r15 + 0xe8]
lea rcx, [r15 + 0xf8]
lea r8, [0x00479250]
mov r9, r15
call fcn.0047c140
test eax, eax
jne 0x47ab4b
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
lea rdx, str.Failed_to_create_listen_thread:__s_n
mov r8, rax
mov rcx, r15
call fcn.0047b4a0
mov rcx, rsi
mov rbx, qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
call rbx
mov rcx, r14
call rbx
cmp r12, 0xffffffffffffffff
je 0x47ac26
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x47ac26
lea r9, str.Close_socket_failed._n
mov r8d, 0x1738
lea rdx, str.T:_Bin_prep_mhd_src_libmicrohttpd_0.9.58_src_microhttpd_daemon.c
mov rcx, qword [0x004e5ae0]
call qword [0x004e5ae8]
nop
lea rdx, str.MHD_failed_to_initialize_IP_connection_limit_mutex_n
mov rcx, r15
call fcn.0047b4a0
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
jne 0x47b294
mov rbx, qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x47ac26
lea rdx, str.Specified_value_for_NC_SIZE_too_large_n
mov rcx, r15
call fcn.0047b4a0
mov rcx, r15
xor r15d, r15d
call sub.msvcrt.dll_free
jmp 0x47ab4b
lea rdx, str.MHD_failed_to_initialize_IP_connection_limit_mutex_n
mov rcx, r15
call fcn.0047b4a0
mov rcx, rsi
mov rbx, qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
call rbx
cmp r12, 0xffffffffffffffff
je 0x47ac26
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x47ac26
lea r9, str.Close_socket_failed._n
mov r8d, 0x170e
lea rdx, str.T:_Bin_prep_mhd_src_libmicrohttpd_0.9.58_src_microhttpd_daemon.c
mov rcx, qword [0x004e5ae0]
call qword [0x004e5ae8]
nop word [rax + rax]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.0047c1a0
lea rdx, str.Failed_to_get_listen_port_number:__s_n
mov r8, rax
mov rcx, r15
call fcn.0047b4a0
jmp 0x47a8d0
and ecx, 0x10
call fcn.0047ce80
cmp rax, 0xffffffffffffffff
mov r12, rax
je 0x47b081
cmp dword [r15 + 0x160], 0
je 0x47aec4
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x58]
mov r8d, 4
jg 0x47aeae
mov r8d, 0xfffffffb
mov edx, 0xffff
mov rcx, r12
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x47b209
mov eax, dword [r15 + 0x194]
movzx r14d, r14w
mov rdx, qword [rsp + 0x68]
test al, 0x10
je 0x47b010
test rdx, rdx
mov dword [rsp + 0x5c], 0x1c
je 0x47b194
mov qword [r15 + 0x158], r12
and eax, 0x810
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0xa0]
cmp eax, 0x810
mov r8d, 0x1b
mov edx, 0x29
setne al
mov rcx, r12
movzx eax, al
mov dword [rsp + 0xa0], eax
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x47b234
mov rdx, qword [rsp + 0x68]
mov r8d, dword [rsp + 0x5c]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x47b02d
mov edx, dword [r15 + 0x1e4]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
jns 0x47a849
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.0047c1a0
lea rdx, str.Failed_to_listen_for_connections:__s_n
mov r8, rax
mov rcx, r15
call fcn.0047b4a0
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x47adc0
lea r9, str.Close_socket_failed._n
mov r8d, 0x167b
lea rdx, str.T:_Bin_prep_mhd_src_libmicrohttpd_0.9.58_src_microhttpd_daemon.c
mov rcx, qword [0x004e5ae0]
call qword [0x004e5ae8]
nop dword [rax]
lea rdx, str.MHD_failed_to_initialize_nonce_nc_mutex_n
mov rcx, r15
call fcn.0047b4a0
mov rcx, qword [r15 + 0x1a8]
call sub.msvcrt.dll_free
mov rcx, r15
xor r15d, r15d
call sub.msvcrt.dll_free
jmp 0x47ab4b
movzx ecx, word [rsp + 0xa2]
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [r15 + 0x198], ax
jmp 0x47a8d0
test rdx, rdx
mov dword [rsp + 0x5c], 0x10
je 0x47b135
mov qword [r15 + 0x158], r12
jmp 0x47af3c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.0047c1a0
lea rdx, str.Failed_to_bind_to_port__u:__s_n
mov r9, rax
mov r8d, r14d
mov rcx, r15
call fcn.0047b4a0
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x47adc0
lea r9, str.Close_socket_failed._n
mov r8d, 0x165d
lea rdx, str.T:_Bin_prep_mhd_src_libmicrohttpd_0.9.58_src_microhttpd_daemon.c
mov rcx, qword [0x004e5ae0]
call qword [0x004e5ae8]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.0047c1a0
lea rdx, str.Failed_to_create_socket_for_listening:__s_n
mov r8, rax
mov rcx, r15
call fcn.0047b4a0
mov rbx, qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x47ac26
mov r15, r13
lea rdx, str.MHD_failed_to_initialize_cleanup_connection_mutex_n
mov r12, qword [rsp + 0x40]
mov rcx, r15
mov r14, qword [rsp + 0x48]
mov r13, qword [rsp + 0x38]
call fcn.0047b4a0
jmp 0x47aab4
mov r15, r13
mov r12, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
mov r13, qword [rsp + 0x38]
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
lea rdx, str.Failed_to_create_pool_thread:__s_n
mov rcx, r15
mov r8, rax
call fcn.0047b4a0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x47aab4
mov r15, r13
jmp 0x47ab4b
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
lea rdx, str.Failed_to_allocate_memory_for_nonce_nc_map:__s_n
mov r8, rax
jmp 0x47ab30
xor ecx, ecx
mov r8d, 2
lea rsi, [rsp + 0x70]
mov word [rsp + 0x7e], cx
mov qword [rsp + 0x72], 0
mov ecx, r14d
mov dword [rsp + 0x7a], 0
mov word [rsp + 0x70], r8w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x72], ax
mov eax, dword [r15 + 0x194]
mov qword [rsp + 0x68], rsi
mov rdx, rsi
mov qword [r15 + 0x158], r12
mov ecx, eax
and ecx, 0x10
test ecx, ecx
je 0x47af3c
jmp 0x47aef4
xor r9d, r9d
mov r10d, 0x17
mov qword [rsp + 0x82], 0
mov qword [rsp + 0x8a], 0
mov qword [rsp + 0x92], 0
mov ecx, r14d
mov word [rsp + 0x9a], r9w
mov word [rsp + 0x80], r10w
lea rsi, [rsp + 0x80]
call qword [sym.imp.WS2_32.dll_htons]
mov qword [rsp + 0x88], 0
mov word [rsp + 0x82], ax
mov qword [rsp + 0x90], 0
jmp 0x47b16c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.0047c1a0
lea rdx, str.setsockopt_failed:__s_n
mov r8, rax
mov rcx, r15
call fcn.0047b4a0
mov rbx, qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x47ac26
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.0047c1a0
lea rdx, str.setsockopt_failed:__s_n
mov r8, rax
mov rcx, r15
call fcn.0047b4a0
jmp 0x47af37
mov dword [r15 + 0xf0], ebx
mov rcx, r15
call sym.xmrig.exe_MHD_stop_daemon
jmp 0x47ab48
call rbx
jmp 0x47ac6a
lea r9, str.Close_socket_failed._n
mov r8d, 0x17af
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.Close_socket_failed._n
mov r8d, 0x1700
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 word cs:[rax + rax]