Function at 0x40a3fa
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x27c
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x22c]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
lea eax, [ebp - 0x22c]
mov dword [ebp - 0x25c], 0xffffffff
mov edx, eax
mov al, 0
mov ecx, dword [ebp - 0x25c]
mov edi, edx
repne scasb al, byte es:[edi]
mov eax, ecx
not eax
lea edx, [eax - 1]
lea eax, [ebp - 0x22c]
add eax, edx
mov word [eax], 0x2f
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
lea eax, [ebp - 0x22c]
mov dword [esp], eax
call fcn.0059fc30
lea eax, [ebp - 0x22c]
mov dword [ebp - 0x25c], 0xffffffff
mov edx, eax
mov al, 0
mov ecx, dword [ebp - 0x25c]
mov edi, edx
repne scasb al, byte es:[edi]
mov eax, ecx
not eax
lea edx, [eax - 1]
lea eax, [ebp - 0x22c]
add eax, edx
mov edx, eax
mov ebx, str._Manifest.mbdb
mov eax, 0xf
mov edi, edx
mov esi, ebx
mov ecx, eax
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 8], 6
mov dword [esp + 4], str.mbdb
lea eax, [ebp - 0x22c]
mov dword [esp], eax
call fcn.00406536
test eax, eax
jns 0x40a4f8
lea eax, [ebp - 0x22c]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Could_not_write_file__s__n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, 0xffffffff
jmp 0x40a8bb
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00404710
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x40a545
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1d
mov dword [esp + 4], 1
mov dword [esp], str.ERROR:_could_not_open_backup_n
call sub.msvcrt.dll_fwrite
mov eax, 0xffffffff
jmp 0x40a8bb
mov dword [esp + 0x14], 0x1f5
mov dword [esp + 0x10], 0x1f5
mov dword [esp + 0xc], 0x1ed
mov dword [esp + 8], str.Media
mov dword [esp + 4], str.MediaDomain
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.0040a189
test eax, eax
jns 0x40a5ae
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
mov dword [esp], str.Couldnt_add_dir_to_backup_n
call sub.msvcrt.dll_fwrite
mov eax, 0xffffffff
jmp 0x40a8bb
mov dword [esp + 0x14], 0x1f5
mov dword [esp + 0x10], 0x1f5
mov dword [esp + 0xc], 0x1ed
mov dword [esp + 8], str.Media_Recordings
mov dword [esp + 4], str.MediaDomain
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.0040a189
test eax, eax
jns 0x40a617
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
mov dword [esp], str.Couldnt_add_dir_to_backup_n
call sub.msvcrt.dll_fwrite
mov eax, 0xffffffff
jmp 0x40a8bb
mov dword [esp + 0x14], 0x1f5
mov dword [esp + 0x10], 0x1f5
mov dword [esp + 0xc], str._var
mov dword [esp + 8], str.Media_Recordings_.haxx
mov dword [esp + 4], str.MediaDomain
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.0040a2bb
test eax, eax
jns 0x40a680
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1c
mov dword [esp + 4], 1
mov dword [esp], str.Couldnt_add_file_to_backup_n
call sub.msvcrt.dll_fwrite
mov eax, 0xffffffff
jmp 0x40a8bb
mov dword [esp], 0
call fcn.00405736
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x40a7ba
mov dword [esp + 4], str.MediaDomain
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00405bf4
mov dword [esp + 4], str.Media_Recordings_.haxx_backup
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00405c19
mov dword [esp + 8], 1
mov dword [esp + 4], 0x655a73
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00405c63
mov dword [esp + 4], 0xa1a4
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00405ed5
mov edx, dword [0x5f3198]
mov eax, edx
inc edx
mov dword [0x5f3198], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00405f02
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00405f27
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00405f4c
mov dword [esp], 0
call sub.msvcrt.dll_time
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00405f71
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00405f96
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00405fbb
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00406018
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00404bc6
test eax, eax
jns 0x40a7a8
mov dword [ebp - 0x1c], 0xffffffff
jmp 0x40a7af
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00405b8b
cmp dword [ebp - 0x1c], 0
jns 0x40a7f2
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x24
mov dword [esp + 4], 1
mov dword [esp], str.Error:_Couldnt_add_file_to_backup__n
call sub.msvcrt.dll_fwrite
mov eax, 0xffffffff
jmp 0x40a8bb
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00405591
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00405684
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.00408db3
test eax, eax
jns 0x40a821
mov eax, 0xffffffff
jmp 0x40a8bb
mov dword [ebp - 0x24c], str.idevicebackup2
mov dword [ebp - 0x248], 0x655aac
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x240], 0x655ab3
mov dword [ebp - 0x23c], 0x655abb
mov dword [ebp - 0x238], 0x655ac4
mov eax, dword [ebp + 8]
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x2c], 7
mov dword [esp], 0x66
call fcn.00410559
lea eax, [ebp - 0x24c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call fcn.00410734
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x40a8b8
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp], str.hmm..._restore_failed__d___n
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 0x1c]
jmp 0x40a8bb
mov eax, dword [ebp - 0x1c]
add esp, 0x27c
pop ebx
pop esi
pop edi
pop ebp
ret