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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push edi
mov edi, ecx
xor al, al
cmp dword [edi + 0x6c], 5
jne 0x406484
cmp dword [edi + 0x2c], 0xffffffff
je 0x406484
push ebx
push esi
mov esi, dword [edi + 0x10]
xor ebx, ebx
mov byte [ebp - 1], 1
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], 0x400
test esi, esi
jg 0x406264
mov dword [ebp - 0x10], 0x19000
mov esi, dword [ebp - 0x10]
jmp 0x40626f
cmp esi, 0x400
jge 0x40626f
mov dword [ebp - 8], esi
mov eax, dword [ebp - 8]
push eax
call fcn.00417e90
push esi
mov dword [ebp - 0x14], eax
call fcn.00417e90
add esp, 8
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], eax
lea ebx, [ebx]
cmp dword [edi + 0x3c], 0
je 0x4062c7
mov eax, dword [edi + 0x54]
mov eax, dword [eax + 4]
test eax, eax
je 0x4062a9
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [edi + 0x54]
mov edx, dword [ecx + 4]
movzx esi, byte [edi + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test esi, esi
setne al
test al, al
je 0x4063d9
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
mov edx, dword [edi + 0x2c]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, 0xffffffff
je 0x4063c5
test esi, esi
je 0x4063d2
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
push esi
push eax
push ecx
add ebx, esi
call fcn.0041ad40
inc dword [edi + 0x60]
mov eax, dword [edi + 0x60]
xor edx, edx
mov ecx, 0x64
div ecx
add dword [ebp - 0xc], esi
add esp, 0xc
test edx, edx
jne 0x40634d
cmp dword [edi + 0x6c], 5
jne 0x40634d
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x406343
movzx ecx, byte [edi + 0x18]
push edx
mov edx, dword [edi + 0x50]
push edx
mov edx, dword [edi + 0x44]
push ecx
mov ecx, dword [edi + 0x48]
push edx
mov edx, dword [edi + 0x40]
push ecx
mov ecx, dword [edi + 0x20]
push edx
push ecx
call eax
add esp, 0x1c
mov ecx, str.code_down_ing
call fcn.00405e80
mov ecx, dword [ebp - 0x10]
mov eax, ebx
mov edx, ecx
sub edx, ebx
mov dword [ebp - 0x18], eax
fild dword [ebp - 0x18]
mov dword [edi + 0x40], ebx
mov dword [edi + 0x48], edx
test eax, eax
jns 0x40636c
fadd qword [0x4360b0]
mov edx, dword [edi + 0x10]
fild dword [edi + 0x10]
test edx, edx
jns 0x40637c
fadd qword [0x4360b0]
fdivp st(1)
fmul qword [0x4360f0]
fnstcw word [ebp - 6]
movzx eax, word [ebp - 6]
or eax, 0xc00
mov dword [ebp - 0x18], eax
fldcw word [ebp - 0x18]
fistp qword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
mov dword [edi + 0x44], eax
fldcw word [ebp - 6]
cmp ebx, ecx
jg 0x4063d2
mov eax, ecx
sub eax, ebx
cmp eax, 0x400
jle 0x4063bd
mov dword [ebp - 8], 0x400
jmp 0x406290
mov dword [ebp - 8], eax
jmp 0x406290
mov dword [edi + 0x68], 1
mov byte [ebp - 1], 0
jmp 0x4063d9
mov dword [edi + 0x68], 3
lea eax, [edi + 0x10]
xor esi, esi
mov dword [ebp - 0x18], eax
mov dword [eax], ebx
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x48], esi
mov dword [edi + 0x44], 0x64
cmp eax, esi
je 0x4063fd
push eax
call fcn.00419007
add esp, 4
mov eax, dword [edi + 0xc]
cmp eax, esi
je 0x406410
push eax
call fcn.00419007
add esp, 4
mov dword [edi + 0xc], esi
lea esi, [ebx + 1]
push esi
call fcn.00417e90
push esi
push 0
push eax
mov dword [edi + 0xc], eax
call fcn.0041b5c0
mov esi, dword [ebp - 0x20]
mov ecx, dword [edi + 0xc]
push ebx
push esi
push ecx
call fcn.0041ad40
add esp, 0x1c
cmp dword [edi + 0x6c], 5
jne 0x40646d
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x406463
mov edx, dword [edi + 0x50]
movzx ecx, byte [edi + 0x18]
push 0
push edx
mov edx, dword [edi + 0x44]
push ecx
mov ecx, dword [edi + 0x48]
push edx
mov edx, dword [edi + 0x40]
push ecx
mov ecx, dword [edi + 0x20]
push edx
push ecx
call eax
add esp, 0x1c
mov ecx, str.code_down_ing
call fcn.00405e80
test esi, esi
je 0x40647a
push esi
call fcn.00419007
add esp, 4
mov edx, dword [ebp - 0x18]
mov al, byte [ebp - 1]
pop esi
mov dword [edx], ebx
pop ebx
pop edi
mov esp, ebp
pop ebp
ret