Function at 0x4d8020
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x44
mov eax, dword [esp + 0x58]
imul eax, eax, 0x170
push ebx
mov ebx, dword [esp + 0x58]
push ebp
mov ebp, dword [esp + 0x54]
push esi
mov esi, dword [esp + 0x54]
mov ecx, dword [esi + 0x3434]
mov edx, dword [eax + ecx + 0x140]
push edi
mov edi, dword [esp + 0x60]
mov dword [esp + 0x60], eax
add eax, ecx
mov ecx, dword [edx + 0x60]
mov dword [esp + 0x58], ecx
mov dword [esp + 0x18], ecx
mov ecx, dword [eax + 0x128]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], ecx
cmp dword [eax + 0x64], 5
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], ebx
jne 0x4d8113
mov ecx, dword [eax + 0x150]
test cl, 2
jne 0x4d8113
cmp dword [esi + 0x468], 0
jne 0x4d8113
test cl, 4
mov eax, dword [esp + 0x68]
je 0x4d80de
push ebp
push eax
push esi
mov dword [esi + 0x644], 1
call fcn.0052c410
mov edx, dword [esi + 0x39c]
add esp, 0xc
lea ecx, [esi + 0x418]
push ecx
push edx
mov dword [esi + 0x644], 0
call dword [sym.imp.USER32.dll_ValidateRect]
push esi
call fcn.004b1b10
add esp, 4
jmp 0x4d80e8
push eax
push esi
call fcn.0052c410
add esp, 8
mov ecx, dword [esi + 0x3434]
mov edx, dword [esp + 0x60]
test byte [edx + ecx + 0x150], 4
lea eax, [edx + ecx]
je 0x4d8113
or dword [eax + 0x150], 8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret
cmp dword [eax + 0x100], 0
jne 0x4d8144
cmp dword [eax + 0x104], 0
jne 0x4d8144
cmp dword [eax + 0x108], 0
jne 0x4d8144
cmp dword [eax + 0x10c], 0
jne 0x4d8144
mov dword [esp + 0x24], 0
jmp 0x4d8287
mov ecx, dword [eax + 0xb4]
test ecx, ecx
mov dword [esp + 0x24], 1
mov dword [esp + 0x28], ecx
je 0x4d81e3
mov edx, dword [eax + 0x110]
fild dword [esp + 0x28]
mov ecx, dword [eax + 0x100]
sub edx, dword [eax + 0x104]
mov dword [esp + 0x10], ecx
sub edx, ecx
mov dword [esp + 0x28], edx
fidiv dword [esp + 0x28]
fstp dword [esp + 0x28]
fild dword [esp + 0x10]
fmul dword [esp + 0x28]
call fcn.005ac350
mov ecx, dword [esi + 0x504]
push 0x5a0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov edx, dword [esi + 0x3434]
mov ecx, edi
sub ecx, eax
mov eax, dword [esp + 0x60]
fild dword [eax + edx + 0x110]
mov dword [esp + 0x10], ecx
fmul dword [esp + 0x28]
call fcn.005ac350
mov ecx, dword [esi + 0x500]
push 0x5a0
push ecx
push eax
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov dword [esp + 0x18], eax
mov edx, dword [esi + 0x3434]
mov eax, dword [esp + 0x60]
mov ecx, dword [eax + edx + 0xb0]
add eax, edx
test ecx, ecx
mov dword [esp + 0x28], ecx
je 0x4d8287
mov edx, dword [eax + 0x114]
fild dword [esp + 0x28]
mov ecx, dword [eax + 0x108]
sub edx, dword [eax + 0x10c]
mov dword [esp + 0x1c], ecx
sub edx, ecx
mov dword [esp + 0x28], edx
fidiv dword [esp + 0x28]
fstp dword [esp + 0x28]
fild dword [esp + 0x1c]
fmul dword [esp + 0x28]
call fcn.005ac350
mov ecx, dword [esi + 0x504]
push 0x5a0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov edx, dword [esi + 0x3434]
mov ecx, ebx
sub ecx, eax
mov eax, dword [esp + 0x60]
fild dword [eax + edx + 0x114]
mov dword [esp + 0x1c], ecx
fmul dword [esp + 0x28]
call fcn.005ac350
mov ecx, dword [esi + 0x504]
push 0x5a0
push ecx
push eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov dword [esp + 0x20], eax
cmp dword [esi + 0x5a4], 0
jle 0x4d82a3
cmp dword [0x621ab8], 0
je 0x4d82a3
push ebp
push esi
call fcn.004fcd00
add esp, 8
mov edx, dword [esi + 0x3434]
mov eax, dword [esp + 0x60]
mov ecx, dword [eax + edx + 0x88]
add eax, edx
cmp ecx, 0xc
jne 0x4d839e
cmp dword [esp + 0x6c], 0
jle 0x4d8dbb
lea ebx, [ebx]
mov ecx, dword [esi + 0x3434]
mov edx, dword [esp + 0x60]
mov eax, dword [edx + ecx + 0xa4]
mov edx, dword [eax + 4]
mov ecx, dword [eax]
mov dword [esp + 0x48], edx
mov edx, dword [eax + 8]
mov dword [esp + 0x4c], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x50], edx
mov edx, dword [esi + 0x418]
sub edx, dword [esi + 0x4bc]
sub dword [esp + 0x6c], 1
add edx, edi
mov dword [eax], edx
mov edx, ebx
sub edx, dword [esi + 0x4c0]
add edx, dword [esi + 0x41c]
mov dword [eax + 4], edx
mov edx, dword [esi + 0x418]
sub edx, dword [esi + 0x4bc]
add edx, dword [esp + 0x58]
add edx, edi
mov dword [eax + 8], edx
mov edx, dword [esp + 0x14]
sub edx, dword [esi + 0x4c0]
add edx, ebx
add edx, dword [esi + 0x41c]
cmp dword [eax], ecx
mov dword [eax + 0xc], edx
jne 0x4d8355
mov ecx, dword [esp + 0x48]
cmp dword [eax + 4], ecx
je 0x4d8380
movzx ecx, word [eax + 4]
movzx edx, word [eax]
mov ebx, dword [esp + 0x60]
shl ecx, 0x10
or ecx, edx
mov edx, dword [esi + 0x3434]
mov dword [ebx + edx + 0x14c], ecx
mov ebx, dword [esp + 0x64]
mov dword [esi + 0x644], 0
cmp byte [eax + 0x10], 0
jne 0x4d838e
mov byte [eax + 0x11], 1
mov byte [eax + 0x10], 1
cmp dword [esp + 0x6c], 0
jg 0x4d82d0
jmp 0x4d8dbb
xor edx, edx
cmp ecx, edx
jne 0x4d853d
cmp dword [esp + 0x6c], edx
jle 0x4d8dbb
jmp 0x4d83c0
mov ecx, dword [eax + 0xa4]
mov edx, dword [eax + 0xa0]
mov dword [esp + 0x28], ecx
mov ecx, dword [eax + 0xe0]
test ecx, ecx
mov dword [esp + 0x2c], edx
je 0x4d8403
mov edx, dword [eax + 0xdc]
test edx, edx
jle 0x4d83ec
mov eax, edx
jmp 0x4d83f3
movzx eax, word [eax + 0xb8]
push 1
push 0
push eax
push ecx
push ebp
push esi
call fcn.00500cb0
add esp, 0x18
mov eax, dword [esi + 0x3434]
mov ecx, dword [esp + 0x60]
mov eax, dword [ecx + eax + 0xa8]
cmp eax, dword [esp + 0x18]
jne 0x4d842a
cmp eax, dword [esp + 0x20]
jne 0x4d842a
mov dword [esp + 0x64], 0
jmp 0x4d843f
push 4
push ebp
mov dword [esp + 0x6c], 1
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
mov dword [esp + 0x30], eax
cmp dword [esp + 0x24], 0
je 0x4d849a
push ebp
call dword [sym.imp.GDI32.dll_SaveDC]
mov eax, dword [esi + 0x41c]
sub eax, dword [esi + 0x4c0]
mov edx, dword [esp + 0x14]
mov ecx, dword [esi + 0x418]
sub ecx, dword [esi + 0x4bc]
add edx, eax
add edx, ebx
push edx
mov edx, dword [esp + 0x5c]
add edx, ecx
add edx, edi
push edx
add eax, ebx
push eax
add ecx, edi
push ecx
call dword [sym.imp.GDI32.dll_CreateRectRgn]
push eax
push ebp
mov dword [esp + 0x70], eax
call dword [sym.imp.GDI32.dll_SelectClipRgn]
mov eax, dword [esp + 0x68]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esi + 0x3434]
mov edx, dword [esp + 0x60]
push 0xcc0020
push 0
lea eax, [edx + ecx]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
push ecx
mov ecx, dword [eax + 0xa8]
push edx
mov edx, dword [eax + 0xac]
mov eax, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x34]
push 0
push 0
push eax
mov eax, dword [esp + 0x34]
push ecx
push edx
push eax
push ebp
push esi
call fcn.00504100
add esp, 0x38
cmp dword [esp + 0x24], 0
je 0x4d84f8
push 0xffffffffffffffff
push ebp
call dword [sym.imp.GDI32.dll_RestoreDC]
cmp dword [esp + 0x64], 0
je 0x4d850b
mov ecx, dword [esp + 0x30]
push ecx
push ebp
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
mov edx, dword [esi + 0x3434]
mov eax, dword [esp + 0x60]
mov ecx, dword [eax + edx + 0x140]
add eax, edx
mov edx, dword [ecx + 0x60]
mov ecx, dword [esp + 0x6c]
add dword [esp + 0x10], edx
sub ecx, 1
test ecx, ecx
mov dword [esp + 0x6c], ecx
jg 0x4d83c0
jmp 0x4d8dbb
cmp ecx, 1
je 0x4d8aa1
cmp ecx, 3
je 0x4d8aa1
cmp ecx, 9
jne 0x4d879d
push ebp
call dword [sym.imp.GDI32.dll_SaveDC]
cmp dword [esi + 0x6a8], 0
mov dword [esp + 0x28], eax
je 0x4d85d3
mov ecx, dword [esi + 0x6f4]
test ecx, ecx
je 0x4d85d3
mov eax, dword [esi + 0x6fc]
cmp eax, dword [esi + 0x6f8]
jge 0x4d85d3
mov edx, dword [esp + 0x58]
lea eax, [eax + eax*2]
shl eax, 4
add eax, ecx
mov ecx, dword [esi + 0x708]
push eax
push ecx
push edx
push edi
push esi
call fcn.004fcd30
mov ecx, dword [esi + 0x708]
mov edx, dword [esp + 0x2c]
mov edi, eax
mov eax, dword [esi + 0x6fc]
lea eax, [eax + eax*2]
shl eax, 4
add eax, dword [esi + 0x6f4]
push eax
mov eax, dword [esp + 0x28]
push ecx
push edx
push eax
push esi
call fcn.004fcd30
add esp, 0x28
mov dword [esp + 0x10], eax
cmp dword [esp + 0x6c], 0
jle 0x4d878c
mov edi, edi
cmp dword [esi + 0x5a4], 0
jle 0x4d86be
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x58]
add ecx, ebx
push ecx
add edx, edi
push edx
push ebx
push edi
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [esi + 0x708]
push ecx
lea edx, [esp + 0x38]
push edx
push esi
call fcn.005016f0
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x48]
add esp, 0xc
cmp eax, edi
jge 0x4d862b
mov edi, eax
mov eax, dword [esp + 0x38]
mov ebx, dword [esp + 0x40]
cmp eax, ebx
jge 0x4d8639
mov ebx, eax
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.004e0910
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
add esp, 8
add edx, ecx
push edx
mov edx, dword [esp + 0x1c]
lea edx, [edx + eax*2]
push edx
push ecx
push eax
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [esi + 0x708]
push ecx
lea edx, [esp + 0x38]
push edx
push esi
call fcn.005016f0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x48]
add esp, 0xc
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x4d8698
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x4d86ac
mov dword [esp + 0x1c], ecx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.004e0910
add esp, 8
cmp dword [esp + 0x24], 0
je 0x4d8719
push ebp
call dword [sym.imp.GDI32.dll_SaveDC]
mov eax, dword [esi + 0x41c]
sub eax, dword [esi + 0x4c0]
mov edx, dword [esp + 0x14]
mov ecx, dword [esi + 0x418]
sub ecx, dword [esi + 0x4bc]
add edx, eax
add edx, ebx
push edx
mov edx, dword [esp + 0x5c]
add edx, ecx
add edx, edi
push edx
add eax, ebx
push eax
add ecx, edi
push ecx
call dword [sym.imp.GDI32.dll_CreateRectRgn]
push eax
push ebp
mov dword [esp + 0x70], eax
call dword [sym.imp.GDI32.dll_SelectClipRgn]
mov eax, dword [esp + 0x68]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x1c]
add edx, eax
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x14]
add eax, ecx
mov dword [esp + 0x48], ecx
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x50], edx
mov edx, dword [esi + 0x3434]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x64]
mov ecx, dword [eax + edx + 0x94]
push esi
push 0x4d7180
push ecx
push ebp
call dword [sym.imp.GDI32.dll_EnumEnhMetaFile]
cmp dword [esp + 0x24], 0
je 0x4d8771
push 0xffffffffffffffff
push ebp
call dword [sym.imp.GDI32.dll_RestoreDC]
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x18]
add dword [esp + 0x10], edx
sub eax, 1
test eax, eax
mov dword [esp + 0x6c], eax
jg 0x4d85e0
mov eax, dword [esp + 0x28]
push eax
push ebp
call dword [sym.imp.GDI32.dll_RestoreDC]
jmp 0x4d8dbb
mov ecx, dword [esp + 0x68]
push ecx
push esi
call fcn.004cd1e0
add esp, 8
test eax, eax
je 0x4d8a63
mov edx, dword [esi + 0x3434]
mov eax, dword [esp + 0x60]
cmp dword [eax + edx + 0x84], 0
lea edx, [eax + edx + 0x84]
je 0x4d8a63
cmp dword [esi + 0x468], 0
je 0x4d8829
push 7
call dword [sym.imp.GDI32.dll_GetStockObject]
mov ecx, dword [esi + 0x3a0]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esp + 0x14]
mov ecx, dword [esi + 0x3a0]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x58]
add edx, ebx
push edx
add eax, edi
push eax
push ebx
push edi
push ecx
call dword [sym.imp.GDI32.dll_Rectangle]
mov edx, dword [esp + 0x68]
mov eax, dword [esi + 0x3a0]
push edx
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
jmp 0x4d8dbb
mov ecx, dword [esi + 0x41c]
sub ecx, dword [esi + 0x4c0]
mov eax, dword [esi + 0x418]
sub eax, dword [esi + 0x4bc]
push 0x75
push 0
push 0
add ecx, ebx
push ecx
add eax, edi
push eax
mov dword [esp + 0x44], ecx
mov dword [esi + 0x644], 1
mov ecx, dword [edx]
push 0
push ecx
mov dword [esp + 0x48], eax
call dword [sym.imp.USER32.dll_SetWindowPos]
mov edx, dword [esi + 0x3434]
mov eax, dword [esp + 0x60]
push 1
mov dword [esi + 0x644], 0
mov ecx, dword [eax + edx + 0x84]
push 0
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
mov edx, dword [esi + 0x3434]
mov eax, dword [esp + 0x60]
mov ecx, dword [eax + edx + 0x84]
push 0
push 0
push 0xf
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esi + 0x40c]
mov ecx, dword [esi + 0x410]
mov edx, dword [esi + 0x408]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x44]
mov dword [esp + 0x4c], ecx
mov ecx, dword [esi + 0x39c]
mov dword [esp + 0x44], edx
mov edx, dword [esi + 0x414]
push eax
push ecx
mov dword [esp + 0x58], edx
call dword [sym.imp.USER32.dll_ValidateRect]
push esi
call fcn.004b1b10
mov edx, dword [esi + 0x3434]
mov eax, dword [esp + 0x64]
mov eax, dword [eax + edx + 0xa4]
add esp, 4
push str.Button
push eax
mov dword [esp + 0x6c], eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4d89b2
mov ecx, dword [esp + 0x64]
cmp byte [ecx + 0x3c], 4
jne 0x4d89b2
call dword [sym.imp.USER32.dll_GetFocus]
mov edx, dword [esi + 0x3434]
mov ecx, dword [esp + 0x60]
cmp eax, dword [ecx + edx + 0x84]
jne 0x4d89b2
mov edx, dword [esp + 0x14]
push 0
lea ecx, [ebx - 1]
lea eax, [edi - 1]
lea ebx, [edx + ebx - 1]
mov edx, dword [esp + 0x5c]
push ebx
push eax
push ecx
push eax
push ebp
push esi
mov dword [esp + 0x80], ecx
mov dword [esp + 0x44], eax
lea edi, [edx + edi - 1]
call fcn.00505a40
mov eax, dword [esp + 0x44]
push 0
push ebx
push edi
push ebx
push eax
push ebp
push esi
call fcn.00505a40
mov ecx, dword [esp + 0x9c]
push 0
push ecx
push edi
push ebx
push edi
push ebp
push esi
call fcn.00505a40
mov eax, dword [esp + 0xb8]
mov edx, dword [esp + 0x7c]
add esp, 0x54
push 0
push eax
push edx
push eax
push edi
push ebp
push esi
call fcn.00505a40
add esp, 0x1c
mov eax, dword [esi + 0x3434]
mov ecx, dword [esp + 0x60]
mov edx, dword [ecx + eax + 0x84]
lea eax, [ecx + eax + 0x84]
xor edi, edi
mov dword [eax], 0
cmp dword [esi + 0xa9c], edi
mov dword [esp + 0x64], edx
jle 0x4d8a1b
xor ebx, ebx
mov eax, dword [esi + 0xa98]
add eax, ebx
cmp dword [eax], 0
je 0x4d8a0d
mov ecx, dword [eax + 0x2c]
cmp ecx, dword [esp + 0x68]
jne 0x4d8a0d
mov edx, dword [esi + 0x55c]
cmp edx, dword [eax + 0x64]
je 0x4d8a0d
push 0
push edi
push esi
call fcn.004fff70
add esp, 0xc
add edi, 1
add ebx, 0x78
cmp edi, dword [esi + 0xa9c]
jl 0x4d89e0
mov eax, dword [esi + 0x3434]
mov ecx, dword [esp + 0x64]
mov edi, dword [esp + 0x60]
mov edx, dword [esp + 0x30]
mov dword [edi + eax + 0x84], ecx
mov eax, dword [esp + 0x58]
lea ecx, [edx + eax]
push ecx
mov ecx, dword [esp + 0x30]
add eax, ecx
push eax
push edx
push ecx
push esi
call fcn.004d7200
mov ecx, dword [esi + 0x3434]
lea eax, [edi + ecx + 0x150]
add esp, 0x14
or dword [eax], 0xc
jmp 0x4d8dbb
test dword [esi + 0xa174], 0x10000
je 0x4d8dbb
mov eax, dword [esi + 0x11c]
test eax, eax
je 0x4d8dbb
mov edx, dword [esp + 0x14]
push 0xcc0020
push ebx
push edi
push eax
mov eax, dword [esp + 0x68]
push edx
push eax
push ebx
push edi
push ebp
call dword [sym.imp.GDI32.dll_BitBlt]
jmp 0x4d8dbb
cmp ebp, dword [esi + 0x3a0]
je 0x4d8ac3
cmp ebp, dword [esi + 0x3a8]
je 0x4d8ac3
mov dword [esp + 0x24], 1
mov dword [esp + 0x64], edx
mov dword [esp + 0x68], edx
jmp 0x4d8ae7
mov eax, dword [esi + 0x418]
sub eax, dword [esi + 0x4bc]
mov dword [esp + 0x24], edx
mov dword [esp + 0x64], eax
mov eax, dword [esi + 0x41c]
sub eax, dword [esi + 0x4c0]
mov dword [esp + 0x68], eax
push ebp
call dword [sym.imp.GDI32.dll_SaveDC]
cmp dword [esi + 0x5a4], 0
mov dword [esp + 0x28], eax
jle 0x4d8bcf
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x58]
add ecx, ebx
push ecx
add edx, edi
push edx
push ebx
push edi
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [esi + 0x708]
push ecx
lea edx, [esp + 0x38]
push edx
push esi
call fcn.005016f0
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x48]
add esp, 0xc
cmp eax, edi
jge 0x4d8b3d
mov edi, eax
mov eax, dword [esp + 0x38]
mov ebx, dword [esp + 0x40]
cmp eax, ebx
jge 0x4d8b4b
mov ebx, eax
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.004e0910
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
add esp, 8
add edx, ecx
push edx
mov edx, dword [esp + 0x1c]
add edx, eax
push edx
push ecx
push eax
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [esi + 0x708]
push ecx
lea edx, [esp + 0x38]
push edx
push esi
call fcn.005016f0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x48]
add esp, 0xc
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x4d8ba9
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x4d8bbd
mov dword [esp + 0x1c], ecx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.004e0910
add esp, 8
cmp dword [esi + 0x6a8], 0
je 0x4d8c3f
mov ecx, dword [esi + 0x6f4]
test ecx, ecx
je 0x4d8c3f
mov eax, dword [esi + 0x6fc]
cmp eax, dword [esi + 0x6f8]
jge 0x4d8c3f
lea edx, [eax + eax*2]
mov eax, dword [esi + 0x708]
shl edx, 4
add edx, ecx
mov ecx, dword [esp + 0x58]
push edx
push eax
push ecx
push edi
push esi
call fcn.004fcd30
mov ecx, dword [esp + 0x2c]
mov edi, eax
mov eax, dword [esi + 0x6fc]
lea edx, [eax + eax*2]
mov eax, dword [esi + 0x708]
shl edx, 4
add edx, dword [esi + 0x6f4]
push edx
mov edx, dword [esp + 0x28]
push eax
push ecx
push edx
push esi
call fcn.004fcd30
add esp, 0x28
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x14]
add edi, eax
add ebx, ecx
cmp dword [esp + 0x24], 0
lea eax, [ebx + edx]
jne 0x4d8c71
mov ecx, dword [esi + 0x41c]
cmp ebx, ecx
jge 0x4d8c65
mov ebx, ecx
mov ecx, dword [esi + 0x424]
cmp eax, ecx
jle 0x4d8c71
mov eax, ecx
push eax
mov eax, dword [esp + 0x5c]
lea ecx, [edi + eax]
push ecx
push ebx
push edi
call dword [sym.imp.GDI32.dll_CreateRectRgn]
mov edx, dword [esi + 0x3434]
mov edi, eax
mov eax, dword [esp + 0x60]
cmp dword [eax + edx + 0x58], 0
jne 0x4d8c9d
push edi
push ebp
call dword [sym.imp.GDI32.dll_SelectClipRgn]
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esi + 0x3434]
mov edi, dword [esp + 0x60]
cmp dword [edi + ecx + 0x88], 3
jne 0x4d8cbc
push 7
jmp 0x4d8cbe
push 8
push ebp
call dword [sym.imp.GDI32.dll_SetMapMode]
mov edx, dword [esi + 0x3434]
mov ecx, dword [edi + edx + 0xa8]
lea eax, [edi + edx]
mov edx, dword [eax + 0xac]
push 0
push ecx
push edx
push ebp
call dword [sym.imp.GDI32.dll_SetWindowExtEx]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
push 0
push eax
push ecx
push ebp
call dword [sym.imp.GDI32.dll_SetViewportExtEx]
push 0xd
call dword [sym.imp.GDI32.dll_GetStockObject]
push eax
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
cmp dword [esp + 0x6c], 0
jle 0x4d8d7f
mov edx, dword [esp + 0x68]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x64]
lea edi, [edx + eax]
mov edx, dword [esp + 0x10]
lea ebx, [ecx + edx]
push 0
push edi
push ebx
push ebp
call dword [sym.imp.GDI32.dll_SetViewportOrgEx]
push 0
push 0
push 0
push ebp
call dword [sym.imp.GDI32.dll_SetWindowOrgEx]
xor eax, eax
cmp eax, 0x4d7360
mov dword [esi + 0x668], 0
je 0x4d8d70
mov ecx, dword [esi + 0x3434]
mov edx, dword [esp + 0x60]
mov eax, dword [edx + ecx + 0x90]
push esi
push 0x4d7360
push eax
push ebp
call dword [sym.imp.GDI32.dll_EnumMetaFile]
mov eax, dword [esp + 0x6c]
sub eax, 1
test eax, eax
mov dword [esp + 0x6c], eax
jg 0x4d8d26
mov ecx, dword [esp + 0x28]
push ecx
push ebp
call dword [sym.imp.GDI32.dll_RestoreDC]
mov eax, dword [esi + 0x6e4]
test eax, eax
je 0x4d8dbb
cmp dword [esi + 0x668], 0
je 0x4d8dbb
test dword [esi + 0xa15c], 0x10000
jne 0x4d8dbb
push 0
push eax
push ebp
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebp
call dword [sym.imp.GDI32.dll_RealizePalette]
mov edx, dword [esi + 0x3434]
mov eax, dword [esp + 0x60]
and dword [eax + edx + 0x150], 0xffffffef
cmp dword [esi + 0x5a4], 0
lea eax, [eax + edx + 0x150]
jle 0x4d8df7
cmp dword [0x621ab8], 0
je 0x4d8df7
mov ecx, dword [esi + 0x708]
push ecx
push ebp
push esi
call fcn.004fca90
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret