Function at 0x100053f0
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 0x10005506
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x10005456
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000ff45
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x1000546c
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 4], 0xffffffff
mov eax, dword [esi + 8]
test eax, eax
je 0x10005481
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 0x1000549a
cmp byte [0x1013b420], 0
jne 0x100054f5
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x100054f5
push eax
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x1003b3ec], eax
cmp eax, 0xffffffff
je 0x100054f5
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [0x1003b3f0], eax
test eax, eax
je 0x100054f5
movzx eax, word [0x1003b004]
mov ecx, 0x1003b3e8
push eax
push 0x1003b027
mov dword [0x1013b3fc], 0x100061d0
call fcn.10004ab0
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000ff45
mov esp, ebp
pop ebp
ret
add dword [esi + 0x8000c], eax
cmp dword [esi + 0x8000c], 4
jl 0x10005445
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 0x10005538
movzx ebx, byte [esi + ecx + 0xd]
mov dl, al
jmp 0x10005555
cmp al, 0xc2
jne 0x1000561b
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 0x1000561b
cmp ebx, 0x80000
jg 0x1000561b
cmp ebx, dword [esi + 0x8000c]
jg 0x100055df
cmp dl, 0xc1
jne 0x10005585
movzx eax, byte [esi + ecx + 0xe]
lea edi, [esi + 0xf]
push eax
lea eax, [ebx - 3]
jmp 0x10005591
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.100075c0
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 0x10005608
jmp 0x1000551d
test ecx, ecx
jle 0x10005608
mov eax, dword [esi + 0x8000c]
test eax, eax
jle 0x10005608
mov edx, 0x80000
sub edx, ecx
cmp eax, edx
jg 0x10005608
push eax
lea eax, [esi + 0xc]
add eax, ecx
push eax
push edi
call fcn.100116d0
add esp, 0xc
pop ebx
pop edi
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000ff45
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.100059f0
mov ecx, dword [ebp - 4]
xor al, al
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.1000ff45
mov esp, ebp
pop ebp
ret