Function at 0x40c791
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x4633f5
call fcn.00403c85
test al, al
je 0x40cb7f
mov dword [esp], str.ResDir
call fcn.00403a4f
test eax, eax
je 0x40c7e1
mov dword [esp], str._ResDir__resourcesmanifest
call fcn.00403af3
mov ebx, eax
mov dword [esp + 4], 0x463548
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x14], eax
jmp 0x40c802
mov dword [esp], str._InstDir__resourcesmanifest
call fcn.00403af3
mov ebx, eax
mov dword [esp + 4], 0x463548
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40c814
mov dword [esp], str.Cant_open_manifest_for_writing
call fcn.00401520
mov dword [esp + 8], 0x4714e0
mov dword [esp + 4], 0x463588
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp + 4], ebx
mov eax, dword [0x4714a0]
mov dword [esp], eax
call fcn.00412bb1
mov edi, dword [ebp - 0x14]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0xc
mov dword [esp + 4], 1
mov dword [esp], str._Variables__n
call sub.msvcrt.dll_fwrite
mov eax, dword [0x4714c0]
mov dword [esp], eax
call fcn.00413063
jmp 0x40c8ac
mov eax, dword [0x4714c0]
mov dword [esp], eax
call fcn.00412fa8
mov ebx, eax
mov dword [esp], eax
call fcn.00403a4f
mov dword [esp], eax
call fcn.0040a447
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], str._s_s_n
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [0x4714c0]
mov dword [esp], eax
call fcn.00413072
test eax, eax
jne 0x40c872
mov eax, dword [0x4714d0]
mov dword [esp], eax
call fcn.00413063
jmp 0x40c909
mov eax, dword [0x4714d0]
mov dword [esp], eax
call fcn.00412fa8
mov ebx, eax
cmp dword [eax + 8], 0
je 0x40c909
mov eax, dword [eax]
mov dword [esp], eax
call fcn.0040a447
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_s_n
mov edi, dword [ebp - 0x14]
mov dword [esp], edi
call sub.msvcrt.dll_fprintf
mov eax, dword [0x4714d0]
mov dword [esp], eax
call fcn.00413072
test eax, eax
jne 0x40c8cc
mov eax, dword [ebp - 0x14]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 8
mov dword [esp + 4], 1
mov dword [esp], str._Files__n
call sub.msvcrt.dll_fwrite
mov eax, dword [0x4714a0]
mov dword [esp], eax
call fcn.00413063
jmp 0x40c978
mov eax, dword [0x4714a0]
mov dword [esp], eax
call fcn.00412fa8
mov dword [esp], eax
call fcn.0040a447
mov dword [esp + 8], eax
mov dword [esp + 4], 0x463588
mov edi, dword [ebp - 0x14]
mov dword [esp], edi
call sub.msvcrt.dll_fprintf
mov eax, dword [0x4714a0]
mov dword [esp], eax
call fcn.00413072
test eax, eax
jne 0x40c94c
mov eax, dword [ebp - 0x14]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xa
mov dword [esp + 4], 1
mov dword [esp], str._Folders__n
call sub.msvcrt.dll_fwrite
mov eax, dword [0x4714b0]
mov dword [esp], eax
call fcn.00412f7b
mov esi, eax
dec esi
cmp esi, 0xffffffff
je 0x40c9f7
mov dword [esp + 4], esi
mov eax, dword [0x4714b0]
mov dword [esp], eax
call fcn.00412f38
mov dword [esp], eax
call fcn.0040a447
mov dword [esp + 8], eax
mov dword [esp + 4], 0x463588
mov edi, dword [ebp - 0x14]
mov dword [esp], edi
call sub.msvcrt.dll_fprintf
dec esi
cmp esi, 0xffffffff
jne 0x40c9c1
mov eax, dword [0x4714b0]
mov dword [esp], eax
call fcn.00412f7b
test eax, eax
je 0x40ca52
mov dword [esp + 4], 0
mov eax, dword [0x4714b0]
mov dword [esp], eax
call fcn.00412f38
mov esi, 0xffffffff
mov bl, 0
cld
mov ecx, esi
mov edi, eax
mov al, bl
repne scasb al, byte es:[edi]
mov eax, ecx
not eax
dec eax
mov dword [ebp - 0x10], eax
mov dword [esp], 0x462d8d
call fcn.00403a4f
cld
mov ecx, esi
mov edi, eax
mov al, bl
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp dword [ebp - 0x10], ecx
jbe 0x40ca7d
mov dword [esp], 0x462d8d
call fcn.00403a4f
mov dword [esp], eax
call fcn.0040a447
mov dword [esp + 8], eax
mov dword [esp + 4], 0x463588
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov edi, dword [ebp - 0x14]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0xc
mov dword [esp + 4], 1
mov dword [esp], str._Shortcuts__n
call sub.msvcrt.dll_fwrite
mov eax, dword [0x471540]
mov dword [esp], eax
call fcn.00413063
jmp 0x40cb3c
mov eax, dword [0x471540]
mov dword [esp], eax
call fcn.00412fa8
mov ebx, eax
mov eax, dword [eax + 4]
mov dword [esp], eax
call fcn.0040a447
mov dword [esp + 0xc], eax
mov eax, dword [ebx]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x4635c1
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
cmp dword [ebx + 8], 0
je 0x40cb09
mov eax, dword [ebx + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x4635c7
mov edi, dword [ebp - 0x14]
mov dword [esp], edi
call sub.msvcrt.dll_fprintf
cmp dword [ebx + 0xc], 0
je 0x40cb29
mov eax, dword [ebx + 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x4635cb
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov edi, dword [ebp - 0x14]
mov dword [esp + 4], edi
mov dword [esp], 0xa
call sub.msvcrt.dll_fputc
mov eax, dword [0x471540]
mov dword [esp], eax
call fcn.00413072
test eax, eax
jne 0x40cab2
mov eax, dword [ebp - 0x14]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], str._Run__n
call sub.msvcrt.dll_fwrite
mov edi, dword [ebp - 0x14]
mov dword [esp], edi
call sub.msvcrt.dll_fclose
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret