Function at 0x407071
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 0x40708e
push 6
pop eax
jmp 0x407320
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x44], 0x406f85
mov dword [ebp - 0x40], 0x406f44
mov dword [ebp - 0x20], 0x40460c
mov dword [ebp - 0x1c], 0x404600
mov dword [ebp - 0x38], 0x40460c
mov dword [ebp - 0x34], 0x404600
call fcn.0040466f
lea eax, [ebp - 0x84]
push eax
call fcn.00404ec7
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.00406977
add esp, 0x14
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x407320
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 0x407303
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.00404cfe
add esp, 0x28
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x407303
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.004073df
test eax, eax
je 0x4072df
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x494]
push eax
call fcn.0040743b
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 0x4071c0
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 0x4071f9
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 0x407212
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x28c]
push eax
call fcn.0040733a
jmp 0x4072ca
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 0x4220a0
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.0040733a
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 0x4072e8
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 0x4072f3
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x18]
jne 0x4072f3
cmp byte [esi + 0x1c], bl
je 0x4072bf
push esi
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
je 0x4072f3
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4072e8
inc dword [ebp - 0xc]
add dword [ebp - 0x10], 0x20
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x6c]
jb 0x40710d
jmp 0x407303
mov dword [ebp - 4], 1
jmp 0x407303
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x407303
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.00404ee3
mov eax, dword [ebp - 4]
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret 8