Function at 0x1003a350
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x344
mov eax, dword [0x10115770]
xor eax, esp
mov dword [esp + 0x340], eax
xor eax, eax
mov dword [esp + 8], ecx
push ebx
mov dword [esp + 0x10], eax
mov ebx, edx
push esi
mov eax, ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
push edi
mov edi, dword [ebp + 0xc]
cmp eax, 0xffffffff
jne 0x1003a3bc
cmp ebx, ecx
jne 0x1003a3bc
cmp dword [ebp + 8], ecx
jne 0x1003a3bc
mov ecx, edi
call fcn.1003a330
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.100626a1
mov esp, ebp
pop ebp
ret
test edi, edi
jle 0x1003a3d5
mov dword [esp + 0x18], edi
call fcn.1003b430
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], edx
xor ecx, ecx
xor esi, esi
or edx, 0xffffffff
mov dword [esp + 0x240], ecx
mov dword [esp + 0x28], esi
cmp eax, 0xffffffff
je 0x1003a40b
mov esi, 1
mov dword [esp + 0x2c], eax
mov ecx, esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x244], eax
mov edx, eax
mov dword [esp + 0x240], ecx
cmp ebx, 0xffffffff
je 0x1003a472
xor eax, eax
test esi, esi
je 0x1003a421
cmp dword [esp + eax*4 + 0x2c], ebx
je 0x1003a421
inc eax
cmp eax, esi
jb 0x1003a416
cmp eax, esi
jne 0x1003a437
cmp esi, 0x40
jae 0x1003a437
mov dword [esp + eax*4 + 0x2c], ebx
mov esi, dword [esp + 0x28]
inc esi
mov dword [esp + 0x28], esi
xor eax, eax
test ecx, ecx
je 0x1003a44e
lea ecx, [ecx]
cmp dword [esp + eax*4 + 0x244], ebx
je 0x1003a44e
inc eax
cmp eax, ecx
jb 0x1003a440
cmp eax, ecx
jne 0x1003a46d
cmp ecx, 0x40
jae 0x1003a46d
mov dword [esp + eax*4 + 0x244], ebx
mov ecx, dword [esp + 0x240]
inc ecx
mov dword [esp + 0x240], ecx
cmp ebx, edx
cmova edx, ebx
mov eax, dword [ebp + 8]
mov dword [esp + 0x130], 0
cmp eax, 0xffffffff
je 0x1003a4d3
mov dword [esp + 0x134], eax
xor eax, eax
mov dword [esp + 0x130], 1
test ecx, ecx
je 0x1003a4b2
mov ebx, dword [ebp + 8]
cmp dword [esp + eax*4 + 0x244], ebx
je 0x1003a4ae
inc eax
cmp eax, ecx
jb 0x1003a4a0
mov ebx, dword [esp + 0x10]
cmp eax, ecx
jne 0x1003a4cc
cmp ecx, 0x40
jae 0x1003a4cc
mov ecx, dword [ebp + 8]
mov dword [esp + eax*4 + 0x244], ecx
inc dword [esp + 0x240]
cmp dword [ebp + 8], edx
cmova edx, dword [ebp + 8]
xor ecx, ecx
lea eax, [esp + 0x238]
test edi, edi
cmovs eax, ecx
lea ecx, [edx + 1]
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x18]
test edi, edi
jle 0x1003a527
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x238], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [esp + 0x23c], eax
mov eax, dword [esp + 0x10]
jmp 0x1003a53f
jne 0x1003a53f
mov dword [esp + 0x238], 0
mov dword [esp + 0x23c], 0
push eax
xor ecx, ecx
lea eax, [esp + 0x244]
cmp dword [esp + 0x134], ecx
push eax
lea eax, [esp + 0x138]
cmove eax, ecx
test esi, esi
push eax
lea eax, [esp + 0x34]
cmove eax, ecx
push eax
push dword [esp + 0x34]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x1003a5d0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x1003a58f
cmp dword [0x1011aa84], 0
jne 0x1003a5d4
cmp eax, 0x2714
jne 0x1003a5d4
test edi, edi
jg 0x1003a5a0
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
jmp 0x1003a4ec
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.1003b430
push edx
push eax
call fcn.1003b460
mov ecx, edi
add esp, 0x10
sub ecx, eax
mov dword [esp + 0x18], ecx
test ecx, ecx
jle 0x1003a5ee
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
jmp 0x1003a4f0
test eax, eax
jns 0x1003a5ec
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.100626a1
mov esp, ebp
pop ebp
ret
jne 0x1003a605
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.100626a1
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x14]
xor esi, esi
mov edi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
cmp eax, 0xffffffff
je 0x1003a63e
lea ecx, [esp + 0x28]
push ecx
push eax
call edi
test eax, eax
mov ecx, 1
lea eax, [esp + 0x240]
cmovne esi, ecx
mov ecx, dword [esp + 0x14]
push eax
push ecx
call edi
test eax, eax
je 0x1003a63e
or esi, 4
cmp ebx, 0xffffffff
je 0x1003a664
lea eax, [esp + 0x28]
push eax
push ebx
call edi
test eax, eax
je 0x1003a652
or esi, 8
lea eax, [esp + 0x240]
push eax
push ebx
call edi
test eax, eax
je 0x1003a664
or esi, 4
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
je 0x1003a690
lea eax, [esp + 0x130]
push eax
push ebx
call edi
test eax, eax
je 0x1003a67e
or esi, 2
lea eax, [esp + 0x240]
push eax
push ebx
call edi
test eax, eax
je 0x1003a690
or esi, 4
mov ecx, dword [esp + 0x34c]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100626a1
mov esp, ebp
pop ebp
ret