Function at 0x10003f40
Capabilities:
Get socket status

Disassembly:
sub esp, 0x348
push ebx
push ebp
push esi
lea eax, [esp + 0x18]
push edi
xor esi, esi
push eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], 1
call fcn.100061e2
mov eax, dword [esp + 0x368]
mov ecx, dword [esp + 0x20]
add esp, 4
cmp eax, esi
mov dword [esp + 0x18], ecx
jle 0x1000449b
mov edi, dword [esp + 0x360]
or ecx, 0xffffffff
xor eax, eax
xor ebp, ebp
xor ebx, ebx
xor esi, esi
xor edx, edx
mov dword [esp + 0x4c], ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x150], ebx
test ecx, ecx
mov dword [esp + 0x254], esi
jle 0x10004066
mov eax, dword [esp + 0x360]
mov al, byte [edx + eax]
cmp al, 0x72
jne 0x10003fea
cmp ebp, 0x40
jae 0x10003fe2
mov ecx, dword [esp + 0x35c]
mov dword [esp + ebp*4 + 0x50], ecx
mov ebp, dword [esp + 0x4c]
inc ebp
mov dword [esp + 0x4c], ebp
lea ecx, [esp + 0x4c]
mov dword [esp + 0x20], ecx
cmp al, 0x77
jne 0x1000401b
cmp ebx, 0x40
jae 0x10004010
mov ecx, dword [esp + 0x35c]
mov dword [esp + ebx*4 + 0x154], ecx
mov ebx, dword [esp + 0x150]
inc ebx
mov dword [esp + 0x150], ebx
lea ecx, [esp + 0x150]
mov dword [esp + 0x24], ecx
cmp al, 0x65
jne 0x1000404c
cmp esi, 0x40
jae 0x10004041
mov eax, dword [esp + 0x35c]
mov dword [esp + esi*4 + 0x258], eax
mov esi, dword [esp + 0x254]
inc esi
mov dword [esp + 0x254], esi
lea ecx, [esp + 0x254]
mov dword [esp + 0x14], ecx
mov edi, dword [esp + 0x360]
or ecx, 0xffffffff
xor eax, eax
inc edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp edx, ecx
jl 0x10003fbb
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x20]
lea edx, [esp + 0x28]
push edx
push ebp
push ebx
push edi
push 0xffffffffffffffff
call sub.WSOCK32.dll_select
mov esi, eax
call sub.WSOCK32.dll_WSAGetLastError
mov dword [esp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [esp + 0x18]
push eax
call fcn.100061e2
add esp, 4
test esi, esi
jne 0x10004225
push 1
push esi
push esi
lea ecx, [esp + 0x3c]
push esi
push ecx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x100040dc
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
cmp dword [esp + 0x34], 0x12
je 0x1000448b
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x364]
sub ecx, edx
cmp ecx, eax
jl 0x10003f88
test edi, edi
je 0x10004142
mov edx, dword [esp + 0x4c]
xor eax, eax
test edx, edx
jbe 0x10004142
mov esi, dword [esp + 0x35c]
lea ecx, [esp + 0x50]
cmp dword [ecx], esi
je 0x1000411c
inc eax
add ecx, 4
cmp eax, edx
jb 0x1000410e
jmp 0x10004149
lea ecx, [edx - 1]
cmp eax, ecx
jae 0x1000413b
lea ecx, [esp + eax*4 + 0x50]
mov edx, dword [ecx + 4]
inc eax
mov dword [ecx], edx
mov edx, dword [esp + 0x4c]
add ecx, 4
lea edi, [edx - 1]
cmp eax, edi
jb 0x10004127
dec edx
mov dword [esp + 0x4c], edx
jmp 0x10004149
mov esi, dword [esp + 0x35c]
test ebx, ebx
je 0x1000419c
mov edx, dword [esp + 0x150]
xor eax, eax
test edx, edx
jbe 0x1000419c
lea ecx, [esp + 0x154]
cmp dword [ecx], esi
je 0x1000416f
inc eax
add ecx, 4
cmp eax, edx
jb 0x10004161
jmp 0x1000419c
lea ecx, [edx - 1]
cmp eax, ecx
jae 0x10004194
lea ecx, [esp + eax*4 + 0x154]
mov edx, dword [ecx + 4]
inc eax
mov dword [ecx], edx
mov edx, dword [esp + 0x150]
add ecx, 4
lea edi, [edx - 1]
cmp eax, edi
jb 0x1000417d
dec edx
mov dword [esp + 0x150], edx
test ebp, ebp
je 0x10004209
mov edx, dword [esp + 0x254]
xor eax, eax
test edx, edx
jbe 0x10004209
lea ecx, [esp + 0x258]
cmp dword [ecx], esi
je 0x100041dc
inc eax
add ecx, 4
cmp eax, edx
jb 0x100041b4
push 0x2733
call sub.WSOCK32.dll_WSASetLastError
pop edi
pop esi
pop ebp
mov eax, 0xfffffff6
pop ebx
add esp, 0x348
ret 0xc
lea ecx, [edx - 1]
cmp eax, ecx
jae 0x10004201
lea ecx, [esp + eax*4 + 0x258]
mov edx, dword [ecx + 4]
inc eax
mov dword [ecx], edx
mov edx, dword [esp + 0x254]
add ecx, 4
lea esi, [edx - 1]
cmp eax, esi
jb 0x100041ea
dec edx
mov dword [esp + 0x254], edx
push 0x2733
call sub.WSOCK32.dll_WSASetLastError
pop edi
pop esi
pop ebp
mov eax, 0xfffffff6
pop ebx
add esp, 0x348
ret 0xc
test ebp, ebp
je 0x1000435b
mov esi, dword [esp + 0x35c]
push ebp
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x10004362
test edi, edi
je 0x10004287
mov edx, dword [esp + 0x4c]
xor eax, eax
test edx, edx
jbe 0x10004287
lea ecx, [esp + 0x50]
cmp dword [ecx], esi
je 0x10004263
inc eax
add ecx, 4
cmp eax, edx
jb 0x10004255
jmp 0x10004287
lea ecx, [edx - 1]
cmp eax, ecx
jae 0x10004282
lea ecx, [esp + eax*4 + 0x50]
mov edx, dword [ecx + 4]
inc eax
mov dword [ecx], edx
mov edx, dword [esp + 0x4c]
add ecx, 4
lea edi, [edx - 1]
cmp eax, edi
jb 0x1000426e
dec edx
mov dword [esp + 0x4c], edx
test ebx, ebx
je 0x100042da
mov edx, dword [esp + 0x150]
xor eax, eax
test edx, edx
jbe 0x100042da
lea ecx, [esp + 0x154]
cmp dword [ecx], esi
je 0x100042ad
inc eax
add ecx, 4
cmp eax, edx
jb 0x1000429f
jmp 0x100042da
lea ecx, [edx - 1]
cmp eax, ecx
jae 0x100042d2
lea ecx, [esp + eax*4 + 0x154]
mov edx, dword [ecx + 4]
inc eax
mov dword [ecx], edx
mov edx, dword [esp + 0x150]
add ecx, 4
lea edi, [edx - 1]
cmp eax, edi
jb 0x100042bb
dec edx
mov dword [esp + 0x150], edx
mov edx, dword [esp + 0x254]
xor eax, eax
test edx, edx
jbe 0x10004341
lea ecx, [esp + 0x258]
cmp dword [ecx], esi
je 0x10004314
inc eax
add ecx, 4
cmp eax, edx
jb 0x100042ee
mov eax, dword [esp + 0x10]
push eax
call sub.WSOCK32.dll_WSASetLastError
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x348
ret 0xc
lea ecx, [edx - 1]
cmp eax, ecx
jae 0x10004339
lea ecx, [esp + eax*4 + 0x258]
mov edx, dword [ecx + 4]
inc eax
mov dword [ecx], edx
mov edx, dword [esp + 0x254]
add ecx, 4
lea esi, [edx - 1]
cmp eax, esi
jb 0x10004322
dec edx
mov dword [esp + 0x254], edx
mov eax, dword [esp + 0x10]
push eax
call sub.WSOCK32.dll_WSASetLastError
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x348
ret 0xc
mov esi, dword [esp + 0x35c]
test edi, edi
je 0x10004371
push edi
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x1000437c
test ebx, ebx
je 0x1000437c
push ebx
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test edi, edi
je 0x100043c0
mov edx, dword [esp + 0x4c]
xor eax, eax
test edx, edx
jbe 0x100043c0
lea ecx, [esp + 0x50]
cmp dword [ecx], esi
je 0x1000439c
inc eax
add ecx, 4
cmp eax, edx
jb 0x1000438e
jmp 0x100043c0
lea ecx, [edx - 1]
cmp eax, ecx
jae 0x100043bb
lea ecx, [esp + eax*4 + 0x50]
mov edx, dword [ecx + 4]
inc eax
mov dword [ecx], edx
mov edx, dword [esp + 0x4c]
add ecx, 4
lea edi, [edx - 1]
cmp eax, edi
jb 0x100043a7
dec edx
mov dword [esp + 0x4c], edx
test ebx, ebx
je 0x10004413
mov edx, dword [esp + 0x150]
xor eax, eax
test edx, edx
jbe 0x10004413
lea ecx, [esp + 0x154]
cmp dword [ecx], esi
je 0x100043e6
inc eax
add ecx, 4
cmp eax, edx
jb 0x100043d8
jmp 0x10004413
lea ecx, [edx - 1]
cmp eax, ecx
jae 0x1000440b
lea ecx, [esp + eax*4 + 0x154]
mov edx, dword [ecx + 4]
inc eax
mov dword [ecx], edx
mov edx, dword [esp + 0x150]
add ecx, 4
lea edi, [edx - 1]
cmp eax, edi
jb 0x100043f4
dec edx
mov dword [esp + 0x150], edx
test ebp, ebp
je 0x10004466
mov edx, dword [esp + 0x254]
xor eax, eax
test edx, edx
jbe 0x10004466
lea ecx, [esp + 0x258]
cmp dword [ecx], esi
je 0x10004439
inc eax
add ecx, 4
cmp eax, edx
jb 0x1000442b
jmp 0x10004466
lea ecx, [edx - 1]
cmp eax, ecx
jae 0x1000445e
lea ecx, [esp + eax*4 + 0x258]
mov edx, dword [ecx + 4]
inc eax
mov dword [ecx], edx
mov edx, dword [esp + 0x254]
add ecx, 4
lea esi, [edx - 1]
cmp eax, esi
jb 0x10004447
dec edx
mov dword [esp + 0x254], edx
mov esi, dword [esp + 0x10]
push esi
call sub.WSOCK32.dll_WSASetLastError
cmp esi, 0x2714
jne 0x10004487
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x348
ret 0xc
test esi, esi
je 0x1000449b
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x348
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x348
ret 0xc