Function at 0x401430
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, 0x988
mov edx, dword [section..bss]
mov edi, dword [ecx]
test edx, edx
je 0x401460
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.kernel32.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 sym._LoadStringW_16
sub esp, 0x10
test eax, eax
jne 0x4014d8
test byte [section..data], 1
je 0x401453
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.LoadString_failed_with__d_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x401453
lea eax, [ebp - 0x94c]
add ebx, 4
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x948]
mov dword [ebp - 0x94c], ebx
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.kernel32.dll_FormatMessageW]
sub esp, 0x1c
mov ebx, eax
test eax, eax
jne 0x401630
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xeb
je 0x401630
test byte [section..data], 1
je 0x401453
mov eax, esi
shr eax, 0x10
je 0x401909
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x40182c
movzx eax, word [ebp - 0x818]
test ax, ax
je 0x40192b
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [esi + edx*2 + 2], 0
jne 0x401590
mov ecx, 0x224c
lea ebx, [ebp - 0x942]
lea edi, [ebp - 0x822]
mov word [ebp - 0x944], cx
jmp 0x4015f8
cmp ax, 9
je 0x4018e0
cmp ax, 0xa
jne 0x40188e
mov eax, 0x6e5c
add ebx, 2
mov word [ebx - 2], ax
lea ecx, [edx - 1]
test edx, edx
jle 0x401800
cmp ebx, edi
ja 0x401800
movzx eax, word [esi]
mov edx, ecx
add esi, 2
cmp ax, 0xd
je 0x401870
jbe 0x4015c0
cmp ax, 0x22
je 0x4018f8
cmp ax, 0x5c
jne 0x401881
mov eax, 0x5c5c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x4015e0
mov edx, dword [ebp - 0x948]
mov dword [esp], 0xfffffff5
lea esi, [ebp - 0x944]
mov edi, dword [sym.imp.kernel32.dll_GetStdHandle]
mov dword [ebp - 0x95c], edx
call edi
mov edx, dword [ebp - 0x95c]
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteConsoleW]
sub esp, 0x14
test eax, eax
je 0x4016a0
mov eax, dword [ebp - 0x948]
mov dword [esp], eax
call dword [sym.imp.kernel32.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 ecx, dword [sym.imp.kernel32.dll_GetConsoleOutputCP]
mov edx, dword [ebp - 0x948]
mov dword [ebp - 0x96c], ecx
mov dword [ebp - 0x95c], edx
call ecx
mov edx, dword [ebp - 0x95c]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 8], edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 4], 0
mov dword [ebp - 0x964], eax
call eax
sub esp, 0x20
mov dword [ebp - 0x95c], eax
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov dword [ebp - 0x968], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x960], eax
sub esp, 0xc
test eax, eax
je 0x40167e
mov edx, dword [ebp - 0x948]
mov ecx, dword [ebp - 0x96c]
mov dword [ebp - 0x970], edx
call ecx
mov edx, dword [ebp - 0x960]
mov ecx, dword [ebp - 0x95c]
mov dword [esp + 0xc], ebx
mov ebx, dword [ebp - 0x970]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 8], ebx
mov ebx, dword [ebp - 0x964]
mov dword [esp + 0x18], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call ebx
sub esp, 0x20
mov dword [esp], 0xfffffff5
call edi
mov ecx, dword [ebp - 0x95c]
mov edi, dword [ebp - 0x960]
sub esp, 4
mov dword [esp + 8], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
mov edx, dword [ebp - 0x968]
sub esp, 0x14
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
jmp 0x40167e
mov byte [ebx], 0x22
test ecx, ecx
jle 0x401944
mov esi, 0x2e2e
mov byte [ebx + 3], 0x2e
lea eax, [ebx + 4]
mov word [ebx + 1], si
mov byte [eax], 0
lea eax, [ebp - 0x944]
mov dword [esp], eax
call dbg.__wine_dbg_strdup
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_u__fmt_s_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x401453
mov eax, 0x725c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x4015e0
lea ecx, [eax - 0x20]
cmp cx, 0x5e
jbe 0x401921
mov ecx, eax
mov byte [ebx], 0x5c
add ebx, 5
shr cx, 0xc
movzx ecx, cx
movzx ecx, byte [ecx + str.0123456789abcdefoutput_write]
mov byte [ebx - 4], cl
mov ecx, eax
shr cx, 8
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefoutput_write]
mov byte [ebx - 3], cl
mov ecx, eax
and eax, 0xf
shr cx, 4
movzx eax, byte [eax + str.0123456789abcdefoutput_write]
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefoutput_write]
mov byte [ebx - 1], al
mov byte [ebx - 2], cl
jmp 0x4015e0
mov eax, 0x745c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x4015e0
mov eax, 0x225c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x4015e0
movzx esi, si
mov dword [esp], str._04x
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf.constprop.0
jmp 0x40182c
mov byte [ebx], al
add ebx, 1
jmp 0x4015e0
mov eax, 0x224c
mov byte [ebp - 0x942], 0x22
lea ebx, [ebp - 0x942]
mov word [ebp - 0x944], ax
lea eax, [ebx + 1]
jmp 0x40181b