Function at 0x41cd30
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 0x41cd87
jg 0x41cd72
mov ebp, dword [esp + 0x360]
cmp ebp, 0x7fffffff
jb 0x41cd8e
mov ebp, bind
mov dword [esp + 0x360], ebp
mov dword [esp + 0x364], edx
jmp 0x41cd8e
mov ebp, dword [esp + 0x360]
mov eax, dword [esp + 0x354]
mov ecx, dword [esp + 0x358]
cmp eax, 0xffffffff
jne 0x41cdd5
cmp ecx, eax
jne 0x41cdd5
cmp dword [esp + 0x35c], eax
jne 0x41cdd5
cmp ebp, edx
je 0x41cdce
jge 0x41cdc7
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x41d14c
push ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x41d14c
cmp dword [esp + 0x364], edx
jl 0x41ce1e
jg 0x41cde4
cmp ebp, edx
jbe 0x41ce1e
lea eax, [esp + 0x30]
push eax
mov edi, ebp
call fcn.004301c0
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 0x41ce52
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 0x41ceba
xor eax, eax
test esi, esi
je 0x41ce6b
lea ecx, [ecx]
cmp dword [esp + eax*4 + 0x44], ecx
je 0x41ce6b
inc eax
cmp eax, esi
jb 0x41ce60
cmp eax, esi
jne 0x41ce81
cmp esi, 0x40
jae 0x41ce81
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 0x41ce95
cmp dword [esp + eax*4 + 0x24c], ecx
je 0x41ce95
inc eax
cmp eax, edx
jb 0x41ce87
cmp eax, edx
jne 0x41ceb4
cmp edx, 0x40
jae 0x41ceb4
mov dword [esp + eax*4 + 0x24c], ecx
mov edx, dword [esp + 0x248]
inc edx
mov dword [esp + 0x248], edx
cmp ecx, ebx
jbe 0x41ceba
mov ebx, ecx
mov eax, dword [esp + 0x35c]
xor ecx, ecx
mov dword [esp + 0x144], ecx
cmp eax, 0xffffffff
je 0x41cf3a
mov dword [esp + 0x148], eax
mov ecx, 1
xor eax, eax
mov dword [esp + 0x144], ecx
test edx, edx
je 0x41cf0c
jmp 0x41cef0
mov ebp, dword [esp + 0x35c]
cmp dword [esp + eax*4 + 0x24c], ebp
je 0x41cf05
inc eax
cmp eax, edx
jb 0x41cef0
mov ebp, dword [esp + 0x360]
cmp eax, edx
jne 0x41cf2a
cmp edx, 0x40
jae 0x41cf2a
mov edx, dword [esp + 0x35c]
mov dword [esp + eax*4 + 0x24c], edx
inc dword [esp + 0x248]
cmp dword [esp + 0x35c], ebx
jbe 0x41cf3a
mov ebx, dword [esp + 0x35c]
cmp dword [esp + 0x364], 0
jg 0x41cf5f
jl 0x41cf4a
test ebp, ebp
jae 0x41cf5f
inc ebx
mov dword [esp + 0x2c], ebx
mov ebx, dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x10], 0
jmp 0x41cf80
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 0x41cf80
mov ecx, dword [esp + 0x144]
mov esi, dword [esp + 0x40]
nop
cmp dword [esp + 0x364], 0
jl 0x41cfbb
jg 0x41cf90
test ebp, ebp
je 0x41cfbb
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 0x41cfce
mov eax, ebp
or eax, dword [esp + 0x364]
jne 0x41cfce
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 0x41d09c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x41d026
cmp dword [0x47a798], 0
jne 0x41cdbf
cmp eax, 0x2714
jne 0x41cdbf
cmp dword [esp + 0x364], 0
jl 0x41cf74
jg 0x41d03e
test ebp, ebp
je 0x41cf74
lea edx, [esp + 0x30]
push edx
call fcn.004301c0
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.004302a0
mov edi, ebp
sub edi, eax
add esp, 0x20
test edi, edi
jle 0x41cdce
jmp 0x41cf74
test eax, eax
js 0x41cdbf
je 0x41cdce
mov edi, dword [esp + 0x354]
xor esi, esi
cmp edi, 0xffffffff
je 0x41d0e1
lea ecx, [esp + 0x40]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d0cc
mov esi, 1
lea edx, [esp + 0x248]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d0e1
or esi, 4
mov edi, dword [esp + 0x358]
cmp edi, 0xffffffff
je 0x41d114
lea eax, [esp + 0x40]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d0ff
or esi, 8
lea ecx, [esp + 0x248]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d114
or esi, 4
mov edi, dword [esp + 0x35c]
cmp edi, 0xffffffff
je 0x41d14a
lea edx, [esp + 0x144]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d135
or esi, 2
lea eax, [esp + 0x248]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41d14a
or esi, 4
mov eax, esi
mov ecx, dword [esp + 0x34c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004183ef
add esp, 0x340
ret