Function at 0x4237e0
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xe8
mov eax, dword [0x4a206c]
xor eax, esp
mov dword [esp + 0xe4], eax
mov eax, dword [ebp + 0x18]
push esi
push edi
mov edi, ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp + 0x1c], 1
mov dword [esp + 0x10], 0
test edi, 0x200
jne 0x423a52
test edi, 2
jne 0x423a52
test edi, 0x4000
jne 0x423a52
test edi, 0x8000
je 0x42384b
or edi, 0x2400
cmp dword [ebp + 0x10], 0
je 0x423a52
mov ecx, edi
and ecx, 0x240
cmp ecx, 0x240
je 0x423a52
mov eax, edi
and eax, 0x204
cmp eax, 0x204
je 0x423a52
mov eax, edi
and al, 0x4c
cmp al, 0x40
je 0x423a52
test ecx, ecx
setne cl
bt edi, 0x10
setb al
test al, cl
jne 0x423a52
test edi, 0x10000
je 0x4238b6
test edi, 4
jne 0x4238b3
test edi, 8
je 0x4238b6
or edi, 0x40
push pe_nt_image_headers32
push 1
call fcn.0044a9b2
mov esi, eax
add esp, 8
mov dword [esp + 0x24], esi
test esi, esi
je 0x423a52
mov eax, edi
mov dword [esi + 0xb4], 0xffffffff
shr eax, 5
and eax, 1
mov dword [esi + 0xb8], 0
mov dword [esi + 0xec], eax
mov eax, dword [esp + 8]
mov word [esi + 0xe8], ax
mov eax, dword [ebp + 8]
mov dword [esi + 0x30], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x34], eax
mov eax, dword [ebp + 0x10]
mov dword [esi], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0xe4], edi
mov dword [esi + 4], eax
mov dword [esi + 0xcc], 0
mov dword [esi + 0xd0], 0x7fe
mov dword [esi + 0x6c], 0x8000
mov dword [esi + 0x70], 0x400
mov dword [esi + 0x50], 0x4232c0
mov dword [esi + 0xd8], 0
mov dword [esi + 0xdc], 0
mov dword [esi + 0xc0], 0xffffffff
mov dword [esi + 0xbc], 0xffffffff
push 2
mov dword [esi + 0x118], accept
mov dword [esi + 0x58], 0x408030
call fcn.00449f5a
mov dword [esi + 0x5c], eax
add esp, 4
mov eax, dword [esi + 0xe4]
and al, 0xc
cmp al, 4
jne 0x4239ad
push 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
push esi
call fcn.00428de0
add esp, 8
or dword [esi + 0xe4], 8
mov eax, dword [esi + 0xe4]
test al, 8
jne 0x4239be
and eax, 0xfffffbff
jmp 0x4239c3
or eax, 0x400
push dword [esp + 0xc]
mov dword [esi + 0xe4], eax
lea edx, [esp + 0x14]
mov ecx, esi
mov dword [esi + 0x110], 0
mov dword [esi + 0xf0], 0
mov dword [esi + 0x114], 4
call fcn.004233d0
add esp, 4
cmp eax, 1
jne 0x423a49
push str.Using_debug_build_of_libmicrohttpd._n
push esi
call fcn.00428de0
add esp, 8
test dword [esi + 0xe4], 0x400
je 0x423a68
cmp dword [esi + 0x78], 0
jne 0x423a68
lea ecx, [esi + 0xbc]
call fcn.00428aa0
test eax, eax
jne 0x423a68
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.00428610
push eax
push str.Failed_to_create_inter_thread_communication_channel:__s_n
push esi
call fcn.00428de0
add esp, 0xc
push esi
call fcn.00446c84
add esp, 4
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0xe4]
xor ecx, esp
call fcn.0042b571
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x114]
test ecx, ecx
je 0x423ae5
imul edi, ecx, 0x98
mov eax, 0xaf286bcb
mul edi
mov eax, edi
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 7
cmp eax, ecx
je 0x423ab8
push str.Specified_value_for_NC_SIZE_too_large_n
push esi
call fcn.00428de0
push esi
call fcn.00446c84
add esp, 0xc
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0xe4]
xor ecx, esp
call fcn.0042b571
mov esp, ebp
pop ebp
ret
push edi
call fcn.00446ef7
add esp, 4
mov dword [esi + 0xf4], eax
test eax, eax
jne 0x423ae5
call fcn.0044c2cd
push dword [eax]
call fcn.0044f2f7
add esp, 4
push eax
push str.Failed_to_allocate_memory_for_nonce_nc_map:__s_n
jmp 0x423a40
lea eax, [esi + 0xf8]
push 0x10
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x423b13
push str.MHD_failed_to_initialize_nonce_nc_mutex_n
push esi
call fcn.00428de0
push dword [esi + 0xf4]
call fcn.00446c84
jmp 0x423a46
mov eax, dword [esi + 0xe4]
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
test al, 8
jne 0x423b3c
cmp dword [esi + 0x78], 0
jbe 0x423b3c
push str.MHD_thread_pooling_only_works_with_MHD_USE_INTERNAL_POLLING_THREAD_n
push esi
call fcn.00428de0
add esp, 8
jmp 0x423bdb
mov edi, dword [esi + 0xb4]
mov dword [esp + 0x18], edi
cmp edi, 0xffffffff
jne 0x423e3b
test eax, 0x100
jne 0x423e3b
push 0x80
push 0
push 0
test al, 0x10
mov ecx, 0x17
push 0
mov eax, 2
cmovne eax, ecx
push 1
push eax
mov dword [esp + 0x24], eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov edi, eax
mov dword [esp + 0x18], edi
cmp edi, 0xffffffff
jne 0x423c2a
push 0
push 1
push dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
mov dword [esp + 0x18], eax
cmp edi, 0xffffffff
je 0x423bb9
push 0
push 1
push edi
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
cmp edi, 0xffffffff
jne 0x423c2a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.00428610
push eax
push str.Failed_to_create_socket_for_listening:__s_n
push esi
call fcn.00428de0
add esp, 0xc
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
push dword [esi + 0xf4]
call fcn.00446c84
add esp, 4
lea eax, [esi + 0xf8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [esi + 0xbc]
cmp eax, 0xffffffff
je 0x423a49
push eax
call edi
push dword [esi + 0xc0]
test eax, eax
jne 0x424336
call edi
neg eax
sbb eax, eax
add eax, 1
je 0x424338
jmp 0x423a49
mov eax, dword [esi + 0xb8]
mov ecx, dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x423c8f
push 4
lea eax, [esp + 0x20]
push eax
jle 0x423c69
push 4
push 0xffff
push edi
call ecx
test eax, eax
jns 0x423c8f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.00428610
push eax
push 0x4a50d4
jmp 0x423bcc
push 0xfffffffffffffffb
push 0xffff
push edi
call ecx
test eax, eax
jns 0x423c8f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.00428610
push eax
push 0x4a518c
jmp 0x423bcc
test byte [esi + 0xe4], 0x10
mov eax, 0x10
mov ecx, 0x1c
cmovne eax, ecx
cmp dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
jne 0x423d1d
test dword [esi + 0xe4], 0x10
xorps xmm0, xmm0
push dword [esp + 8]
je 0x423cfb
mov eax, 0x17
movaps xmmword [esp + 0x44], xmm0
movq qword [esp + 0x54], xmm0
mov dword [esp + 0x5c], 0
mov word [esp + 0x44], ax
call dword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [0x497374]
mov word [esp + 0x42], ax
lea eax, [esp + 0x40]
movups xmmword [esp + 0x48], xmm0
jmp 0x423d19
mov eax, 2
movaps xmmword [esp + 0x34], xmm0
mov word [esp + 0x34], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x32], ax
lea eax, [esp + 0x30]
mov dword [esp + 0x10], eax
mov dword [esi + 0xb4], edi
mov ecx, dword [esi + 0xe4]
test ecx, 0x10
je 0x423d78
xor eax, eax
and ecx, 0x810
cmp ecx, 0x810
push 4
setne al
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push eax
push 0x1b
push 0x29
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x423d78
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.00428610
push eax
push str.setsockopt_failed:__s_n
push esi
call fcn.00428de0
add esp, 0xc
push dword [esp + 0x14]
push dword [esp + 0x14]
push edi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x423ddf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.00428610
push eax
mov eax, dword [esp + 0xc]
movzx eax, ax
push eax
push str.Failed_to_bind_to_port__u:__s_n
push esi
call fcn.00428de0
add esp, 0x10
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x423bdb
push 0x4a5404
push 0x165d
push 0x4a7440
push dword [0x4b03b8]
call dword [0x4b03b0]
add esp, 0x10
push dword [esi + 0x118]
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jns 0x423e3b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.00428610
push eax
push str.Failed_to_listen_for_connections:__s_n
push esi
call fcn.00428de0
add esp, 0xc
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x423bdb
push 0x4a553c
push 0x167b
push 0x4a7498
push dword [0x4b03b8]
call dword [0x4b03b0]
add esp, 0x10
xor eax, eax
cmp ax, word [esi + 0xe8]
jne 0x423edb
test dword [esi + 0xe4], 0x100
jne 0x423edb
push 0x80
push eax
lea eax, [esp + 0x70]
push eax
call fcn.00443980
add esp, 0xc
mov dword [esp + 0x14], 0x80
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x6c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x423ea8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.00428610
push eax
push str.Failed_to_get_listen_port_number:__s_n
push esi
call fcn.00428de0
add esp, 0xc
jmp 0x423edb
movzx eax, word [esp + 0x68]
sub eax, 1
je 0x423ed2
sub eax, 1
je 0x423f76
sub eax, 0x15
je 0x423f50
push str.Unknown_address_family__n
push esi
call fcn.00428de0
add esp, 8
xor eax, eax
mov word [esi + 0xe8], ax
cmp edi, 0xffffffff
je 0x423f85
mov ecx, edi
call fcn.00428cb0
test eax, eax
jne 0x423f85
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.00428610
push eax
push str.Failed_to_set_nonblocking_mode_on_listening_socket:__s_n
push esi
call fcn.00428de0
add esp, 0xc
test dword [esi + 0xe4], 0x200
jne 0x423f21
cmp dword [esi + 0x78], 0
jbe 0x423f85
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x423bdb
push 0x4a57a4
push 0x16d4
push 0x4a75b8
push dword [0x4b03b8]
call dword [0x4b03b0]
add esp, 0x10
push dword [esp + 0x6a]
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esi + 0xe8], ax
test dword [esi + 0xe4], 0x10
jne 0x423edb
jmp 0x424356
push dword [esp + 0x6a]
call dword [sym.imp.WS2_32.dll_ntohs]
jmp 0x423ed4
lea eax, [esi + 0x84]
push 0x10
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x423fde
push 0x4a52ac
push esi
call fcn.00428de0
add esp, 8
cmp edi, 0xffffffff
je 0x423bd5
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x423bdb
push 0x4a5974
push 0x1700
push 0x4a7678
push dword [0x4b03b8]
call dword [0x4b03b0]
add esp, 0x10
cmp dword [esi + 0x78], 0
jne 0x42404b
lea eax, [esi + 0x9c]
push 0x10
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x42404b
push str.MHD_failed_to_initialize_IP_connection_limit_mutex_n
push esi
call fcn.00428de0
add esp, 8
lea eax, [esi + 0x9c]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
call eax
cmp edi, 0xffffffff
je 0x423bd5
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x423bdb
push 0x4a5a1c
push 0x170e
push 0x4a7738
push dword [0x4b03b8]
call dword [0x4b03b0]
add esp, 0x10
mov ecx, dword [esi + 0xe4]
mov eax, ecx
and eax, 0x108
cmp eax, 8
jne 0x424237
mov eax, dword [esi + 0x78]
test eax, eax
jne 0x42411a
test cl, 4
mov eax, str.MHD_single
mov edx, str.MHD_listen
cmove edx, eax
xor al, al
je 0x42408d
call fcn.0044c2cd
mov dword [eax], 0x16
jmp 0x4240a9
push esi
push 0x423260
push dword [esi + 0x74]
lea ecx, [esi + 0x7c]
call fcn.004290f0
add esp, 0xc
test eax, eax
jne 0x424237
call fcn.0044c2cd
push dword [eax]
call fcn.0044f2f7
add esp, 4
push eax
push str.Failed_to_create_listen_thread:__s_n
push esi
call fcn.00428de0
add esp, 0xc
lea eax, [esi + 0x9c]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
call eax
lea eax, [esi + 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
cmp edi, 0xffffffff
je 0x423bd5
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x423bdb
push 0x4a5adc
push 0x1738
push 0x4a7858
push dword [0x4b03b8]
call dword [0x4b03b0]
add esp, 0x10
mov eax, dword [esi + 0xd0]
xor edx, edx
mov ecx, dword [esi + 0x78]
div ecx
lea ecx, [ecx + ecx*8]
shl ecx, 5
push ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], eax
call fcn.00446ef7
add esp, 4
mov dword [esi + 0x64], eax
test eax, eax
je 0x4242da
cmp dword [esi + 0x78], 0
mov dword [esp + 8], 0
jbe 0x424237
xor eax, eax
mov dword [esp + 0xc], eax
mov edx, dword [esi + 0x64]
mov ecx, 0x48
add edx, eax
mov edi, edx
mov dword [esp + 0x20], edx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x24]
mov dword [edx + 0x60], esi
mov dword [edx + 0x78], 0
mov dword [edx + 0x64], 0
test dword [esi + 0xe4], 0x400
je 0x4241ad
lea ecx, [edx + 0xbc]
call fcn.00428aa0
test eax, eax
je 0x42424d
mov edx, dword [esp + 0x20]
jmp 0x4241c1
mov dword [edx + 0xc0], 0xffffffff
mov dword [edx + 0xbc], 0xffffffff
mov edi, dword [esp + 8]
mov eax, dword [esp + 0x28]
mov dword [edx + 0xd0], eax
cmp edi, dword [esp + 0x2c]
jae 0x4241dc
inc eax
mov dword [edx + 0xd0], eax
lea eax, [edx + 0x9c]
push 0x10
push eax
mov dword [esp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
je 0x4242a4
xor al, al
jne 0x42426f
mov ecx, dword [esp + 0x20]
mov edx, str.MHD_worker
push ecx
push 0x423260
push dword [esi + 0x74]
add ecx, 0x7c
call fcn.004290f0
add esp, 0xc
test eax, eax
je 0x42427a
mov eax, dword [esp + 0xc]
inc edi
add eax, 0x120
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
cmp edi, dword [esi + 0x78]
jb 0x424161
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0xe4]
xor ecx, esp
call fcn.0042b571
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.00428610
push eax
push str.Failed_to_create_worker_inter_thread_communication_channel:__s_n
push esi
call fcn.00428de0
mov edi, dword [esp + 0x14]
add esp, 0xc
jmp 0x4242b2
call fcn.0044c2cd
mov dword [eax], 0x16
call fcn.0044c2cd
push dword [eax]
call fcn.0044f2f7
add esp, 4
push eax
push str.Failed_to_create_pool_thread:__s_n
push esi
call fcn.00428de0
add esp, 0xc
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x4242b2
push str.MHD_failed_to_initialize_cleanup_connection_mutex_n
push esi
call fcn.00428de0
add esp, 8
test edi, edi
je 0x4242d6
mov ecx, esi
mov dword [esi + 0x78], edi
call fcn.00424620
mov ecx, dword [esp + 0xec]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.0042b571
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0x18]
cmp edi, 0xffffffff
je 0x42430a
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x424310
push 0x4a5b94
push 0x17af
push 0x4a7a18
push dword [0x4b03b8]
call dword [0x4b03b0]
add esp, 0x10
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [esi + 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [esi + 0x64]
test eax, eax
je 0x423bdb
push eax
call fcn.00446c84
add esp, 4
jmp 0x423bdb
call edi
push 0x4a5cdc
push 0x17dd
push 0x4a7bb0
push dword [0x4b03b8]
call dword [0x4b03b0]
add esp, 0x10
push str.0____pflags__MHD_USE_IPv6_
push 0x16b2
push 0x4a74f8
push 0x4a754c
push 2
call fcn.00449f5a
add esp, 4
push eax
call fcn.00408050
add esp, 0x14
push 2
call fcn.00449f5a
add esp, 4
push eax
call fcn.0044a5b8
add esp, 4
call fcn.0044ca25
int3