Function at 0x477170
Capabilities:
Get socket status

Disassembly:
sub esp, 0x320
mov eax, dword [0xa57200]
xor eax, esp
mov dword [esp + 0x31c], eax
mov edx, dword [esp + 0x324]
mov dword [esp + 4], edx
test edx, edx
je 0x4771ab
mov ecx, dword [esp + 0x328]
xor eax, eax
test ecx, ecx
je 0x4771ab
cmp dword [edx + eax*8], 0xffffffff
jne 0x4771e3
inc eax
cmp eax, ecx
jb 0x4771a0
mov eax, dword [esp + 0x32c]
test eax, eax
je 0x477498
jns 0x477491
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
mov ecx, dword [esp + 0x31c]
xor ecx, esp
call fcn.00452bc2
add esp, 0x320
ret
push ebx
push ebp
push esi
push edi
xor edi, edi
xor ebx, ebx
xor esi, esi
mov dword [esp + 0x20], edi
or ebp, 0xffffffff
mov dword [esp + 0x124], ebx
xor edx, edx
mov dword [esp + 0x228], esi
mov dword [esp + 0x10], edx
nop dword [eax + eax]
mov ecx, dword [esp + 0x14]
xor eax, eax
mov dword [esp + 0x18], ebp
mov word [ecx + edx*8 + 6], ax
mov ecx, dword [ecx + edx*8]
cmp ecx, 0xffffffff
je 0x4772f1
mov eax, dword [esp + 0x14]
movzx edx, word [eax + edx*8 + 4]
mov eax, ebp
test edx, 0x710
je 0x4772ed
cmp ecx, eax
mov ebp, ecx
cmovbe ebp, eax
test edx, 0x300
je 0x477278
xor eax, eax
test edi, edi
je 0x477262
cmp dword [esp + eax*4 + 0x24], ecx
je 0x477262
inc eax
cmp eax, edi
jb 0x477257
cmp eax, edi
jne 0x477278
cmp edi, 0x40
jae 0x477278
mov dword [esp + eax*4 + 0x24], ecx
mov edi, dword [esp + 0x20]
inc edi
mov dword [esp + 0x20], edi
test dl, 0x10
je 0x4772b0
xor eax, eax
test ebx, ebx
je 0x477291
cmp dword [esp + eax*4 + 0x128], ecx
je 0x477291
inc eax
cmp eax, ebx
jb 0x477283
cmp eax, ebx
jne 0x4772b0
cmp ebx, 0x40
jae 0x4772b0
mov dword [esp + eax*4 + 0x128], ecx
mov ebx, dword [esp + 0x124]
inc ebx
mov dword [esp + 0x124], ebx
test edx, 0x600
je 0x4772ed
xor eax, eax
test esi, esi
je 0x4772ce
nop
cmp dword [esp + eax*4 + 0x22c], ecx
je 0x4772ce
inc eax
cmp eax, esi
jb 0x4772c0
cmp eax, esi
jne 0x4772ed
cmp esi, 0x40
jae 0x4772ed
mov dword [esp + eax*4 + 0x22c], ecx
mov esi, dword [esp + 0x228]
inc esi
mov dword [esp + 0x228], esi
mov edx, dword [esp + 0x10]
inc edx
mov dword [esp + 0x10], edx
cmp edx, dword [esp + 0x338]
jb 0x477210
mov eax, dword [esp + 0x33c]
cdq
mov ecx, eax
test edx, edx
jl 0x477322
jg 0x47731b
cmp ecx, 0x7fffffff
jb 0x477322
mov ecx, closesocket
xor edx, edx
test edi, edi
jne 0x47735c
test ebx, ebx
jne 0x47735c
test esi, esi
jne 0x47735c
test ecx, ecx
jne 0x477339
xor eax, eax
jmp 0x4773ed
jns 0x47734e
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x4773ed
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x4773ed
lea eax, [esp + 0x18]
mov dword [esp + 0x10], eax
test edx, edx
jg 0x477382
jl 0x47736e
test ecx, ecx
jae 0x477378
mov dword [esp + 0x10], 0
jmp 0x4773b7
test edx, edx
jl 0x4773ab
jg 0x477382
test ecx, ecx
je 0x4773ab
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x18], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [esp + 0x1c], eax
jmp 0x4773b7
or ecx, edx
jne 0x4773b7
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
push dword [esp + 0x10]
xor eax, eax
lea edx, [esp + 0x22c]
test esi, esi
lea ecx, [esp + 0x128]
cmove edx, eax
test ebx, ebx
push edx
cmove ecx, eax
xor esi, esi
test edi, edi
lea eax, [esp + 0x28]
push ecx
cmove eax, esi
push eax
lea eax, [ebp + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x47740d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x31c]
xor ecx, esp
call fcn.00452bc2
add esp, 0x320
ret
jne 0x477413
xor eax, eax
jmp 0x4773f4
mov esi, dword [esp + 0x14]
xor edi, edi
add esi, 6
mov ebx, 0x300
mov ebp, 0x400
xor eax, eax
mov word [esi], ax
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
je 0x47747d
lea ecx, [esp + 0x20]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x477445
or word [esi], bx
lea eax, [esp + 0x124]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47745d
or word [esi], 0x10
lea eax, [esp + 0x228]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x477474
or word [esi], bp
movzx eax, word [esi]
test ax, ax
je 0x47747d
inc edi
add esi, 8
sub dword [esp + 0x338], 1
jne 0x477426
mov eax, edi
jmp 0x4773f4
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x31c]
xor eax, eax
xor ecx, esp
call fcn.00452bc2
add esp, 0x320
ret