Function at 0x41d3d0
Capabilities:
Get socket status

Disassembly:
sub esp, 0x340
mov eax, dword [0x476018]
xor eax, esp
mov dword [esp + 0x33c], eax
push ebx
push ebp
xor edx, edx
push esi
push edi
xor edi, edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
cmp dword [esp + 0x364], edx
jl 0x41d427
jg 0x41d412
mov ebp, dword [esp + 0x360]
cmp ebp, 0x7fffffff
jb 0x41d42e
mov ebp, bind
mov dword [esp + 0x360], ebp
mov dword [esp + 0x364], edx
jmp 0x41d42e
mov ebp, dword [esp + 0x360]
mov eax, dword [esp + 0x354]
mov ecx, dword [esp + 0x358]
cmp eax, 0xffffffff
jne 0x41d475
cmp ecx, eax
jne 0x41d475
cmp dword [esp + 0x35c], eax
jne 0x41d475
cmp ebp, edx
je 0x41d46e
jge 0x41d467
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x41d7ec
push ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x41d7ec
cmp dword [esp + 0x364], edx
jl 0x41d4be
jg 0x41d484
cmp ebp, edx
jbe 0x41d4be
lea eax, [esp + 0x30]
push eax
mov edi, ebp
call fcn.00430860
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x18], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x1c], edx
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x358]
add esp, 4
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x358]
mov dword [esp + 0x20], edx
xor edx, edx
xor esi, esi
or ebx, 0xffffffff
mov dword [esp + 0x248], edx
mov dword [esp + 0x40], esi
cmp eax, 0xffffffff
je 0x41d4f2
mov esi, 1
mov edx, esi
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x24c], eax
mov dword [esp + 0x248], edx
mov ebx, eax
cmp ecx, 0xffffffff
je 0x41d55a
xor eax, eax
test esi, esi
je 0x41d50b
lea ecx, [ecx]
cmp dword [esp + eax*4 + 0x44], ecx
je 0x41d50b
inc eax
cmp eax, esi
jb 0x41d500
cmp eax, esi
jne 0x41d521
cmp esi, 0x40
jae 0x41d521
mov dword [esp + eax*4 + 0x44], ecx
mov esi, dword [esp + 0x40]
inc esi
mov dword [esp + 0x40], esi
xor eax, eax
test edx, edx
je 0x41d535
cmp dword [esp + eax*4 + 0x24c], ecx
je 0x41d535
inc eax
cmp eax, edx
jb 0x41d527
cmp eax, edx
jne 0x41d554
cmp edx, 0x40
jae 0x41d554
mov dword [esp + eax*4 + 0x24c], ecx
mov edx, dword [esp + 0x248]
inc edx
mov dword [esp + 0x248], edx
cmp ecx, ebx
jbe 0x41d55a
mov ebx, ecx
mov eax, dword [esp + 0x35c]
xor ecx, ecx
mov dword [esp + 0x144], ecx
cmp eax, 0xffffffff
je 0x41d5da
mov dword [esp + 0x148], eax
mov ecx, 1
xor eax, eax
mov dword [esp + 0x144], ecx
test edx, edx
je 0x41d5ac
jmp 0x41d590
mov ebp, dword [esp + 0x35c]
cmp dword [esp + eax*4 + 0x24c], ebp
je 0x41d5a5
inc eax
cmp eax, edx
jb 0x41d590
mov ebp, dword [esp + 0x360]
cmp eax, edx
jne 0x41d5ca
cmp edx, 0x40
jae 0x41d5ca
mov edx, dword [esp + 0x35c]
mov dword [esp + eax*4 + 0x24c], edx
inc dword [esp + 0x248]
cmp dword [esp + 0x35c], ebx
jbe 0x41d5da
mov ebx, dword [esp + 0x35c]
cmp dword [esp + 0x364], 0
jg 0x41d5ff
jl 0x41d5ea
test ebp, ebp
jae 0x41d5ff
inc ebx
mov dword [esp + 0x2c], ebx
mov ebx, dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x10], 0
jmp 0x41d620
inc ebx
lea eax, [esp + 0x24]
mov dword [esp + 0x2c], ebx
mov ebx, dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x10], eax
jmp 0x41d620
mov ecx, dword [esp + 0x144]
mov esi, dword [esp + 0x40]
nop
cmp dword [esp + 0x364], 0
jl 0x41d65b
jg 0x41d630
test ebp, ebp
je 0x41d65b
mov eax, 0x10624dd3
imul edi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x24], eax
imul eax, eax, 0x3e8
mov edx, edi
sub edx, eax
imul edx, edx, 0x3e8
mov dword [esp + 0x28], edx
jmp 0x41d66e
mov eax, ebp
or eax, dword [esp + 0x364]
jne 0x41d66e
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x10]
push edx
neg ecx
sbb ecx, ecx
lea edx, [esp + 0x148]
and ecx, edx
lea eax, [esp + 0x24c]
push eax
neg esi
push ecx
mov ecx, dword [esp + 0x38]
sbb esi, esi
lea eax, [esp + 0x4c]
and esi, eax
push esi
push ecx
call ebx
cmp eax, 0xffffffff
jne 0x41d73c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x41d6c6
cmp dword [0x47a798], 0
jne 0x41d45f
cmp eax, 0x2714
jne 0x41d45f
cmp dword [esp + 0x364], 0
jl 0x41d614
jg 0x41d6de
test ebp, ebp
je 0x41d614
lea edx, [esp + 0x30]
push edx
call fcn.00430860
mov edx, dword [esp + 0x18]
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x28]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x2c]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0x30]
mov dword [ecx + 0xc], edx
mov edx, dword [eax]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
call fcn.00430940
mov edi, ebp
sub edi, eax
add esp, 0x20
test edi, edi
jle 0x41d46e
jmp 0x41d614
test eax, eax
js 0x41d45f
je 0x41d46e
mov edi, dword [esp + 0x354]
xor esi, esi
cmp edi, 0xffffffff
je 0x41d781
lea ecx, [esp + 0x40]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d76c
mov esi, 1
lea edx, [esp + 0x248]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d781
or esi, 4
mov edi, dword [esp + 0x358]
cmp edi, 0xffffffff
je 0x41d7b4
lea eax, [esp + 0x40]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d79f
or esi, 8
lea ecx, [esp + 0x248]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d7b4
or esi, 4
mov edi, dword [esp + 0x35c]
cmp edi, 0xffffffff
je 0x41d7ea
lea edx, [esp + 0x144]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d7d5
or esi, 2
lea eax, [esp + 0x248]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d7ea
or esi, 4
mov eax, esi
mov ecx, dword [esp + 0x34c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00418a8f
add esp, 0x340
ret