Function at 0x40b42a
Capabilities:
Delete file
Move file
Write file on windows

Disassembly:
push 0x24
mov eax, 0x424085
call fcn.004109ec
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
sub eax, 0x10
mov byte [ebp - 0xd], 0
call fcn.0040402e
add eax, 0x10
mov dword [ebp - 0x14], eax
xor edi, edi
mov dword [ebp - 4], edi
cmp word [eax], di
mov ebx, eax
je 0x40b49d
movzx eax, word [ebx]
push eax
push 0x429f60
call fcn.0040e2b1
test eax, eax
pop ecx
pop ecx
je 0x40b475
test edi, edi
jne 0x40b477
mov edi, ebx
jmp 0x40b477
xor edi, edi
inc ebx
inc ebx
cmp word [ebx], 0
jne 0x40b459
test edi, edi
je 0x40b49d
sub edi, dword [ebp - 0x14]
lea esi, [ebp - 0x14]
sar edi, 1
push edi
call fcn.00404fbb
mov eax, edi
mov edx, esi
call fcn.00404c37
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 0xa0]
lea eax, [edi + 0xa4]
inc dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x18], ecx
mov ecx, dword [edi + 0x80]
test ecx, ecx
mov dword [ebp - 0x24], eax
mov ebx, 0x4312e4
je 0x40b562
imul eax, eax, 0x64
cdq
idiv dword [ebp - 0x18]
push eax
push 0
push 0xbd0
push ecx
mov dword [ebp - 0x2c], eax
call dword [sym.imp.USER32.dll_PostMessageW]
cmp dword [0x43059c], 0xffffffff
je 0x40b562
mov eax, dword [0x4312e4]
and dword [ebp - 0x30], 0
mov ecx, ebx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x18]
mov byte [ebp - 4], 1
push dword [ebp - 0x24]
lea eax, [ebp - 0x1c]
push dword [ebp - 0x2c]
push dword [esi]
push dword [ebp + 0x10]
push str.CFileDownloadJob_OnTaskFinished:sliceid_d__datafile_s_downloadpercent_d_finishedtask_d_totaltask_d_n
call fcn.004044af
mov esi, dword [ebp - 0x1c]
add esp, 0x18
push esi
lea eax, [ebp - 0x20]
push eax
call fcn.004036ef
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax - 0xc]
push 0
lea edx, [ebp - 0x30]
push edx
push ecx
push eax
push dword [0x43059c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
call fcn.00404c04
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0
call fcn.00404c04
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 0x18], eax
jne 0x40b57c
mov eax, dword [esi]
push 1
push dword [ebp - 0x14]
mov byte [ebp - 0xd], 1
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [ebp - 0x28]
push str..cfg
push eax
mov ecx, esi
call fcn.004068ba
pop ecx
pop ecx
cmp byte [ebp - 0xd], 0
mov byte [ebp - 4], 2
je 0x40b74d
mov eax, dword [0x4312e4]
mov ecx, ebx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 0x10], eax
push 0x5c
mov byte [ebp - 4], 3
call fcn.0040681e
test eax, eax
jle 0x40b5e8
lea edx, [eax + 1]
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp + 0xc]
call fcn.0040b7d9
lea edi, [ebp + 0x10]
mov byte [ebp - 4], 4
call fcn.004038f2
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
call fcn.00404c04
mov edi, dword [ebp + 8]
push dword [ebp + 0x10]
lea eax, [ebp - 0x1c]
push eax
call fcn.004036ef
mov byte [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
mov eax, dword [0x4312e4]
mov ecx, ebx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov byte [ebp - 4], 6
push dword [ebp - 0x1c]
sub esi, dword [0x431ef4]
lea eax, [ebp + 8]
push esi
push str.causeBydownloadTimeOut_Time_d_file_s
call fcn.004044fa
mov eax, dword [ebp + 8]
pop ecx
pop ecx
add eax, 0xfffffff0
mov dword [ebp - 0x30], esp
mov esi, esp
mov dword [ebp - 0x2c], eax
call fcn.00404184
add eax, 0x10
mov dword [esi], eax
push ecx
mov byte [ebp - 4], 7
mov eax, esp
mov dword [ebp - 0x24], esp
push str.downloadFinished
push eax
call fcn.004036aa
mov byte [ebp - 4], 6
call fcn.00401c99
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop ecx
pop ecx
push dword [ebp - 0x28]
call esi
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x30]
push str..redic
push eax
call fcn.004068ba
pop ecx
pop ecx
push dword [eax]
call esi
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
call fcn.00404c04
mov eax, dword [ebp - 0x14]
push 0
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x30], esp
mov esi, esp
call fcn.0040402e
add eax, 0x10
mov dword [esi], eax
lea esi, [edi + 0x84]
push esi
add edi, 0x54
call fcn.0040b83d
cmp dword [0x43059c], 0xffffffff
je 0x40b72d
mov eax, dword [0x4312e4]
and dword [ebp - 0x30], 0
mov ecx, ebx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
push dword [ebp - 0x18]
mov eax, dword [ebp + 0xc]
mov byte [ebp - 4], 8
push dword [eax]
lea eax, [ebp - 0x24]
push dword [esi]
push str.CFileDownloadJob_OnTaskFinished:jobid_d__datafile_s_totaltask_d_downloadcomplete_n
call fcn.004044af
mov esi, dword [ebp - 0x24]
add esp, 0x10
push esi
lea eax, [ebp - 0x20]
push eax
call fcn.004036ef
push 0
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x20]
push dword [eax - 0xc]
push eax
push dword [0x43059c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
call fcn.00404c04
lea eax, [esi - 0x10]
call fcn.00404c04
mov eax, dword [ebp - 0x2c]
call fcn.00404c04
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.00404c04
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
call fcn.00404c04
jmp 0x40b75e
mov edi, dword [edi + 0xa8]
test edi, edi
je 0x40b75e
mov eax, dword [ebp + 0x10]
mov byte [edi + eax], 0x80
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
call fcn.00404c04
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.00404c04
xor eax, eax
call fcn.00410ac4
ret 0xc