Function at 0x409f8a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6a0
mov eax, dword [ecx]
push ebx
xor ebx, ebx
mov dword [ebp - 8], ecx
cmp eax, ebx
jne 0x409fa7
push 6
pop eax
jmp 0x40a239
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x44], 0x409e9e
mov dword [ebp - 0x40], 0x409e5d
mov dword [ebp - 0x20], 0x407525
mov dword [ebp - 0x1c], 0x407519
mov dword [ebp - 0x38], 0x407525
mov dword [ebp - 0x34], 0x407519
call fcn.00407588
lea eax, [ebp - 0x84]
push eax
call fcn.00407de0
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00409890
add esp, 0x14
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x40a239
or dword [ebp - 0x2c], 0xffffffff
cmp dword [ebp - 0x6c], ebx
push esi
push edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0xc], ebx
jbe 0x40a21c
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x10]
lea esi, [ecx + eax]
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x84]
push dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00407c17
add esp, 0x28
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x40a21c
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x492]
mov word [ebp - 0x494], bx
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 8]
push 0x104
stosw word es:[edi], ax
lea eax, [ebp - 0x494]
push eax
push dword [esi + 0x14]
call fcn.0040a2f8
test eax, eax
je 0x40a1f8
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x494]
push eax
call fcn.0040a354
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x28a]
mov word [ebp - 0x28c], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
cmp eax, ebx
jne 0x40a0d9
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
lea ecx, [ebp - 0x494]
push ecx
push eax
lea eax, [ebp - 0x28c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
cmp dword [ebp + 0xc], ebx
je 0x40a112
lea eax, [ebp - 0x28c]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
mov ecx, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x28c]
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
cmp byte [esi + 0x1a], bl
je 0x40a12b
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x28c]
push eax
call fcn.0040a253
jmp 0x40a1e3
mov ecx, 0x82
xor eax, eax
lea edi, [ebp - 0x69e]
mov word [ebp - 0x6a0], bx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x28c]
push eax
push 0x4260b8
lea eax, [ebp - 0x6a0]
push 0x104
push eax
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x10
lea eax, [ebp - 0x6a0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x6a0]
push eax
call fcn.0040a253
push ebx
push 0x80
push 2
push ebx
push ebx
lea eax, [ebp - 0x28c]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40a201
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x28]
push ebx
push eax
mov eax, dword [ebp - 0x14]
push dword [ebp - 0x18]
add ecx, eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a20c
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x18]
jne 0x40a20c
cmp byte [esi + 0x1c], bl
je 0x40a1d8
push esi
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
je 0x40a20c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40a201
inc dword [ebp - 0xc]
add dword [ebp - 0x10], 0x20
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x6c]
jb 0x40a026
jmp 0x40a21c
mov dword [ebp - 4], 1
jmp 0x40a21c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x40a21c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x14]
call dword [ebp - 0x1c]
push dword [ebp - 0x1c]
lea eax, [ebp - 0x84]
push eax
call fcn.00407dfc
mov eax, dword [ebp - 4]
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret 8