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

Disassembly:
sub esp, 0x50
push esi
mov esi, ecx
cmp byte [esi + 0x6d], 0
je 0x407ec4
xor eax, eax
jmp 0x408121
cmp dword [esp + 0x58], 0
je 0x407edc
push dword [esp + 0x58]
call fcn.00407e4b
test eax, eax
jne 0x408121
mov eax, dword [0x4e47f8]
push ebx
push ebp
mov byte [esi + 0x6d], 1
mov ecx, dword [eax + 0x34]
push edi
mov dword [eax + 0x34], 0x20
xor eax, eax
push eax
push eax
push dword [0x4e8ccc]
mov dword [esp + 0x28], ecx
push dword [esi + 0x10]
mov dword [esp + 0x24], eax
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
lea eax, [esp + 0x14]
push eax
push 0x8004667e
push dword [esi + 0x10]
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
lea ebp, [esi + 0x24]
xor edi, edi
mov eax, dword [esi + 0x2c]
cmp edi, eax
jae 0x407f3a
mov ecx, dword [ebp]
cmp byte [ecx + edi], 0
je 0x407f72
inc edi
cmp edi, eax
jb 0x407f2f
cmp eax, dword [esi + 0x28]
jne 0x407f4f
mov eax, dword [ebp + 4]
mov ecx, ebp
inc eax
push eax
call fcn.0040b492
test eax, eax
jne 0x407f78
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x2c]
push 0
push eax
mov eax, dword [ebp]
add eax, dword [esi + 0x2c]
push eax
push dword [esi + 0x10]
call dword [sym.imp.WSOCK32.dll_recv]
cmp eax, 0xffffffff
je 0x407f78
add dword [esi + 0x2c], eax
jmp 0x407f25
mov dword [esp + 0x18], edi
jmp 0x407f8c
mov ecx, 0x4d1ac0
call fcn.0040acc5
mov edi, eax
test edi, edi
jne 0x4080f0
mov ebx, dword [ebp]
push 0x20
push ebx
mov dword [esp + 0x6c], ebx
call fcn.0049d050
pop ecx
xor ebp, ebp
mov dword [esp + 0x14], 0x4cf2ae
pop ecx
test eax, eax
je 0x40814e
mov byte [eax], 0
inc eax
cmp byte [eax], 0
je 0x40814e
mov edi, ebp
cmp ebp, 0x10
je 0x408056
cmp byte [eax], 0x2d
jne 0x408056
inc eax
mov dl, byte [eax]
test dl, dl
je 0x408056
cmp byte [eax + 1], 0x20
jne 0x407fe6
cmp byte [eax + 2], 0x2d
je 0x407fe6
inc eax
mov byte [eax], dl
mov dword [esp + ebp*4 + 0x20], eax
lea ecx, [eax + 1]
inc ebp
cmp dl, 0x69
jne 0x407ffb
mov dword [esp + 0x10], ecx
mov ebp, edi
jmp 0x408004
cmp dl, 0x2d
je 0x40814a
cmp byte [ecx], 0x22
jne 0x408128
lea edi, [eax + 2]
jmp 0x40802b
mov dl, al
cmp al, 0x5c
jne 0x40801b
mov dl, byte [edi + 1]
lea ebx, [edi + 1]
cmovne ebx, edi
test dl, dl
je 0x408056
mov byte [ecx], dl
lea edi, [ebx + 1]
inc ecx
mov al, byte [edi]
cmp al, 0x22
jne 0x408012
inc edi
mov byte [ecx], 0
cmp byte [edi], 0
je 0x40814a
push 2
push 0x4d1098
push edi
call fcn.004a4a30
add esp, 0xc
test eax, eax
je 0x40813e
xor edi, edi
inc edi
and dword [esi + 0x3c], 0
lea ebx, [esi + 0x34]
and dword [esi + 0x40], 0
cmp dword [esi + 0x10], 0xffffffff
je 0x4080f0
push dword [esp + 0x10]
push dword [esp + 0x68]
push 0x4d19f4
push ebx
call fcn.0040aff6
add esp, 0xc
mov ecx, ebx
push 0x4d1a20
call fcn.0040afa5
push edi
push 0x4d1a24
push ebx
call fcn.0040aff6
add esp, 0xc
mov ecx, esi
push 0
call fcn.0040a8e9
mov edi, eax
test edi, edi
jne 0x4080f0
cmp dword [esi + 0x2c], 0
lea ebp, [esi + 0x24]
je 0x4080d9
mov ebx, dword [esp + 0x18]
mov eax, dword [ebp + 8]
inc ebx
cmp ebx, eax
jae 0x4080d6
mov ecx, dword [ebp]
sub eax, ebx
push eax
lea eax, [ecx + ebx]
push eax
push ecx
call fcn.0049cad0
add esp, 0xc
sub dword [ebp + 8], ebx
cmp dword [esi + 0x44], 2
je 0x407f23
cmp dword [esi + 0x44], 0
je 0x4080f0
mov ecx, esi
call fcn.00407e90
mov eax, dword [0x4e47f8]
mov ecx, dword [esp + 0x1c]
mov byte [esi + 0x6d], 0
mov dword [eax + 0x34], ecx
cmp dword [esi + 0x10], 0xffffffff
je 0x40811c
push 0x21
push 0x408
push dword [0x4e8ccc]
push dword [esi + 0x10]
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov eax, edi
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x50
ret 4
push 0x4d1098
push ecx
call fcn.0049d180
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x40814a
mov byte [edi], 0
lea eax, [edi + 1]
cmp byte [eax], 0
jne 0x407fbc
mov ebx, dword [esp + 0x64]
xor edi, edi
push ebx
push dword [edi*8 + 0x4e4720]
call fcn.004a3c70
pop ecx
pop ecx
test eax, eax
je 0x408171
inc edi
cmp edi, 0x1a
jne 0x408150
push 4
pop edi
jmp 0x408059
push dword [esp + 0x10]
lea eax, [esp + 0x24]
mov ecx, esi
push ebp
push eax
call dword [edi*8 + 0x4e4724]
mov edi, eax
test edi, edi
jne 0x4081ba
cmp dword [esi + 0x3c], eax
jne 0x4081a5
push dword [esp + 0x10]
lea eax, [esi + 0x34]
push ebx
push 0x4d1a44
push eax
call fcn.0040aff6
add esp, 0x10
push 0
mov ecx, esi
call fcn.0040a8e9
mov edi, eax
test edi, edi
jne 0x4080f0
jmp 0x4081c3
cmp edi, 0xffffffff
jne 0x408059
xor edi, edi
jmp 0x4080ae