Function at 0x4012f0
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags
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, 0x858
mov eax, dword [section..bss]
mov edi, dword [ecx]
test eax, eax
je 0x401320
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov ebx, ecx
mov dword [esp], 0
lea esi, [ebp - 0x818]
call dword [sym.imp.kernelbase.dll_GetModuleHandleW]
sub esp, 4
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
test eax, eax
jne 0x4013a0
test byte [section..data], 1
je 0x401312
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.LoadString_failed_with__ld_n
mov dword [esp + 8], global___func__
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x401312
add ebx, 4
lea eax, [ebp - 0x824]
mov dword [ebp - 0x824], ebx
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x820]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], 0x500
call dword [sym.imp.kernelbase.dll_FormatMessageW]
sub esp, 0x1c
mov ebx, eax
test eax, eax
jne 0x401480
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xeb
je 0x401480
test byte [section..data], 1
je 0x401312
mov eax, esi
shr eax, 0x10
je 0x401629
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x401440
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x14], eax
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x34]
mov dword [esp + 0xc], str.Could_not_format_string:_le_lu__fmt_s_n
mov dword [esp + 8], global___func__
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x401312
mov edi, dword [ebp - 0x820]
mov esi, dword [sym.imp.kernelbase.dll_GetStdHandle]
mov dword [esp], 0xfffffff5
call esi
lea edx, [ebp - 0x81c]
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_WriteConsoleW]
sub esp, 0x14
test eax, eax
je 0x4014e0
mov eax, dword [ebp - 0x820]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_LocalFree]
sub esp, 4
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov edx, dword [sym.imp.kernelbase.dll_GetOEMCP]
mov edi, dword [ebp - 0x820]
mov dword [ebp - 0x83c], edx
call edx
mov dword [esp + 8], edi
mov dword [esp], eax
mov eax, dword [sym.imp.kernelbase.dll_WideCharToMultiByte]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 0
mov dword [ebp - 0x830], eax
call eax
sub esp, 0x20
mov dword [ebp - 0x82c], eax
mov edi, dword fs:[0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov dword [ebp - 0x834], edi
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_HeapAlloc]
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x4014c2
mov ecx, dword [ebp - 0x820]
mov edx, dword [ebp - 0x83c]
mov dword [ebp - 0x838], ecx
call edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov edx, dword [ebp - 0x82c]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], ebx
mov ecx, dword [ebp - 0x838]
mov dword [esp + 4], 0
mov dword [esp + 8], ecx
mov dword [esp], eax
mov ecx, dword [ebp - 0x830]
call ecx
sub esp, 0x20
mov dword [esp], 0xfffffff5
call esi
lea esi, [ebp - 0x81c]
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov edx, dword [ebp - 0x82c]
mov dword [esp + 4], edi
mov dword [esp + 8], edx
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_WriteFile]
sub esp, 0x14
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov edi, dword [ebp - 0x834]
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_HeapFree]
sub esp, 0xc
jmp 0x4014c2
movzx esi, si
mov dword [esp], str._04x
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf.constprop.0
jmp 0x401440