Function at 0x405050
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 0x4052b4
cmp dword [edi + 0x2c], 0xffffffff
je 0x4052b4
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 0x405094
mov dword [ebp - 0x10], 0x19000
mov esi, dword [ebp - 0x10]
jmp 0x40509f
cmp esi, 0x400
jge 0x40509f
mov dword [ebp - 8], esi
mov eax, dword [ebp - 8]
push eax
call fcn.0041576e
push esi
mov dword [ebp - 0x14], eax
call fcn.0041576e
add esp, 8
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], eax
lea ebx, [ebx]
cmp dword [edi + 0x3c], 0
je 0x4050f7
mov eax, dword [edi + 0x54]
mov eax, dword [eax + 4]
test eax, eax
je 0x4050d9
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 0x405209
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 0x4051f5
test esi, esi
je 0x405202
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
push esi
push eax
push ecx
add ebx, esi
call fcn.00417fc0
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 0x40517d
cmp dword [edi + 0x6c], 5
jne 0x40517d
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x405173
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.00404cb0
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 0x40519c
fadd qword [0x432058]
mov edx, dword [edi + 0x10]
fild dword [edi + 0x10]
test edx, edx
jns 0x4051ac
fadd qword [0x432058]
fdivp st(1)
fmul qword [0x432098]
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 0x405202
mov eax, ecx
sub eax, ebx
cmp eax, 0x400
jle 0x4051ed
mov dword [ebp - 8], 0x400
jmp 0x4050c0
mov dword [ebp - 8], eax
jmp 0x4050c0
mov dword [edi + 0x68], 1
mov byte [ebp - 1], 0
jmp 0x405209
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 0x40522d
push eax
call fcn.00416430
add esp, 4
mov eax, dword [edi + 0xc]
cmp eax, esi
je 0x405240
push eax
call fcn.00416430
add esp, 4
mov dword [edi + 0xc], esi
lea esi, [ebx + 1]
push esi
call fcn.0041576e
push esi
push 0
push eax
mov dword [edi + 0xc], eax
call fcn.0041cf90
mov esi, dword [ebp - 0x20]
mov ecx, dword [edi + 0xc]
push ebx
push esi
push ecx
call fcn.00417fc0
add esp, 0x1c
cmp dword [edi + 0x6c], 5
jne 0x40529d
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x405293
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.00404cb0
test esi, esi
je 0x4052aa
push esi
call fcn.00416430
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