Function at 0x406180
Capabilities:
Get socket status

Disassembly:
sub esp, 0x14c
push ebx
push ebp
xor ebp, ebp
xor eax, eax
mov dword [esp + 0x28], eax
push esi
mov dword [esp + 0x30], eax
push edi
mov edi, dword [esp + 0x164]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], 0xffffffff
mov esi, 0x41adb0
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x4061e0
test cl, cl
je 0x4061dc
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x4061e0
add eax, 2
add esi, 2
test cl, cl
jne 0x4061b8
xor eax, eax
jmp 0x4061e5
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebp
jne 0x406266
mov dword [esp + 0x10], ebp
mov dword [esp + 0x34], ebp
mov ebx, dword [esp + 0x16c]
mov esi, dword [esp + 0x160]
and ebx, 0xffff
mov dword [esp + 0x1c], ebx
push str.waiting_to_accept_connection
push ebp
push 3
call fcn.00404de0
add esp, 0xc
lea eax, [esp + 0x40]
lea ecx, [esp + 0x58]
mov dword [esp + 0x40], ebx
push eax
push ebp
push ebp
lea eax, [esi + 1]
push ecx
push eax
mov dword [esp + 0x58], ebp
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], 1
call sub.WS2_32.dll_select
cmp eax, ebp
je 0x40637f
jge 0x4062b3
mov edi, dword [sym.imp.MSVCRT.dll__errno]
call edi
cmp dword [eax], 4
je 0x4062b3
call edi
cmp dword [eax], 4
jne 0x406390
jmp 0x406209
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x34]
push ecx
push edx
push edi
call fcn.004059b0
add esp, 0x10
test eax, eax
jne 0x4061f1
push edi
push str.cant_resolve_host_or_address__s
push ebp
push ebp
call fcn.00404de0
add esp, 0x10
push 0xffffffffffffffff
call sub.WS2_32.dll_closesocket
call dword [sym.imp.MSVCRT.dll__errno]
pop edi
mov dword [eax], ebp
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x14c
ret
xor edx, edx
lea eax, [esp + 0x18]
mov dword [esp + 0x20], edx
lea ecx, [esp + 0x20]
mov dword [esp + 0x24], edx
push eax
mov dword [esp + 0x2c], edx
push ecx
push esi
mov dword [esp + 0x24], 0x10
mov dword [esp + 0x38], edx
call sub.WS2_32.dll_accept
mov esi, eax
cmp esi, ebp
jl 0x4063a7
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x34]
mov ebx, dword [esp + 0x14]
mov edx, ebp
and eax, edi
and edx, edi
cmp edx, eax
je 0x4063c7
mov eax, dword [ebx]
mov ecx, ebx
cmp eax, 0xffffffff
je 0x40631f
and eax, edi
cmp edx, eax
je 0x40631f
mov eax, dword [ecx + 4]
add ecx, 4
cmp eax, 0xffffffff
jne 0x40630e
cmp dword [ecx], 0xffffffff
jne 0x4063c7
mov ecx, dword [esp + 0x164]
lea edx, [esp + 0x48]
push ecx
push edx
push ebp
call fcn.00405b50
add esp, 8
push eax
push str.Warning:_connection_from__s_rejected__does_not_match_server_host__s
push 0
push 1
call fcn.00404de0
add esp, 0x14
push esi
call sub.WS2_32.dll_closesocket
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0
mov eax, dword [esp + 0x168]
test eax, eax
je 0x4063a5
mov esi, dword [esp + 0x160]
mov ebx, dword [esp + 0x1c]
xor ebp, ebp
jmp 0x406209
push str.timed_out_waiting_to_accept_connection
push ebp
push ebp
call fcn.00404de0
add esp, 0xc
jmp 0x4063a7
push str.error_in_select_waiting_for_client_to_accept_connection
call edi
mov eax, dword [eax]
push eax
push ebp
call fcn.00404de0
add esp, 0xc
jmp 0x4063a7
xor ebp, ebp
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x4063b9
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x14c
ret
test ebx, ebx
je 0x4063d9
push ebx
call dword [sym.imp.MSVCRT.dll_free]
mov ebp, dword [esp + 0x28]
add esp, 4
lea ecx, [esp + 0x48]
push ecx
push ebp
call fcn.00405b50
push eax
push str.accepted_connection_from__s
push 0
push 3
call fcn.00404de0
push esi
call fcn.004060f0
push esi
call fcn.00406140
add esp, 0x20
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret