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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a0
mov eax, dword [0x10136994]
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 0x10004416
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x10004366
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000d4ed
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x1000437c
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 4], 0xffffffff
mov eax, dword [esi + 8]
test eax, eax
je 0x10004391
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov dword [esi + 8], 0
mov byte [esi + 0x100038], 0
cmp dword [0x100363ec], 0xffffffff
je 0x100043aa
cmp byte [0x10136420], 0
jne 0x10004405
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x10004405
push eax
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x100363ec], eax
cmp eax, 0xffffffff
je 0x10004405
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [0x100363f0], eax
test eax, eax
je 0x10004405
movzx eax, word [0x10036004]
mov ecx, 0x100363e8
push eax
push 0x10036027
mov dword [0x101363fc], 0x10004d00
call fcn.10003c30
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000d4ed
mov esp, ebp
pop ebp
ret
add dword [esi + 0x8000c], eax
cmp dword [esi + 0x8000c], 4
jl 0x10004355
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 0x10004448
movzx ebx, byte [esi + ecx + 0xd]
mov dl, al
jmp 0x10004465
cmp al, 0xc2
jne 0x1000452b
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 0x1000452b
cmp ebx, 0x80000
jg 0x1000452b
cmp ebx, dword [esi + 0x8000c]
jg 0x100044ef
cmp dl, 0xc1
jne 0x10004495
movzx eax, byte [esi + ecx + 0xe]
lea edi, [esi + 0xf]
push eax
lea eax, [ebx - 3]
jmp 0x100044a1
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.10005e60
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 0x10004518
jmp 0x1000442d
test ecx, ecx
jle 0x10004518
mov eax, dword [esi + 0x8000c]
test eax, eax
jle 0x10004518
mov edx, 0x80000
sub edx, ecx
cmp eax, edx
jg 0x10004518
push eax
lea eax, [esi + 0xc]
add eax, ecx
push eax
push edi
call fcn.1000ec70
add esp, 0xc
pop ebx
pop edi
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000d4ed
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.10004900
mov ecx, dword [ebp - 4]
xor al, al
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.1000d4ed
mov esp, ebp
pop ebp
ret