Function at 0x40a281
Capabilities:
Copy file
Get file size

Disassembly:
push ebp
lea ebp, [esp - 0x1c8]
sub esp, 0x248
mov eax, dword [0x4280c8]
push ebx
xor ebx, ebx
cmp dword [0x42a670], ebx
push esi
mov dword [ebp + 0x1c4], eax
push edi
je 0x40a3c3
cmp dword [ebp + 0x1d0], ebx
je 0x40a3c3
push dword [ebp + 0x1d0]
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [ebp + 0x1d4], ebx
jne 0x40a2de
push str..dju
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov eax, dword [0x42a670]
cmp eax, ebx
jne 0x40a2f6
push 0x80004003
call fcn.0041b9a0
mov eax, dword [0x42a670]
mov ecx, dword [eax]
lea edx, [ebp - 0x68]
push edx
lea edx, [ebp - 0x60]
push edx
lea edx, [ebp - 0x5c]
push edx
lea edx, [ebp - 0x78]
push edx
lea edx, [ebp - 0x74]
push edx
lea edx, [ebp + 0x1b4]
push edx
lea edx, [ebp - 0x54]
push edx
push eax
call dword [ecx + 0x28]
test eax, eax
jne 0x40a3c3
mov eax, dword [0x42a670]
cmp eax, ebx
jne 0x40a33b
push 0x80004003
call fcn.0041b9a0
mov eax, dword [0x42a670]
mov ecx, dword [eax]
lea edx, [ebp - 0x70]
push edx
lea edx, [ebp - 0x68]
push edx
lea edx, [ebp - 0x60]
push edx
lea edx, [ebp - 0x5c]
push edx
lea edx, [ebp - 0x6c]
push edx
lea edx, [ebp - 0x80]
push edx
lea edx, [ebp + 0x1b4]
push edx
push eax
call dword [ecx + 0x38]
mov esi, eax
cmp esi, ebx
je 0x40a38b
push esi
push str.CPPAMCom::GetFileProgress_hr0x_x_n
call fcn.0040b1f8
cmp esi, 0x800706ba
pop ecx
pop ecx
jne 0x40a38b
call fcn.0040a248
test al, al
jne 0x40a38b
push 0xffffffffffffff9b
jmp 0x40a52a
mov eax, dword [ebp - 0x6c]
dec eax
je 0x40a549
dec eax
je 0x40a537
dec eax
dec eax
je 0x40a530
sub eax, 4
je 0x40a3dc
sub eax, 0x78
je 0x40a3b8
push 0x4236d8
jmp 0x40a53c
push str.The_file_is_unavailable_currently._For_example__the_file_is_on_a_movable_device_and_the_device_is_not_present_currently._n
call fcn.0040b1f8
pop ecx
or eax, 0xffffffff
mov ecx, dword [ebp + 0x1c4]
pop edi
pop esi
pop ebx
call fcn.004120cb
add ebp, 0x1c8
leave
ret
push str.The_file_was_successfully_downloaded._n
call fcn.0040b1f8
cmp dword [ebp + 0x1d4], ebx
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
pop ecx
mov edi, 0x80
jne 0x40a4ec
push ebx
push edi
push 3
push ebx
push 1
mov ebx, connect
push ebx
lea eax, [ebp - 0x54]
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x58], eax
jne 0x40a42e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x54]
push eax
push str.CPPAMCom::GetFileProgress_Finished__s_GetLastError__d_n
jmp 0x40a517
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push dword [ebp - 0x58]
mov dword [ebp - 0x64], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
push eax
push edi
push 3
push eax
push 1
push ebx
push dword [ebp + 0x1d0]
mov dword [ebp - 0x58], eax
call esi
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40a484
push dword [ebp + 0x1d0]
push str.CPPAMCom::GetFileProgress_exist__s__n
call fcn.0040b1f8
pop ecx
pop ecx
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
mov dword [ebp - 0x58], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x64]
je 0x40a4ea
push dword [ebp + 0x1d0]
push str.CPPAMCom::GetFileProgress_CopyFile_to__s__n
call fcn.0040b1f8
pop ecx
pop ecx
push 0
push dword [ebp + 0x1d0]
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x40a4c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x54]
push eax
push str.CPPAMCom::GetFileProgress_CopyFile__s_GetLastError__d_n
jmp 0x40a517
mov eax, dword [0x42a670]
test eax, eax
jne 0x40a4de
push 0x80004003
call fcn.0041b9a0
mov eax, dword [0x42a670]
mov ecx, dword [eax]
push 0xffffffffffffffff
lea edx, [ebp - 0x54]
push edx
push eax
call dword [ecx + 0x14]
xor ebx, ebx
push ebx
push edi
push 3
push ebx
push 1
push 0xa0000000
push dword [ebp + 0x1d0]
call esi
cmp eax, 0xffffffff
jne 0x40a521
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 0x1d0]
push str.CPPAMCom::GetFileProgress_Open__s_GetLastError__d_n
call fcn.0040b1f8
add esp, 0xc
jmp 0x40a568
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x64
pop eax
jmp 0x40a3c6
push str.The_download_job_is_suspended__paused_._n
jmp 0x40a53c
push str.The_download_job_is_in_the_queue_and_waiting_to_start._n
call fcn.0040b1f8
pop ecx
xor eax, eax
jmp 0x40a3c6
push dword [ebp - 0x60]
push dword [ebp - 0x5c]
push str.This_file_downloaded__u__._rate_is__u_bytes._n
call fcn.0040b1f8
mov eax, dword [ebp - 0x5c]
add esp, 0xc
cmp eax, 0x64
jb 0x40a3c6
push 0x63
jmp 0x40a52a