Function at 0x40a55b
Capabilities:
Copy file
Get file size

Disassembly:
push ebp
lea ebp, [esp - 0x1b8]
sub esp, 0x238
mov eax, dword [0x4290c8]
push ebx
push esi
xor ebx, ebx
cmp dword [0x42b680], ebx
mov dword [ebp + 0x1b4], eax
push edi
mov esi, ecx
je 0x40a7d6
cmp dword [ebp + 0x1c0], ebx
je 0x40a7d6
cmp dword [0x42b474], ebx
jne 0x40a5a4
cmp esi, 1
je 0x40a7d6
cmp dword [0x42b470], ebx
jne 0x40a5b4
cmp esi, ebx
je 0x40a7d6
push dword [ebp + 0x1c0]
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp esi, ebx
jne 0x40a5d7
push str..dju
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
cmp esi, 1
jne 0x40a5e3
mov eax, dword [0x42b474]
jmp 0x40a5f0
cmp esi, ebx
jne 0x40a7d2
mov eax, dword [0x42b470]
mov ecx, dword [eax]
lea edx, [ebp - 0x5c]
push edx
lea edx, [ebp - 0x54]
push edx
push eax
call dword [ecx + 0x38]
cmp eax, ebx
jne 0x40a7d2
mov eax, dword [ebp - 0x5c]
mov ecx, dword [eax]
lea edx, [ebp - 0x80]
push edx
push eax
call dword [ecx + 0x28]
mov edi, eax
mov eax, dword [ebp - 0x5c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp edi, ebx
je 0x40a636
push edi
push str.CPPAMCom::GetFileProgress_hr0x_x_n
call fcn.0040b9f0
pop ecx
pop ecx
push 0xffffffffffffff9b
jmp 0x40a794
movzx eax, byte [ebp - 0x63]
sub eax, ebx
je 0x40a7c3
dec eax
je 0x40a79e
dec eax
je 0x40a797
dec eax
je 0x40a65d
push str.The_file_information_is_unknown_at_present._n
jmp 0x40a7c8
push str.The_file_was_successfully_downloaded._n
call fcn.0040b9f0
cmp esi, ebx
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
pop ecx
mov edi, 0x80
jne 0x40a756
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 0x40a6ab
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 0x40a781
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push dword [ebp - 0x58]
mov dword [ebp - 0x60], 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 + 0x1c0]
mov dword [ebp - 0x58], eax
call esi
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40a701
push dword [ebp + 0x1c0]
push str.CPPAMCom::GetFileProgress_exist__s__n
call fcn.0040b9f0
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 - 0x60]
je 0x40a754
push dword [ebp + 0x1c0]
push str.CPPAMCom::GetFileProgress_CopyFile_to__s__n
call fcn.0040b9f0
pop ecx
pop ecx
push 0
push dword [ebp + 0x1c0]
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x40a743
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 0x40a781
mov eax, dword [0x42b470]
mov ecx, dword [eax]
push 1
lea edx, [ebp - 0x54]
push edx
push eax
call dword [ecx + 0x44]
xor ebx, ebx
push ebx
push edi
push 3
push ebx
push 1
push 0xa0000000
push dword [ebp + 0x1c0]
call esi
cmp eax, 0xffffffff
jne 0x40a78b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 0x1c0]
push str.CPPAMCom::GetFileProgress_Open__s_GetLastError__d_n
call fcn.0040b9f0
add esp, 0xc
jmp 0x40a7b9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x64
pop eax
jmp 0x40a7d9
push str.The_download_job_is_suspended__paused_._n
jmp 0x40a7c8
push dword [ebp - 0x70]
movzx eax, byte [ebp - 0x64]
push eax
push str.This_file_downloaded__u__._rate_is__u_bytes._n
call fcn.0040b9f0
add esp, 0xc
cmp byte [ebp - 0x64], 0x64
jb 0x40a7bd
push 0x63
jmp 0x40a794
movzx eax, byte [ebp - 0x64]
jmp 0x40a7d9
push str.The_download_job_is_in_the_queue_and_waiting_to_start._n
call fcn.0040b9f0
pop ecx
xor eax, eax
jmp 0x40a7d9
push 0xfffffffffffffffe
jmp 0x40a794
or eax, 0xffffffff
mov ecx, dword [ebp + 0x1b4]
pop edi
pop esi
pop ebx
call fcn.00412aab
add ebp, 0x1b8
leave
ret