Function at 0x401350
Capabilities:
Write file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x58
mov esi, dword [ecx]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], 0
mov edi, dword [sym.imp.kernelbase.dll_GetModuleHandleW]
mov dword [esp], 0
call edi
lea edx, [ebp - 0x28]
mov ebx, dword [sym.imp.kernelbase.dll_LoadStringW]
sub esp, 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], eax
call ebx
sub esp, 0x10
test eax, eax
jne 0x4013c0
test byte [section..data], 1
jne 0x4014d8
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov edx, dword [sym.imp.ucrtbase.dll_malloc]
add eax, 1
mov dword [ebp - 0x30], eax
add eax, eax
mov dword [esp], eax
mov dword [ebp - 0x38], edx
call edx
test eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x34], eax
je 0x4013b4
mov dword [esp], 0
call edi
mov ecx, dword [ebp - 0x30]
sub esp, 4
mov dword [esp + 0xc], ecx
mov edx, dword [ebp - 0x34]
mov dword [esp + 4], esi
mov dword [esp], eax
mov dword [esp + 8], edx
call ebx
mov eax, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x28]
sub esp, 0x10
add eax, 4
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], 0x500
call dword [sym.imp.kernelbase.dll_FormatMessageW]
sub esp, 0x1c
mov ebx, eax
test eax, eax
jne 0x401466
mov edx, dword fs:[0x18]
cmp dword [edx + 0x34], 0xeb
jne 0x401518
mov eax, dword [sym.imp.kernelbase.dll_GetStdHandle]
lea esi, [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
mov dword [esp], 0xfffffff5
mov dword [ebp - 0x2c], eax
call eax
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_WriteConsoleW]
mov esi, dword [sym.imp.ucrtbase.dll_free]
sub esp, 0x14
test eax, eax
je 0x401570
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_LocalFree]
sub esp, 4
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call esi
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.LoadString_failed_with__ld_n
mov dword [esp + 8], str.output_message
mov dword [esp + 4], 0x403000
mov dword [esp], 0
mov dword [esp + 0x10], eax
call fcn.00401300
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov esi, dword [sym.imp.ucrtbase.dll_free]
test byte [section..data], 1
je 0x4014bd
mov eax, edi
mov dword [ebp - 0x2c], edx
call fcn.00401060
mov dword [esp + 0x14], eax
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x34]
mov dword [esp + 0xc], str.Could_not_format_string:_le_lu__fmt_s_n
mov dword [esp + 8], 0x404090
mov dword [esp + 4], 0x403000
mov dword [esp], 0
mov dword [esp + 0x10], eax
call fcn.00401300
jmp 0x4014bd
mov edx, dword [sym.imp.kernelbase.dll_GetOEMCP]
mov dword [ebp - 0x40], edx
call edx
mov dword [esp + 0x1c], 0
mov dword [esp], eax
mov eax, dword [sym.imp.kernelbase.dll_WideCharToMultiByte]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [ebp - 0x3c], eax
call eax
sub esp, 0x20
mov dword [ebp - 0x30], eax
mov dword [esp], eax
mov eax, dword [ebp - 0x38]
call eax
mov edx, dword [ebp - 0x40]
test eax, eax
mov dword [ebp - 0x34], eax
je 0x4014ae
call edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov ecx, dword [ebp - 0x30]
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp - 0x34]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp + 0x10], ecx
mov dword [esp], eax
mov eax, dword [ebp - 0x3c]
call eax
sub esp, 0x20
mov dword [esp], 0xfffffff5
mov eax, dword [ebp - 0x2c]
call eax
lea edx, [ebp - 0x1c]
sub esp, 4
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], 0
mov edi, dword [ebp - 0x30]
mov dword [esp + 8], edi
mov ebx, dword [ebp - 0x34]
mov dword [esp], eax
mov dword [esp + 4], ebx
call dword [sym.imp.kernelbase.dll_WriteFile]
sub esp, 0x14
mov dword [esp], ebx
call esi
jmp 0x4014ae