Function at 0x10003170
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp byte [ebp + 8], 0
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
jne 0x10003315
cmp dword [edi + 4], 0
je 0x10003282
mov eax, dword [esi + 0x24]
lea ebx, [esi + 0x24]
add dword [esi + 0x2c], eax
mov edx, dword [esi + 0x2c]
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x1c]
cmp edx, ecx
jae 0x100031b7
add eax, edx
sub ecx, edx
mov dword [ebp - 4], eax
mov dword [ebp - 8], ecx
jmp 0x100032d2
mov esi, dword [eax]
cmp esi, 0x3e80000
mov dword [ebp - 4], esi
mov esi, dword [ebp + 0xc]
jbe 0x100031cd
push eax
jmp 0x10003318
mov esi, dword [ebp - 4]
add esi, 4
mov dword [ebp + 8], esi
cmp edx, esi
mov esi, dword [ebp + 0xc]
jae 0x1000321a
push eax
call fcn.10003abc
add esp, 4
push dword [ebp + 8]
call fcn.10003acf
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [esi + 0x1c], eax
mov dword [esi + 0x28], ecx
mov ecx, dword [ebp - 4]
mov dword [esi + 0x2c], 4
mov dword [eax], ecx
mov eax, dword [esi + 0x1c]
add eax, dword [esi + 0x2c]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x2c]
jmp 0x100032cf
add ecx, 0xfffffffc
je 0x10003261
cmp dword [edi + 8], 0
jle 0x10003245
push ecx
add eax, 4
push eax
push dword [edi + 0xc]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.DLL_SetEvent]
mov dword [edi + 8], 0
push dword [edi + 0x10]
mov eax, dword [esi + 0x28]
sub eax, 4
push eax
mov eax, dword [esi + 0x1c]
add eax, 4
push eax
push 2
push dword [edi]
push edi
call dword [0x10005034]
push dword [esi + 0x1c]
call fcn.10003abc
add esp, 4
push 4
call fcn.10003acf
add esp, 4
mov dword [esi + 0x1c], eax
mov dword [esi + 0x28], 4
jmp 0x100032bf
cmp dword [edi + 8], 0
jle 0x100032a9
push dword [esi + 0x24]
push dword [esi + 0x1c]
push dword [edi + 0xc]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.DLL_SetEvent]
mov dword [edi + 8], 0
push dword [edi + 0x10]
lea ebx, [esi + 0x24]
push dword [ebx]
push dword [esi + 0x1c]
push 2
push dword [edi]
push edi
call dword [0x10005034]
mov eax, dword [esi + 0x1c]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x28]
mov dword [esi + 0x2c], 0
mov dword [ebp - 8], eax
push 0
push esi
lea eax, [ebp + 8]
mov dword [esi + 0x14], edi
push eax
push ebx
push 1
lea eax, [ebp - 8]
mov dword [esi + 0x18], 2
push eax
push dword [edi]
mov dword [ebp + 8], 0
call dword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
je 0x10003386
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x271e
je 0x10003386
cmp eax, 0x3e5
je 0x10003386
push dword [esi + 0x1c]
call fcn.10003abc
add esp, 4
mov dword [esi + 0x1c], 0
push 0x30
push esi
call fcn.10003ac1
add esp, 8
push dword [edi + 0x10]
push 0
push 0
push 3
push dword [edi]
push edi
call dword [0x10005034]
mov esi, dword [edi]
mov dword [edi + 0x14], 1
cmp esi, 0xffffffff
je 0x10003380
push 4
lea eax, [ebp + 8]
mov dword [ebp + 8], 1
push eax
push 0x80
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi], 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8