Function at 0x40c9c8
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
push edi
mov edi, dword [ebp + 8]
xor eax, eax
cmp edi, eax
jne 0x40c9e0
mov edi, 0x418140
cmp dword [edi + 0x4b8], eax
jl 0x40cd26
cmp dword [ebp + 0xc], eax
push ebx
mov ebx, dword [edi + 0x4c8]
push esi
mov dword [ebp + 8], ebx
jne 0x40ca0c
push eax
call dword [sym.imp.MSVCRT.dll_time]
pop ecx
mov dword [ebp + 0xc], eax
jmp 0x40ca0c
mov ebx, dword [ebp + 8]
lea eax, [ebp - 4]
xor esi, esi
push eax
lea eax, [ebp - 0x28]
push eax
push esi
push dword [edi + 0x14]
mov dword [ebp - 4], 0x10
push ebx
push dword [edi + 0x4b8]
call dword [sym.imp.ws2_32.dll_recvfrom]
cmp eax, esi
mov dword [ebp - 8], eax
jge 0x40ca48
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x40cd13
jmp 0x40ca0c
lea edx, [eax + ebx]
lea ecx, [ebx + 0xc]
cmp ecx, edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x10], ecx
ja 0x40ccf1
xor ecx, ecx
mov ch, byte [ebx + 4]
mov cl, byte [ebx + 5]
cmp ecx, 1
ja 0x40ccf1
test byte [ebx + 2], 0x78
jne 0x40ccf1
mov esi, dword [edi + 0x4bc]
lea eax, [edi + 0x4bc]
cmp esi, eax
je 0x40ca9c
mov cl, byte [ebx]
cmp cl, byte [esi + 0x38]
jne 0x40ca96
mov dl, byte [ebx + 1]
cmp dl, byte [esi + 0x39]
je 0x40cac0
mov esi, dword [esi]
cmp esi, eax
jne 0x40ca89
mov eax, dword [edi + 0x4b0]
test eax, eax
je 0x40ca0c
push 0
push 0
push dword [ebp - 8]
lea ecx, [ebp - 0x28]
push ebx
push dword [ebp - 4]
push ecx
push 0xfffffffffffffffb
jmp 0x40cb4a
xor eax, eax
mov ah, byte [ebx + 4]
mov al, byte [ebx + 5]
test eax, eax
je 0x40cb22
lea eax, [ebp - 0x128]
push 0xff
push eax
lea eax, [ebp - 0x10]
push dword [ebp - 0x18]
push eax
push ebx
call fcn.0040d421
test eax, eax
jl 0x40cb2b
mov eax, dword [ebp - 0x10]
add eax, 4
cmp eax, dword [ebp - 0x18]
ja 0x40cb2b
lea eax, [esi + 0x3e]
push eax
lea eax, [ebp - 0x128]
push eax
call fcn.0040d7c8
test eax, eax
je 0x40ca9c
lea eax, [esi + 0x3a]
push 4
push eax
push dword [ebp - 0x10]
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
je 0x40cb51
jmp 0x40ca9c
mov al, byte [ebx + 3]
and al, 0xf
cmp al, 1
je 0x40cb51
mov eax, dword [edi + 0x4b0]
test eax, eax
je 0x40ca0c
push 0
push 0
push dword [ebp - 8]
lea ecx, [ebp - 0x28]
push ebx
push dword [ebp - 4]
push ecx
push 0xffffffffffffffff
call eax
jmp 0x40ca0c
cmp word [ebp - 0x28], 2
jne 0x40cb8d
cmp dword [ebp - 4], 0x10
jb 0x40cb8d
mov ecx, dword [edi + 0x98]
and dword [ebp - 0xc], 0
test ecx, ecx
jbe 0x40cb96
lea eax, [edi + 0x1c]
mov dx, word [eax - 2]
cmp dx, word [ebp - 0x26]
jne 0x40cb80
mov edx, dword [eax]
cmp edx, dword [ebp - 0x24]
je 0x40cb96
inc dword [ebp - 0xc]
add eax, 0x10
cmp dword [ebp - 0xc], ecx
jb 0x40cb6f
jmp 0x40cb96
mov eax, dword [edi + 0x98]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
push 1
pop ebx
mov eax, dword [edi + 0x4b0]
shl ebx, cl
test dword [esi + 0x14], ebx
jne 0x40cbcb
test eax, eax
je 0x40ca09
push 0
push 0
push dword [ebp - 8]
lea ecx, [ebp - 0x28]
push dword [ebp + 8]
push dword [ebp - 4]
push ecx
push 0xfffffffffffffffe
call eax
jmp 0x40ca09
test eax, eax
je 0x40cbe4
push dword [esi + 0x34]
lea ecx, [ebp - 0x28]
push esi
push dword [ebp - 8]
push dword [ebp + 8]
push dword [ebp - 4]
push ecx
push 0
call eax
mov eax, ebx
not eax
and dword [esi + 0x14], eax
mov eax, dword [ebp + 8]
mov cl, byte [eax + 3]
and ecx, 0xf
sub ecx, 0
je 0x40cc4c
dec ecx
je 0x40cc25
dec ecx
dec ecx
je 0x40cc05
dec ecx
je 0x40cc25
jmp 0x40cc52
push esi
push edi
call fcn.0040c8d5
test eax, eax
jne 0x40cc5f
push eax
mov eax, dword [esi + 0xc]
not eax
shr eax, 2
and eax, 1
or eax, 0xfffffffc
push eax
jmp 0x40ccce
cmp dword [edi + 0x14], 0x200
jbe 0x40cc52
mov eax, dword [esi + 0x1c]
test ebx, eax
jne 0x40cc52
push dword [ebp + 0xc]
or eax, ebx
mov dword [esi + 0x1c], eax
push dword [ebp - 0xc]
push esi
push edi
call fcn.0040cd71
jmp 0x40ca09
test byte [eax + 2], 2
je 0x40cc6e
or dword [esi + 0x18], ebx
cmp dword [esi + 0x14], 0
jne 0x40ca09
push dword [ebp + 0xc]
push esi
push edi
call fcn.0040cf69
jmp 0x40ca09
xor ecx, ecx
mov ch, byte [eax + 6]
mov cl, byte [eax + 7]
test ecx, ecx
jne 0x40cc91
push esi
push edi
call fcn.0040c8d5
test eax, eax
je 0x40cc8b
or dword [esi + 0xc], 4
jmp 0x40cc5f
push 0
push 0xfffffffffffffffc
jmp 0x40ccce
mov ecx, dword [esi + 0x2c]
test ecx, ecx
je 0x40ccba
lea edx, [ebp - 0x14]
push edx
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push eax
lea eax, [esi + 0x3e]
push eax
call ecx
test eax, eax
jge 0x40ccb1
xor ecx, ecx
jmp 0x40ccb4
mov ecx, dword [ebp - 0x14]
push ecx
jmp 0x40cc1f
push dword [ebp - 8]
call dword [sym.imp.MSVCRT.dll_malloc]
test eax, eax
pop ecx
mov dword [ebp - 0x14], eax
jne 0x40ccda
push eax
push 0xfffffffffffffffb
push esi
push edi
call fcn.0040cd2b
jmp 0x40ca09
push dword [ebp - 8]
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push dword [ebp - 0x14]
push dword [ebp - 8]
jmp 0x40ccce
mov ecx, dword [edi + 0x4b0]
cmp ecx, esi
je 0x40ca0c
push esi
push esi
push eax
push ebx
push dword [ebp - 4]
lea eax, [ebp - 0x28]
push eax
push 0xffffffffffffffff
call ecx
jmp 0x40ca0c
cmp dword [edi + 0x4a4], esi
pop esi
pop ebx
je 0x40cd26
push dword [ebp + 0xc]
push edi
call fcn.0040c4ef
pop edi
leave
ret 8