Function at 0x4014e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
sub esp, 0x89c
mov eax, dword [ebp + 8]
cmp dword [0x403284], 0
je 0x4014ff
jmp 0x401864
lea eax, [ebp - 0x804]
mov dword [esp], eax
call pe_dos_header
xor ecx, ecx
lea edx, [ebp - 0x804]
mov esi, dword [ebp + 8]
mov dword [esp], 0
mov dword [ebp - 0x820], eax
mov dword [ebp - 0x824], ecx
mov dword [ebp - 0x828], edx
mov dword [ebp - 0x82c], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
sub esp, 4
mov dword [esp], eax
mov eax, dword [ebp - 0x82c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x828]
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x820]
mov dword [esp + 0xc], ecx
call dword [sym.imp.USER32.dll_LoadStringW]
sub esp, 0x10
cmp eax, 0
jne 0x401590
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, str.LoadString_failed_with__d_n
mov dword [esp], ecx
mov dword [esp + 4], eax
call pe_dos_header
jmp 0x401864
cmp dword [ebp - 0x80c], 0
jne 0x4015e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xeb
je 0x4015e9
lea eax, [ebp - 0x804]
mov dword [esp], eax
call pe_dos_header
mov dword [ebp - 0x830], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, str.Could_not_format_string:_le_u__fmt_s_n
mov dword [esp], ecx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x830]
mov dword [esp + 8], eax
call pe_dos_header
jmp 0x401864
mov eax, dword [ebp - 0x80c]
mov ecx, dword [ebp - 0x808]
mov dword [esp], 0xfffffff5
mov dword [ebp - 0x834], eax
mov dword [ebp - 0x838], ecx
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
sub esp, 4
xor ecx, ecx
mov dword [esp], eax
mov eax, dword [ebp - 0x838]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x834]
mov dword [esp + 8], edx
lea edx, [ebp - 0x810]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], 0
mov dword [ebp - 0x83c], ecx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
sub esp, 0x14
mov dword [ebp - 0x814], eax
cmp dword [ebp - 0x814], 0
jne 0x401852
mov eax, dword [ebp - 0x80c]
mov ecx, dword [ebp - 0x808]
mov dword [ebp - 0x840], eax
mov dword [ebp - 0x844], ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x844]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x840]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov dword [ebp - 0x848], ecx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
sub esp, 0x20
mov dword [ebp - 0x818], eax
mov eax, dword [ebp - 0x818]
mov dword [ebp - 0x84c], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x84c]
mov dword [esp + 8], eax
mov dword [ebp - 0x850], ecx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
sub esp, 0xc
mov dword [ebp - 0x81c], eax
cmp dword [ebp - 0x81c], 0
je 0x40184d
mov eax, dword [ebp - 0x818]
mov ecx, dword [ebp - 0x81c]
mov edx, dword [ebp - 0x80c]
mov esi, dword [ebp - 0x808]
mov dword [ebp - 0x854], eax
mov dword [ebp - 0x858], ecx
mov dword [ebp - 0x85c], edx
mov dword [ebp - 0x860], esi
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x860]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x85c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x858]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x854]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov dword [ebp - 0x864], ecx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
sub esp, 0x20
mov ecx, dword [ebp - 0x818]
mov edx, dword [ebp - 0x81c]
mov dword [esp], 0xfffffff5
mov dword [ebp - 0x868], eax
mov dword [ebp - 0x86c], ecx
mov dword [ebp - 0x870], edx
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
sub esp, 4
xor ecx, ecx
mov dword [esp], eax
mov eax, dword [ebp - 0x870]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x86c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x810]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 0
mov dword [ebp - 0x874], ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
mov ecx, dword [ebp - 0x81c]
mov dword [ebp - 0x878], eax
mov dword [ebp - 0x87c], ecx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x87c]
mov dword [esp + 8], eax
mov dword [ebp - 0x880], ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
sub esp, 0xc
jmp 0x401852
mov eax, dword [ebp - 0x808]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
sub esp, 4
add esp, 0x89c
pop esi
pop ebp
ret