Function at 0x407c00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
cmp dword [ebp + 8], 0
push edi
mov edi, ecx
je 0x407ddb
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x407ddb
push ebx
push esi
push 0x800
mov dword [eax], 0
push 0
push dword [edi + 0x264]
call fcn.00411990
mov ebx, dword [ebp + 0x10]
add esp, 0xc
mov ecx, dword [ebp + 0xc]
test ebx, ebx
jl 0x407c72
jg 0x407c4b
test ecx, ecx
jb 0x407c72
mov esi, dword [edi + 0x22c]
mov eax, esi
cdq
push edx
push eax
push ebx
push ecx
call fcn.0041d710
push eax
movzx eax, byte [ebp + 0x1c]
push eax
mov eax, dword [ebp + 0x14]
cdq
idiv esi
push eax
push esi
push str.__xml_version_1.0_____data__n_program_SECTOR_SIZE_IN_BYTES__i__num_partition_sectors__i__physical_partition_number__i__start_sector__i____n__data_
jmp 0x407c97
mov esi, dword [edi + 0x22c]
mov eax, esi
cdq
push edx
push eax
push ebx
push ecx
call fcn.0041d710
push eax
movzx eax, byte [ebp + 0x1c]
push eax
mov eax, dword [ebp + 0x14]
cdq
idiv esi
push eax
push esi
push str.__xml_version_1.0_____data__n_program_SECTOR_SIZE_IN_BYTES__i__num_partition_sectors__i__physical_partition_number__i__start_sector_NUM_DISK_SECTORS_i____n__data_
push 0x800
push dword [edi + 0x264]
call fcn.0040ca05
mov edx, dword [edi + 0x264]
add esp, 0x1c
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407cb5
mov eax, dword [edi + 0x238]
sub ecx, esi
xor ebx, ebx
mov dword [ebp + 0x1c], ecx
push ebx
lea esi, [ebp + 0x1c]
push esi
push ecx
push edx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x407ce4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push dword [edi + 0x264]
push edi
call fcn.00409880
add esp, 8
mov ecx, edi
call fcn.00407950
test eax, eax
jne 0x407dd0
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov ebx, dword [ebp + 0x14]
xor esi, esi
mov ecx, dword [edi + 0x25c]
mov dword [ebp - 8], edx
mov edx, ecx
mov dword [ebp - 4], eax
test ebx, ebx
je 0x407d87
nop
mov eax, ebx
sub eax, esi
cmp eax, ecx
mov ecx, dword [edi + 0x238]
cmovb edx, eax
xor ebx, ebx
push ebx
lea eax, [ebp + 0x10]
mov dword [ebp + 0x10], edx
push eax
mov eax, dword [ebp + 8]
push edx
add eax, esi
mov dword [ebp + 0x1c], edx
push eax
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x407d57
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jne 0x407dd0
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x14]
add dword [ecx], eax
mov eax, ebx
sub eax, esi
push eax
push str.Sectors_remaining__i_r
call fcn.0040b79b
mov ecx, dword [edi + 0x25c]
add esp, 8
mov edx, dword [ebp + 0x1c]
add esi, ecx
cmp esi, ebx
jb 0x407d20
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov esi, eax
mov ecx, 1
sub ecx, dword [ebp - 4]
mov eax, 0
sbb eax, dword [ebp - 8]
add esi, ecx
adc edx, eax
mov eax, ebx
shr eax, 0xa
push edx
imul eax, eax, 0x3e8
push esi
push 0
push eax
call fcn.0041d7c0
push eax
push ebx
push str._nDownloaded_raw_image_size__i_at_speed__i_KB_s_n
call fcn.0040b79b
add esp, 0xc
mov ecx, edi
call fcn.00407950
mov ebx, eax
pop esi
mov eax, ebx
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 0x18
mov eax, 0x57
pop edi
mov esp, ebp
pop ebp
ret 0x18