Function at 0x10004422
Capabilities:
Get socket status

Disassembly:
push ebp
lea ebp, [esp - 0x404]
sub esp, 0x404
push 0xffffffffffffffff
push 0x10038d2e
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x1004d0e0]
xor eax, ebp
mov dword [ebp + 0x400], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 0x410]
mov dword [ebp - 0x20], eax
lea eax, [edi + 0x18]
push eax
mov dword [ebp - 0x38], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
inc eax
mov byte [ebp - 0x34], al
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], ebx
cmp byte [edi + 0xd0], bl
jne 0x1000478d
lea esi, [edi + 0xa8]
push 3
mov ecx, esi
pop edx
mov eax, dword [ecx]
lea ecx, [ecx + 0xc]
mov dword [eax], ebx
or dword [ecx - 4], 0xffffffff
sub edx, 1
jne 0x10004498
mov eax, dword [edi + 0x30]
mov ecx, ebx
mov dword [ebp - 0x10], eax
mov eax, dword [esi]
mov edx, dword [eax]
test edx, edx
je 0x100044cd
add eax, 4
mov ebx, dword [ebp - 0x10]
cmp dword [eax], ebx
push 0
pop ebx
je 0x100044e7
inc ecx
add eax, 4
cmp ecx, edx
jb 0x100044bb
lea eax, [edx + 1]
mov ecx, esi
push eax
call fcn.10003407
mov ecx, dword [esi]
mov edx, dword [ebp - 0x10]
mov eax, dword [ecx]
mov dword [ecx + eax*4 + 4], edx
mov eax, dword [esi]
inc dword [eax]
mov esi, dword [edi + 0xcc]
mov eax, ebx
test esi, esi
je 0x10004507
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
test al, al
je 0x10004505
mov esi, dword [esi + 4]
test esi, esi
jne 0x100044f3
mov eax, ebx
mov ecx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ecx
mov esi, eax
lea eax, [edi + 0x38]
push ecx
add eax, ecx
lea ecx, [edi + 0xa8]
push eax
add ecx, ebx
call fcn.1000333a
mov eax, dword [edi + ebx + 0xb0]
cmp eax, esi
mov ecx, dword [ebp - 0x10]
cmovbe eax, esi
add ecx, 0x1c
add ebx, 0xc
mov dword [ebp - 0x10], ecx
cmp ecx, 0x54
jl 0x1000450f
push ecx
lea ebx, [edi + 0x8c]
mov dword [ebp - 0x14], eax
push ebx
lea ecx, [edi + 0xb4]
call fcn.1000333a
mov esi, dword [edi + 0xbc]
cmp esi, dword [ebp - 0x14]
push ecx
cmovbe esi, dword [ebp - 0x14]
lea ecx, [edi + 0xc0]
push ebx
call fcn.1000333a
mov eax, dword [edi + 0xc8]
cmp eax, esi
cmovbe eax, esi
mov esi, dword [edi + 0xcc]
mov dword [ebp - 0x10], eax
xor eax, eax
push eax
pop ebx
lea ecx, [eax + 1]
jmp 0x1000459c
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 0xc]
mov esi, dword [esi + 4]
mov ecx, eax
test esi, esi
jne 0x1000458f
mov eax, ecx
mov esi, 0xf4240
cdq
idiv esi
mov dword [ebp - 0x28], eax
mov eax, ecx
cdq
idiv esi
lea eax, [edi + 0x18]
push eax
mov dword [ebp - 0x24], edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [edi + 0xa8]
mov byte [ebp - 0x34], bl
mov edx, dword [esi]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], 0x1004d9c0
test edx, edx
jne 0x10004610
cmp dword [edi + 0xb4], edx
jne 0x10004610
cmp dword [edi + 0xc0], edx
jne 0x10004610
mov eax, dword [ebp - 0x24]
mov ecx, 0x3e8
cdq
idiv ecx
imul ecx, dword [ebp - 0x28], 0x3e8
push 1
add eax, ecx
pop ecx
cmove eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, ebx
jmp 0x10004707
cmp dword [ebp - 0x28], 0
jne 0x1000462f
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x14], 0x3e8
lea eax, [ecx - 1]
cmp eax, 0x3e6
cmovbe ecx, dword [ebp - 0x14]
mov dword [ebp - 0x24], ecx
lea eax, [ebp - 0x28]
push eax
push dword [edi + 0xc0]
mov eax, dword [ebp - 0x10]
push dword [edi + 0xb4]
inc eax
push edx
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x30]
sets dl
call fcn.10003461
cmp dword [ebp - 0x10], 0
jle 0x10004704
push dword [esi]
push dword [edi + 0x30]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x10004704
lea eax, [ebp]
mov dword [ebp - 0x18], ebx
mov esi, 0x400
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x14], 0x1004d9c0
lea eax, [ebp - 0x18]
push eax
push ecx
push ecx
mov ecx, dword [edi + 0x30]
lea edx, [ebp - 0x30]
call fcn.1000377f
add esp, 0xc
cmp eax, esi
je 0x10004690
test eax, eax
jg 0x100046fa
je 0x100046dd
call fcn.10001bef
mov esi, dword [ebp - 0x14]
mov ecx, dword [esi + 4]
cmp ecx, dword [eax + 4]
jne 0x100046c7
cmp dword [ebp - 0x18], 0x2733
je 0x100046fa
call fcn.10001bef
mov ecx, dword [esi + 4]
cmp ecx, dword [eax + 4]
jne 0x100046dd
cmp dword [ebp - 0x18], 0x4d5
je 0x100046fa
lea eax, [edi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
lea ecx, [edi + 0x30]
lea ebx, [eax + 1]
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x34], bl
call fcn.1000402c
mov esi, dword [ebp - 0x10]
dec esi
test bl, bl
jne 0x1000471c
jmp 0x10004707
mov esi, dword [ebp - 0x10]
lea eax, [edi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
lea ebx, [eax + 1]
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x34], bl
test esi, esi
jle 0x1000476a
mov ebx, dword [ebp - 0x20]
lea esi, [edi + 0x8c]
push ebx
push esi
lea ecx, [edi + 0xc0]
call fcn.10003379
push ebx
push esi
lea ecx, [edi + 0xb4]
call fcn.10003379
push 0x18
pop ebx
push 0x38
pop esi
push dword [ebp - 0x20]
lea eax, [edi + 0x38]
add eax, esi
lea ecx, [edi + 0xa8]
push eax
add ecx, ebx
call fcn.10003379
add ebx, 0xfffffff4
sub esi, 0x1c
jns 0x10004749
mov ebx, dword [ebp - 0x1c]
mov esi, dword [edi + 0xcc]
test esi, esi
je 0x10004789
mov ebx, dword [ebp - 0x20]
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0x10]
mov esi, dword [esi + 4]
test esi, esi
jne 0x10004777
mov ebx, dword [ebp - 0x1c]
test bl, bl
je 0x10004797
lea eax, [edi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x400]
xor ecx, ebp
call fcn.1002211a
add ebp, 0x404
leave
ret 8