Function at 0x401110
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags
Write file on windows

Disassembly:
mov edx, dword [section..bss]
test edx, edx
je 0x401120
ret
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x818]
push ebx
sub esp, 0x98c
mov dword [esp], 0
call dword [sym.imp.kernelbase.dll_GetModuleHandleW]
mov edx, dword [ebp + 8]
sub esp, 4
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
test eax, eax
jne 0x401180
test byte [section..data], 1
jne 0x4012d0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp + 0xc]
mov dword [esp + 0x14], 0
mov dword [ebp - 0x94c], eax
lea eax, [ebp - 0x94c]
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x948]
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 0x401172
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 edx, str._invalid_
sub esp, 8
test eax, eax
jne 0x4014ee
cmp word [ebp - 0x818], 0
je 0x4015ed
lea esi, [esi]
mov edx, eax
lea eax, [eax + 1]
cmp word [esi + edx*2 + 2], 0
jne 0x401230
mov ecx, 0x224c
lea ebx, [ebp - 0x942]
lea edi, [ebp - 0x822]
mov word [ebp - 0x944], cx
jmp 0x401295
cmp ax, 9
je 0x4015a0
cmp ax, 0xa
jne 0x40154e
mov eax, 0x6e5c
add ebx, 2
mov word [ebx - 2], ax
lea eax, [edx - 1]
test edx, edx
jle 0x4014c0
cmp ebx, edi
ja 0x4014c0
mov edx, eax
movzx eax, word [esi]
add esi, 2
cmp ax, 0xd
je 0x401530
jbe 0x401260
cmp ax, 0x22
je 0x4015b8
cmp ax, 0x5c
jne 0x401541
mov eax, 0x5c5c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x401280
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 0x401172
mov edi, dword [ebp - 0x948]
mov dword [esp], 0xfffffff5
mov esi, dword [sym.imp.kernelbase.dll_GetStdHandle]
call esi
lea ecx, [ebp - 0x944]
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
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 - 0xc]
pop ebx
pop esi
pop edi
pop ebp
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 ecx, dword [ebp - 0x95c]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebx
mov ebx, dword [ebp - 0x960]
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp - 0x968]
mov dword [esp + 0x1c], 0
mov dword [esp + 8], ecx
mov dword [esp + 0x18], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call ebx
lea ebx, [ebp - 0x944]
sub esp, 0x20
mov dword [esp], 0xfffffff5
call esi
mov ecx, dword [ebp - 0x95c]
sub esp, 4
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
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 eax, eax
jle 0x401606
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 edx, eax
mov dword [esp + 0x14], edx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 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 0x401172
mov eax, 0x725c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x401280
lea ecx, [eax - 0x20]
cmp cx, 0x5e
jbe 0x4015e3
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 0x401280
mov eax, 0x745c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x401280
mov eax, 0x225c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x401280
movzx esi, si
mov dword [esp], str._04x
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf.constprop.0
mov edx, eax
jmp 0x4014ee
mov byte [ebx], al
add ebx, 1
jmp 0x401280
mov eax, 0x224c
mov byte [ebp - 0x942], 0x22
lea ebx, [ebp - 0x942]
mov word [ebp - 0x944], ax
lea eax, [ebx + 1]
jmp 0x4014db