Function at 0x1002afe0
Capabilities:
Get socket status

Disassembly:
push 0xffffffffffffffff
push 0x10056fd8
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push ebp
push edi
mov eax, dword [0x1007fa04]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
mov byte [esp + 0x13], 0
lea ebp, [esi + 0x10]
mov edi, edi
mov eax, dword [esi]
xor ebx, ebx
or eax, dword [esi + 4]
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [ebp], ebx
mov byte [esp + 0x12], bl
push ebx
je 0x1002b048
call dword [sym.imp.MSVCR80.dll__time64]
mov ecx, dword [esi]
mov edi, dword [esi + 4]
add esp, 4
sub eax, ecx
sbb edx, edi
add ecx, eax
adc edi, edx
mov dword [esp + 0x24], eax
mov dword [esi], ecx
mov dword [esi + 4], edi
jmp 0x1002b05e
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.MSVCR80.dll__time64]
add esp, 4
mov dword [esi], eax
mov dword [esi + 4], edx
mov eax, dword [0x100839e0]
push eax
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x44]
cmp edi, ebx
mov dword [esp + 0x3c], ebx
je 0x1002b13d
mov edi, edi
cmp dword [edi + 0x38], ebx
jne 0x1002b132
mov eax, dword [edi + 0x6c]
cmp eax, 0xffffffff
jne 0x1002b09b
test byte [edi + 0x5a], 4
jne 0x1002b132
cmp dword [edi + 0x60], ebx
je 0x1002b0a7
mov ecx, dword [esp + 0x24]
sub dword [edi + 0x64], ecx
cmp byte [esp + 0x13], 0
je 0x1002b0e6
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x24]
push ecx
push 0x80
push 0xffff
push eax
mov dword [esp + 0x2c], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
je 0x1002b0e6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2736
je 0x1002b1c5
mov dl, byte [0x100839d6]
test dl, dl
je 0x1002b0f6
cmp edi, dword [esp + 0x44]
je 0x1002b132
mov edx, dword [ebp]
mov ebx, dword [edi + 0x6c]
xor eax, eax
test edx, edx
jbe 0x1002b113
lea ecx, [esi + 0x14]
cmp dword [ecx], ebx
je 0x1002b113
add eax, 1
add ecx, 4
cmp eax, edx
jb 0x1002b105
cmp eax, edx
jne 0x1002b127
cmp edx, 0x400
jae 0x1002b127
mov dword [esi + eax*4 + 0x14], ebx
add dword [ebp], 1
add dword [esi + 0xc], 1
mov byte [esp + 0x12], 1
xor ebx, ebx
mov edi, dword [edi + 0x40]
cmp edi, ebx
jne 0x1002b080
or edi, 0xffffffff
lea ecx, [esp + 0x14]
mov dword [esp + 0x3c], edi
call fcn.10001130
cmp byte [esp + 0x12], 0
je 0x1002b213
jmp 0x1002b160
mov eax, dword [0x100839d8]
cmp eax, ebx
je 0x1002b173
call eax
test eax, eax
jne 0x1002b251
lea eax, [esp + 0x2c]
push eax
push ebx
push ebx
push ebp
push 0x400
mov dword [esp + 0x40], 0x3c
mov dword [esp + 0x44], ebx
call dword [sym.imp.WS2_32.dll_select]
mov dword [esi + 8], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [esi + 8], edi
jne 0x1002b270
cmp eax, 4
je 0x1002b160
cmp eax, 0x2714
je 0x1002b160
cmp eax, 0x2736
jne 0x1002b2c0
mov byte [esp + 0x13], 1
jmp 0x1002b010
mov ecx, dword [edi + 0x6c]
push ecx
push str.INET_select_wait:_found__not_a_socket__socket_:__ld
call sym.fbclient.dll_gds__log
mov dword [esi + 0xc], ebx
mov dword [ebp], ebx
mov dword [esi + 8], ebx
mov edi, dword [edi + 0x6c]
mov dword [esi + 0x14], edi
add dword [ebp], 1
add dword [esi + 0xc], 1
add esp, 8
lea ecx, [esp + 0x14]
mov dword [esp + 0x3c], 0xffffffff
call fcn.10001130
mov al, 1
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0x30
ret
mov dl, byte [0x100839d6]
test dl, dl
jne 0x1002b2ce
mov eax, dword [esp + 0x44]
test byte [eax + 0x54], 2
je 0x1002b2ce
push str.INET_select_wait:_client_rundown_complete__server_exiting
call sym.fbclient.dll_gds__log
add esp, 4
xor al, al
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0x30
ret
mov eax, dword [esp + 0x44]
and word [eax + 0x54], 0xfffd
xor al, al
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0x30
ret
cmp dword [esi + 8], ebx
jne 0x1002b2ab
mov eax, dword [0x100839e0]
push eax
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x44]
cmp edi, ebx
je 0x1002b2a2
lea ecx, [ecx]
mov ecx, dword [edi + 0x6c]
push ecx
mov ecx, esi
call fcn.1002a000
mov edi, dword [edi + 0x40]
cmp edi, ebx
jne 0x1002b290
lea ecx, [esp + 0x1c]
call fcn.10001130
mov al, 1
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0x30
ret
push eax
push str.INET_select_wait:_select_failed__errno___d
call sym.fbclient.dll_gds__log
add esp, 8
xor al, al
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0x30
ret