Function at 0x10005650
Capabilities:
Initialize winsock library
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a0
mov eax, dword [0x1013b994]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov dword [ebp - 0x19c], 0
push 0
mov eax, 0x80000
mov ecx, dword [esi + 0x8000c]
sub eax, ecx
push eax
lea eax, [esi + 0xc]
add eax, ecx
push eax
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x10005766
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x100056b6
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100101d0
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x100056cc
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 4], 0xffffffff
mov eax, dword [esi + 8]
test eax, eax
je 0x100056e1
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov dword [esi + 8], 0
mov byte [esi + 0x100038], 0
cmp dword [0x1003b3ec], 0xffffffff
je 0x100056fa
cmp byte [0x1013b420], 0
jne 0x10005755
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x10005755
push eax
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x1003b3ec], eax
cmp eax, 0xffffffff
je 0x10005755
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [0x1003b3f0], eax
test eax, eax
je 0x10005755
movzx eax, word [0x1003b004]
mov ecx, 0x1003b3e8
push eax
push 0x1003b027
mov dword [0x1013b3fc], 0x10006420
call fcn.10004d00
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100101d0
mov esp, ebp
pop ebp
ret
add dword [esi + 0x8000c], eax
cmp dword [esi + 0x8000c], 4
jl 0x100056a5
push edi
xor ecx, ecx
push ebx
lea edi, [esi + 0xc]
lea eax, [edi + ecx]
mov dword [ebp - 0x1a0], eax
mov al, byte [eax]
cmp al, 0xc1
jne 0x10005798
movzx ebx, byte [esi + ecx + 0xd]
mov dl, al
jmp 0x100057b5
cmp al, 0xc2
jne 0x1000587b
mov dl, al
movzx eax, byte [esi + ecx + 0xd]
shl ax, 8
movzx ebx, ax
movzx eax, byte [esi + ecx + 0xe]
or ebx, eax
cmp ebx, 4
jl 0x1000587b
cmp ebx, 0x80000
jg 0x1000587b
cmp ebx, dword [esi + 0x8000c]
jg 0x1000583f
cmp dl, 0xc1
jne 0x100057e5
movzx eax, byte [esi + ecx + 0xe]
lea edi, [esi + 0xf]
push eax
lea eax, [ebx - 3]
jmp 0x100057f1
movzx eax, byte [esi + ecx + 0xf]
lea edi, [esi + 0x10]
push eax
lea eax, [ebx - 4]
push eax
add edi, ecx
push edi
call fcn.10007820
mov al, byte [edi]
add esp, 0xc
mov byte [ebp - 0x198], al
mov eax, dword [esi + 0x100014]
push ebx
push dword [ebp - 0x1a0]
push dword [ebp - 0x198]
call eax
mov ecx, dword [ebp - 0x19c]
add esp, 0xc
sub dword [esi + 0x8000c], ebx
add ecx, ebx
cmp dword [esi + 0x8000c], 0
mov dword [ebp - 0x19c], ecx
jle 0x10005868
jmp 0x1000577d
test ecx, ecx
jle 0x10005868
mov eax, dword [esi + 0x8000c]
test eax, eax
jle 0x10005868
mov edx, 0x80000
sub edx, ecx
cmp eax, edx
jg 0x10005868
push eax
lea eax, [esi + 0xc]
add eax, ecx
push eax
push edi
call fcn.10011980
add esp, 0xc
pop ebx
pop edi
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100101d0
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.10005c50
mov ecx, dword [ebp - 4]
xor al, al
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.100101d0
mov esp, ebp
pop ebp
ret