Function at 0x401110
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 0x401140
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 0x4011c0
test byte [section..data], 1
je 0x401133
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_write
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x401133
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.kernelbase.dll_FormatMessageW]
sub esp, 0x1c
mov ebx, eax
test eax, eax
jne 0x401310
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xeb
je 0x401310
test byte [section..data], 1
je 0x401133
mov eax, esi
shr eax, 0x10
je 0x4015c9
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 0x4014ec
movzx eax, word [ebp - 0x818]
test ax, ax
je 0x4015e9
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [esi + edx*2 + 2], 0
jne 0x401278
mov ecx, 0x224c
lea ebx, [ebp - 0x942]
lea edi, [ebp - 0x822]
mov word [ebp - 0x944], cx
jmp 0x4012d8
cmp ax, 9
je 0x4015a0
cmp ax, 0xa
jne 0x40154e
mov eax, 0x6e5c
add ebx, 2
mov word [ebx - 2], ax
lea ecx, [edx - 1]
test edx, edx
jle 0x4014c0
cmp ebx, edi
ja 0x4014c0
movzx eax, word [esi]
mov edx, ecx
add esi, 2
cmp ax, 0xd
je 0x401530
jbe 0x4012a0
cmp ax, 0x22
je 0x4015b8
cmp ax, 0x5c
jne 0x401541
mov eax, 0x5c5c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x4012c0
mov edi, dword [ebp - 0x948]
mov dword [esp], 0xfffffff5
mov esi, dword [sym.imp.kernelbase.dll_GetStdHandle]
call esi
lea edx, [ebp - 0x944]
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 0x401370
mov eax, dword [ebp - 0x948]
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 - 0x948]
mov dword [ebp - 0x96c], 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 - 0x960], eax
call eax
sub esp, 0x20
mov dword [ebp - 0x95c], eax
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov edi, dword fs:[0x18]
mov eax, dword [edi + 0x30]
mov dword [ebp - 0x964], 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 0x401352
mov ecx, dword [ebp - 0x948]
mov edx, dword [ebp - 0x96c]
mov dword [ebp - 0x968], ecx
call edx
mov edx, dword [ebp - 0x95c]
mov ecx, dword [ebp - 0x968]
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], edx
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x960]
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call ecx
sub esp, 0x20
mov dword [esp], 0xfffffff5
call esi
mov edx, dword [ebp - 0x95c]
lea esi, [ebp - 0x944]
sub esp, 4
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp], eax
call dword [sym.imp.kernelbase.dll_WriteFile]
sub esp, 0x14
mov dword [esp + 8], edi
mov edi, dword [ebp - 0x964]
mov dword [esp + 4], 0
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 0x401352
mov byte [ebx], 0x22
test ecx, ecx
jle 0x401602
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 sym.___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_lu__fmt_s_n
mov dword [esp + 8], str.output_write
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x401133
mov eax, 0x725c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x4012c0
lea ecx, [eax - 0x20]
cmp cx, 0x5e
jbe 0x4015e1
mov ecx, eax
mov byte [ebx], 0x5c
add ebx, 5
shr cx, 0xc
movzx ecx, cx
movzx ecx, byte [ecx + str.0123456789abcdefreexec_self]
mov byte [ebx - 4], cl
mov ecx, eax
shr cx, 8
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefreexec_self]
mov byte [ebx - 3], cl
mov ecx, eax
and eax, 0xf
shr cx, 4
movzx eax, byte [eax + str.0123456789abcdefreexec_self]
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefreexec_self]
mov byte [ebx - 1], al
mov byte [ebx - 2], cl
jmp 0x4012c0
mov eax, 0x745c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x4012c0
mov eax, 0x225c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x4012c0
movzx esi, si
mov dword [esp], str._04x
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf.constprop.0
jmp 0x4014ec
mov byte [ebx], al
inc ebx
jmp 0x4012c0
mov eax, 0x224c
mov byte [ebp - 0x942], 0x22
lea ebx, [ebp - 0x942]
mov word [ebp - 0x944], ax
lea eax, [ebx + 1]
jmp 0x4014db