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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a0
mov eax, dword [0x10135994]
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 0x100042b6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x10004206
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000ba87
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x1000421c
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 4], 0xffffffff
mov eax, dword [esi + 8]
test eax, eax
je 0x10004231
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov dword [esi + 8], 0
mov byte [esi + 0x100038], 0
cmp dword [0x100353ec], 0xffffffff
je 0x1000424a
cmp byte [0x10135420], 0
jne 0x100042a5
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x100042a5
push eax
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x100353ec], eax
cmp eax, 0xffffffff
je 0x100042a5
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [0x100353f0], eax
test eax, eax
je 0x100042a5
movzx eax, word [0x10035004]
mov ecx, 0x100353e8
push eax
push 0x10035027
mov dword [0x101353fc], 0x10004ba0
call fcn.10003ae0
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000ba87
mov esp, ebp
pop ebp
ret
add dword [esi + 0x8000c], eax
cmp dword [esi + 0x8000c], 4
jl 0x100041f5
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 0x100042e8
movzx ebx, byte [esi + ecx + 0xd]
mov dl, al
jmp 0x10004305
cmp al, 0xc2
jne 0x100043cb
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 0x100043cb
cmp ebx, 0x80000
jg 0x100043cb
cmp ebx, dword [esi + 0x8000c]
jg 0x1000438f
cmp dl, 0xc1
jne 0x10004335
movzx eax, byte [esi + ecx + 0xe]
lea edi, [esi + 0xf]
push eax
lea eax, [ebx - 3]
jmp 0x10004341
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.10005cd0
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 0x100043b8
jmp 0x100042cd
test ecx, ecx
jle 0x100043b8
mov eax, dword [esi + 0x8000c]
test eax, eax
jle 0x100043b8
mov edx, 0x80000
sub edx, ecx
cmp eax, edx
jg 0x100043b8
push eax
lea eax, [esi + 0xc]
add eax, ecx
push eax
push edi
call fcn.1000d1f0
add esp, 0xc
pop ebx
pop edi
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000ba87
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.100047a0
mov ecx, dword [ebp - 4]
xor al, al
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.1000ba87
mov esp, ebp
pop ebp
ret