Function at 0x40ad24
Capabilities:
Delete file
Get file size
Write file on windows

Disassembly:
push 8
mov eax, 0x4237a8
call fcn.004109ec
mov ebx, ecx
mov eax, dword [ebx]
mov ecx, dword [eax - 0xc]
xor edi, edi
cmp ecx, edi
je 0x40adee
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx]
cmp dword [ecx - 0xc], edi
je 0x40adee
cmp dword [ebp + 0x10], edi
jbe 0x40adee
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
push 0x40000080
push 4
push edi
push 3
push 0xc0000000
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x40adf8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [0x43059c], 0xffffffff
mov esi, eax
je 0x40adee
mov eax, dword [0x4312e4]
mov ecx, 0x4312e4
mov dword [ebp - 0x10], edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 0xc], eax
push esi
mov dword [ebp - 4], edi
push dword [ebx]
lea eax, [ebp + 0xc]
push str.CreateDownloadFile_create_file__s_Error__d_n
call fcn.004044af
mov esi, dword [ebp + 0xc]
add esp, 0xc
push esi
lea eax, [ebp + 0x10]
push eax
call fcn.004036ef
push edi
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp + 0x10]
push dword [eax - 0xc]
push eax
push dword [0x43059c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
call fcn.00404c04
lea eax, [esi - 0x10]
call fcn.00404c04
xor al, al
call fcn.00410ac4
ret 0xc
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, dword [ebp + 0x10]
push edi
je 0x40ae25
push dword [ebp + 0x10]
push edi
push 4
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, eax
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40ae35
push edi
push edi
push 4
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, eax
cmp ebx, edi
jne 0x40ae44
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40adee
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push dword [ebp - 0x10]
call ebx
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push edi
push 0x40000080
push 4
push edi
push 3
push 0xc0000000
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x40aee7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [0x43059c], 0xffffffff
mov esi, eax
je 0x40adee
mov eax, dword [0x4312e4]
mov ecx, 0x4312e4
mov dword [ebp - 0x14], edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 0x10], eax
mov dword [ebp - 4], 1
mov eax, dword [ebp + 0xc]
push esi
push dword [eax]
lea eax, [ebp + 0x10]
push str.CreateDownloadFile_create_file__s_Error__d_n
call fcn.004044af
mov esi, dword [ebp + 0x10]
add esp, 0xc
push esi
lea eax, [ebp + 8]
push eax
call fcn.004036ef
push edi
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp + 8]
push dword [eax - 0xc]
push eax
push dword [0x43059c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
jmp 0x40adde
mov esi, dword [ebp + 8]
call fcn.0040b403
fild dword [ebp + 0x10]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x10]
test eax, eax
jge 0x40af02
fadd dword [0x42a378]
fidiv dword [ebp + 0xc]
push ecx
push ecx
fstp dword [ebp + 0xc]
fld dword [ebp + 0xc]
fstp qword [esp]
call fcn.0040f3f0
fstp dword [ebp + 0xc]
fld dword [ebp + 0xc]
pop ecx
pop ecx
call fcn.004232b0
push edi
push dword [ebp - 0x10]
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, dword [ebp + 0xc]
push edi
je 0x40af3a
push dword [ebp + 0xc]
jmp 0x40af3b
push edi
push edi
push 4
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov esi, eax
cmp esi, edi
jne 0x40af58
push dword [ebp - 0x10]
call ebx
jmp 0x40adee
push edi
push edi
push edi
push 0xf001f
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, edi
jne 0x40af70
push esi
call ebx
jmp 0x40af4e
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xa8], eax
mov eax, dword [ebp + 0xc]
mov dword [ecx + 0xac], eax
mov eax, dword [ebp - 0x10]
mov dword [ecx + 0xb4], eax
mov dword [ecx + 0xb0], esi
mov al, 1
jmp 0x40adf0