Function at 0x4bc5c0
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 [0x53c074]
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, 0x4202
jne 0x4bc81e
mov edx, ecx
test edi, 0x8000
je 0x4bc617
or edi, 0x2400
mov edx, edi
cmp dword [ebp + 0x10], 0
je 0x4bc81e
mov ecx, edx
and ecx, 0x240
cmp ecx, 0x240
je 0x4bc81e
mov eax, edx
and eax, 0x204
cmp eax, 0x204
je 0x4bc81e
mov eax, edx
and al, 0x4c
cmp al, 0x40
je 0x4bc81e
test ecx, ecx
setne cl
bt edi, 0x10
setb al
test al, cl
jne 0x4bc81e
test edx, 0x10000
je 0x4bc67c
test edx, 0xc
je 0x4bc67c
mov edi, edx
or edi, 0x40
push pe_nt_image_headers32
push 1
call fcn.004cead8
mov esi, eax
add esp, 8
mov dword [esp + 0x24], esi
test esi, esi
je 0x4bc81e
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], 0x4bc0e0
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], connect
mov dword [esi + 0x58], 0x403890
call fcn.004cb8fa
mov dword [esi + 0x5c], eax
add esp, 4
mov edx, dword [esi + 0xe4]
mov eax, edx
and al, 0xc
cmp al, 4
jne 0x4bc777
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.004c1e90
mov edx, dword [esi + 0xe4]
add esp, 8
or edx, 8
mov ecx, edx
mov eax, edx
and ecx, 0xfffffbff
or eax, 0x400
test edx, 8
lea edx, [esp + 0x10]
cmove eax, ecx
mov ecx, esi
mov dword [esi + 0xe4], eax
push dword [esp + 0xc]
mov dword [esi + 0x110], 0
mov dword [esi + 0xf0], 0
mov dword [esi + 0x114], 4
call fcn.004bc1e0
add esp, 4
cmp eax, 1
jne 0x4bc815
push str.Using_debug_build_of_libmicrohttpd._n
push esi
call fcn.004c1e90
add esp, 8
test dword [esi + 0xe4], 0x400
je 0x4bc834
cmp dword [esi + 0x78], 0
jne 0x4bc834
lea ecx, [esi + 0xbc]
call fcn.004c1b20
test eax, eax
jne 0x4bc834
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.004c1690
push eax
push str.Failed_to_create_inter_thread_communication_channel:__s_n
push esi
call fcn.004c1e90
add esp, 0xc
push esi
call fcn.004cc9e5
add esp, 4
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0xe4]
xor ecx, esp
call fcn.004c3717
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x114]
test ecx, ecx
je 0x4bc8b1
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 0x4bc884
push str.Specified_value_for_NC_SIZE_too_large_n
push esi
call fcn.004c1e90
push esi
call fcn.004cc9e5
add esp, 0xc
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0xe4]
xor ecx, esp
call fcn.004c3717
mov esp, ebp
pop ebp
ret
push edi
call fcn.004cc9da
add esp, 4
mov dword [esi + 0xf4], eax
test eax, eax
jne 0x4bc8b1
call fcn.004ceb5c
push dword [eax]
call fcn.004d1502
add esp, 4
push eax
push str.Failed_to_allocate_memory_for_nonce_nc_map:__s_n
jmp 0x4bc80c
lea eax, [esi + 0xf8]
push 0x10
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x4bc8df
push str.MHD_failed_to_initialize_nonce_nc_mutex_n
push esi
call fcn.004c1e90
push dword [esi + 0xf4]
call fcn.004cc9e5
jmp 0x4bc812
mov eax, dword [esi + 0xe4]
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
test al, 8
jne 0x4bc908
cmp dword [esi + 0x78], 0
jbe 0x4bc908
push str.MHD_thread_pooling_only_works_with_MHD_USE_INTERNAL_POLLING_THREAD_n
push esi
call fcn.004c1e90
add esp, 8
jmp 0x4bc9a7
mov edi, dword [esi + 0xb4]
mov dword [esp + 0x18], edi
cmp edi, 0xffffffff
jne 0x4bcc07
test eax, 0x100
jne 0x4bcc07
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 0x4bc9f7
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 0x4bc985
push 0
push 1
push edi
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
cmp edi, 0xffffffff
jne 0x4bc9f7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.004c1690
push eax
push str.Failed_to_create_socket_for_listening:__s_n
push esi
call fcn.004c1e90
add esp, 0xc
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
push dword [esi + 0xf4]
call fcn.004cc9e5
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 0x4bc815
push eax
call edi
mov ecx, dword [esi + 0xc0]
push ecx
test eax, eax
jne 0x4bd0e6
call edi
neg eax
sbb eax, eax
add eax, 1
je 0x4bd0e8
jmp 0x4bc815
mov eax, dword [esi + 0xb8]
mov ecx, dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x4bca5c
push 4
lea eax, [esp + 0x20]
push eax
jle 0x4bca36
push 4
push 0xffff
push edi
call ecx
test eax, eax
jns 0x4bca5c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.004c1690
push eax
push str.setsockopt_failed:__s_n
jmp 0x4bc998
push 0xfffffffffffffffb
push 0xffff
push edi
call ecx
test eax, eax
jns 0x4bca5c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.004c1690
push eax
push 0x53e3ec
jmp 0x4bc998
test dword [esi + 0xe4], 0x10
mov eax, 0x1c
mov ecx, 0x10
cmove eax, ecx
cmp dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
jne 0x4bcae9
xorps xmm0, xmm0
push dword [esp + 8]
test dword [esi + 0xe4], ecx
je 0x4bcac7
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 [0x531fd4]
mov word [esp + 0x42], ax
lea eax, [esp + 0x40]
movups xmmword [esp + 0x48], xmm0
jmp 0x4bcae5
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 0x4bcb44
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 0x4bcb44
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.004c1690
push eax
push 0x53e3d4
push esi
call fcn.004c1e90
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 0x4bcbab
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.004c1690
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.004c1e90
add esp, 0x10
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x4bc9a7
push 0x53e39c
push 0x165d
push 0x53e364
push dword [0x545874]
call dword [0x545870]
add esp, 0x10
push dword [esi + 0x118]
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jns 0x4bcc07
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.004c1690
push eax
push str.Failed_to_listen_for_connections:__s_n
push esi
call fcn.004c1e90
add esp, 0xc
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x4bc9a7
push 0x53e324
push 0x167b
push 0x53e2ec
push dword [0x545874]
call dword [0x545870]
add esp, 0x10
xor eax, eax
cmp ax, word [esi + 0xe8]
jne 0x4bcca7
test dword [esi + 0xe4], 0x100
jne 0x4bcca7
push 0x80
push eax
lea eax, [esp + 0x70]
push eax
call fcn.004c6150
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 0x4bcc74
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.004c1690
push eax
push str.Failed_to_get_listen_port_number:__s_n
push esi
call fcn.004c1e90
add esp, 0xc
jmp 0x4bcca7
movzx eax, word [esp + 0x68]
sub eax, 1
je 0x4bcc9e
sub eax, 1
je 0x4bcd45
sub eax, 0x15
je 0x4bcd1f
push str.Unknown_address_family__n
push esi
call fcn.004c1e90
add esp, 8
xor eax, eax
mov word [esi + 0xe8], ax
cmp edi, 0xffffffff
je 0x4bcd54
mov ecx, edi
call fcn.004c1d20
test eax, eax
jne 0x4bcd54
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.004c1690
push eax
push str.Failed_to_set_nonblocking_mode_on_listening_socket:__s_n
push esi
call fcn.004c1e90
add esp, 0xc
test dword [esi + 0xe4], 0x200
jne 0x4bccf0
cmp dword [esi + 0x78], 0
jbe 0x4bcd54
nop dword [eax]
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x4bc9a7
push 0x53e1d0
push 0x16d4
push 0x53e198
push dword [0x545874]
call dword [0x545870]
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
je 0x4bd106
jmp 0x4bcca7
push dword [esp + 0x6a]
call dword [sym.imp.WS2_32.dll_ntohs]
jmp 0x4bcca0
lea eax, [esi + 0x84]
push 0x10
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x4bcdad
push str.MHD_failed_to_initialize_IP_connection_limit_mutex_n
push esi
call fcn.004c1e90
add esp, 8
cmp edi, 0xffffffff
je 0x4bc9a1
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x4bc9a7
push 0x53e14c
push 0x1700
push 0x53e114
push dword [0x545874]
call dword [0x545870]
add esp, 0x10
cmp dword [esi + 0x78], 0
jne 0x4bce1a
lea eax, [esi + 0x9c]
push 0x10
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x4bce1a
push 0x53e0e0
push esi
call fcn.004c1e90
add esp, 8
lea eax, [esi + 0x9c]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
call eax
cmp edi, 0xffffffff
je 0x4bc9a1
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x4bc9a7
push 0x53e0c8
push 0x170e
push 0x53e090
push dword [0x545874]
call dword [0x545870]
add esp, 0x10
mov edx, dword [esi + 0xe4]
mov eax, edx
and eax, 0x108
cmp eax, 8
jne 0x4bcff2
mov ecx, dword [esi + 0x78]
test ecx, ecx
jne 0x4bced8
push esi
test dl, 4
lea ecx, [esi + 0x7c]
mov eax, str.MHD_single
mov edx, str.MHD_listen
push 0x4bc080
push dword [esi + 0x74]
cmove edx, eax
call fcn.004c21c0
add esp, 0xc
test eax, eax
jne 0x4bcff2
call fcn.004ceb5c
push dword [eax]
call fcn.004d1502
add esp, 4
push eax
push str.Failed_to_create_listen_thread:__s_n
push esi
call fcn.004c1e90
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 0x4bc9a1
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x4bc9a7
push 0x53e060
push 0x1738
push 0x53dfc4
push dword [0x545874]
call dword [0x545870]
add esp, 0x10
mov eax, dword [esi + 0xd0]
xor edx, edx
div ecx
lea ecx, [ecx + ecx*8]
shl ecx, 5
push ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], eax
call fcn.004cc9da
add esp, 4
mov dword [esi + 0x64], eax
test eax, eax
je 0x4bd08a
cmp dword [esi + 0x78], 0
mov dword [esp + 8], 0
jbe 0x4bcff2
xor eax, eax
mov dword [esp + 0xc], eax
nop dword [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 0x4bcf6c
lea ecx, [edx + 0xbc]
call fcn.004c1b20
test eax, eax
je 0x4bd008
mov edx, dword [esp + 0x20]
jmp 0x4bcf80
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 0x4bcf9b
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 0x4bd054
mov ecx, dword [esp + 0x20]
mov edx, str.MHD_worker
push ecx
push 0x4bc080
push dword [esi + 0x74]
add ecx, 0x7c
call fcn.004c21c0
add esp, 0xc
test eax, eax
je 0x4bd02a
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 0x4bcf20
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0xe4]
xor ecx, esp
call fcn.004c3717
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.004c1690
push eax
push str.Failed_to_create_worker_inter_thread_communication_channel:__s_n
push esi
call fcn.004c1e90
mov edi, dword [esp + 0x14]
add esp, 0xc
jmp 0x4bd062
call fcn.004ceb5c
push dword [eax]
call fcn.004d1502
add esp, 4
push eax
push str.Failed_to_create_pool_thread:__s_n
push esi
call fcn.004c1e90
add esp, 0xc
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x4bd062
push str.MHD_failed_to_initialize_cleanup_connection_mutex_n
push esi
call fcn.004c1e90
add esp, 8
test edi, edi
je 0x4bd086
mov ecx, esi
mov dword [esi + 0x78], edi
call fcn.004bd3d0
mov ecx, dword [esp + 0xec]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.004c3717
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0x18]
cmp edi, 0xffffffff
je 0x4bd0ba
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
test eax, eax
je 0x4bd0c0
push 0x53df48
push 0x17af
push 0x53df10
push dword [0x545874]
call dword [0x545870]
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 0x4bc9a7
push eax
call fcn.004cc9e5
add esp, 4
jmp 0x4bc9a7
call edi
push str.Failed_to_destroy_ITC._n
push 0x17dd
push 0x53dec0
push dword [0x545874]
call dword [0x545870]
add esp, 0x10
push str.0____pflags__MHD_USE_IPv6_
push 0x16b2
push 0x53e26c
push 0x53e23c
push 2
call fcn.004cb8fa
add esp, 4
push eax
call fcn.004038b0
add esp, 0x14
push 2
call fcn.004cb8fa
add esp, 4
push eax
call fcn.004cd32e
add esp, 4
call fcn.004cebb9
int3