Function at 0x409920
Capabilities:
Access peb ldr_data
Get process heap flags
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
lea eax, [ebp - 0x2c]
sub esp, 0x5c
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x2c], edx
xor edx, edx
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], 0x500
call dword [sym.imp.kernel32.dll_FormatMessageW]
sub esp, 0x1c
test eax, eax
mov ebx, eax
jne 0x4099d0
mov edi, dword fs:[0x18]
cmp dword [edi + 0x34], 0xeb
je 0x4099d0
test byte [0x411188], 1
je 0x409a1b
mov eax, esi
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x34]
mov dword [esp], 0
mov dword [esp + 0x10], eax
mov eax, str.Could_not_format_string:_le_lu__fmt_s_n
mov dword [esp + 0xc], eax
mov eax, 0x412a88
mov dword [esp + 8], eax
mov eax, 0x411188
mov dword [esp + 4], eax
call sym._wine_dbg_log.constprop.0_3
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0xfffffff5
mov eax, dword [sym.imp.kernel32.dll_GetStdHandle]
xor edi, edi
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x30], eax
call eax
sub esp, 4
mov dword [esp + 0x10], edi
lea edi, [ebp - 0x1c]
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteConsoleW]
sub esp, 0x14
test eax, eax
je 0x409a28
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LocalFree]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [sym.imp.kernel32.dll_GetConsoleOutputCP]
mov dword [ebp - 0x40], ecx
call ecx
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x1c], edx
xor edx, edx
mov dword [esp + 0x14], edx
xor edx, edx
mov dword [esp + 4], edx
mov edx, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [ebp - 0x3c], edx
call edx
mov dword [ebp - 0x34], eax
sub esp, 0x20
mov dword [esp], eax
call sym._heap_xalloc
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x38], eax
call ecx
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp - 0x34]
mov dword [esp + 0x18], edx
mov edx, dword [ebp - 0x38]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
xor esi, esi
mov dword [esp + 0x14], ecx
xor ecx, ecx
mov dword [esp + 4], ecx
mov dword [esp + 0x10], edx
mov edx, dword [ebp - 0x3c]
mov dword [esp], eax
call edx
mov ebx, dword [ebp - 0x30]
sub esp, 0x20
mov dword [esp], 0xfffffff5
call ebx
mov ecx, dword [ebp - 0x34]
xor ebx, ebx
sub esp, 4
mov dword [esp + 0xc], edi
mov edi, dword [ebp - 0x38]
mov dword [esp + 8], ecx
mov dword [esp + 0x10], ebx
mov dword [esp], eax
mov dword [esp + 4], edi
call dword [sym.imp.kernel32.dll_WriteFile]
mov eax, dword fs:[0x18]
sub esp, 0x14
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
jmp 0x409a0c