Function at 0x641880b0
Capabilities:
Access peb ldr_data
Get process heap flags

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, 0x58
mov eax, dword [ecx + 4]
mov edi, dword [ecx]
mov esi, dword [ecx + 8]
mov ebx, dword [ecx + 0x14]
mov dword [ebp - 0x24], eax
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x28], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x20], eax
test byte [0x6419a04c], 8
jne 0x64188368
mov eax, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x2c], eax
call eax
mov dword [ebp - 0x1c], 0
sub esp, 0x18
mov edx, eax
test eax, eax
jne 0x64188320
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x64188144
test bl, 3
jne 0x64188220
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x64188198
test bl, 8
je 0x64188198
mov eax, dword [ebp - 0x20]
xor esi, esi
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_GdiConvertToDevmodeW]
push edx
mov dword [ebp - 0x20], eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], edi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
call sym.winspool.drv_DocumentPropertiesW
sub esp, 0x18
mov edi, eax
jmp 0x641882cc
mov eax, dword [ebp - 0x1c]
mov dword [esp], edi
mov dword [esp + 0x14], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
call sym.winspool.drv_DocumentPropertiesW
mov edi, eax
mov eax, dword [ebp - 0x1c]
sub esp, 0x18
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
test ebx, ebx
jne 0x64188206
test edi, edi
jle 0x64188206
sub edi, 0x40
lea esp, [ebp - 0x10]
mov eax, edi
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x18
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov dword [esp], edi
call sym.winspool.drv_DocumentPropertiesW
sub esp, 0x18
test eax, eax
jle 0x64188470
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov esi, eax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x641883c0
test esi, esi
setne byte [ebp - 0x2c]
test bl, 8
jne 0x64188420
mov eax, dword [ebp - 0x1c]
mov dword [esp], edi
mov dword [esp + 0x14], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
call sym.winspool.drv_DocumentPropertiesW
sub esp, 0x18
mov edi, eax
test eax, eax
js 0x64188486
cmp byte [ebp - 0x2c], 0
mov dword [ebp - 0x20], 0
je 0x64188486
mov edx, dword [ebp - 0x28]
mov eax, esi
call sym._DEVMODEWtoA
mov eax, dword [ebp - 0x1c]
mov ebx, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call ebx
mov edx, dword [ebp - 0x20]
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov dword [esp], esi
call ebx
lea esp, [ebp - 0x10]
mov eax, edi
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x18
add eax, eax
mov dword [ebp - 0x30], edx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x30]
mov dword [esp + 0xc], 0xffffffff
mov dword [ebp - 0x1c], eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0x14], edx
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
call eax
sub esp, 0x18
jmp 0x64188134
mov eax, esi
call sym._wine_dbgstr_an.constprop.0
mov edx, dword [ebp - 0x20]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0x20], edx
mov edx, dword [ebp - 0x28]
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.__p__p__s__p__p__ld__n
mov dword [esp + 8], str.DocumentPropertiesA
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x641880eb
mov eax, dword [ebp - 0x1c]
mov dword [esp], edi
mov dword [esp + 0x14], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
call sym.winspool.drv_DocumentPropertiesW
sub esp, 0x18
mov edi, eax
test esi, esi
je 0x641883f7
test eax, eax
jns 0x641882c2
mov eax, dword [ebp - 0x1c]
mov ebx, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call ebx
mov dword [esp + 8], 0
mov eax, dword fs:[0x18]
jmp 0x641882e7
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_GdiConvertToDevmodeW]
sub esp, 4
mov dword [ebp - 0x20], eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], edi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
call sym.winspool.drv_DocumentPropertiesW
sub esp, 0x18
mov edi, eax
test eax, eax
js 0x641882cc
cmp byte [ebp - 0x2c], 0
jne 0x641882c2
jmp 0x641882cc
mov eax, dword [ebp - 0x1c]
mov edi, 0xffffffff
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x64188206
mov dword [ebp - 0x20], 0
jmp 0x641882cc