Function at 0x402080
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
mov esi, ecx
push ebx
mov ebx, eax
sub esp, 0x3c
mov edx, dword [ebp + 8]
test byte [0x415010], 8
jne 0x4021e8
cmp dl, 2
je 0x40222a
ja 0x402100
test dl, dl
je 0x4022c8
mov dword [esp + 8], esi
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_HeapAlloc]
mov ecx, eax
mov eax, dword [ebp + 0xc]
sub esp, 0xc
mov dword [eax], ecx
test ecx, ecx
je 0x4020f4
mov dword [esp], esi
lea edx, [ebx + edi]
mov eax, ebx
mov dword [ebp - 0x1c], ecx
call dbg.HLPFILE_UncompressRLE
mov ecx, dword [ebp - 0x1c]
lea esp, [ebp - 0xc]
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dl, 3
jne 0x4021c8
lea edx, [ebx + edi]
mov eax, ebx
mov dword [ebp - 0x24], edx
call dbg.HLPFILE_UncompressedLZ77_Size
mov dword [ebp - 0x28], eax
mov edi, dword fs:[0x18]
mov dword [esp + 8], eax
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_HeapAlloc]
mov dword [ebp - 0x20], eax
call eax
mov dword [ebp - 0x1c], eax
sub esp, 0xc
test eax, eax
je 0x4021d5
mov edx, dword [ebp - 0x24]
mov ecx, eax
mov eax, ebx
call dbg.HLPFILE_UncompressLZ77
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 - 0x20]
call eax
mov ecx, eax
mov eax, dword [ebp + 0xc]
sub esp, 0xc
mov dword [eax], ecx
test ecx, ecx
je 0x402360
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x28]
mov dword [esp], esi
mov dword [ebp - 0x1c], ecx
mov esi, eax
add edx, eax
call dbg.HLPFILE_UncompressRLE
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov ecx, dword [ebp - 0x1c]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
mov eax, ecx
pop esi
pop edi
pop ebp
ret
test byte [0x415010], 1
jne 0x4022f0
xor ecx, ecx
lea esp, [ebp - 0xc]
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, dl
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edi
mov dword [ebp - 0x1c], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unpacking___d__from__u_bytes_to__u_bytes_n
mov dword [esp + 8], str.HLPFILE_DecompressGfx
mov dword [esp + 4], 0x415010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
mov edx, dword [ebp - 0x1c]
cmp dl, 2
jne 0x4020a8
lea edx, [ebx + edi]
mov eax, ebx
mov dword [ebp - 0x1c], edx
call dbg.HLPFILE_UncompressedLZ77_Size
mov dword [esp + 4], 0
mov edi, eax
mov dword [esp + 8], edi
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_HeapAlloc]
mov edx, dword [ebp - 0x1c]
mov ecx, eax
mov eax, dword [ebp + 0xc]
sub esp, 0xc
test ecx, ecx
mov dword [eax], ecx
je 0x4021d5
mov eax, ebx
mov dword [ebp - 0x1c], ecx
call dbg.HLPFILE_UncompressLZ77
cmp esi, edi
mov ecx, dword [ebp - 0x1c]
je 0x4020f4
test byte [0x415010], 4
je 0x4020f4
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.Bogus_gfx_sizes__LZ77_:__u____u_n
mov dword [esp + 8], str.HLPFILE_DecompressGfx
mov dword [esp + 4], 0x415010
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
mov ecx, dword [ebp - 0x1c]
jmp 0x4020f4
cmp edi, esi
je 0x4022d5
test byte [0x415010], 4
jne 0x402328
mov eax, dword [ebp + 0xc]
mov ecx, ebx
mov dword [eax], 0
lea esp, [ebp - 0xc]
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret
movzx edx, dl
mov dword [esp + 0xc], str.Unsupported_packing__u_n
mov dword [esp + 0x10], edx
mov dword [esp + 8], str.HLPFILE_DecompressGfx
mov dword [esp + 4], 0x415010
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
xor ecx, ecx
jmp 0x4021d7
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.Bogus_gfx_sizes__uncompressed_:__u____u_n
mov dword [esp + 8], str.HLPFILE_DecompressGfx
mov dword [esp + 4], 0x415010
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
jmp 0x4022d5
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
xor ecx, ecx
sub esp, 0xc
jmp 0x4021d7