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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5aa800
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xf4
push ebx
mov ebx, ecx
push esi
push edi
mov edx, dword [ebx + 0x18]
mov edi, dword [ebx + 0x1c]
mov eax, edx
xor esi, esi
or eax, edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 4], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x20], esi
mov byte [ebp - 0x21], 0
je 0x4f85bf
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebx + 0x20]
sub eax, ecx
mov ecx, dword [ebx + 0x34]
sbb ecx, dword [ebx + 0x24]
add eax, 1
mov dword [ebp - 0x1c], eax
adc ecx, esi
mov dword [ebp - 0x18], ecx
jmp 0x4f85c5
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
mov eax, dword [ebx + 0x80]
mov eax, dword [eax + 0x2c4]
cmp eax, esi
mov dword [ebp - 0x28], eax
je 0x4f8611
mov esi, dword [ebx + 0x30]
mov eax, dword [ebx + 0x34]
mov ecx, esi
or ecx, eax
je 0x4f8611
mov eax, edx
mov ecx, edi
sub eax, 1
sbb ecx, 0
cmp esi, eax
jne 0x4f8611
cmp dword [ebx + 0x34], ecx
jne 0x4f8611
mov eax, edx
or eax, edi
je 0x4f8611
mov ecx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
add esi, ecx
adc eax, 0
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], eax
mov esi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
mov eax, esi
or eax, ecx
jne 0x4f8642
or edx, edi
je 0x4f8642
push str.Completed0._n
mov ecx, ebx
call fcn.004f73c0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x4f8655
cmp eax, 0x2da0
jg 0x4f8692
mov dword [ebp + 0x10], eax
jmp 0x4f8699
test ecx, ecx
jl 0x4f8692
jg 0x4f865f
test esi, esi
jbe 0x4f8692
mov edx, dword [ebx + 0x38]
mov eax, dword [ebx + 0x3c]
mov esi, dword [ebp - 0x18]
mov ecx, edx
add ecx, 0x2da0
adc eax, 0
cmp eax, esi
jl 0x4f8688
jg 0x4f867e
cmp ecx, dword [ebp - 0x1c]
jbe 0x4f8688
mov ecx, dword [ebp - 0x1c]
sub ecx, edx
mov dword [ebp + 0x10], ecx
jmp 0x4f869c
mov ecx, 0x2da0
mov dword [ebp + 0x10], ecx
jmp 0x4f869c
mov dword [ebp + 0x10], 0x2da0
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebx + 0x84]
xor esi, esi
cmp eax, esi
je 0x4f86ad
mov eax, dword [eax + 0x10]
jmp 0x4f86b6
mov eax, dword [ebx + 0x80]
mov eax, dword [eax + 0x24]
cmp eax, 2
mov dword [ebp - 0x28], eax
jne 0x4f88a6
mov eax, dword [ebx + 0x3c]
mov ecx, dword [ebx + 0x38]
mov edx, dword [ebx]
push eax
push ecx
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x14]
push eax
push ecx
mov ecx, ebx
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x34], esi
call dword [edx + 0xc]
mov ecx, dword [ebp - 0x14]
mov edi, eax
cmp edi, esi
je 0x4f8911
mov esi, dword [ebp - 0x20]
cmp ecx, esi
jne 0x4f8853
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4f8853
mov eax, ecx
cdq
add eax, dword [ebx + 0x38]
adc edx, dword [ebx + 0x3c]
cmp edx, dword [ebp - 0x18]
jl 0x4f8725
jg 0x4f8717
cmp eax, dword [ebp - 0x1c]
jb 0x4f8725
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
or edx, eax
jne 0x4f8853
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
xor esi, esi
cmp eax, esi
je 0x4f875a
mov ecx, dword [ebp - 0x14]
cmp ecx, esi
jne 0x4f8840
sub eax, 0x2733
neg eax
sbb eax, eax
and al, 0xfd
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov al, byte [ebx + 0x2bd]
test al, al
je 0x4f8777
mov ecx, dword [ebp - 0x14]
mov byte [ebx + 0x2bd], 0
mov byte [ebp - 0x21], 1
jmp 0x4f8911
mov al, byte [ebx + 0x93]
test al, al
jne 0x4f87e2
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebx + 0x38]
cdq
add ecx, eax
mov eax, dword [ebx + 0x3c]
mov edi, dword [ebx]
mov dword [ebp - 0x30], esi
adc eax, edx
lea edx, [ebp - 0x30]
push eax
push ecx
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x34], esi
push ecx
push edx
mov ecx, ebx
call dword [edi + 0xc]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x20]
mov edi, eax
mov eax, dword [ebp - 0x30]
add ecx, eax
mov eax, dword [ebp - 0x34]
add edx, eax
mov al, byte [ebx + 0x94]
test al, al
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x20], edx
je 0x4f87e5
mov edx, dword [ebx + 0x18]
mov eax, dword [ebx + 0x1c]
or edx, eax
jne 0x4f87e5
mov al, byte [ebx + 0x2bc]
test al, al
jne 0x4f8911
jmp 0x4f87e5
mov ecx, dword [ebp - 0x14]
cmp edi, esi
je 0x4f8840
cmp ecx, dword [ebp - 0x20]
jne 0x4f8840
cmp dword [ebp - 0x30], esi
jne 0x4f880f
mov al, byte [ebx + 0x94]
test al, al
je 0x4f8840
cmp dword [ebx + 0x2c0], esi
je 0x4f8840
mov al, byte [ebx + 0x2be]
test al, al
je 0x4f8840
mov esi, dword [ebx + 0x38]
mov eax, ecx
cdq
add esi, eax
mov eax, dword [ebx + 0x3c]
adc eax, edx
mov edx, dword [ebp - 0x18]
cmp eax, edx
jl 0x4f8725
jg 0x4f8832
cmp esi, dword [ebp - 0x1c]
jb 0x4f8725
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
or eax, edx
je 0x4f8725
mov al, byte [ebx + 0x93]
test al, al
jne 0x4f8725
jmp 0x4f8911
test esi, esi
jne 0x4f8911
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4f8911
test ecx, ecx
jne 0x4f8913
mov eax, dword [ebx + 0x3c]
mov edx, dword [ebp - 0x18]
cmp eax, edx
jl 0x4f8891
jg 0x4f8886
mov esi, dword [ebx + 0x38]
mov eax, dword [ebp - 0x1c]
cmp esi, eax
jb 0x4f8891
jmp 0x4f8889
mov eax, dword [ebp - 0x1c]
or eax, edx
jne 0x4f8cb9
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x2b8]
cmp eax, esi
jle 0x4f88f7
cmp eax, ecx
jl 0x4f88b6
mov eax, ecx
mov edx, dword [ebx + 0x2b4]
mov ecx, eax
lea edi, [ebx + 0x31c]
lea esi, [edx + ebx + 0xb4]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebx + 0x2b4]
mov ecx, dword [ebx + 0x2b8]
add edx, eax
sub ecx, eax
mov dword [ebx + 0x2b4], edx
mov dword [ebx + 0x2b8], ecx
jmp 0x4f8909
push esi
push ecx
mov ecx, dword [ebp + 8]
lea eax, [ebx + 0x31c]
push eax
push ecx
call sub.WSOCK32.dll_recv
mov edi, dword [ebp + 0xc]
mov ecx, eax
mov dword [ebp - 0x14], ecx
test ecx, ecx
jle 0x4f8c54
cmp dword [ebp - 0x28], 2
je 0x4f8a5f
mov al, byte [ebx + 0x94]
test al, al
je 0x4f894c
lea edx, [ebp + 0x10]
lea eax, [ebp - 0x20]
push edx
lea ecx, [ebp - 0x14]
push eax
lea edx, [ebx + 0x31c]
push ecx
push edx
mov ecx, ebx
call fcn.004f80d0
jmp 0x4f8a5a
lea eax, [ebp + 0xc]
lea esi, [ebx + 0x31c]
push eax
push esi
push ecx
mov ecx, ebx
mov dword [ebp + 0xc], 0
call fcn.004f8d40
test eax, eax
je 0x4f8a49
mov eax, dword [ebp + 0xc]
cmp eax, 0xfffffff6
jne 0x4f8b8a
mov ecx, dword [ebp - 0x14]
add ecx, 0x30
push ecx
call fcn.00582ecc
add esp, 4
mov dword [ebp + 8], eax
test eax, eax
jne 0x4f89a8
mov eax, 0xfffffff7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebx + 0x80]
mov ecx, 0xc
mov eax, dword [edx + 0xe0]
mov esi, dword [eax]
mov eax, dword [ebp + 8]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x14]
lea esi, [ebx + 0x31c]
mov edx, ecx
lea edi, [eax + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x18]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x14]
add esi, 0x30
test eax, eax
mov dword [ebp - 0x14], esi
jl 0x4f8a20
jg 0x4f89f5
mov eax, dword [ebp - 0x1c]
test eax, eax
jbe 0x4f8a20
mov edi, dword [ebx + 0x38]
mov eax, esi
cdq
mov ecx, eax
mov eax, dword [ebx + 0x3c]
mov dword [ebp - 0x2c], ecx
add ecx, edi
adc edx, eax
mov eax, dword [ebp - 0x18]
cmp edx, eax
jl 0x4f8a1b
mov eax, dword [ebp - 0x1c]
jg 0x4f8a17
cmp ecx, eax
jbe 0x4f8a1b
sub eax, edi
jmp 0x4f8a22
mov eax, dword [ebp - 0x2c]
jmp 0x4f8a22
mov eax, esi
cmp eax, esi
jge 0x4f8a2b
mov esi, eax
mov dword [ebp - 0x14], esi
lea eax, [ebp - 0x20]
lea ecx, [ebx + 0x10]
push eax
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.004faca0
push esi
mov edi, eax
call fcn.00582ef5
add esp, 4
jmp 0x4f8a5c
mov edx, dword [ebp - 0x14]
lea ecx, [ebp - 0x20]
push ecx
push edx
push esi
lea ecx, [ebx + 0x10]
call fcn.004faca0
mov edi, eax
mov ecx, dword [ebp - 0x14]
test edi, edi
je 0x4f8b9d
cmp ecx, dword [ebp - 0x20]
jne 0x4f8b9d
mov edi, dword [ebx + 0x38]
mov eax, ecx
mov ecx, dword [ebx + 0x40]
cdq
add edi, eax
mov dword [ebx + 0x38], edi
mov esi, dword [ebx + 0x3c]
adc esi, edx
add ecx, eax
mov dword [ebx + 0x40], ecx
mov edi, dword [ebx + 0x44]
mov ecx, dword [ebx + 0x64]
mov dword [ebx + 0x3c], esi
adc edi, edx
mov dword [ebx + 0x44], edi
mov esi, dword [ecx]
add esi, eax
mov dword [ecx], esi
mov edi, dword [ecx + 4]
adc edi, edx
mov dword [ecx + 4], edi
mov ecx, dword [ebx + 0x68]
mov eax, dword [ebp - 0x14]
mov esi, dword [ecx]
cdq
add esi, eax
mov dword [ecx], esi
mov eax, dword [ecx + 4]
lea esi, [ebx + 0x30c]
adc eax, edx
push esi
mov dword [ecx + 4], eax
call fcn.0056c17c
mov eax, dword [esi]
mov ecx, dword [ebx + 0x300]
mov esi, dword [ebx + 0x80]
add esp, 4
sub eax, ecx
mov dword [ebx + 0x318], eax
mov dword [ebp + 0xc], eax
je 0x4f8b77
mov edi, dword [esi + 0x3dc]
test edi, edi
mov dword [ebp + 8], edi
je 0x4f8b50
fild dword [ebp + 8]
lea eax, [edi + 1]
fstp qword [ebp - 0x40]
fild dword [ebp + 0xc]
mov dword [ebp + 0xc], eax
fstp qword [ebp - 0x1c]
fild dword [ebp + 0xc]
fst qword [ebp - 0x2c]
fld qword [ebp - 0x40]
fmul qword [esi + 0x3b0]
fadd qword [ebp - 0x1c]
fdivrp st(1)
fst qword [ebp - 0x38]
fstp qword [esi + 0x3b0]
fld qword [ebp - 0x1c]
fsub qword [ebp - 0x38]
fld qword [0x5d8360]
call fcn.0056cd80
fdiv qword [ebp - 0x2c]
fld qword [ebp - 0x40]
fmul qword [esi + 0x3c0]
fdiv qword [ebp - 0x2c]
faddp st(1)
fstp qword [esi + 0x3c0]
fld qword [ebp - 0x1c]
jmp 0x4f8b59
fild dword [ebp + 0xc]
fst qword [esi + 0x3b0]
fcom qword [esi + 0x3d0]
fnstsw ax
test ah, 0x41
jne 0x4f8b6e
fstp qword [esi + 0x3d0]
jmp 0x4f8b70
fstp st(0)
inc edi
mov dword [esi + 0x3dc], edi
mov ecx, ebx
call fcn.004f80b0
mov ecx, dword [ebp - 0x14]
mov dword [ebx + 0x74], 0
mov eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x14]
mov esi, eax
lea eax, [ebp - 0x100]
push esi
push ecx
push edx
push str.File_write_error__Received__d_bytes__wrote__d_bytes__errCode___ld_n
push eax
call fcn.0056b4da
add esp, 0x14
lea ecx, [ebp - 0x100]
push ecx
mov ecx, ebx
call fcn.004f73c0
cmp esi, 5
jne 0x4f8be4
mov edx, dword [0x662204]
mov ecx, dword [ebx + 0x6c]
push edx
call fcn.004fa710
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebx + 0x38]
xor edx, edx
add eax, ecx
mov dword [ebx + 0x38], eax
mov edi, dword [ebx + 0x3c]
mov eax, dword [ebx + 0x64]
adc edi, edx
mov dword [ebx + 0x3c], edi
mov esi, dword [eax]
add esi, ecx
mov dword [eax], esi
mov ecx, dword [eax + 4]
adc ecx, edx
mov dword [eax + 4], ecx
mov ecx, ebx
call fcn.004f9690
test eax, eax
je 0x4f8c2d
mov eax, 0xfffffffb
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x60]
mov ecx, dword [eax + 0x10]
push ecx
lea ecx, [ebx + 0x10]
call fcn.004fa8e0
mov eax, 0xfffffffe
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp ecx, 0xffffffff
jne 0x4f8cb9
call sub.WSOCK32.dll_WSAGetLastError
mov edx, dword [ebp + 8]
mov esi, eax
push edx
push esi
lea eax, [ebp - 0x80]
push str.Error_code___d__socket___d_n
push eax
call fcn.0056b4da
add esp, 0x10
cmp esi, 0x2733
je 0x4f8c99
mov ecx, dword [0x6624b0]
push 1
push ecx
mov ecx, ebx
call fcn.004f72f0
lea edx, [ebp - 0x80]
mov ecx, ebx
push edx
call fcn.004f73c0
mov eax, esi
sub eax, 0x2733
neg eax
sbb eax, eax
and al, 0xfd
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x4f8b88
test ecx, ecx
jne 0x4f8b88
cmp dword [ebp - 0x28], 2
jne 0x4f8cdd
mov al, byte [ebp - 0x21]
test al, al
je 0x4f8b88
mov eax, dword [0x6624ac]
push 1
push eax
mov ecx, ebx
call fcn.004f72f0
mov eax, 0xfffffffc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc