Function at 0x403888
Capabilities:
Get socket status

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x37c
mov ebx, dword [esp + 0x390]
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
test ebx, ebx
je 0x4038d3
mov esi, dword [esp + 0x394]
test esi, esi
je 0x4038d3
cmp dword [ebx], 0xffffffff
jne 0x4038f4
xor eax, eax
mov edx, dword [esp + 0x394]
jmp 0x4038ce
cmp dword [ebx + eax*8], 0xffffffff
jne 0x4038f4
inc eax
cmp eax, edx
jne 0x4038c8
mov ecx, dword [esp + 0x398]
mov dword [esp], ecx
call fcn.00403350
mov ebx, eax
mov eax, ebx
add esp, 0x37c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x398]
test eax, eax
jle 0x403ce0
call fcn.0041125c
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edx
mov ecx, dword [esp + 0x398]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x64], 0
mov dword [esp + 0x168], 0
mov dword [esp + 0x26c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x3c], 0
mov ebp, ebx
mov ebx, dword [esp + 0x394]
lea ebx, [ebp + ebx*8]
mov dword [esp + 0x30], ebx
mov ecx, ebp
mov dword [esp + 0x44], 0
xor ebx, ebx
xor esi, esi
xor eax, eax
mov dword [esp + 0x48], ebp
mov ebp, eax
mov word [ecx + 6], 0
mov eax, dword [ecx]
cmp eax, 0xffffffff
je 0x403a50
mov di, word [ecx + 4]
test edi, 7
je 0x403a50
test edi, 1
je 0x4039cc
test ebx, ebx
je 0x403ced
cmp eax, dword [esp + 0x68]
je 0x4039cc
xor edx, edx
jmp 0x4039b6
cmp eax, dword [esp + edx*4 + 0x68]
je 0x403bf4
inc edx
cmp edx, ebx
jne 0x4039ac
cmp ebx, 0x3f
ja 0x4039cc
mov dword [esp + edx*4 + 0x68], eax
inc ebx
mov dword [esp + 0x40], ebx
lea esi, [esi]
test edi, 4
je 0x403a10
test esi, esi
je 0x403cfb
cmp eax, dword [esp + 0x16c]
je 0x403a10
xor edx, edx
jmp 0x4039f9
cmp eax, dword [esp + edx*4 + 0x16c]
je 0x403c04
inc edx
cmp edx, esi
jne 0x4039ec
cmp esi, 0x3f
ja 0x403a10
mov dword [esp + edx*4 + 0x16c], eax
inc esi
mov dword [esp + 0x3c], esi
nop
and edi, 2
je 0x403a50
test ebp, ebp
je 0x403cf4
cmp eax, dword [esp + 0x270]
je 0x403a50
xor edx, edx
jmp 0x403a39
cmp eax, dword [esp + edx*4 + 0x270]
je 0x403c14
inc edx
cmp edx, ebp
jne 0x403a2c
cmp ebp, 0x3f
ja 0x403a50
mov dword [esp + edx*4 + 0x270], eax
inc ebp
mov dword [esp + 0x44], ebp
nop
add ecx, 8
cmp ecx, dword [esp + 0x30]
jne 0x403970
mov eax, ebp
mov ebp, dword [esp + 0x48]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x64], edx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x168], ecx
mov edx, dword [esp + 0x44]
mov dword [esp + 0x26c], edx
test ebx, ebx
jne 0x403a8d
test esi, esi
je 0x403cd0
mov ecx, dword [esp + 0x398]
test ecx, ecx
js 0x403cc8
lea edi, [esp + 0x5c]
mov ecx, esi
mov dword [esp + 0x30], edi
mov edi, eax
mov dword [esp + 0x3c], ebp
mov ebp, dword [esp + 0x4c]
mov esi, dword [esp + 0x398]
jmp 0x403b71
lea edx, [esp + 0x26c]
test ecx, ecx
je 0x403bcd
lea eax, [esp + 0x168]
test ebx, ebx
je 0x403bd7
lea ecx, [esp + 0x64]
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], 0
call sub.WS2_32.dll_select
sub esp, 0x14
mov ebx, eax
cmp eax, 0xffffffff
jne 0x403c24
call sub.WS2_32.dll_WSAGetLastError
test eax, eax
je 0x403b2e
mov edx, dword [0x65d010]
test edx, edx
jne 0x4038e4
cmp eax, 0x2714
jne 0x4038e4
test esi, esi
jle 0x403b5f
call fcn.0041125c
mov ecx, dword [esp + 0x34]
mov dword [esp + 8], ecx
mov ebx, dword [esp + 0x38]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00411294
mov ebp, esi
sub ebp, eax
test ebp, ebp
jle 0x403d02
mov edi, dword [esp + 0x26c]
mov ecx, dword [esp + 0x168]
mov ebx, dword [esp + 0x64]
cmp esi, 0
jle 0x403be0
mov eax, 0x10624dd3
imul ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
sar edx, 6
mov dword [esp + 0x40], edx
mov eax, ebp
cdq
sub dword [esp + 0x40], edx
mov edx, dword [esp + 0x40]
mov dword [esp + 0x5c], edx
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
mov edx, ebp
sub edx, eax
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
mov dword [esp + 0x60], eax
test edi, edi
jne 0x403abc
xor edx, edx
test ecx, ecx
jne 0x403acb
xor eax, eax
test ebx, ebx
jne 0x403ada
xor ecx, ecx
jmp 0x403ade
jne 0x403bbb
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
jmp 0x403bbb
cmp ebx, edx
jne 0x4039cc
jmp 0x4039bb
cmp esi, edx
jne 0x403a10
jmp 0x4039fe
cmp ebp, edx
jne 0x403a50
jmp 0x403a3e
mov ebp, dword [esp + 0x3c]
cmp eax, 0
jl 0x403d09
je 0x4038e4
xor ebx, ebx
xor esi, esi
lea edi, [esp + 0x168]
jmp 0x403c5c
cmp word [ebp + 6], 0
jne 0x403cc3
inc esi
add ebp, 8
cmp esi, dword [esp + 0x394]
je 0x4038e4
mov word [ebp + 6], 0
mov eax, dword [ebp]
cmp eax, 0xffffffff
je 0x403c4b
lea edx, [esp + 0x64]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
je 0x403c86
or word [ebp + 6], 1
mov dword [esp + 4], edi
mov eax, dword [ebp]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
je 0x403ca1
or word [ebp + 6], 4
lea eax, [esp + 0x26c]
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
je 0x403c44
or word [ebp + 6], 2
inc ebx
jmp 0x403c4b
xor edi, edi
jmp 0x403aa0
test eax, eax
jne 0x403a8d
jmp 0x4038d3
mov dword [esp + 0x4c], 0
jmp 0x40391b
xor edx, edx
jmp 0x4039c0
xor edx, edx
jmp 0x403a43
xor edx, edx
jmp 0x403a03
xor ebx, ebx
jmp 0x4038e4
mov ebx, 0xffffffff
jmp 0x4038e4