Function at 0x409ef2
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 0x409f0f
push 6
pop eax
jmp 0x40a1a1
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x44], 0x409e06
mov dword [ebp - 0x40], 0x409dc5
mov dword [ebp - 0x20], 0x407481
mov dword [ebp - 0x1c], 0x407497
mov dword [ebp - 0x38], 0x407481
mov dword [ebp - 0x34], 0x407497
call fcn.004074f0
lea eax, [ebp - 0x84]
push eax
call fcn.00407d48
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.004097f8
add esp, 0x14
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x40a1a1
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 0x40a184
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.00407b7f
add esp, 0x28
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x40a184
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.0040a260
test eax, eax
je 0x40a160
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x494]
push eax
call fcn.0040a2bc
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 0x40a041
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 0x40a07a
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 0x40a093
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x28c]
push eax
call fcn.0040a1bb
jmp 0x40a14b
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.0040a1bb
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 0x40a169
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 0x40a174
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x18]
jne 0x40a174
cmp byte [esi + 0x1c], bl
je 0x40a140
push esi
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
je 0x40a174
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40a169
inc dword [ebp - 0xc]
add dword [ebp - 0x10], 0x20
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x6c]
jb 0x409f8e
jmp 0x40a184
mov dword [ebp - 4], 1
jmp 0x40a184
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x40a184
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.00407d64
mov eax, dword [ebp - 4]
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret 8