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

Disassembly:
push ebp
lea ebp, [esp - 0x404]
sub esp, 0x404
push 0xffffffffffffffff
push 0x1021743d
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x10282800]
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 0x1012f868
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 0x1012f323
add eax, 4
cmp dword [eax], esi
je 0x1012f33a
inc ecx
add eax, 4
cmp ecx, edx
jb 0x1012f317
lea eax, [edx + 1]
mov ecx, edi
push eax
call fcn.1012e0e0
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 0x1012f364
nop dword [eax]
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 4]
call eax
test al, al
je 0x1012f37f
mov esi, dword [esi + 4]
test esi, esi
jne 0x1012f350
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 0x1012f386
mov dl, 1
jmp 0x1012f366
mov dl, byte [ebp - 0xd]
test dl, dl
jne 0x1012f393
cmp dword [eax + 4], 0
mov byte [ebp - 0xd], dl
je 0x1012f397
mov byte [ebp - 0xd], 1
mov eax, dword [eax]
mov esi, dword [eax]
cmp esi, eax
je 0x1012f447
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 0x1012f42b
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.101e3738
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 0x1012f415
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 0x1012f400
mov edi, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x38]
push edx
call fcn.10086bc0
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 0x1012f3a3
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 0x1012f383
cmp byte [ebp - 0xd], 0
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x14]
jne 0x1012f485
cmp dword [eax + 0x94], 0
mov byte [ebp - 0xd], 0
je 0x1012f489
mov byte [ebp - 0xd], 1
lea esi, [eax + 0x8c]
push ebx
push esi
lea ecx, [eax + 0xb4]
call fcn.101326d0
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.101326d0
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 0x1012f4d5
cmp byte [ebp - 0xd], cl
je 0x1012f865
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
test ecx, ecx
je 0x1012f530
mov esi, dword [edx + 0xcc]
mov eax, 0x11e1a300
cmp ecx, eax
cmova ecx, eax
test esi, esi
je 0x1012f511
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 0x1012f500
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 0x1012f666
test esi, esi
jne 0x1012f666
test edx, edx
jne 0x1012f666
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 0x1012f843
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
push ebx
lea esi, [edi + 0x8c]
push esi
call fcn.101277a0
push ebx
push esi
lea ecx, [edi + 0xb4]
call fcn.101277a0
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 0x1012f828
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.10117d90
mov esi, dword [eax]
cmp esi, dword [edi + 4]
je 0x1012f811
mov edi, dword [esi + 0xc]
test edi, edi
je 0x1012f801
nop dword [eax]
mov eax, dword [edi + 0x30]
push edi
call eax
add esp, 4
test eax, eax
je 0x1012f80e
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x1012f64c
mov eax, dword [ecx + 0x14]
mov dword [esi + 0xc], eax
test eax, eax
jne 0x1012f645
mov dword [esi + 0x10], eax
mov dword [ecx + 0x14], 0
mov dword [edi + 0x14], 0
mov eax, dword [ebx + 4]
test eax, eax
je 0x1012f7f1
mov dword [eax + 0x14], edi
jmp 0x1012f7f3
cmp dword [ebp - 0x40], 0
jne 0x1012f685
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 0x1012f6af
call fcn.100e0d20
call edi
test esi, esi
jle 0x1012f594
mov ecx, dword [ebp - 0x14]
push dword [ecx + 0xa8]
push dword [ecx + 0x30]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1012f594
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.100e0d20
mov esi, eax
call edi
mov edi, eax
cmp edi, 0x40
jne 0x1012f72d
mov edi, 0x2746
call fcn.100e0d20
mov esi, eax
jmp 0x1012f755
cmp edi, 0x4d2
jne 0x1012f743
mov edi, 0x274d
call fcn.100e0d20
mov esi, eax
jmp 0x1012f755
cmp edi, 0x2738
je 0x1012f7bd
mov eax, esi
cmp edi, 0xea
je 0x1012f7bd
cmp dword [ebp - 0x28], 0
je 0x1012f7bf
or eax, 0xffffffff
test eax, eax
jg 0x1012f7d8
je 0x1012f78e
call fcn.100e0d20
mov eax, dword [eax + 4]
cmp dword [esi + 4], eax
jne 0x1012f779
cmp edi, 0x2733
je 0x1012f7d8
call fcn.100e0d20
mov eax, dword [eax + 4]
cmp dword [esi + 4], eax
jne 0x1012f78e
cmp edi, 0x4d5
je 0x1012f7d8
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.10127de0
jmp 0x1012f7de
mov eax, esi
mov esi, eax
xor edi, edi
mov eax, dword [ebp - 0x18]
cmp eax, 0x400
jne 0x1012f75e
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x1012f6e0
mov edi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp - 0x50]
dec esi
cmp byte [ebp - 0xd], 0
jne 0x1012f5a7
jmp 0x1012f59a
mov dword [ebx], edi
mov dword [ebx + 4], edi
mov edi, dword [esi + 0xc]
test edi, edi
jne 0x1012f620
mov edi, dword [ebp - 0x20]
mov ecx, edi
push esi
call fcn.10117460
jmp 0x1012f811
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 0x1012f5f0
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x1c]
dec edx
sub eax, 0xc
mov dword [ebp - 0x44], edx
sub edi, 0x1c
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], edi
test edx, edx
jns 0x1012f5e0
mov eax, dword [ebp - 0x14]
mov esi, dword [eax + 0xcc]
test esi, esi
je 0x1012f85f
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0x10]
mov esi, dword [esi + 4]
test esi, esi
jne 0x1012f850
cmp byte [ebp - 0xd], 0
je 0x1012f86d
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.101e3b75
lea esp, [ebp + 0x404]
pop ebp
ret 8