Function at 0x403dd0
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 - 0x130], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14c], edx
mov dword [ebp - 0x140], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x12c], ecx
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x11c], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], 0x2c
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
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 0x4044c4
mov dword [eax], 0x28
mov esi, eax
test byte [edi + 2], 1
jne 0x4044d0
mov edi, dword [ebp - 0x12c]
movzx eax, word [edi + 2]
lea ecx, [edi + 4]
mov word [ebp - 0x134], ax
shr ax, 1
movzx eax, ax
mov dword [esi + 0x18], eax
test byte [ecx], 1
je 0x4044ea
mov eax, dword [ecx]
add ecx, 4
shr eax, 1
mov dword [esi + 0x1c], eax
movzx eax, byte [ecx]
test al, 1
je 0x404504
movzx eax, word [ecx]
add ecx, 2
shr ax, 1
mov word [ebp - 0x138], ax
movzx eax, word [ebp - 0x138]
mov word [esi + 0xc], ax
movzx eax, byte [ecx]
test al, 1
je 0x4046f0
movzx eax, word [ecx]
add ecx, 2
shr ax, 1
mov word [esi + 0xe], ax
test byte [ecx], 1
je 0x404705
mov edx, dword [ecx]
add ecx, 4
shr edx, 1
mov dword [ebp - 0x13c], edx
mov dword [esi + 4], edx
test byte [ecx], 1
je 0x404723
mov edx, dword [ecx]
add ecx, 4
shr edx, 1
mov dword [esi + 8], edx
test byte [ecx], 1
je 0x40473b
mov ebx, dword [ecx]
add ecx, 4
shr ebx, 1
mov dword [esi + 0x20], ebx
test byte [ecx], 1
je 0x404753
mov edi, dword [ecx]
shr edi, 1
mov dword [ebp - 0x144], edi
lea edi, [ecx + 4]
mov ebx, dword [ebp - 0x144]
xor ecx, ecx
mov dword [esi + 0x10], 0
cmp ebx, 2
cmovae ecx, ebx
mov dword [esi + 0x24], ecx
movzx ecx, byte [0x415010]
mov byte [ebp - 0x134], cl
cmp ax, 0x20
jbe 0x40455d
and ecx, 1
jne 0x404520
mov ebx, dword [ebp - 0x13c]
movzx eax, ax
imul ebx, eax
add ebx, 0x1f
and ebx, 0xffffffe0
lea ecx, [ebx + 7]
cmovns ecx, ebx
sar ecx, 3
imul ecx, edx
mov dword [esi + 0x14], ecx
test byte [ebp - 0x134], 8
jne 0x404770
test byte [edi], 1
je 0x4046d0
mov eax, dword [edi]
add edi, 4
shr eax, 1
mov dword [ebp - 0x138], eax
test byte [edi], 1
je 0x4046b8
mov ecx, dword [edi]
add edi, 4
shr ecx, 1
movzx edx, byte [edi + 3]
movzx eax, byte [edi + 2]
movzx ebx, byte [edi]
shl edx, 8
add edx, eax
movzx eax, byte [edi + 1]
shl edx, 0x10
shl eax, 8
add eax, ebx
movzx ebx, byte [edi + 4]
movzx eax, ax
add eax, edx
movzx edx, byte [edi + 6]
mov dword [ebp - 0x134], eax
movzx eax, byte [edi + 7]
shl eax, 8
add eax, edx
movzx edx, byte [edi + 5]
shl eax, 0x10
shl edx, 8
add edx, ebx
movzx edx, dx
add eax, edx
test ecx, ecx
je 0x40400f
test eax, eax
je 0x40400f
mov dword [esp], eax
mov ecx, dword [ebp - 0x12c]
mov edx, dword [ebp - 0x14c]
mov eax, dword [ebp - 0x130]
call sym._HLPFILE_AddHotSpotLinks.part.0
cmp byte [ebp - 0x140], 6
jne 0x4045d0
mov edx, dword [esi + 0x20]
test edx, edx
je 0x4047b8
lea ecx, [edx*4 + 0x2c]
mov dword [ebp - 0x13c], edx
mov eax, dword fs:[0x18]
mov dword [esp + 8], esi
mov dword [esp + 0xc], ecx
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_HeapReAlloc]
sub esp, 0x10
mov esi, eax
test eax, eax
je 0x4044c4
mov edx, dword [ebp - 0x13c]
xor ebx, ebx
nop
movzx eax, byte [edi + ebx*4 + 8]
mov byte [esi + ebx*4 + 0x28], al
movzx eax, byte [edi + ebx*4 + 9]
mov byte [esi + ebx*4 + 0x29], al
movzx eax, byte [edi + ebx*4 + 0xa]
mov byte [esi + ebx*4 + 0x2b], 0
mov byte [esi + ebx*4 + 0x2a], al
add ebx, 1
cmp ebx, edx
jne 0x404070
mov edx, dword [ebp - 0x134]
mov eax, dword [ebp - 0x12c]
mov ecx, dword [esi + 0x14]
add eax, edx
lea edx, [ebp - 0x11c]
mov dword [esp + 4], edx
movzx edx, byte [ebp - 0x148]
mov dword [esp], edx
mov edx, dword [ebp - 0x138]
call sym._HLPFILE_DecompressGfx.constprop.0
cmp dword [ebp - 0x144], 1
mov dword [ebp - 0x12c], eax
jne 0x404940
mov dword [esp], 0
call sym._GetDC_4
sub esp, 4
mov edi, eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], esi
mov eax, dword [ebp - 0x12c]
mov dword [esp], edi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 4
mov dword [esp + 4], esi
call sym._CreateDIBitmap_24
mov dword [ebp - 0x134], edi
sub esp, 0x18
mov dword [ebp - 0x12c], eax
mov dword [esp], edi
call sym._CreateCompatibleDC_4
mov edi, eax
mov eax, dword [ebp - 0x12c]
sub esp, 4
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._SelectObject_8
mov edx, dword [ebp - 0x134]
sub esp, 8
mov dword [ebp - 0x140], eax
mov dword [esp], edx
call sym._CreateCompatibleDC_4
sub esp, 4
mov dword [ebp - 0x138], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 1
mov eax, dword [esi + 8]
mov dword [esp + 4], eax
mov eax, dword [esi + 4]
mov dword [esp], eax
call sym._CreateBitmap_20
sub esp, 0x14
mov dword [ebp - 0x13c], eax
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x138]
mov dword [esp], edx
call sym._SelectObject_8
lea edx, [esi + ebx*4]
movzx ecx, byte [edx + 0x25]
mov dword [ebp - 0x144], eax
sub esp, 8
movzx eax, byte [edx + 0x24]
movzx edx, byte [edx + 0x26]
mov dword [esp], edi
shl ecx, 8
shl eax, 0x10
or eax, ecx
or eax, edx
mov dword [esp + 4], eax
call sym._SetBkColor_8
sub esp, 8
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], 0xcc0020
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov eax, dword [esi + 8]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 4]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov ebx, dword [ebp - 0x138]
mov dword [esp], ebx
call sym._BitBlt_36
sub esp, 0x24
mov dword [esp], edi
mov dword [esp + 4], 0
call sym._SetBkColor_8
sub esp, 8
mov dword [esp], edi
mov dword [esp + 4], 0xffffff
call sym._SetTextColor_8
sub esp, 8
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], 0x8800c6
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov eax, dword [esi + 8]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 4]
mov dword [esp], edi
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], ebx
call sym._SelectObject_8
sub esp, 8
mov dword [esp], ebx
call sym._DeleteDC_4
mov ebx, dword [ebp - 0x140]
sub esp, 4
mov dword [esp + 4], ebx
mov dword [esp], edi
call sym._SelectObject_8
sub esp, 8
mov dword [esp], edi
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 ebx, eax
mov dword [esp], eax
call sym._CreateCompatibleDC_4
mov ecx, dword [ebp - 0x13c]
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 - 0x138], eax
mov dword [esp], ebx
mov dword [esp + 4], 0xffffff
call sym._SetBkColor_8
sub esp, 8
mov dword [esp], ebx
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 [esi + 8]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 4]
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call sym._BitBlt_36
mov eax, dword [ebp - 0x12c]
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 [esi + 8]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 4]
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call sym._BitBlt_36
mov edx, dword [ebp - 0x138]
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 - 0x134]
sub esp, 4
mov dword [esp + 4], edi
mov dword [esp], 0
call sym._ReleaseDC_8
mov ecx, dword [ebp - 0x13c]
sub esp, 8
mov dword [esp], ecx
call sym._DeleteObject_4
mov eax, dword [ebp - 0x12c]
sub esp, 4
mov dword [esp], eax
call sym._DeleteObject_4
sub esp, 4
mov dword [esp], ebx
call sym._CloseEnhMetaFile_4
sub esp, 4
mov ebx, eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._GetEnhMetaFileBits_12
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov ecx, eax
test eax, eax
jne 0x404830
mov dword [esp], ebx
call sym._DeleteEnhMetaFile_4
sub esp, 4
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov ebx, dword fs:[0x18]
mov eax, dword [ebx + 0x30]
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 [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [edi + 2]
lea ecx, [edi + 6]
mov dword [ebp - 0x134], eax
shr eax, 1
mov dword [esi + 0x18], eax
test byte [ecx], 1
jne 0x403e7b
movzx eax, word [ecx]
add ecx, 2
shr ax, 1
movzx eax, ax
mov dword [esi + 0x1c], eax
movzx eax, byte [ecx]
test al, 1
jne 0x403e90
shr al, 1
add ecx, 1
movzx eax, al
mov word [ebp - 0x138], ax
jmp 0x403ea0
movzx eax, ax
mov dword [esp + 0xc], str.Unknown_bit_count__u_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.HLPFILE_RtfAddBitmap
mov dword [esp + 4], 0x415010
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
movzx eax, word [esi + 0xc]
movzx ecx, byte [0x415010]
mov word [ebp - 0x138], ax
cmp word [ebp - 0x138], 1
mov byte [ebp - 0x134], cl
je 0x40457a
test byte [ebp - 0x134], 1
jne 0x4047d8
mov eax, dword [esi + 4]
mov edx, dword [esi + 8]
mov dword [ebp - 0x13c], eax
movzx eax, word [esi + 0xe]
jmp 0x403f50
mov dword [esp + 8], esi
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 esi, eax
test eax, eax
je 0x4044c4
lea esi, [esi]
lea esi, [esi]
lea edx, [ebp - 0x11c]
mov eax, dword [ebp - 0x12c]
mov edi, dword [ebp - 0x134]
mov ecx, dword [esi + 0x14]
mov dword [esp + 4], edx
movzx edx, byte [ebp - 0x148]
add eax, edi
mov dword [esp], edx
mov edx, dword [ebp - 0x138]
call sym._HLPFILE_DecompressGfx.constprop.0
mov edx, str.pict
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp - 0x130]
call dbg.HLPFILE_RtfAddControl
test eax, eax
je 0x404901
cmp byte [ebp - 0x140], 6
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
je 0x4048d0
mov dword [esp + 0x14], edx
lea ebx, [ebp - 0x118]
mov dword [esp + 0x10], eax
movzx eax, word [esi + 0xc]
mov dword [esp + 0xc], eax
movzx eax, word [esi + 0xe]
mov dword [esp + 4], str.wbitmap0wbmbitspixel_dwbmplanes_dpicw_ldpich_ld
mov dword [esp + 8], eax
mov dword [esp], ebx
call sym._sprintf
mov eax, dword [ebp - 0x130]
mov edx, ebx
call dbg.HLPFILE_RtfAddControl
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
test eax, eax
je 0x404483
mov ecx, dword [esi + 0x14]
mov edx, dword [ebp - 0x12c]
mov eax, dword [ebp - 0x130]
call dbg.HLPFILE_RtfAddHexBytes
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
test eax, eax
je 0x404483
mov eax, dword [ebp - 0x130]
mov edx, 0x41658b
call dbg.HLPFILE_RtfAddControl
jmp 0x404483
movzx ecx, word [edi]
add edi, 2
shr cx, 1
movzx ecx, cx
jmp 0x403fa4
movzx eax, word [edi]
add edi, 2
shr ax, 1
movzx eax, ax
mov dword [ebp - 0x138], eax
jmp 0x403f94
shr al, 1
add ecx, 1
movzx eax, al
mov word [esi + 0xe], ax
test byte [ecx], 1
jne 0x403ecc
movzx edx, word [ecx]
add ecx, 2
shr dx, 1
movzx edx, dx
mov dword [ebp - 0x13c], edx
mov dword [esi + 4], edx
test byte [ecx], 1
jne 0x403ee5
movzx edx, word [ecx]
add ecx, 2
shr dx, 1
movzx edx, dx
mov dword [esi + 8], edx
test byte [ecx], 1
jne 0x403ef8
movzx ebx, word [ecx]
add ecx, 2
shr bx, 1
movzx ebx, bx
mov dword [esi + 0x20], ebx
test byte [ecx], 1
jne 0x403f0b
movzx ebx, word [ecx]
shr bx, 1
movzx edi, bx
mov dword [ebp - 0x144], edi
lea edi, [ecx + 2]
jmp 0x403f18
mov dword [esp + 0x1c], edx
mov edx, dword [ebp - 0x13c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
movzx eax, word [esi + 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], 0x415010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x403f7e
movzx ecx, word [esi + 0xe]
cmp cx, 8
ja 0x404590
mov edx, 1
shl edx, cl
jmp 0x404027
movzx eax, word [ebp - 0x138]
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], 0x415010
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
mov eax, dword [esi + 4]
movzx ebx, byte [0x415010]
mov edx, dword [esi + 8]
mov dword [ebp - 0x13c], eax
movzx eax, word [esi + 0xe]
mov byte [ebp - 0x134], bl
jmp 0x403f50
mov dword [esp + 8], ecx
mov eax, dword fs:[0x18]
mov dword [ebp - 0x134], ecx
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x150]
call eax
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x12c], eax
sub esp, 0xc
test eax, eax
je 0x404478
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x134]
mov dword [esp], ebx
mov dword [esp + 4], ecx
call sym._GetEnhMetaFileBits_12
mov ecx, dword [ebp - 0x134]
sub esp, 0xc
cmp ecx, eax
je 0x404969
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 edi, dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
sub esp, 0xc
jmp 0x404478
xor ebx, ebx
lea edi, [ebp - 0x118]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str.dibitmap0picw_ldpich_ld
mov dword [esp], edi
call sym._sprintf
mov eax, dword [ebp - 0x130]
mov edx, edi
call dbg.HLPFILE_RtfAddControl
test eax, eax
jne 0x404910
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
jmp 0x404483
mov eax, dword [ebp - 0x130]
lea ecx, [ebx*4 + 0x2c]
mov edx, esi
call dbg.HLPFILE_RtfAddHexBytes
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
test eax, eax
jne 0x40467a
jmp 0x404483
mov eax, dword [ebp - 0x130]
mov edx, str.pict
call dbg.HLPFILE_RtfAddControl
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
test eax, eax
je 0x404483
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
jmp 0x4048d2
mov eax, dword [ebp - 0x130]
mov edx, str.pictemfblip
call dbg.HLPFILE_RtfAddControl
mov ecx, dword [ebp - 0x134]
test eax, eax
je 0x404897
mov edx, dword [ebp - 0x12c]
mov eax, dword [ebp - 0x130]
call dbg.HLPFILE_RtfAddHexBytes
test eax, eax
je 0x404897
mov eax, dword [ebp - 0x130]
mov edx, 0x41658b
call dbg.HLPFILE_RtfAddControl
jmp 0x404897