Function at 0x420800
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x240], 1
mov dword [ebp - 0x18], 0
cmp dword [ebp + 8], 0
je 0x420862
mov dword [ebp - 4], 0
jmp 0x420840
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 0xc]
jae 0x420862
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
cmp dword [eax + edx*8], 0xffffffff
je 0x420860
mov dword [ebp - 0x240], 0
jmp 0x420862
jmp 0x420837
cmp dword [ebp - 0x240], 0
je 0x420888
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00420210
add esp, 4
mov dword [ebp - 0x23c], eax
mov eax, dword [ebp - 0x23c]
jmp 0x420d23
cmp dword [ebp + 0x10], 0
jle 0x42089f
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x18], edx
call fcn.004249d0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x348], 0
mov dword [ebp - 0x128], 0
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x12c], 0xffffffff
mov dword [ebp - 4], 0
jmp 0x4208d9
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 0xc]
jae 0x420b14
xor edx, edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov word [ecx + eax*8 + 6], dx
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
cmp dword [eax + edx*8], 0xffffffff
jne 0x420900
jmp 0x4208d0
xor ecx, ecx
jne 0x420900
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
movsx ecx, word [eax + edx*8 + 4]
and ecx, 7
je 0x420b0f
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + edx*8]
cmp ecx, dword [ebp - 0x12c]
jbe 0x420938
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + edx*8]
mov dword [ebp - 0x12c], ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
movsx ecx, word [eax + edx*8 + 4]
and ecx, 1
je 0x4209d5
mov dword [ebp - 0x34c], 0
jmp 0x420967
mov edx, dword [ebp - 0x34c]
add edx, 1
mov dword [ebp - 0x34c], edx
mov eax, dword [ebp - 0x34c]
cmp eax, dword [ebp - 0x348]
jae 0x420991
mov ecx, dword [ebp - 0x34c]
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + ecx*4 - 0x344]
cmp ecx, dword [eax + edx*8]
jne 0x42098f
jmp 0x420991
jmp 0x420958
mov edx, dword [ebp - 0x34c]
cmp edx, dword [ebp - 0x348]
jne 0x4209cd
cmp dword [ebp - 0x348], 0x40
jae 0x4209cd
mov eax, dword [ebp - 0x34c]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov ecx, dword [edx + ecx*8]
mov dword [ebp + eax*4 - 0x344], ecx
mov edx, dword [ebp - 0x348]
add edx, 1
mov dword [ebp - 0x348], edx
xor eax, eax
jne 0x42094c
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
movsx eax, word [edx + ecx*8 + 4]
and eax, 4
je 0x420a72
mov dword [ebp - 0x350], 0
jmp 0x420a04
mov ecx, dword [ebp - 0x350]
add ecx, 1
mov dword [ebp - 0x350], ecx
mov edx, dword [ebp - 0x350]
cmp edx, dword [ebp - 0x128]
jae 0x420a2e
mov eax, dword [ebp - 0x350]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + eax*4 - 0x124]
cmp eax, dword [edx + ecx*8]
jne 0x420a2c
jmp 0x420a2e
jmp 0x4209f5
mov ecx, dword [ebp - 0x350]
cmp ecx, dword [ebp - 0x128]
jne 0x420a6a
cmp dword [ebp - 0x128], 0x40
jae 0x420a6a
mov edx, dword [ebp - 0x350]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + eax*8]
mov dword [ebp + edx*4 - 0x124], eax
mov ecx, dword [ebp - 0x128]
add ecx, 1
mov dword [ebp - 0x128], ecx
xor edx, edx
jne 0x4209e9
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + eax*8 + 4]
and edx, 2
je 0x420b0f
mov dword [ebp - 0x354], 0
jmp 0x420aa1
mov eax, dword [ebp - 0x354]
add eax, 1
mov dword [ebp - 0x354], eax
mov ecx, dword [ebp - 0x354]
cmp ecx, dword [ebp - 0x238]
jae 0x420acb
mov edx, dword [ebp - 0x354]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + edx*4 - 0x234]
cmp edx, dword [ecx + eax*8]
jne 0x420ac9
jmp 0x420acb
jmp 0x420a92
mov eax, dword [ebp - 0x354]
cmp eax, dword [ebp - 0x238]
jne 0x420b07
cmp dword [ebp - 0x238], 0x40
jae 0x420b07
mov ecx, dword [ebp - 0x354]
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov edx, dword [eax + edx*8]
mov dword [ebp + ecx*4 - 0x234], edx
mov eax, dword [ebp - 0x238]
add eax, 1
mov dword [ebp - 0x238], eax
xor ecx, ecx
jne 0x420a86
jmp 0x4208d0
xor edx, edx
cmp dword [ebp + 0x10], 0
setl dl
sub edx, 1
lea eax, [ebp - 0x10]
and edx, eax
mov dword [ebp - 8], edx
cmp dword [ebp + 0x10], 0
jle 0x420b52
mov eax, dword [ebp - 0x18]
cdq
mov ecx, 0x3e8
idiv ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x18]
cdq
mov ecx, 0x3e8
idiv ecx
imul edx, edx, 0x3e8
mov dword [ebp - 0xc], edx
jmp 0x420b66
cmp dword [ebp + 0x10], 0
jne 0x420b66
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 8]
push edx
lea eax, [ebp - 0x238]
push eax
lea ecx, [ebp - 0x128]
push ecx
lea edx, [ebp - 0x348]
push edx
mov eax, dword [ebp - 0x12c]
add eax, 1
push eax
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x23c], eax
cmp dword [ebp - 0x23c], 0xffffffff
je 0x420ba0
jmp 0x420bfd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x420bc3
cmp dword [0x46f5ec], 0
jne 0x420bc1
cmp dword [ebp - 0x14], 0x2714
je 0x420bc3
jmp 0x420bfd
cmp dword [ebp + 0x10], 0
jle 0x420bf0
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call fcn.004249d0
push edx
push eax
call fcn.00424a10
add esp, 0x10
mov ecx, dword [ebp + 0x10]
sub ecx, eax
mov dword [ebp - 0x18], ecx
cmp dword [ebp - 0x18], 0
jg 0x420bf0
jmp 0x420bfd
cmp dword [ebp - 0x23c], 0xffffffff
je 0x420b28
cmp dword [ebp - 0x23c], 0
jge 0x420c0e
or eax, 0xffffffff
jmp 0x420d23
cmp dword [ebp - 0x23c], 0
jne 0x420c1e
xor eax, eax
jmp 0x420d23
mov dword [ebp - 0x23c], 0
mov dword [ebp - 4], 0
jmp 0x420c3a
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jae 0x420d1d
xor ecx, ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov word [eax + edx*8 + 6], cx
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
cmp dword [edx + ecx*8], 0xffffffff
jne 0x420c61
jmp 0x420c31
lea eax, [ebp - 0x348]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx*8]
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x420c94
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
movsx eax, word [edx + ecx*8 + 6]
or eax, 1
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov word [edx + ecx*8 + 6], ax
lea eax, [ebp - 0x128]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx*8]
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x420cc7
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
movsx eax, word [edx + ecx*8 + 6]
or eax, 4
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov word [edx + ecx*8 + 6], ax
lea eax, [ebp - 0x238]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx*8]
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x420cfa
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
movsx eax, word [edx + ecx*8 + 6]
or eax, 2
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov word [edx + ecx*8 + 6], ax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + eax*8 + 6]
test edx, edx
je 0x420d18
mov eax, dword [ebp - 0x23c]
add eax, 1
mov dword [ebp - 0x23c], eax
jmp 0x420c31
mov eax, dword [ebp - 0x23c]
mov esp, ebp
pop ebp
ret