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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [ebp + 0xc]
mov ebx, dword [esi + 8]
test byte [0x100258a8], 8
jne 0x1000cf80
movzx eax, word [esi + 0xe]
cmp ax, 1
je 0x1000cbb0
xor ebx, ebx
test byte [0x100258a8], 1
jne 0x1000cfbc
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [ebp + 0x14], 2
jbe 0x1000cbf0
xor ebx, ebx
test byte [0x100258a8], 1
je 0x1000cba5
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xc], str.wrong_usage:__d_n
mov dword [esp + 8], str.PSDRV_WriteDIBPatternDict
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x100258a8
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_16
jmp 0x1000cba5
mov eax, ebx
sar eax, 0x1f
xor ebx, eax
mov edi, ebx
mov ebx, dword [esi + 4]
mov dword [esp + 4], 0
sub edi, eax
lea ecx, [ebx + ebx]
mov dword [ebp - 0x24], edi
mov edx, dword fs:[0x18]
lea eax, [ecx + 7]
test ecx, ecx
mov dword [ebp - 0x30], ebx
cmovns eax, ecx
mov ecx, 0x12b
sar eax, 3
imul eax, edi
inc eax
cmp eax, 0x12b
cmovb eax, ecx
mov dword [esp + 8], eax
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x38], eax
call eax
mov dword [ebp - 0x34], eax
sub esp, 0xc
mov ecx, eax
test edi, edi
jle 0x1000cceb
lea eax, [ebx + 0xe]
add ebx, 7
mov dword [ebp - 0x20], ecx
cmovns eax, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x18], 0
mov edx, eax
mov eax, 2
sar edx, 3
mov dword [ebp - 0x1c], edx
add edx, edx
cmp ebx, 7
cmovg eax, edx
mov dword [ebp - 0x2c], eax
lea esi, cs:[esi]
nop
xor edi, edi
cmp dword [ebp - 0x28], 7
mov ebx, dword [ebp - 0x20]
jle 0x1000cce0
lea esi, cs:[esi]
mov ecx, dword [esi + 4]
lea eax, [ecx + 0x3e]
add ecx, 0x1f
cmovs ecx, eax
mov eax, dword [ebp + 0x10]
sar ecx, 5
imul ecx, dword [ebp - 0x18]
lea eax, [eax + ecx*4]
movzx eax, byte [eax + edi]
mov dword [esp], ebx
inc edi
add ebx, 2
mov dword [esp + 4], 0x1002d093
mov dword [esp + 8], eax
call sym._sprintf
cmp dword [ebp - 0x1c], edi
jg 0x1000cca0
mov edx, dword [ebp - 0x2c]
add dword [ebp - 0x20], edx
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x24], eax
jne 0x1000cc90
mov eax, dword [ebp + 8]
mov dword [esp + 8], 7
mov dword [esp + 4], str._mypat_n
mov dword [esp], eax
call sym._PSDRV_WriteSpool
mov eax, dword [esi + 8]
xor ecx, ecx
mov edx, 1
shr eax, 0x1f
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
mov eax, dword [ebp + 8]
call sym._PSDRV_WriteImageDict.isra.0
mov eax, dword [ebp + 8]
mov dword [esp + 8], 4
mov dword [esp + 4], str.def_n
mov dword [esp], eax
call sym._PSDRV_WriteSpool
mov eax, dword [ebp + 8]
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._PSDRV_WriteIndexColorSpaceBegin
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x1000cfee
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x14], 1
mov eax, dword [eax]
je 0x1000d02a
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_GetTextColor]
mov ebx, eax
mov eax, dword [ebp + 8]
sub esp, 4
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_GetBkColor]
mov edx, ebx
shr edx, 0x10
sub esp, 4
movzx esi, al
movzx edx, dl
mov dword [ebp - 0x18], edx
movzx edx, bh
mov dword [ebp - 0x1c], edx
movzx edx, bl
mov dword [ebp - 0x20], edx
mov edx, eax
shr edx, 0x10
movzx edx, dl
mov dword [ebp - 0x28], edx
movzx edx, ah
mov dword [ebp - 0x2c], edx
mov edi, dword fs:[0x18]
mov dword [esp + 8], 0xf
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x38]
call eax
mov ebx, eax
mov eax, dword [ebp - 0x18]
sub esp, 0xc
mov dword [esp], ebx
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x14], 0x20
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], str._02x_02x_02x_c
mov dword [esp + 8], eax
call sym._sprintf
mov eax, dword [ebp - 0x28]
mov dword [esp + 8], esi
mov dword [esp + 0x14], 0xa
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], str._02x_02x_02x_c
mov dword [esp + 0xc], eax
lea eax, [ebx + 7]
mov dword [esp], eax
call sym._sprintf
mov eax, dword [ebp + 8]
mov dword [esp + 4], ebx
mov dword [esp + 8], 0xe
mov dword [esp], eax
call sym._PSDRV_WriteSpool
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x1c], eax
call eax
mov edx, dword [ebp + 8]
sub esp, 0xc
mov dword [esp], edx
mov dword [esp + 8], 0x12
mov dword [esp + 4], str.__n__setcolorspace_n
call sym._PSDRV_WriteSpool
mov edx, dword [ebp + 8]
mov dword [esp + 4], 0x28
mov ebx, dword [sym.imp.gdi32.dll_GetDeviceCaps]
mov eax, dword [edx]
mov dword [esp], eax
call ebx
mov edx, dword [ebp + 8]
sub esp, 8
mov dword [ebp - 0x18], eax
mov dword [esp + 4], 0x2a
mov eax, dword [edx]
mov dword [esp], eax
call ebx
mov ecx, 0x1b4e81b5
lea esi, [eax + 0x96]
sub esp, 8
mov eax, esi
sar esi, 0x1f
mov dword [esp + 4], str.___n__PaintType_1_n__PatternType_1_n__TilingType_1_n__BBox__0_0__d__d__n__XStep__d_n__YStep__d_n__PaintProc__n__begin_n__0_0_translate_n___d__d_scale_n__mypat_image_n__end_n__n___n_matrix_makepattern_setpattern_n
imul ecx
sar edx, 5
mov ebx, edx
sub ebx, esi
mov esi, dword [ebp - 0x18]
imul ebx, dword [ebp - 0x24]
add esi, 0x96
mov eax, esi
sar esi, 0x1f
mov dword [esp + 0x1c], ebx
imul ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], ebx
mov ebx, 1
sar edx, 5
mov eax, edx
sub eax, esi
imul eax, dword [ebp - 0x30]
mov esi, dword [ebp - 0x34]
mov dword [esp], esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], eax
mov dword [esp + 8], eax
call sym._sprintf
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov edx, dword [ebp + 8]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov dword [esp], edx
call sym._PSDRV_WriteSpool
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x1c]
call eax
mov eax, ebx
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, word [esi + 0xe]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
mov eax, dword [esi + 4]
mov dword [esp + 0xc], str.size__ldx_ldx_d_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.PSDRV_WriteDIBPatternDict
mov dword [esp + 4], 0x100258a8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_16
jmp 0x1000cb8c
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.dib_depth__d_not_supported_n
mov dword [esp + 8], str.PSDRV_WriteDIBPatternDict
mov dword [esp + 4], 0x100258a8
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_16
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, byte [esi + 0x2d]
movzx edx, byte [esi + 0x2c]
shl eax, 8
shl edx, 0x10
or eax, edx
movzx edx, byte [esi + 0x28]
mov dword [ebp - 0x18], edx
movzx edx, byte [esi + 0x29]
mov dword [ebp - 0x1c], edx
movzx edx, byte [esi + 0x2a]
movzx esi, byte [esi + 0x2e]
mov dword [ebp - 0x20], edx
mov edx, eax
movzx eax, ah
shr edx, 0x10
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edx
jmp 0x1000cdc5
mov dword [esp + 4], 5
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_GetCurrentObject]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
sub esp, 8
test eax, eax
je 0x1000d0af
lea edx, [ebp - 0x14]
mov dword [esp + 8], 2
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_GetPaletteEntries]
movzx eax, byte [ebp - 0xf]
movzx edx, byte [ebp - 0xe]
movzx esi, byte [ebp - 0x10]
sub esp, 0x10
shl edx, 0x10
shl eax, 8
or eax, edx
movzx edx, byte [ebp - 0x12]
mov dword [ebp - 0x18], edx
movzx edx, byte [ebp - 0x13]
mov dword [ebp - 0x1c], edx
movzx edx, byte [ebp - 0x14]
mov dword [ebp - 0x20], edx
mov edx, eax
movzx eax, ah
shr edx, 0x10
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edx
jmp 0x1000cdc5
mov dword [ebp - 0x2c], 0
xor esi, esi
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
jmp 0x1000cdc5