Function at 0x45b840
Capabilities:
Get socket status

Disassembly:
sub esp, 0x31c
push ebx
push ebp
mov ebp, dword [esp + 0x32c]
push esi
mov esi, dword [esp + 0x32c]
push edi
xor ebx, ebx
xor edi, edi
cmp esi, 0xffffffff
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
jne 0x45b892
cmp ebp, 0xffffffff
jne 0x45b892
cmp dword [esp + 0x338], ebp
jne 0x45b892
mov eax, dword [esp + 0x33c]
push eax
call fcn.0045b810
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x31c
ret
mov eax, dword [esp + 0x33c]
cmp eax, ebx
jle 0x45b8ac
mov edi, eax
call fcn.00444e40
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
xor eax, eax
or ebx, 0xffffffff
xor ecx, ecx
cmp esi, 0xffffffff
mov dword [esp + 0x20], eax
mov dword [esp + 0x124], ecx
je 0x45b8e2
mov ecx, 1
mov dword [esp + 0x128], esi
mov eax, ecx
mov dword [esp + 0x124], ecx
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], eax
mov ebx, esi
cmp ebp, 0xffffffff
je 0x45b951
xor edx, edx
test ecx, ecx
jbe 0x45b900
lea esi, [esp + 0x128]
cmp dword [esi], ebp
je 0x45b900
inc edx
add esi, 4
cmp edx, ecx
jb 0x45b8f4
cmp edx, ecx
jne 0x45b91f
cmp ecx, 0x40
jae 0x45b91f
mov dword [esp + edx*4 + 0x128], ebp
mov ecx, dword [esp + 0x124]
inc ecx
mov dword [esp + 0x124], ecx
xor ecx, ecx
test eax, eax
jbe 0x45b935
lea edx, [esp + 0x24]
cmp dword [edx], ebp
je 0x45b935
inc ecx
add edx, 4
cmp ecx, eax
jb 0x45b929
cmp ecx, eax
jne 0x45b94b
cmp eax, 0x40
jae 0x45b94b
mov dword [esp + ecx*4 + 0x24], ebp
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp ebp, ebx
jbe 0x45b951
mov ebx, ebp
mov esi, dword [esp + 0x338]
xor ecx, ecx
cmp esi, 0xffffffff
mov dword [esp + 0x228], ecx
je 0x45b9a8
cmp ecx, eax
mov dword [esp + 0x22c], esi
mov dword [esp + 0x228], 1
jae 0x45b98e
lea edx, [esp + 0x24]
cmp dword [edx], esi
je 0x45b98c
inc ecx
add edx, 4
cmp ecx, eax
jb 0x45b980
cmp ecx, eax
jne 0x45b9a2
cmp eax, 0x40
jae 0x45b9a2
mov dword [esp + ecx*4 + 0x24], esi
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp esi, ebx
jbe 0x45b9a8
mov ebx, esi
mov esi, dword [esp + 0x33c]
xor ecx, ecx
test esi, esi
mov ebp, dword [sym.imp.WS2_32.dll_select]
lea edx, [esp + 0x18]
setl cl
dec ecx
and ecx, edx
inc ebx
mov esi, ecx
mov eax, dword [esp + 0x33c]
xor ecx, ecx
cmp eax, ecx
jle 0x45ba04
mov eax, 0x10624dd3
mov ecx, 0x3e8
imul edi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, edi
mov dword [esp + 0x18], edx
cdq
idiv ecx
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
shl edx, 3
mov dword [esp + 0x1c], edx
jmp 0x45ba0e
jne 0x45ba0e
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
lea eax, [esp + 0x20]
push esi
lea ecx, [esp + 0x22c]
push eax
lea edx, [esp + 0x12c]
push ecx
push edx
push ebx
call ebp
cmp eax, 0xffffffff
jne 0x45ba77
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x45ba3d
cmp eax, 0x2714
jne 0x45ba7b
mov eax, dword [esp + 0x33c]
test eax, eax
jle 0x45b9c6
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.00444e40
push edx
push eax
call fcn.00444e70
mov edi, dword [esp + 0x34c]
add esp, 0x10
sub edi, eax
test edi, edi
jle 0x45ba7b
jmp 0x45b9c6
test eax, eax
jge 0x45ba89
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x31c
ret
jne 0x45ba98
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x31c
ret
mov edi, dword [esp + 0x330]
xor esi, esi
cmp edi, 0xffffffff
je 0x45bacf
lea edx, [esp + 0x124]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x45babd
mov esi, 1
lea eax, [esp + 0x20]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x45bacf
or esi, 4
mov edi, dword [esp + 0x334]
cmp edi, 0xffffffff
je 0x45bb02
lea ecx, [esp + 0x124]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x45baf0
or esi, 8
lea edx, [esp + 0x20]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x45bb02
or esi, 4
mov edi, dword [esp + 0x338]
cmp edi, 0xffffffff
je 0x45bb35
lea eax, [esp + 0x228]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x45bb23
or esi, 2
lea ecx, [esp + 0x20]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x45bb35
or esi, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x31c
ret