Function at 0x100151e0
Capabilities:
Get socket status

Disassembly:
sub esp, 0x33c
push ebx
push ebp
xor edx, edx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x360], edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
jl 0x10015229
jg 0x10015214
mov ebp, dword [esp + 0x35c]
cmp ebp, 0x7fffffff
jb 0x10015230
mov ebp, bind
mov dword [esp + 0x35c], ebp
mov dword [esp + 0x360], edx
jmp 0x10015230
mov ebp, dword [esp + 0x35c]
mov eax, dword [esp + 0x350]
mov ecx, dword [esp + 0x354]
cmp eax, 0xffffffff
jne 0x10015283
cmp ecx, eax
jne 0x10015283
cmp dword [esp + 0x358], eax
jne 0x10015283
cmp ebp, edx
je 0x10015276
jge 0x1001526f
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x33c
ret
push ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x33c
ret
cmp dword [esp + 0x360], edx
jl 0x100152cc
jg 0x10015292
cmp ebp, edx
jbe 0x100152cc
lea eax, [esp + 0x30]
push eax
mov edi, ebp
call fcn.100343f0
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 + 0x354]
add esp, 4
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x354]
mov dword [esp + 0x20], edx
xor edx, edx
xor esi, esi
or ebx, 0xffffffff
mov dword [esp + 0x40], edx
mov dword [esp + 0x144], esi
cmp eax, 0xffffffff
je 0x10015300
mov esi, 1
mov edx, esi
mov dword [esp + 0x148], eax
mov dword [esp + 0x144], esi
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], edx
mov ebx, eax
cmp ecx, 0xffffffff
je 0x1001536a
xor eax, eax
test esi, esi
jbe 0x1001531e
jmp 0x10015310
cmp dword [esp + eax*4 + 0x148], ecx
je 0x1001531e
inc eax
cmp eax, esi
jb 0x10015310
cmp eax, esi
jne 0x1001533d
cmp esi, 0x40
jae 0x1001533d
mov dword [esp + eax*4 + 0x148], ecx
mov esi, dword [esp + 0x144]
inc esi
mov dword [esp + 0x144], esi
xor eax, eax
test edx, edx
jbe 0x1001534e
cmp dword [esp + eax*4 + 0x44], ecx
je 0x1001534e
inc eax
cmp eax, edx
jb 0x10015343
cmp eax, edx
jne 0x10015364
cmp edx, 0x40
jae 0x10015364
mov dword [esp + eax*4 + 0x44], ecx
mov edx, dword [esp + 0x40]
inc edx
mov dword [esp + 0x40], edx
cmp ecx, ebx
jbe 0x1001536a
mov ebx, ecx
mov eax, dword [esp + 0x358]
xor ecx, ecx
mov dword [esp + 0x248], ecx
cmp eax, 0xffffffff
je 0x100153e1
mov dword [esp + 0x24c], eax
mov ecx, 1
xor eax, eax
mov dword [esp + 0x248], ecx
test edx, edx
jbe 0x100153b9
jmp 0x100153a0
mov ebp, dword [esp + 0x358]
cmp dword [esp + eax*4 + 0x44], ebp
je 0x100153b2
inc eax
cmp eax, edx
jb 0x100153a0
mov ebp, dword [esp + 0x35c]
cmp eax, edx
jne 0x100153d1
cmp edx, 0x40
jae 0x100153d1
mov edx, dword [esp + 0x358]
mov dword [esp + eax*4 + 0x44], edx
inc dword [esp + 0x40]
cmp dword [esp + 0x358], ebx
jbe 0x100153e1
mov ebx, dword [esp + 0x358]
cmp dword [esp + 0x360], 0
jg 0x10015406
jl 0x100153f1
test ebp, ebp
jae 0x10015406
inc ebx
mov dword [esp + 0x2c], ebx
mov ebx, dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x10], 0
jmp 0x10015430
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 0x10015430
mov ecx, dword [esp + 0x248]
mov esi, dword [esp + 0x144]
mov edi, edi
cmp dword [esp + 0x360], 0
jl 0x1001546b
jg 0x10015440
test ebp, ebp
jbe 0x1001546b
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 0x1001547e
mov eax, ebp
or eax, dword [esp + 0x360]
jne 0x1001547e
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 + 0x24c]
and ecx, edx
lea eax, [esp + 0x44]
push eax
neg esi
push ecx
mov ecx, dword [esp + 0x38]
sbb esi, esi
lea eax, [esp + 0x150]
and esi, eax
push esi
push ecx
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x10015546
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x100154d0
cmp dword [0x1007cac0], 0
jne 0x10015546
cmp eax, 0x2714
jne 0x10015546
cmp dword [esp + 0x360], 0
jl 0x10015420
jg 0x100154e8
test ebp, ebp
jbe 0x10015420
lea edx, [esp + 0x30]
push edx
call fcn.100343f0
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.10034490
mov edi, ebp
sub edi, eax
add esp, 0x20
test edi, edi
jle 0x10015276
jmp 0x10015420
test esi, esi
jl 0x10015261
je 0x10015276
mov edi, dword [esp + 0x350]
xor esi, esi
cmp edi, 0xffffffff
je 0x1001558b
lea ecx, [esp + 0x144]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x10015579
mov esi, 1
lea edx, [esp + 0x40]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1001558b
or esi, 4
mov edi, dword [esp + 0x354]
cmp edi, 0xffffffff
je 0x100155be
lea eax, [esp + 0x144]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100155ac
or esi, 8
lea ecx, [esp + 0x40]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100155be
or esi, 4
mov edi, dword [esp + 0x358]
cmp edi, 0xffffffff
je 0x100155f1
lea edx, [esp + 0x248]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100155df
or esi, 2
lea eax, [esp + 0x40]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100155f1
or esi, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x33c
ret