Function at 0x46e770
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
lea ebp, [esp - 0x404]
sub esp, 0x404
push 0xffffffffffffffff
push 0x48062d
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x49c100]
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 esi, ecx
mov dword [ebp - 0x14], esi
mov eax, dword [ebp + 0x40c]
mov ebx, dword [ebp + 0x410]
mov dword [ebp - 0x24], eax
lea eax, [esi + 0x18]
push eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x58], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x54], 1
cmp byte [esi + 0xd0], 0
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 4], 0
mov dword [ebp - 0x4c], eax
jne 0x46ed98
mov eax, dword [esi + 0xa8]
lea edi, [esi + 0xa8]
lea ecx, [esi + 0xc0]
mov dword [ebp - 0x1c], ecx
mov dword [eax], 0
mov eax, dword [esi + 0xb4]
mov dword [edi + 8], 0xffffffff
mov dword [eax], 0
mov dword [esi + 0xbc], 0xffffffff
mov eax, dword [ecx]
mov dword [eax], 0
mov dword [ecx + 8], 0xffffffff
xor ecx, ecx
mov eax, dword [edi]
mov esi, dword [esi + 0x30]
mov edx, dword [eax]
test edx, edx
je 0x46e853
add eax, 4
cmp dword [eax], esi
je 0x46e86a
inc ecx
add eax, 4
cmp ecx, edx
jb 0x46e847
lea eax, [edx + 1]
mov ecx, edi
push eax
call fcn.0046d5c0
mov ecx, dword [edi]
mov eax, dword [ecx]
mov dword [ecx + eax*4 + 4], esi
mov eax, dword [edi]
inc dword [eax]
mov ebx, dword [ebp - 0x14]
xor edi, edi
mov dword [ebp - 0x44], edi
mov esi, dword [ebx + 0xcc]
test esi, esi
je 0x46e894
nop dword [eax]
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 4]
call eax
test al, al
je 0x46e8af
mov esi, dword [esi + 4]
test esi, esi
jne 0x46e880
xor dl, dl
lea ecx, [ebx + 0xa8]
lea eax, [ebx + 0x3c]
mov dword [ebp - 0x30], ecx
mov ebx, 3
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], ebx
jmp 0x46e8b6
mov dl, 1
jmp 0x46e896
mov dl, byte [ebp - 0xd]
test dl, dl
jne 0x46e8c3
cmp dword [eax + 4], 0
mov byte [ebp - 0xd], dl
je 0x46e8c7
mov byte [ebp - 0xd], 1
mov eax, dword [eax]
mov esi, dword [eax]
cmp esi, eax
je 0x46e977
mov ebx, dword [ecx]
mov edi, esi
mov esi, dword [esi]
mov dword [ebp - 0x50], edi
mov edx, dword [ebx]
lea eax, [edx + 1]
mov dword [ebp - 0x2c], eax
mov eax, dword [ecx + 4]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x2c], eax
jbe 0x46e95b
mov ecx, dword [ebp - 0x2c]
shr eax, 1
add eax, dword [ebp - 0x38]
cmp eax, ecx
cmovae ecx, eax
mov dword [ebp - 0x2c], ecx
lea eax, [ecx*4 + 4]
push eax
call fcn.00475da2
mov ebx, eax
add esp, 4
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x38], ebx
mov ecx, dword [eax]
mov ecx, dword [ecx]
mov dword [ebx], ecx
xor ecx, ecx
mov edx, dword [eax]
cmp dword [edx], ecx
jbe 0x46e945
mov edi, dword [ebp - 0x38]
mov ebx, eax
nop word [eax + eax]
mov eax, dword [edx + ecx*4 + 4]
mov dword [edi + ecx*4 + 4], eax
inc ecx
mov edx, dword [ebx]
cmp ecx, dword [edx]
jb 0x46e930
mov edi, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x38]
push edx
call fcn.00476139
mov ecx, dword [ebp - 0x30]
add esp, 4
mov eax, dword [ebp - 0x2c]
mov dword [ecx], ebx
mov dword [ecx + 4], eax
mov edx, dword [ebx]
mov eax, dword [edi + 8]
mov dword [ebx + edx*4 + 4], eax
mov eax, dword [ecx]
inc dword [eax]
mov eax, dword [ebp - 0x20]
cmp esi, dword [eax]
jne 0x46e8d3
mov edi, dword [ebp - 0x44]
mov ebx, dword [ebp - 0x18]
cmp dword [ecx + 8], edi
mov eax, dword [ebp - 0x20]
cmova edi, dword [ecx + 8]
add eax, 0x1c
add ecx, 0xc
mov dword [ebp - 0x44], edi
sub ebx, 1
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x18], ebx
jne 0x46e8b3
cmp byte [ebp - 0xd], 0
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x14]
jne 0x46e9b5
cmp dword [eax + 0x94], 0
mov byte [ebp - 0xd], 0
je 0x46e9b9
mov byte [ebp - 0xd], 1
lea esi, [eax + 0x8c]
push ebx
push esi
lea ecx, [eax + 0xb4]
call fcn.00470120
mov ecx, dword [ebp - 0x14]
push ebx
push esi
mov eax, dword [ecx + 0xbc]
cmp eax, edi
mov ecx, dword [ebp - 0x1c]
cmova edi, eax
call fcn.00470120
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
mov eax, dword [edx + 0xc8]
cmp eax, edi
cmovbe eax, edi
mov dword [ebp - 0x28], eax
test ecx, ecx
jne 0x46ea05
cmp byte [ebp - 0xd], cl
je 0x46ed95
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
test ecx, ecx
je 0x46ea60
mov esi, dword [edx + 0xcc]
mov eax, 0x11e1a300
cmp ecx, eax
cmova ecx, eax
test esi, esi
je 0x46ea41
nop dword [eax + eax]
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 0x46ea30
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x40], eax
imul eax, eax, 0xf4240
sub ecx, eax
mov dword [ebp - 0x3c], ecx
push dword [ebp - 0x34]
call dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x14]
xor al, al
mov byte [ebp - 0xd], al
mov byte [ebp - 0x54], al
mov eax, dword [ebp - 0x1c]
mov edi, dword [ecx + 0xa8]
mov esi, dword [ecx + 0xb4]
mov edx, dword [eax]
test edi, edi
jne 0x46eb96
test esi, esi
jne 0x46eb96
test edx, edx
jne 0x46eb96
mov eax, 0x10624dd3
imul dword [ebp - 0x3c]
imul eax, dword [ebp - 0x40], 0x3e8
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, eax
mov eax, 1
cmove ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebp - 0x34]
call edi
mov al, 1
mov byte [ebp - 0xd], al
mov byte [ebp - 0x54], al
test esi, esi
jle 0x46ed73
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
push ebx
lea esi, [edi + 0x8c]
push esi
call fcn.00466e40
push ebx
push esi
lea ecx, [edi + 0xb4]
call fcn.00466e40
mov eax, dword [ebp - 0x1c]
mov edx, 2
add edi, 0x70
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x20], edi
mov eax, dword [eax]
xor ecx, ecx
mov dword [ebp - 0x18], ecx
cmp dword [eax], ecx
jbe 0x46ed58
nop
mov eax, dword [eax + ecx*4 + 4]
mov ecx, edi
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00458ae0
mov esi, dword [eax]
cmp esi, dword [edi + 4]
je 0x46ed41
mov edi, dword [esi + 0xc]
test edi, edi
je 0x46ed31
nop dword [eax]
mov eax, dword [edi + 0x30]
push edi
call eax
add esp, 4
test eax, eax
je 0x46ed3e
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x46eb7c
mov eax, dword [ecx + 0x14]
mov dword [esi + 0xc], eax
test eax, eax
jne 0x46eb75
mov dword [esi + 0x10], eax
mov dword [ecx + 0x14], 0
mov dword [edi + 0x14], 0
mov eax, dword [ebx + 4]
test eax, eax
je 0x46ed21
mov dword [eax + 0x14], edi
jmp 0x46ed23
cmp dword [ebp - 0x40], 0
jne 0x46ebb5
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x24], 0x3e8
lea eax, [ecx - 1]
cmp eax, 0x3e6
cmovbe ecx, dword [ebp - 0x24]
mov dword [ebp - 0x3c], ecx
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x28]
push edx
push esi
push edi
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov dword [ebp - 0x50], esi
test esi, esi
jns 0x46ebdf
call fcn.00433040
call edi
test esi, esi
jle 0x46eac4
mov ecx, dword [ebp - 0x14]
push dword [ecx + 0xa8]
push dword [ecx + 0x30]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x46eac4
lea eax, [ebp]
mov dword [ebp - 0x48], 0x400
mov dword [ebp - 0x44], eax
nop dword [eax + eax]
push 0
push 0
lea eax, [ebp - 0x24]
mov dword [ebp - 0x18], 0
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x24], 0
push eax
push 1
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x14]
push dword [eax + 0x30]
call dword [sym.imp.WS2_32.dll_WSARecv]
mov dword [ebp - 0x28], eax
call fcn.00433040
mov esi, eax
call edi
mov edi, eax
cmp edi, 0x40
jne 0x46ec5d
mov edi, 0x2746
call fcn.00433040
mov esi, eax
jmp 0x46ec85
cmp edi, 0x4d2
jne 0x46ec73
mov edi, 0x274d
call fcn.00433040
mov esi, eax
jmp 0x46ec85
cmp edi, 0x2738
je 0x46eced
mov eax, esi
cmp edi, 0xea
je 0x46eced
cmp dword [ebp - 0x28], 0
je 0x46ecef
or eax, 0xffffffff
test eax, eax
jg 0x46ed08
je 0x46ecbe
call fcn.00433040
mov eax, dword [eax + 4]
cmp dword [esi + 4], eax
jne 0x46eca9
cmp edi, 0x2733
je 0x46ed08
call fcn.00433040
mov eax, dword [eax + 4]
cmp dword [esi + 4], eax
jne 0x46ecbe
cmp edi, 0x4d5
je 0x46ed08
push dword [ebp - 0x34]
mov edi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call edi
mov ecx, dword [ebp - 0x14]
mov al, 1
mov byte [ebp - 0xd], al
mov byte [ebp - 0x54], al
push 0
mov byte [ecx + 0xd0], al
lea eax, [ecx + 0xd8]
mov ecx, dword [ecx + 0x14]
push eax
call fcn.00433e90
jmp 0x46ed0e
mov eax, esi
mov esi, eax
xor edi, edi
mov eax, dword [ebp - 0x18]
cmp eax, 0x400
jne 0x46ec8e
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x46ec10
mov edi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp - 0x50]
dec esi
cmp byte [ebp - 0xd], 0
jne 0x46ead7
jmp 0x46eaca
mov dword [ebx], edi
mov dword [ebx + 4], edi
mov edi, dword [esi + 0xc]
test edi, edi
jne 0x46eb50
mov edi, dword [ebp - 0x20]
mov ecx, edi
push esi
call fcn.004586b0
jmp 0x46ed41
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
inc ecx
mov dword [ebp - 0x18], ecx
mov eax, dword [eax]
cmp ecx, dword [eax]
jb 0x46eb20
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x1c]
dec edx
sub edi, 0x1c
mov dword [ebp - 0x44], edx
sub eax, 0xc
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], eax
test edx, edx
jns 0x46eb10
mov eax, dword [ebp - 0x14]
mov esi, dword [eax + 0xcc]
test esi, esi
je 0x46ed8f
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0x10]
mov esi, dword [esi + 4]
test esi, esi
jne 0x46ed80
cmp byte [ebp - 0xd], 0
je 0x46ed9d
mov eax, dword [ebp - 0x4c]
push dword [ebp - 0x34]
call eax
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.00475cb4
lea esp, [ebp + 0x404]
pop ebp
ret 8