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

Disassembly:
push rbp
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x17]
sub rsp, 0x88
mov rax, qword [0x180084088]
xor rax, rsp
mov qword [rbp + 7], rax
mov r12, qword [rbp + 0x7f]
mov r14, r9
mov dword [rbp - 0x39], 1
mov r15, r8
mov qword [rbp - 0x31], 0
movzx r13d, dx
mov edi, ecx
bt ecx, 9
jae 0x180022501
xor eax, eax
jmp 0x180022792
mov eax, ecx
and eax, 2
test al, al
jne 0x1800224fa
bt ecx, 0xe
jb 0x1800224fa
mov qword [rsp + 0x80], rsi
bt ecx, 0xf
jae 0x180022524
or edi, 0x2400
mov rsi, qword [rbp + 0x6f]
test rsi, rsi
je 0x180023114
mov ecx, edi
and ecx, 0x240
cmp ecx, 0x240
je 0x180023114
mov eax, edi
and eax, 0x204
cmp eax, 0x204
je 0x180023114
mov eax, edi
and al, 0x4c
cmp al, 0x40
je 0x180023114
test ecx, ecx
setne cl
bt edi, 0x10
setb al
test al, cl
jne 0x180023114
mov qword [rsp + 0xd0], rbx
bt edi, 0x10
jae 0x18002259a
mov eax, edi
and eax, 4
test al, al
jne 0x180022597
mov eax, edi
and eax, 8
test al, al
je 0x18002259a
or edi, 0x40
mov edx, 0x1e8
mov ecx, 1
call fcn.180033dac
mov rbx, rax
test rax, rax
je 0x180022780
mov qword [rax + 0x158], 0xffffffffffffffff
xor eax, eax
mov dword [rbx + 0x160], eax
mov eax, edi
shr eax, 5
and eax, 1
mov dword [rbx + 0x194], edi
mov dword [rbx + 0x19c], eax
xor edi, edi
mov rax, qword [rbp + 0x77]
mov qword [rbx + 8], rax
lea rax, [0x180021ee0]
mov qword [rbx + 0x60], r15
mov r15d, 2
mov qword [rbx + 0xa0], rax
mov ecx, r15d
mov word [rbx + 0x198], r13w
lea rax, [0x180008ac0]
mov qword [rbx + 0x68], r14
mov qword [rbx], rsi
mov dword [rbx + 0x180], edi
mov dword [rbx + 0x184], 0x7fe
mov qword [rbx + 0xd8], 0x8000
mov qword [rbx + 0xe0], 0x400
mov qword [rbx + 0x188], rdi
mov qword [rbx + 0x170], 0xffffffffffffffff
mov qword [rbx + 0x168], 0xffffffffffffffff
mov qword [rbx + 0xb0], rax
mov dword [rbx + 0x1e4], 0x7fffffff
call fcn.1800333cc
mov qword [rbx + 0xb8], rax
mov eax, dword [rbx + 0x194]
and al, 0xc
cmp al, 4
jne 0x180022699
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, rbx
call fcn.180029dd0
or dword [rbx + 0x194], 8
mov ecx, dword [rbx + 0x194]
mov eax, ecx
and eax, 8
test al, al
jne 0x1800226ae
btr ecx, 0xa
jmp 0x1800226b2
bts ecx, 0xa
mov dword [rbx + 0x194], ecx
lea rdx, [rbp - 0x31]
mov rcx, rbx
mov qword [rbx + 0x1d8], rdi
mov r8, r12
mov qword [rbx + 0x1a0], rdi
mov dword [rbx + 0x1e0], 4
call fcn.180021f50
mov rcx, rbx
cmp eax, 1
jne 0x18002277b
lea rdx, str.Using_debug_build_of_libmicrohttpd._n
call fcn.180029dd0
test dword [rbx + 0x194], 0x400
je 0x18002273c
cmp dword [rbx + 0xf0], edi
jne 0x18002273c
lea rcx, [rbx + 0x168]
call fcn.1800297f0
test eax, eax
jne 0x18002273c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180029280
lea rdx, str.Failed_to_create_inter_thread_communication_channel:__s_n
mov r8, rax
mov rcx, rbx
call fcn.180029dd0
jmp 0x180022778
mov eax, dword [rbx + 0x1e0]
test eax, eax
je 0x1800227e4
imul r8, rax, 0x98
mov ecx, eax
movabs rax, 0xd79435e50d79435f
mul r8
shr rdx, 7
cmp rdx, rcx
je 0x1800227b0
lea rdx, str.Specified_value_for_NC_SIZE_too_large_n
mov rcx, rbx
call fcn.180029dd0
mov rcx, rbx
call fcn.18002fdc4
xor eax, eax
mov rbx, qword [rsp + 0xd0]
mov rsi, qword [rsp + 0x80]
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.18002b180
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret
mov rcx, r8
call fcn.1800300a4
mov qword [rbx + 0x1a8], rax
test rax, rax
jne 0x1800227e4
call fcn.180035640
mov ecx, dword [rax]
call fcn.180037a80
lea rdx, str.Failed_to_allocate_memory_for_nonce_nc_map:__s_n
mov r8, rax
mov rcx, rbx
call fcn.180029dd0
jmp 0x180022778
lea rsi, [rbx + 0x1b0]
mov edx, reloc.WS2_32.dll_recv
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x18002281d
lea rdx, str.MHD_failed_to_initialize_nonce_nc_mutex_n
mov rcx, rbx
call fcn.180029dd0
mov rcx, qword [rbx + 0x1a8]
call fcn.18002fdc4
jmp 0x180022778
mov ecx, dword [rbx + 0x194]
mov eax, ecx
and eax, 8
test al, al
jne 0x180022848
cmp dword [rbx + 0xf0], edi
jbe 0x180022848
lea rdx, str.MHD_thread_pooling_only_works_with_MHD_USE_INTERNAL_POLLING_THREAD_n
mov rcx, rbx
call fcn.180029dd0
jmp 0x180023094
mov r14, qword [rbx + 0x158]
mov edx, 0x1c
lea r12d, [rdx - 5]
cmp r14, 0xffffffffffffffff
jne 0x180022aec
bt ecx, 8
jb 0x180022aec
and ecx, 0x10
call fcn.180029b10
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x1800228a1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180029280
mov r8, rax
lea rdx, str.Failed_to_create_socket_for_listening:__s_n
mov rcx, rbx
call fcn.180029dd0
jmp 0x180023094
mov eax, dword [rbx + 0x160]
test eax, eax
je 0x180022929
mov dword [rsp + 0x20], 4
lea r9, [rbp - 0x39]
mov edx, 0xffff
mov rcx, r14
jle 0x1800228f5
mov r8d, 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x180022929
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180029280
mov r8, rax
lea rdx, [0x1800892b8]
mov rcx, rbx
call fcn.180029dd0
jmp 0x180023094
mov r8d, 0xfffffffb
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x180022929
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180029280
mov r8, rax
lea rdx, [0x1800890a8]
mov rcx, rbx
call fcn.180029dd0
jmp 0x180023094
movzx eax, byte [rbx + 0x194]
mov ecx, reloc.WS2_32.dll_recv
and al, cl
mov eax, 0x1c
cmovne ecx, eax
mov dword [rbp - 0x41], ecx
cmp qword [rbp - 0x31], rdi
jne 0x1800229ab
mov eax, dword [rbx + 0x194]
movzx ecx, r13w
and eax, 0x10
test al, al
je 0x18002298a
xor eax, eax
mov qword [rbp - 0x19], rax
mov word [rbp - 0x19], r12w
mov qword [rbp - 0x11], rax
mov qword [rbp - 9], rax
mov dword [rbp - 1], eax
call qword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [0x1800772d8]
mov word [rbp - 0x17], ax
lea rax, [rbp - 0x19]
movups xmmword [rbp - 0x11], xmm0
jmp 0x1800229a7
xor eax, eax
mov qword [rbp - 0x29], rax
mov word [rbp - 0x29], r15w
mov qword [rbp - 0x21], rax
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x27], ax
lea rax, [rbp - 0x29]
mov qword [rbp - 0x31], rax
mov qword [rbx + 0x158], r14
mov ecx, dword [rbx + 0x194]
mov eax, ecx
and eax, 0x10
test al, al
je 0x180022a16
and ecx, 0x810
mov dword [rsp + 0x20], 4
cmp ecx, 0x810
lea r9, [rbp - 0x3d]
mov eax, edi
mov edx, 0x29
setne al
mov rcx, r14
mov dword [rbp - 0x3d], eax
lea r8d, [rdx - 0xe]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x180022a16
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180029280
mov r8, rax
lea rdx, str.setsockopt_failed:__s_n
mov rcx, rbx
call fcn.180029dd0
mov r8d, dword [rbp - 0x41]
mov rcx, r14
mov rdx, qword [rbp - 0x31]
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x180022a82
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180029280
mov r9, rax
movzx r8d, r13w
lea rdx, str.Failed_to_bind_to_port__u:__s_n
mov rcx, rbx
call fcn.180029dd0
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x180023094
mov rcx, qword [0x180092bb0]
lea r9, [0x180089490]
mov r8d, 0x165d
lea rdx, [0x180089430]
call qword [0x180092bc8]
int3
mov edx, dword [rbx + 0x1e4]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
jns 0x180022ae7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180029280
mov r8, rax
lea rdx, str.Failed_to_listen_for_connections:__s_n
mov rcx, rbx
call fcn.180029dd0
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x180023094
mov rcx, qword [0x180092bb0]
lea r9, [0x1800894a8]
mov r8d, 0x167b
lea rdx, [0x180089510]
call qword [0x180092bc8]
int3
mov edx, 0x1c
cmp di, word [rbx + 0x198]
jne 0x180022bbc
mov eax, dword [rbx + 0x194]
bt eax, 8
jb 0x180022bbc
and eax, 0x10
test al, al
je 0x180022b2f
xor eax, eax
mov dword [rbp - 0x41], edx
mov qword [rbp - 0x19], rax
lea rdx, [rbp - 0x19]
mov word [rbp - 0x19], r12w
mov qword [rbp - 0x11], rax
mov qword [rbp - 9], rax
mov dword [rbp - 1], eax
jmp 0x180022b49
xor eax, eax
mov dword [rbp - 0x41], reloc.WS2_32.dll_recv
mov qword [rbp - 0x29], rax
lea rdx, [rbp - 0x29]
mov word [rbp - 0x29], r15w
mov qword [rbp - 0x21], rax
lea r8, [rbp - 0x41]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x180022b7b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180029280
mov r8, rax
lea rdx, str.Failed_to_get_listen_port_number:__s_n
mov rcx, rbx
call fcn.180029dd0
jmp 0x180022bbc
mov eax, dword [rbx + 0x194]
and eax, 0x10
test al, al
je 0x180022ba0
cmp r12w, word [rbp - 0x19]
jne 0x18002311b
movzx ecx, word [rbp - 0x17]
jmp 0x180022baf
cmp r15w, word [rbp - 0x29]
jne 0x180023161
movzx ecx, word [rbp - 0x27]
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rbx + 0x198], ax
cmp r14, 0xffffffffffffffff
je 0x180022c49
lea r8, [rbp - 0x3d]
mov dword [rbp - 0x3d], 1
mov edx, 0x8004667e
mov rcx, r14
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x180022c49
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180029280
mov r8, rax
lea rdx, str.Failed_to_set_nonblocking_mode_on_listening_socket:__s_n
mov rcx, rbx
call fcn.180029dd0
test dword [rbx + 0x194], 0x200
jne 0x180022c16
cmp dword [rbx + 0xf0], edi
jbe 0x180022c49
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x180023094
mov rcx, qword [0x180092bb0]
lea r9, [0x180089678]
mov r8d, 0x16dc
lea rdx, [0x180089760]
call qword [0x180092bc8]
int3
mov edx, reloc.WS2_32.dll_recv
lea rcx, [rbx + 0x108]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x180022cab
lea rdx, [0x180089850]
mov rcx, rbx
call fcn.180029dd0
cmp r14, 0xffffffffffffffff
je 0x180023094
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x180023094
mov rcx, qword [0x180092bb0]
lea r9, [0x180089838]
mov r8d, 0x1708
lea rdx, [0x1800898c0]
call qword [0x180092bc8]
int3
cmp dword [rbx + 0xf0], edi
jne 0x180022d22
mov edx, reloc.WS2_32.dll_recv
lea rcx, [rbx + 0x130]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x180022d22
lea rdx, str.MHD_failed_to_initialize_IP_connection_limit_mutex_n
mov rcx, rbx
call fcn.180029dd0
lea rcx, [rbx + 0x130]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
cmp r14, 0xffffffffffffffff
je 0x180023094
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x180023094
mov rcx, qword [0x180092bb0]
lea r9, [0x180089a00]
mov r8d, 0x1716
lea rdx, [0x1800899a0]
call qword [0x180092bc8]
int3
mov ecx, dword [rbx + 0x194]
mov eax, ecx
and eax, 0x108
cmp eax, 8
jne 0x18002310c
mov r8d, dword [rbx + 0xf0]
test r8d, r8d
jne 0x180022e0b
and cl, 4
lea rax, str.MHD_listen
lea rdx, str.MHD_single
cmovne rdx, rax
test rdx, rdx
jne 0x180022d6f
call fcn.180035640
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x180022d96
mov r8, qword [rbx + 0xe8]
lea rcx, [rbx + 0xf8]
lea r9, [0x180021e50]
mov qword [rsp + 0x20], rbx
call fcn.18002a220
test eax, eax
jne 0x18002310c
call fcn.180035640
mov ecx, dword [rax]
call fcn.180037a80
mov r8, rax
lea rdx, str.Failed_to_create_listen_thread:__s_n
mov rcx, rbx
call fcn.180029dd0
lea rcx, [rbx + 0x130]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea rcx, [rbx + 0x108]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
cmp r14, 0xffffffffffffffff
je 0x180023094
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x180023094
mov rcx, qword [0x180092bb0]
lea r9, [0x180089b00]
mov r8d, 0x1740
lea rdx, [0x180089bd0]
call qword [0x180092bc8]
int3
mov eax, dword [rbx + 0x184]
xor edx, edx
div r8d
imul rcx, r8, 0x1e8
mov r12d, edx
mov r15d, eax
call fcn.1800300a4
mov qword [rbx + 0xc8], rax
test rax, rax
je 0x180023041
xor r8d, r8d
mov esi, r8d
cmp dword [rbx + 0xf0], r8d
jbe 0x18002310c
nop dword [rax + rax]
mov eax, esi
mov edx, 3
imul rdi, rax, 0x1e8
mov rax, rbx
add rdi, qword [rbx + 0xc8]
mov rcx, rdi
nop dword [rax + rax]
lea rcx, [rcx + 0x80]
movups xmm0, xmmword [rax]
lea rax, [rax + 0x80]
movups xmmword [rcx - 0x80], xmm0
movups xmm1, xmmword [rax - 0x70]
movups xmmword [rcx - 0x70], xmm1
movups xmm0, xmmword [rax - 0x60]
movups xmmword [rcx - 0x60], xmm0
movups xmm1, xmmword [rax - 0x50]
movups xmmword [rcx - 0x50], xmm1
movups xmm0, xmmword [rax - 0x40]
movups xmmword [rcx - 0x40], xmm0
movups xmm1, xmmword [rax - 0x30]
movups xmmword [rcx - 0x30], xmm1
movups xmm0, xmmword [rax - 0x20]
movups xmmword [rcx - 0x20], xmm0
movups xmm1, xmmword [rax - 0x10]
movups xmmword [rcx - 0x10], xmm1
sub rdx, 1
jne 0x180022e70
movups xmm0, xmmword [rax]
movups xmmword [rcx], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rcx + 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rcx + 0x20], xmm0
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rcx + 0x30], xmm1
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rcx + 0x40], xmm0
movups xmm1, xmmword [rax + 0x50]
movups xmmword [rcx + 0x50], xmm1
mov rax, qword [rax + 0x60]
mov qword [rcx + 0x60], rax
mov qword [rdi + 0xc0], rbx
mov dword [rdi + 0xf0], r8d
mov qword [rdi + 0xc8], r8
test dword [rbx + 0x194], 0x400
je 0x180022f4e
lea rcx, [rdi + 0x168]
call fcn.1800297f0
test eax, eax
jne 0x180022f64
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180029280
mov r8, rax
lea rdx, str.Failed_to_create_worker_inter_thread_communication_channel:__s_n
mov rcx, rbx
call fcn.180029dd0
jmp 0x180023023
mov qword [rdi + 0x170], 0xffffffffffffffff
mov qword [rdi + 0x168], 0xffffffffffffffff
mov dword [rdi + 0x184], r15d
cmp esi, r12d
jae 0x180022f7a
lea eax, [r15 + 1]
mov dword [rdi + 0x184], eax
lea rcx, [rdi + 0x130]
mov edx, reloc.WS2_32.dll_recv
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
je 0x180023014
lea rax, str.MHD_worker
test rax, rax
je 0x180022fdc
mov r8, qword [rbx + 0xe8]
lea rcx, [rdi + 0xf8]
lea r9, [0x180021e50]
mov qword [rsp + 0x20], rdi
mov rdx, rax
call fcn.18002a220
test eax, eax
je 0x180022fe7
inc esi
cmp esi, dword [rbx + 0xf0]
jae 0x18002310c
xor r8d, r8d
jmp 0x180022e50
call fcn.180035640
mov dword [rax], reloc.WS2_32.dll_shutdown
call fcn.180035640
mov ecx, dword [rax]
call fcn.180037a80
mov r8, rax
lea rdx, str.Failed_to_create_pool_thread:__s_n
mov rcx, rbx
call fcn.180029dd0
lea rcx, [rdi + 0x130]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x180023023
lea rdx, str.MHD_failed_to_initialize_cleanup_connection_mutex_n
mov rcx, rbx
call fcn.180029dd0
test esi, esi
je 0x18002303a
mov rcx, rbx
mov dword [rbx + 0xf0], esi
call fcn.180023490
jmp 0x180022780
lea rsi, [rbx + 0x1b0]
cmp r14, 0xffffffffffffffff
je 0x180023076
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x180023076
mov rcx, qword [0x180092bb0]
lea r9, [0x180089d58]
mov r8d, 0x17b7
lea rdx, [0x180089df0]
call qword [0x180092bc8]
int3
lea rcx, [rbx + 0x108]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rcx, qword [rbx + 0xc8]
test rcx, rcx
je 0x180023094
call fcn.18002fdc4
mov rcx, qword [rbx + 0x1a8]
call fcn.18002fdc4
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rcx, qword [rbx + 0x168]
cmp rcx, 0xffffffffffffffff
je 0x180022778
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rbx + 0x170]
test eax, eax
jne 0x1800230e4
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
mov eax, 0
sete al
test eax, eax
je 0x1800230ea
jmp 0x180022778
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [0x180092bb0]
lea r9, [0x180089fb0]
mov r8d, 0x17e5
lea rdx, [0x180089f50]
call qword [0x180092bc8]
int3
mov rax, rbx
jmp 0x180022782
xor eax, eax
jmp 0x18002278a
mov ecx, r15d
call fcn.1800333cc
mov rcx, rax
lea r8, [0x180089570]
lea rax, str.AF_INET6__servaddr6.sin6_family
mov r9d, 0x16c0
lea rdx, [0x180089618]
mov qword [rsp + 0x20], rax
call fcn.180008b10
mov ecx, r15d
call fcn.1800333cc
mov rcx, rax
call fcn.18003392c
call fcn.180035304
int3
mov ecx, r15d
call fcn.1800333cc
mov rcx, rax
lea r8, [0x180089690]
lea rax, str.AF_INET__servaddr4.sin_family
mov r9d, 0x16c8
lea rdx, [0x180089648]
mov qword [rsp + 0x20], rax
call fcn.180008b10
mov ecx, r15d
call fcn.1800333cc
mov rcx, rax
call fcn.18003392c
call fcn.180035304
int3