Function at 0x40c52e
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc4
mov eax, dword [0x4294a4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0xc0]
rep stosd dword es:[edi], eax
mov eax, dword [0x42c320]
xor esi, esi
push 2
pop ecx
cmp eax, esi
je 0x40c56f
cmp dword [0x42c324], esi
jne 0x40c577
mov dword [ebp - 0xbc], ecx
jmp 0x40c58b
cmp dword [0x42c324], esi
je 0x40c585
mov dword [ebp - 0xbc], 0x17
cmp eax, esi
je 0x40c58b
mov dword [ebp - 0xbc], esi
push 0x45
xor ebx, ebx
lea eax, [ebp - 0x6c]
push 0x42b4ac
inc ebx
push eax
mov dword [ebp - 0xb8], ecx
mov dword [ebp - 0xc0], ebx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp dword [0x42c438], esi
je 0x40c653
lea edi, [ebp - 0x94]
call fcn.0040af67
test eax, eax
je 0x40c5d1
or eax, 0xffffffff
jmp 0x40c881
cmp dword [0x42bfd8], 0x45
mov eax, 0x42b4b0
je 0x40c5e2
lea eax, [ebp - 0x6c]
lea ecx, [ebp - 0x98]
push ecx
lea ecx, [ebp - 0xc0]
push ecx
push eax
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x40c5c9
mov eax, dword [ebp - 0x98]
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
mov dword [ebp - 0xa0], edi
cmp edi, 0xffffffff
jne 0x40c6ec
call fcn.004104c7
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42b5a8
call fcn.00407736
add esp, 0xc
push dword [ebp - 0x98]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x40c5c9
cmp dword [0x42bfd8], 0x45
mov eax, 0x42b4b8
je 0x40c664
lea eax, [ebp - 0x6c]
lea ecx, [ebp - 0x98]
push ecx
lea ecx, [ebp - 0xc0]
push ecx
push eax
movsx eax, byte [0x42c004]
push eax
call fcn.00412b57
neg eax
sbb eax, eax
mov edi, 0x42c004
pop ecx
and eax, edi
push eax
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x40c602
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x2af9
jne 0x40c6d1
push edi
push 0x42b4c0
push edi
push 0x42b4c8
call fcn.004104c7
push eax
call esi
push eax
push 0x42b4d0
call fcn.00407736
add esp, 0x1c
jmp 0x40c5c9
call fcn.004104c7
push eax
call esi
push eax
push 0x42b57c
call fcn.00407736
add esp, 0xc
jmp 0x40c5c9
cmp dword [0x42c314], esi
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
jne 0x40c72f
push 4
lea eax, [ebp - 0x9c]
push eax
push 4
push 0xffff
push edi
mov dword [ebp - 0x9c], ebx
call esi
test eax, eax
mov eax, str.Port__d_may_be_reused
je 0x40c721
mov eax, str.setsockopt_error
push dword [0x42bfd8]
push eax
call fcn.00410209
pop ecx
pop ecx
xor eax, eax
cmp dword [0x42c320], eax
je 0x40c757
cmp dword [0x42c324], eax
je 0x40c757
push 4
mov dword [ebp - 0x9c], eax
lea eax, [ebp - 0x9c]
push eax
push 0x1b
push 0x29
push edi
call esi
mov eax, dword [ebp - 0x98]
push dword [eax + 0x10]
push dword [eax + 0x18]
push edi
call dword [sym.imp.WS2_32.dll_bind]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40c868
mov eax, dword [0x42b600]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x4c], eax
mov eax, dword [0x42b604]
mov dword [ebp - 0x48], eax
push 8
xor eax, eax
pop ecx
lea edi, [ebp - 0x44]
rep stosd dword es:[edi], eax
mov eax, dword [0x42b608]
mov dword [ebp - 0x24], eax
mov eax, dword [0x42b60c]
mov dword [ebp - 0x20], eax
push 6
pop ecx
xor eax, eax
lea edi, [ebp - 0x1c]
rep stosd dword es:[edi], eax
call esi
push 0xa
push 0x20
mov edi, eax
lea eax, [ebp - 0x24]
push eax
push 0x28
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [ebp - 0x98]
push dword [eax + 0x10]
push dword [eax + 0x18]
call dword [sym.imp.WS2_32.dll_getnameinfo]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
call esi
sub eax, 0x2726
je 0x40c82c
sub eax, 0x1a
je 0x40c82c
dec eax
je 0x40c803
call fcn.004104c7
push eax
call esi
push eax
push 0x42b6d4
call fcn.00407736
add esp, 0xc
jmp 0x40c847
mov eax, 0x42c004
push eax
push 0x42b610
push eax
push 0x42b618
call fcn.004104c7
push eax
call esi
push eax
push 0x42b620
call fcn.00407736
add esp, 0x1c
jmp 0x40c847
push 0x42b6cc
call fcn.004104c7
push eax
call esi
push eax
push 0x42b6e8
call fcn.00407736
add esp, 0x10
push dword [ebp - 0xa0]
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x4c]
push eax
push 0x42b748
call fcn.00410209
add esp, 0xc
push dword [ebp - 0x98]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
or eax, 0xffffffff
cmp ebx, eax
je 0x40c881
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00411a98
leave
ret