Function at 0x40f150
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
mov edi, eax
xor ebx, ebx
cmp dword [edi + 0x144], ebx
je 0x40f173
mov esi, edi
call fcn.0040f910
test eax, eax
je 0x40f28c
mov eax, dword [edi + 0x1d8]
mov ecx, dword [eax + 4]
lea esi, [edi + 0x1d4]
push ecx
mov ecx, esi
call fcn.00406af0
mov eax, dword [esi + 4]
mov dword [eax + 4], eax
mov eax, dword [esi + 4]
mov dword [esi + 8], ebx
mov dword [eax], eax
mov esi, dword [esi + 4]
push 0x487268
push ebp
mov dword [esi + 8], esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x40f1c5
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebp
mov eax, edi
call fcn.0040f400
pop edi
pop esi
pop ebp
pop ebx
ret 4
mov edx, edi
mov eax, ebp
sub edx, ebp
jmp 0x40f1d0
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
cmp cl, bl
jne 0x40f1d0
push ebx
push 0x10000080
push 4
push ebx
push ebx
mov eax, 0x7c
push 0xc0000000
lea esi, [edi + 0x150]
push ebp
mov dword [esi], 0x1a545352
mov dword [edi + 0x154], 1
mov dword [edi + 0x158], eax
mov dword [edi + 0x168], eax
mov dword [edi + 0x15c], eax
mov dword [edi + 0x160], ebx
mov dword [edi + 0x16c], ebx
mov dword [edi + 0x170], 0x1388
mov dword [edi + 0x174], ebx
mov dword [edi + 0x178], 0x2235c
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [edi + 0x148], eax
jne 0x40f295
mov edi, dword [edi + 0x1f4]
mov edx, dword [edi + 0x24]
push 0x10000
mov byte [edx], bl
mov eax, dword [edi + 0x28]
push eax
push 0xffffffffffffffff
push ebp
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, dword [edi + 0x28]
mov ecx, dword [0x476eec]
push edi
mov ebx, str.OpenFileFailed
call fcn.004187b0
push eax
call fcn.004059c0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret 4
push ebx
push 0x48700c
push 0x7c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
call esi
mov edx, dword [edi + 0x1cc]
mov dword [0x487010], eax
mov eax, dword [edi + 0x1d0]
lea ecx, [eax*8]
sub ecx, eax
add ecx, ecx
add ecx, ecx
push ecx
push ebx
push edx
call fcn.00440c10
mov ecx, dword [edi + 0x170]
mov edx, dword [edi + 0x148]
add esp, 0xc
lea eax, [ecx*8]
sub eax, ecx
mov ecx, dword [edi + 0x1cc]
push ebx
add eax, eax
push 0x48700c
add eax, eax
push eax
push ecx
push edx
call esi
push ebx
push ebx
push ebx
push 2
mov dword [0x487010], eax
mov eax, dword [edi + 0x148]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, ebx
mov dword [edi + 0x14c], eax
jne 0x40f378
mov esi, dword [edi + 0x1f4]
mov eax, dword [esi + 0x24]
push 0x10000
mov byte [eax], bl
mov ecx, dword [esi + 0x28]
push ecx
push 0xffffffffffffffff
push ebp
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, dword [esi + 0x28]
mov ecx, dword [0x476eec]
push esi
mov ebx, str.CreateFileMappingFailed
call fcn.004187b0
push eax
call fcn.004059c0
mov edx, dword [edi + 0x148]
add esp, 8
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x148], 0xffffffff
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40f3e3
mov ecx, dword [0x476eec]
mov ebx, str.FileMappingAlreadyExist
call fcn.004187b0
mov esi, dword [edi + 0x1f4]
mov edx, ebp
mov ebx, eax
call fcn.0040df00
push eax
push ebx
call fcn.004059c0
mov eax, dword [edi + 0x14c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 8
push eax
call esi
mov ecx, dword [edi + 0x148]
push ecx
mov dword [edi + 0x14c], 0
call esi
mov dword [edi + 0x148], 0xffffffff
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret 4
mov eax, 1
mov dword [edi + 0x144], eax
pop edi
pop esi
pop ebp
pop ebx
ret 4