Function at 0x403cc0
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get ntdll base address
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, ecx
push esi
push ebx
sub esp, 0x17c
mov dword [ebp - 0x134], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], 0x2c
mov dword [ebp - 0x144], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], 0
mov dword [ebp - 0x148], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x14c], edx
mov dword [ebp - 0x11c], 0
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x150], eax
call eax
sub esp, 0xc
test eax, eax
je 0x404850
mov dword [eax], 0x28
mov ebx, eax
test byte [edi + 2], 1
jne 0x404090
movzx eax, word [edi + 2]
lea ecx, [edi + 4]
shr ax, 1
movzx eax, ax
mov dword [ebx + 0x18], eax
test byte [ecx], 1
je 0x4040a4
mov eax, dword [ecx]
add ecx, 4
shr eax, 1
mov dword [ebx + 0x1c], eax
movzx eax, byte [ecx]
test al, 1
je 0x4040be
movzx eax, word [ecx]
add ecx, 2
shr ax, 1
mov word [ebp - 0x12c], ax
movzx eax, word [ebp - 0x12c]
mov word [ebx + 0xc], ax
movzx eax, byte [ecx]
test al, 1
je 0x404230
movzx eax, word [ecx]
add ecx, 2
shr ax, 1
mov word [ebx + 0xe], ax
test byte [ecx], 1
je 0x404218
mov edx, dword [ecx]
add ecx, 4
shr edx, 1
mov dword [ebp - 0x130], edx
mov dword [ebx + 4], edx
test byte [ecx], 1
je 0x404200
mov edx, dword [ecx]
add ecx, 4
shr edx, 1
mov dword [ebx + 8], edx
test byte [ecx], 1
je 0x4041e8
mov esi, dword [ecx]
add ecx, 4
shr esi, 1
mov dword [ebx + 0x20], esi
test byte [ecx], 1
je 0x404188
mov esi, dword [ecx]
shr esi, 1
mov dword [ebp - 0x140], esi
lea esi, [ecx + 4]
mov dword [ebp - 0x13c], esi
mov esi, dword [ebp - 0x140]
mov ecx, 0
mov dword [ebx + 0x10], 0
cmp esi, 2
cmovae ecx, esi
mov dword [ebx + 0x24], ecx
movzx ecx, byte [0x416010]
mov byte [ebp - 0x138], cl
cmp ax, 0x20
jbe 0x404118
and ecx, 1
movzx eax, ax
jne 0x4040d8
mov esi, dword [ebp - 0x130]
imul esi, eax
add esi, 0x1f
and esi, 0xffffffe0
lea ecx, [esi + 7]
cmovns ecx, esi
sar ecx, 3
imul ecx, edx
mov dword [ebx + 0x14], ecx
test byte [ebp - 0x138], 8
jne 0x404760
mov eax, dword [ebp - 0x13c]
test byte [eax], 1
je 0x4041c0
mov esi, dword [eax]
mov dword [ebp - 0x12c], esi
shr esi, 1
mov dword [ebp - 0x138], esi
lea esi, [eax + 4]
test byte [esi], 1
je 0x4041a8
mov ecx, dword [esi]
add esi, 4
shr ecx, 1
mov dword [ebp - 0x12c], ecx
movzx eax, byte [esi + 3]
movzx edx, byte [esi + 2]
movzx ecx, byte [esi]
shl eax, 8
add eax, edx
movzx edx, byte [esi + 1]
shl eax, 0x10
shl edx, 8
add edx, ecx
movzx ecx, byte [esi + 4]
movzx edx, dx
add eax, edx
movzx edx, byte [esi + 6]
mov dword [ebp - 0x130], eax
movzx eax, byte [esi + 7]
shl eax, 8
add eax, edx
movzx edx, byte [esi + 5]
shl eax, 0x10
shl edx, 8
add edx, ecx
movzx edx, dx
add edx, eax
mov eax, dword [ebp - 0x12c]
test eax, eax
je 0x403f09
test edx, edx
je 0x403f09
mov dword [esp], edx
mov eax, dword [ebp - 0x134]
mov ecx, edi
mov edx, dword [ebp - 0x14c]
call sym._HLPFILE_AddHotSpotLinks.part.0
cmp byte [ebp - 0x144], 6
jne 0x404240
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x12c], eax
test eax, eax
jne 0x404305
movzx ecx, word [ebx + 0xe]
cmp cx, 8
jbe 0x4042f8
mov dword [esp + 8], ebx
mov dword [esp + 0xc], 0x2c
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_HeapReAlloc]
sub esp, 0x10
mov ebx, eax
test eax, eax
je 0x404850
lea edx, [ebp - 0x11c]
mov ecx, dword [eax + 0x14]
mov eax, dword [ebp - 0x130]
mov dword [esp + 4], edx
movzx edx, byte [ebp - 0x148]
add eax, edi
mov dword [esp], edx
mov edx, dword [ebp - 0x138]
call dbg.HLPFILE_DecompressGfx
mov esi, eax
mov eax, dword [ebp - 0x134]
mov edx, str.pict
call dbg.HLPFILE_RtfAddControl
mov edx, eax
test eax, eax
je 0x40489e
mov eax, dword [ebx + 8]
lea edi, [ebp - 0x118]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 4]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.dibitmap0picw_ldpich_ld
call sym._sprintf
mov eax, dword [ebp - 0x134]
mov edx, edi
call dbg.HLPFILE_RtfAddControl
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
mov edx, eax
test eax, eax
je 0x404030
mov ecx, dword [ebp - 0x12c]
mov eax, dword [ebp - 0x134]
mov edx, ebx
lea ecx, [ecx*4 + 0x2c]
call dbg.HLPFILE_RtfAddHexBytes
mov edx, eax
test eax, eax
je 0x404030
mov edx, esi
mov esi, dword [ebp - 0x134]
mov ecx, dword [ebx + 0x14]
mov eax, esi
call dbg.HLPFILE_RtfAddHexBytes
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
mov edx, eax
test eax, eax
jne 0x4047a8
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov esi, dword fs:[0x18]
mov eax, dword [esi + 0x30]
mov dword [ebp - 0x12c], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x11c]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov edx, dword [ebp - 0x12c]
sub esp, 0xc
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [edi + 2]
lea ecx, [edi + 6]
shr eax, 1
mov dword [ebx + 0x18], eax
test byte [ecx], 1
jne 0x403d58
movzx eax, word [ecx]
add ecx, 2
shr ax, 1
movzx eax, ax
mov dword [ebx + 0x1c], eax
movzx eax, byte [ecx]
test al, 1
jne 0x403d6d
shr al, 1
add ecx, 1
movzx eax, al
mov word [ebp - 0x12c], ax
jmp 0x403d7d
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unknown_bit_count__u_n
mov dword [esp + 8], str.HLPFILE_RtfAddBitmap
mov dword [esp + 4], 0x416010
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
movzx eax, word [ebx + 0xc]
mov word [ebp - 0x12c], ax
movzx eax, byte [0x416010]
mov byte [ebp - 0x138], al
cmp word [ebp - 0x12c], 1
je 0x4042e0
test byte [ebp - 0x138], 1
je 0x4042e0
movzx eax, word [ebp - 0x12c]
mov dword [esp + 0xc], str.Unsupported_planes__u_n
mov dword [esp + 8], str.HLPFILE_RtfAddBitmap
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x416010
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
mov eax, dword [ebx + 4]
mov edx, dword [ebx + 8]
mov dword [ebp - 0x130], eax
movzx eax, byte [0x416010]
mov byte [ebp - 0x138], al
movzx eax, word [ebx + 0xe]
jmp 0x403e39
movzx esi, word [ecx]
shr si, 1
movzx esi, si
mov dword [ebp - 0x140], esi
lea esi, [ecx + 2]
mov dword [ebp - 0x13c], esi
jmp 0x403dfb
movzx ecx, word [esi]
add esi, 2
shr cx, 1
movzx eax, cx
mov dword [ebp - 0x12c], eax
jmp 0x403e9c
mov esi, dword [ebp - 0x13c]
movzx eax, word [esi]
add esi, 2
mov word [ebp - 0x12c], ax
shr ax, 1
movzx eax, ax
mov dword [ebp - 0x138], eax
jmp 0x403e86
movzx esi, word [ecx]
add ecx, 2
shr si, 1
movzx esi, si
jmp 0x403ddc
movzx edx, word [ecx]
add ecx, 2
shr dx, 1
movzx edx, dx
jmp 0x403dc9
movzx edx, word [ecx]
add ecx, 2
shr dx, 1
movzx edx, dx
jmp 0x403db0
shr al, 1
add ecx, 1
movzx eax, al
jmp 0x403d9c
lea edx, [ebp - 0x11c]
mov ecx, dword [ebx + 0x14]
mov eax, dword [ebp - 0x130]
mov dword [esp + 4], edx
movzx edx, byte [ebp - 0x148]
add eax, edi
mov dword [esp], edx
mov edx, dword [ebp - 0x138]
call dbg.HLPFILE_DecompressGfx
mov edx, str.pict
mov esi, eax
mov eax, dword [ebp - 0x134]
call dbg.HLPFILE_RtfAddControl
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
mov edx, eax
test eax, eax
je 0x404030
mov eax, dword [ebx + 8]
lea edx, [ebp - 0x118]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 4]
mov dword [esp + 0x10], eax
movzx eax, word [ebx + 0xc]
mov dword [esp + 0xc], eax
movzx eax, word [ebx + 0xe]
mov dword [esp], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str.wbitmap0wbmbitspixel_dwbmplanes_dpicw_ldpich_ld
call sym._sprintf
mov eax, dword [ebp - 0x134]
lea edx, [ebp - 0x118]
call dbg.HLPFILE_RtfAddControl
mov edx, eax
test eax, eax
jne 0x40400e
jmp 0x404030
mov eax, dword [ebx + 4]
mov edx, dword [ebx + 8]
mov dword [ebp - 0x130], eax
movzx eax, word [ebx + 0xe]
jmp 0x403e39
mov eax, 1
shl eax, cl
mov dword [ebp - 0x12c], eax
mov ecx, dword [ebp - 0x12c]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
lea edx, [ecx*4 + 0x2c]
mov dword [esp + 0xc], edx
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_HeapReAlloc]
sub esp, 0x10
mov ebx, eax
test eax, eax
je 0x404850
mov ecx, dword [ebp - 0x12c]
xor eax, eax
lea esi, [esi]
movzx edx, byte [esi + eax*4 + 8]
mov byte [ebx + eax*4 + 0x28], dl
movzx edx, byte [esi + eax*4 + 9]
mov byte [ebx + eax*4 + 0x29], dl
movzx edx, byte [esi + eax*4 + 0xa]
mov byte [ebx + eax*4 + 0x2b], 0
mov byte [ebx + eax*4 + 0x2a], dl
add eax, 1
cmp eax, ecx
jb 0x404350
lea edx, [ebp - 0x11c]
mov ecx, dword [ebx + 0x14]
mov eax, dword [ebp - 0x130]
mov dword [esp + 4], edx
movzx edx, byte [ebp - 0x148]
add eax, edi
mov dword [esp], edx
mov edx, dword [ebp - 0x138]
call dbg.HLPFILE_DecompressGfx
cmp dword [ebp - 0x140], 1
mov esi, eax
jne 0x403f97
mov dword [esp], 0
call sym._GetDC_4
sub esp, 4
mov edi, eax
mov dword [esp + 0xc], esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], ebx
mov dword [esp + 8], 4
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._CreateDIBitmap_24
sub esp, 0x18
mov dword [ebp - 0x130], eax
mov dword [esp], edi
call sym._CreateCompatibleDC_4
mov esi, eax
mov eax, dword [ebp - 0x130]
sub esp, 4
mov dword [esp], esi
mov dword [esp + 4], eax
call sym._SelectObject_8
mov dword [ebp - 0x13c], edi
sub esp, 8
mov dword [ebp - 0x140], eax
mov dword [esp], edi
call sym._CreateCompatibleDC_4
sub esp, 4
mov edi, eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 1
mov eax, dword [ebx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sym._CreateBitmap_20
sub esp, 0x14
mov dword [ebp - 0x138], eax
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._SelectObject_8
mov edx, dword [ebp - 0x12c]
mov dword [ebp - 0x144], eax
sub esp, 8
lea edx, [ebx + edx*4]
movzx ecx, byte [edx + 0x25]
movzx eax, byte [edx + 0x24]
shl ecx, 8
shl eax, 0x10
or eax, ecx
movzx ecx, byte [edx + 0x26]
mov dword [esp], esi
or eax, ecx
mov dword [esp + 4], eax
call sym._SetBkColor_8
sub esp, 8
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], 0xcc0020
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov eax, dword [ebx + 8]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 4]
mov dword [esp], edi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call sym._BitBlt_36
sub esp, 0x24
mov dword [esp], esi
mov dword [esp + 4], 0
call sym._SetBkColor_8
sub esp, 8
mov dword [esp], esi
mov dword [esp + 4], 0xffffff
call sym._SetTextColor_8
sub esp, 8
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], 0x8800c6
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov eax, dword [ebx + 8]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 4]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call sym._BitBlt_36
mov edx, dword [ebp - 0x144]
sub esp, 0x24
mov dword [esp + 4], edx
mov dword [esp], edi
call sym._SelectObject_8
sub esp, 8
mov dword [esp], edi
call sym._DeleteDC_4
mov edx, dword [ebp - 0x140]
sub esp, 4
mov dword [esp + 4], edx
mov dword [esp], esi
call sym._SelectObject_8
sub esp, 8
mov dword [esp], esi
call sym._DeleteDC_4
sub esp, 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._CreateEnhMetaFileW_16
sub esp, 0x10
mov esi, eax
mov dword [esp], eax
call sym._CreateCompatibleDC_4
mov ecx, dword [ebp - 0x138]
sub esp, 4
mov edi, eax
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._SelectObject_8
sub esp, 8
mov dword [ebp - 0x12c], eax
mov dword [esp], esi
mov dword [esp + 4], 0xffffff
call sym._SetBkColor_8
sub esp, 8
mov dword [esp], esi
mov dword [esp + 4], 0
call sym._SetTextColor_8
sub esp, 8
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], 0x8800c6
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov eax, dword [ebx + 8]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 4]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call sym._BitBlt_36
mov eax, dword [ebp - 0x130]
sub esp, 0x24
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._SelectObject_8
sub esp, 8
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], 0xee0086
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov eax, dword [ebx + 8]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 4]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call sym._BitBlt_36
mov edx, dword [ebp - 0x12c]
sub esp, 0x24
mov dword [esp + 4], edx
mov dword [esp], edi
call sym._SelectObject_8
sub esp, 8
mov dword [esp], edi
call sym._DeleteDC_4
mov edi, dword [ebp - 0x13c]
sub esp, 4
mov dword [esp + 4], edi
mov dword [esp], 0
call sym._ReleaseDC_8
mov ecx, dword [ebp - 0x138]
sub esp, 8
mov dword [esp], ecx
call sym._DeleteObject_4
mov eax, dword [ebp - 0x130]
sub esp, 4
mov dword [esp], eax
call sym._DeleteObject_4
sub esp, 4
mov dword [esp], esi
call sym._CloseEnhMetaFile_4
sub esp, 4
mov esi, eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._GetEnhMetaFileBits_12
sub esp, 0xc
mov edi, eax
test eax, eax
jne 0x4047c0
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
xor edx, edx
mov dword [esp], esi
mov dword [ebp - 0x12c], edx
call sym._DeleteEnhMetaFile_4
mov edx, dword [ebp - 0x12c]
sub esp, 4
jmp 0x404030
mov esi, dword [ebp - 0x130]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], esi
movzx eax, word [ebx + 0xc]
mov dword [esp + 0xc], str.planes_d_bc_d_size__ld__ld__n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.HLPFILE_RtfAddBitmap
mov dword [esp + 4], 0x416010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x403e64
mov edx, 0x417587
mov eax, esi
call dbg.HLPFILE_RtfAddControl
xor edx, edx
test eax, eax
setne dl
jmp 0x404030
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x150]
call eax
mov dword [ebp - 0x12c], eax
sub esp, 0xc
test eax, eax
je 0x404732
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._GetEnhMetaFileBits_12
sub esp, 0xc
cmp edi, eax
je 0x404857
xor edx, edx
mov edi, dword [ebp - 0x12c]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edi
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x130], edx
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov edx, dword [ebp - 0x130]
sub esp, 0xc
jmp 0x40473a
xor edx, edx
jmp 0x40407d
mov eax, dword [ebp - 0x134]
mov edx, str.pictemfblip
call dbg.HLPFILE_RtfAddControl
test eax, eax
je 0x40480b
mov edx, dword [ebp - 0x12c]
mov eax, dword [ebp - 0x134]
mov ecx, edi
call dbg.HLPFILE_RtfAddHexBytes
test eax, eax
je 0x40480b
mov eax, dword [ebp - 0x134]
mov edx, 0x417587
call dbg.HLPFILE_RtfAddControl
xor edx, edx
test eax, eax
setne dl
jmp 0x40480d
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
jmp 0x404030