Function at 0x406960
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x154
mov eax, dword [0x4c40e4]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x12c], ecx
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x10c], 0
jmp 0x40699e
mov eax, dword [ebp - 0x10c]
add eax, 1
mov dword [ebp - 0x10c], eax
mov ecx, dword [ebp - 0x10c]
cmp ecx, dword [ebp - 0x108]
jae 0x4069c8
mov edx, dword [ebp - 0x10c]
mov eax, dword [ebp - 0x12c]
mov ecx, dword [ebp + edx*4 - 0x104]
cmp ecx, dword [eax + 8]
jne 0x4069c6
jmp 0x4069c8
jmp 0x40698f
mov edx, dword [ebp - 0x10c]
cmp edx, dword [ebp - 0x108]
jne 0x406a04
cmp dword [ebp - 0x108], 0x40
jae 0x406a04
mov eax, dword [ebp - 0x10c]
mov ecx, dword [ebp - 0x12c]
mov edx, dword [ecx + 8]
mov dword [ebp + eax*4 - 0x104], edx
mov eax, dword [ebp - 0x108]
add eax, 1
mov dword [ebp - 0x108], eax
xor ecx, ecx
jne 0x406983
push 0
push 0x3e8
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.0049aa00
mov dword [ebp - 0x134], eax
push 0
push 0x3e8
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.0049aab0
push 0
push 0x3e8
push edx
push eax
call fcn.00499e90
mov dword [ebp - 0x130], eax
cmp dword [ebp + 0x10], 0
jl 0x406a6a
jg 0x406a5c
cmp dword [ebp + 0xc], 0
jb 0x406a6a
lea eax, [ebp - 0x134]
mov dword [ebp - 0x128], eax
jmp 0x406a74
mov dword [ebp - 0x128], 0
cmp dword [ebp + 8], 1
jne 0x406a88
lea ecx, [ebp - 0x108]
mov dword [ebp - 0x11c], ecx
jmp 0x406a92
mov dword [ebp - 0x11c], 0
cmp dword [ebp + 8], 0
jne 0x406aa6
lea edx, [ebp - 0x108]
mov dword [ebp - 0x124], edx
jmp 0x406ab0
mov dword [ebp - 0x124], 0
mov eax, dword [ebp - 0x128]
push eax
push 0
mov ecx, dword [ebp - 0x11c]
push ecx
mov edx, dword [ebp - 0x124]
push edx
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x110], eax
cmp dword [ebp - 0x110], 0xffffffff
jne 0x406b7f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
jne 0x406b7f
cmp dword [ebp + 0x10], 0
jl 0x406b0f
jg 0x406b01
cmp dword [ebp + 0xc], 0
jb 0x406b0f
lea eax, [ebp - 0x134]
mov dword [ebp - 0x114], eax
jmp 0x406b19
mov dword [ebp - 0x114], 0
cmp dword [ebp + 8], 1
jne 0x406b2d
lea ecx, [ebp - 0x108]
mov dword [ebp - 0x120], ecx
jmp 0x406b37
mov dword [ebp - 0x120], 0
cmp dword [ebp + 8], 0
jne 0x406b4b
lea edx, [ebp - 0x108]
mov dword [ebp - 0x118], edx
jmp 0x406b55
mov dword [ebp - 0x118], 0
mov eax, dword [ebp - 0x114]
push eax
push 0
mov ecx, dword [ebp - 0x120]
push ecx
mov edx, dword [ebp - 0x118]
push edx
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x110], eax
jmp 0x406ad5
cmp dword [ebp - 0x110], 0xffffffff
jne 0x406bb8
push str.Failed_to_select_socket
call fcn.004035c0
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea ecx, [ebp - 0x154]
call fcn.00403220
push 0x4bff28
lea eax, [ebp - 0x154]
push eax
call sub.MSVCR120.dll__CxxThrowException
jmp 0x406be2
cmp dword [ebp - 0x110], 0
jne 0x406be2
push str.Request_timed_out
lea ecx, [ebp - 0x140]
call fcn.004063c0
push 0x4c011c
lea ecx, [ebp - 0x140]
push ecx
call sub.MSVCR120.dll__CxxThrowException
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00499716
mov esp, ebp
pop ebp
ret 0xc