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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
mov eax, dword [0x613ad0]
xor eax, ebp
mov dword [ebp - 0xa0], eax
push esi
mov eax, dword [ebp + 8]
cmp dword [eax + 0x34], 0
jne 0x509c55
jmp 0x50b67c
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x5ba4], 0
jne 0x509c9a
mov edx, dword [ebp + 8]
cmp dword [edx + 0x5bb8], 0
jne 0x509c9a
mov eax, dword [ebp + 8]
cmp dword [eax + 0x558], 0x114
je 0x509c9a
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x4b48], 0
jne 0x509c9a
mov edx, dword [ebp + 8]
mov dword [edx + 0x4dc], 1
jmp 0x50b67c
cmp dword [ebp + 0xc], 0
je 0x509d27
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x5d8]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x138]
mov ecx, dword [eax + ecx*4]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4e4]
cmp eax, dword [ecx + 0x28]
jne 0x509d27
push 2
push 0x102
push 0x102
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x39c]
push edx
lea eax, [ebp - 0x8c]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
jne 0x509d15
push 2
push 0x100
push 0x100
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x39c]
push edx
lea eax, [ebp - 0x8c]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x509d27
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x4dc], 1
jmp 0x50b67c
mov edx, dword [ebp + 8]
mov dword [edx + 0x5bb8], 0
mov eax, dword [ebp + 8]
mov dword [eax + 0x4dc], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x5d8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004aea30
add esp, 8
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x4e8], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x5d8]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x138]
mov eax, dword [edx + eax*4]
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0x28]
mov dword [ecx + 0x4e4], edx
mov eax, dword [ebp + 8]
cmp dword [eax + 0x4b48], 0
je 0x509db0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x4b3c]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x138]
mov edx, dword [ecx + edx*4]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 0x14]
mov dword [eax + 0x2b44], ecx
jmp 0x509dd1
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x5d8]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x138]
mov eax, dword [edx + eax*4]
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0x14]
mov dword [ecx + 0x2b44], edx
push 8
push 5
mov eax, dword [ebp + 8]
push eax
call fcn.00521b70
add esp, 0xc
push 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
call dword [sym.imp.GDI32.dll_SetTextColor]
push 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xb3f8]
push ecx
call dword [sym.imp.GDI32.dll_SetBkMode]
push 7
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [ebp - 4], eax
push 6
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [ebp - 0x48], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3b8]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x90], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x500]
mov dword [ebp - 0xb0], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x5d8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004aea30
add esp, 8
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0x654], 0
je 0x509ebb
fild dword [ebp - 0xb0]
mov eax, dword [ebp - 0x2c]
imul eax, eax, 0x70
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x39c4]
fmul dword [edx + eax + 0x64]
call fcn.005ac350
mov esi, eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x510]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x500]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x564]
push edx
call dword [sym.imp.KERNEL32.dll_MulDiv]
lea eax, [esi + eax*2]
mov dword [ebp - 0x68], eax
jmp 0x509f0a
fild dword [ebp - 0xb0]
mov ecx, dword [ebp - 0x2c]
imul ecx, ecx, 0x70
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x39c4]
mov edx, dword [ebp - 0x2c]
imul edx, edx, 0x98
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x39c0]
fld dword [eax + ecx + 0x64]
fsub dword [esi + edx + 4]
mov eax, dword [ebp - 0x2c]
imul eax, eax, 0x98
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x39c0]
fsub dword [edx + eax + 8]
fmulp st(1)
call fcn.005ac350
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4bc]
mov edx, dword [ebp + 8]
add ecx, dword [edx + 0x4b4]
cmp dword [ebp - 0x68], ecx
jge 0x509f36
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4bc]
mov edx, dword [ebp + 8]
add ecx, dword [edx + 0x4b4]
mov dword [ebp - 0x68], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x5d8]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004f5d80
add esp, 8
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jge 0x509f5c
mov dword [ebp - 0x5c], 0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x5c]
mov dword [eax + 0x708], ecx
mov edx, dword [ebp - 0x5c]
imul edx, edx, 0xb4
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x704]
mov eax, dword [ebp - 0x5c]
imul eax, eax, 0xb4
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x704]
mov ecx, dword [ecx + edx + 0x14]
add ecx, dword [esi + eax + 0x7c]
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x434]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x430]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x42c]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x428]
push eax
call dword [sym.imp.GDI32.dll_CreateRectRgn]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3a0]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 0x428]
sub ecx, dword [eax + 0x418]
mov edx, dword [ebp + 8]
add ecx, dword [edx + 0x4bc]
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4bc]
mov edx, dword [ebp + 8]
add ecx, dword [edx + 0x4b4]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [eax + 0x430]
sub eax, dword [edx + 0x420]
add ecx, eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [ecx + 0x434]
sub eax, dword [edx + 0x42c]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x4c0]
mov eax, dword [ebp + 8]
add edx, dword [eax + 0x42c]
mov ecx, dword [ebp + 8]
sub edx, dword [ecx + 0x41c]
mov dword [ebp - 0xbc], edx
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 0x14]
add edx, 1
push edx
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x18]
add eax, 1
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3a0]
push edx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x98], eax
push 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x41c]
push ecx
push 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xb3f8]
push eax
call dword [sym.imp.GDI32.dll_SetViewportOrgEx]
push 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x41c]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
call dword [sym.imp.GDI32.dll_SetWindowOrgEx]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x4b38], 0
je 0x50a106
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x4b38]
mov dword [ebp - 0xc8], edx
jmp 0x50a114
push 1
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [ebp - 0xc8], eax
mov eax, dword [ebp - 0xc8]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x64], eax
push 8
call dword [sym.imp.GDI32.dll_GetStockObject]
push eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xb3f8]
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x94], eax
mov edx, dword [ebp - 0xc]
add edx, 1
push edx
mov eax, dword [ebp - 0x10]
add eax, 2
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xb3f8]
push ecx
call dword [sym.imp.GDI32.dll_Rectangle]
mov edx, dword [ebp - 0x64]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xb3f8]
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [ebp - 0x94]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xb3f8]
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [ebp - 0x48]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xb3f8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00505930
add esp, 0x20
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x14]
add eax, dword [edx + 0x4f4]
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x48]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x58]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00505930
add esp, 0x20
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x5d8]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x138]
mov edx, dword [ecx + edx*4]
mov eax, dword [edx + 0x3c]
and eax, 0x20
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x6a8], eax
mov edx, dword [ebp + 8]
mov dword [edx + 0x6f4], 0
fild dword [ebp - 0x6c]
fstp dword [ebp - 0x1c]
fild dword [ebp - 0xb0]
fstp dword [ebp - 0x50]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xa15c]
and ecx, 2
je 0x50a269
fld dword [ebp - 0x50]
fmul qword [0x5ea068]
fdiv qword [0x5ea060]
fstp dword [ebp - 0x50]
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x20], edx
mov dword [ebp - 8], 0
fild dword [ebp - 0x68]
fld dword [ebp - 0x1c]
fcompp
fnstsw ax
test ah, 0x41
jp 0x50a37a
push 0xa
fld dword [ebp - 0x1c]
fmul qword [0x5ea068]
call fcn.005ac350
push eax
call fcn.004e08e0
add esp, 8
cdq
mov ecx, 0xa
idiv ecx
mov dword [ebp - 0x54], eax
mov edx, dword [ebp - 0x48]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x54]
push edx
mov eax, dword [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x54]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xb3f8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00505930
add esp, 0x20
mov edx, dword [ebp - 8]
push edx
push 0x5e90cc
lea eax, [ebp - 0xac]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ecx, dword [ebp - 0x54]
add ecx, 2
mov dword [ebp - 0x60], ecx
mov edx, dword [ebp + 8]
cmp dword [edx + 0x6a8], 0
je 0x50a327
push 0
mov eax, dword [ebp - 0x5c]
push eax
push 0
mov ecx, dword [ebp - 0x60]
sub ecx, 5
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004fcd30
add esp, 0x14
mov dword [ebp - 0x60], eax
fild dword [ebp - 0x6c]
fld dword [ebp - 0x1c]
fcompp
fnstsw ax
test ah, 0x41
jne 0x50a363
lea eax, [ebp - 0xac]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea ecx, [ebp - 0xac]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x60]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
call dword [sym.imp.GDI32.dll_TextOutA]
fld dword [ebp - 0x1c]
fadd dword [ebp - 0x50]
fstp dword [ebp - 0x1c]
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
jmp 0x50a276
fild dword [ebp - 0xb0]
fdiv qword [0x5e3050]
fstp dword [ebp - 0x50]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xa15c]
and edx, 2
je 0x50a3a9
fld dword [ebp - 0x50]
fmul qword [0x5ea068]
fdiv qword [0x5ea060]
fstp dword [ebp - 0x50]
fild dword [ebp - 0x6c]
fadd dword [ebp - 0x50]
fstp dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4f4]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0x58]
sub ecx, eax
mov dword [ebp - 0x20], ecx
fild dword [ebp - 0x68]
fld dword [ebp - 0x1c]
fcompp
fnstsw ax
test ah, 5
jp 0x50a434
push 0xa
fld dword [ebp - 0x1c]
fmul qword [0x5ea068]
call fcn.005ac350
push eax
call fcn.004e08e0
add esp, 8
cdq
mov ecx, 0xa
idiv ecx
mov dword [ebp - 0x54], eax
mov edx, dword [ebp - 0x48]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x54]
push edx
mov eax, dword [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x54]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xb3f8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00505930
add esp, 0x20
fld dword [ebp - 0x1c]
fadd dword [ebp - 0x50]
fstp dword [ebp - 0x1c]
jmp 0x50a3c8
fild dword [ebp - 0xb0]
fdiv qword [0x5e8b00]
fstp dword [ebp - 0x50]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xa15c]
and eax, 2
je 0x50a463
fld dword [ebp - 0x50]
fmul qword [0x5e8d68]
fdiv qword [0x5ea060]
fstp dword [ebp - 0x50]
fild dword [ebp - 0x6c]
fadd dword [ebp - 0x50]
fstp dword [ebp - 0x1c]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x4f4]
cdq
mov ecx, 3
idiv ecx
mov edx, dword [ebp - 0x58]
sub edx, eax
mov dword [ebp - 0x20], edx
fild dword [ebp - 0x68]
fld dword [ebp - 0x1c]
fcompp
fnstsw ax
test ah, 5
jp 0x50a4f1
push 0xa
fld dword [ebp - 0x1c]
fmul qword [0x5ea068]
call fcn.005ac350
push eax
call fcn.004e08e0
add esp, 8
cdq
mov ecx, 0xa
idiv ecx
mov dword [ebp - 0x54], eax
mov edx, dword [ebp - 0x48]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x54]
push edx
mov eax, dword [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x54]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xb3f8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00505930
add esp, 0x20
fld dword [ebp - 0x1c]
fadd dword [ebp - 0x50]
fstp dword [ebp - 0x1c]
jmp 0x50a485
mov edx, dword [ebp + 8]
cmp dword [edx + 0x39b0], 0
je 0x50a521
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x39a4]
imul ecx, ecx, 0x10c
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3894]
mov ecx, dword [eax + ecx + 0x98]
mov dword [ebp - 0x70], ecx
jmp 0x50a53d
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x2b44]
imul eax, eax, 0x58
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x2b38]
mov eax, dword [edx + eax + 0x1c]
mov dword [ebp - 0x70], eax
mov ecx, dword [ebp - 0x70]
imul ecx, ecx, 0xb8
mov edx, dword [ebp + 8]
add ecx, dword [edx + 0x387c]
mov dword [ebp - 0x9c], ecx
mov dword [ebp - 0x28], 0
jmp 0x50a567
mov eax, dword [ebp - 0x28]
add eax, 1
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x9c]
mov edx, dword [ebp - 0x28]
cmp edx, dword [ecx]
jge 0x50aa75
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x9c]
mov edx, dword [ecx + eax*4 + 4]
mov dword [ebp - 0xc0], edx
push 0x5a0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x500]
push ecx
mov edx, dword [ebp - 0xc0]
push edx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0xc0]
add eax, dword [ebp - 0x6c]
mov dword [ebp - 0xc0], eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x9c]
cmp dword [edx + ecx*4 + 0x54], 2
jne 0x50a5e9
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4f4]
imul eax, eax, 3
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, dword [ebp - 0x58]
mov dword [ebp - 0x20], eax
jmp 0x50a631
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x9c]
cmp dword [edx + ecx*4 + 0x54], 3
jne 0x50a618
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4f4]
shl eax, 1
cdq
mov ecx, 3
idiv ecx
mov edx, dword [ebp - 0x58]
lea eax, [edx + eax - 1]
mov dword [ebp - 0x20], eax
jmp 0x50a631
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x4f4]
shl eax, 1
cdq
mov ecx, 3
idiv ecx
add eax, dword [ebp - 0x58]
mov dword [ebp - 0x20], eax
push 0
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0xc0]
push ecx
mov edx, dword [ebp - 0x58]
push edx
mov eax, dword [ebp - 0xc0]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00505930
add esp, 0x20
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x39a4], 0
jl 0x50a67f
mov edx, dword [ebp + 8]
cmp dword [edx + 0x39b0], 0
je 0x50a8c1
mov eax, dword [ebp + 8]
push eax
call fcn.00521a40
add esp, 4
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0
jl 0x50a8c1
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x6a8], 0
je 0x50a6cd
push 0
mov edx, dword [ebp - 0x5c]
push edx
push 0
mov eax, dword [ebp - 0xc0]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004fcd30
add esp, 0x14
mov dword [ebp - 0xcc], eax
jmp 0x50a6d9
mov edx, dword [ebp - 0xc0]
mov dword [ebp - 0xcc], edx
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0xc4], eax
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x585c]
mov dword [ecx + eax], 1
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x585c]
mov dword [eax + ecx + 8], 8
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x585c]
mov edx, dword [ebp - 0x28]
mov dword [eax + ecx + 0xc], edx
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x585c]
mov dword [edx + eax + 0xdc], 1
push 0x5a0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x500]
push ecx
push 0x3c
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov edx, dword [ebp - 0xc4]
sub edx, eax
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x585c]
mov dword [ecx + eax + 0x5c], edx
mov edx, dword [ebp - 0xbc]
add edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x585c]
mov dword [ecx + eax + 0x60], edx
push 0x5a0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x500]
push eax
push 0x3c
call dword [sym.imp.KERNEL32.dll_MulDiv]
add eax, dword [ebp - 0xc4]
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x585c]
mov dword [edx + ecx + 0x64], eax
mov eax, dword [ebp - 0xbc]
add eax, dword [ebp - 0x58]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x4f4]
lea eax, [eax + edx + 1]
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x585c]
mov dword [edx + ecx + 0x68], eax
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x585c]
mov dword [edx + eax + 0x48], 2
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x585c]
mov ecx, dword [ebp - 0xc4]
mov dword [edx + eax + 0x18], ecx
mov edx, dword [ebp - 0xbc]
add edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x585c]
mov dword [ecx + eax + 0x1c], edx
mov edx, dword [ebp - 0xb8]
imul edx, edx, 0xf0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x585c]
mov eax, dword [ebp - 0xc4]
mov dword [ecx + edx + 0x20], eax
mov ecx, dword [ebp - 0xbc]
add ecx, dword [ebp - 0x58]
mov edx, dword [ebp + 8]
add ecx, dword [edx + 0x4f4]
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x585c]
mov dword [edx + eax + 0x24], ecx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4f4]
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, dword [ebp - 0x58]
mov dword [ebp - 0x20], eax
push 0
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4f4]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov ecx, dword [ebp - 0xc0]
sub ecx, eax
push ecx
mov edx, dword [ebp - 0x58]
push edx
mov eax, dword [ebp - 0xc0]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00505930
add esp, 0x20
push 0
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4f4]
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, dword [ebp - 0xc0]
push eax
mov ecx, dword [ebp - 0x58]
push ecx
mov edx, dword [ebp - 0xc0]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xb3f8]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00505930
add esp, 0x20
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4f4]
shl eax, 1
cdq
mov ecx, 3
idiv ecx
add eax, dword [ebp - 0x58]
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x9c]
cmp dword [eax + edx*4 + 0x54], 0
jne 0x50a9d4
push 0
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4f4]
cdq
mov ecx, 3
idiv ecx
add eax, dword [ebp - 0xc0]
push eax
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0xc0]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00505930
add esp, 0x20
jmp 0x50aa70
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x9c]
cmp dword [edx + ecx*4 + 0x54], 1
jne 0x50aa2b
push 0
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4f4]
cdq
mov ecx, 3
idiv ecx
mov edx, dword [ebp - 0xc0]
sub edx, eax
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0xc0]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xb3f8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00505930
add esp, 0x20
jmp 0x50aa70
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x9c]
cmp dword [eax + edx*4 + 0x54], 3
jne 0x50aa70
push 0
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x20]
add edx, 2
push edx
mov eax, dword [ebp - 0xc0]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0xc0]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xb3f8]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00505930
add esp, 0x20
jmp 0x50a55e
mov eax, dword [ebp - 0x9c]
cmp dword [eax], 0
jne 0x50aa8c
mov dword [ebp - 0xc0], 0
jmp 0x50aaa3
mov ecx, dword [ebp - 0x9c]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x9c]
mov ecx, dword [eax + edx*4]
mov dword [ebp - 0xc0], ecx
mov eax, dword [ebp - 0xc0]
add eax, 0x3c
mov ecx, dword [ebp + 8]
cdq
idiv dword [ecx + 0x388c]
add eax, 1
mov edx, dword [ebp + 8]
imul eax, dword [edx + 0x388c]
mov dword [ebp - 0xc0], eax
mov eax, 1
test eax, eax
je 0x50ac37
push 0x5a0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x500]
push edx
mov eax, dword [ebp - 0xc0]
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov dword [ebp - 0xb4], eax
mov ecx, dword [ebp - 0xb4]
add ecx, dword [ebp - 0x6c]
mov dword [ebp - 0xb4], ecx
mov edx, dword [ebp - 0xb4]
cmp edx, dword [ebp - 0x68]
jl 0x50ab17
jmp 0x50ac37
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xa15c]
and ecx, 2
je 0x50ab7b
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x58]
add eax, dword [edx + 0x4f4]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x48]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0xb4]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4f4]
cdq
sub eax, edx
sar eax, 1
add eax, dword [ebp - 0x58]
push eax
mov eax, dword [ebp - 0xb4]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00505930
add esp, 0x20
jmp 0x50ac19
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x4f4]
cdq
sub eax, edx
sar eax, 1
add eax, dword [ebp - 0x58]
mov dword [ebp - 0x20], eax
push 0
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0xb4]
push ecx
mov edx, dword [ebp - 0x58]
push edx
mov eax, dword [ebp - 0xb4]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00505930
add esp, 0x20
push 0
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4f4]
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, dword [ebp - 0xb4]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4f4]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov ecx, dword [ebp - 0xb4]
sub ecx, eax
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xb3f8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00505930
add esp, 0x20
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0xc0]
add eax, dword [edx + 0x388c]
mov dword [ebp - 0xc0], eax
jns 0x50ac32
jmp 0x50ac37
jmp 0x50aac9
push 4
call dword [sym.imp.GDI32.dll_GetStockObject]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x39b0], 0
je 0x50ac96
push 0x5a0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x500]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x39a4]
imul ecx, ecx, 0x10c
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3894]
mov ecx, dword [eax + ecx + 0x78]
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov dword [ebp - 0x44], eax
jmp 0x50acb1
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x2b44]
imul eax, eax, 0x58
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x2b38]
mov eax, dword [eax + edx]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x44]
add ecx, dword [ebp - 0x6c]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x58]
add edx, dword [ecx + 0x4f4]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4f4]
cdq
sub eax, edx
sar eax, 1
add eax, dword [ebp - 0x44]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x4f4]
cdq
sub eax, edx
sar eax, 1
add eax, dword [ebp - 0x58]
mov dword [ebp - 0x30], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0x6a8], 0
je 0x50ad46
mov dword [ebp - 0x28], 0
jmp 0x50ad1b
mov eax, dword [ebp - 0x28]
add eax, 1
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 3
jge 0x50ad46
push 0
mov ecx, dword [ebp - 0x5c]
push ecx
push 0
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp + edx*8 - 0x44]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004fcd30
add esp, 0x14
mov edx, dword [ebp - 0x28]
mov dword [ebp + edx*8 - 0x44], eax
jmp 0x50ad12
push 3
lea eax, [ebp - 0x44]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
call dword [sym.imp.GDI32.dll_Polygon]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x39a4], 0
jl 0x50ad78
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x39b0], 0
je 0x50af3a
mov edx, dword [ebp + 8]
push edx
call fcn.00521a40
add esp, 4
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0
jl 0x50af3a
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x585c]
mov dword [eax + edx], 1
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x585c]
mov dword [edx + eax + 8], 5
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x585c]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x2b44]
mov dword [edx + eax + 0xc], ecx
mov edx, dword [ebp - 0xb8]
imul edx, edx, 0xf0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x585c]
mov dword [ecx + edx + 0xdc], 1
mov edx, dword [ebp - 0xb8]
imul edx, edx, 0xf0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x585c]
mov eax, dword [ebp - 0x44]
mov dword [ecx + edx + 0x5c], eax
mov ecx, dword [ebp - 0xbc]
add ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0xb8]
imul edx, edx, 0xf0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x585c]
mov dword [eax + edx + 0x60], ecx
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x585c]
mov edx, dword [ebp - 0x34]
mov dword [eax + ecx + 0x64], edx
mov eax, dword [ebp + 8]
cmp dword [eax + 0x6a8], 0
je 0x50aeb4
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x585c]
lea ecx, [eax + ecx + 0x64]
push ecx
mov edx, dword [ebp - 0xb8]
imul edx, edx, 0xf0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x585c]
lea edx, [ecx + edx + 0x5c]
push edx
call fcn.004e0910
add esp, 8
mov eax, dword [ebp - 0xbc]
add eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x585c]
mov dword [edx + ecx + 0x68], eax
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x585c]
mov dword [edx + eax + 0x48], 3
mov dword [ebp - 0x28], 0
jmp 0x50af05
mov eax, dword [ebp - 0x28]
add eax, 1
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 3
jge 0x50af3a
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp + ecx*8 - 0x44]
mov eax, dword [ebp + ecx*8 - 0x40]
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x585c]
add esi, ecx
mov ecx, dword [ebp - 0x28]
mov dword [esi + ecx*8 + 0x18], edx
mov dword [esi + ecx*8 + 0x1c], eax
jmp 0x50aefc
mov edx, dword [ebp + 8]
cmp dword [edx + 0x39b0], 0
je 0x50af9c
push 0x5a0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x500]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x39a4]
imul eax, eax, 0x10c
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3894]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x39a4]
imul ecx, ecx, 0x10c
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x3894]
mov edx, dword [edx + eax + 0x78]
add edx, dword [esi + ecx + 0x80]
push edx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov dword [ebp - 0x44], eax
jmp 0x50afd0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x2b44]
imul ecx, ecx, 0x58
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x2b38]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x2b44]
imul edx, edx, 0x58
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x2b38]
mov eax, dword [eax + ecx]
add eax, dword [esi + edx + 8]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x44]
add ecx, dword [ebp - 0x6c]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x58]
sub eax, dword [edx + 0x4f4]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4f4]
cdq
sub eax, edx
sar eax, 1
add eax, dword [ebp - 0x44]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x4f4]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [ebp - 0x58]
sub edx, eax
mov dword [ebp - 0x30], edx
mov eax, dword [ebp + 8]
cmp dword [eax + 0x6a8], 0
je 0x50b067
mov dword [ebp - 0x28], 0
jmp 0x50b03c
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
cmp dword [ebp - 0x28], 3
jge 0x50b067
push 0
mov edx, dword [ebp - 0x5c]
push edx
push 0
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + eax*8 - 0x44]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004fcd30
add esp, 0x14
mov ecx, dword [ebp - 0x28]
mov dword [ebp + ecx*8 - 0x44], eax
jmp 0x50b033
push 3
lea edx, [ebp - 0x44]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xb3f8]
push ecx
call dword [sym.imp.GDI32.dll_Polygon]
mov edx, dword [ebp + 8]
cmp dword [edx + 0x39a4], 0
jl 0x50b099
mov eax, dword [ebp + 8]
cmp dword [eax + 0x39b0], 0
je 0x50b25b
mov ecx, dword [ebp + 8]
push ecx
call fcn.00521a40
add esp, 4
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0
jl 0x50b25b
mov edx, dword [ebp - 0xb8]
imul edx, edx, 0xf0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x585c]
mov dword [edx + ecx], 1
mov edx, dword [ebp - 0xb8]
imul edx, edx, 0xf0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x585c]
mov dword [ecx + edx + 8], 7
mov edx, dword [ebp - 0xb8]
imul edx, edx, 0xf0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x585c]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x2b44]
mov dword [ecx + edx + 0xc], eax
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x585c]
mov dword [eax + ecx + 0xdc], 1
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x585c]
mov edx, dword [ebp - 0x44]
mov dword [eax + ecx + 0x5c], edx
mov eax, dword [ebp - 0xbc]
add eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x585c]
mov dword [edx + ecx + 0x60], eax
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x585c]
mov ecx, dword [ebp - 0x34]
mov dword [edx + eax + 0x64], ecx
mov edx, dword [ebp + 8]
cmp dword [edx + 0x6a8], 0
je 0x50b1d5
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x585c]
lea eax, [edx + eax + 0x64]
push eax
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x585c]
lea ecx, [eax + ecx + 0x5c]
push ecx
call fcn.004e0910
add esp, 8
mov edx, dword [ebp - 0xbc]
add edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x585c]
mov dword [ecx + eax + 0x68], edx
mov edx, dword [ebp - 0xb8]
imul edx, edx, 0xf0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x585c]
mov dword [ecx + edx + 0x48], 3
mov dword [ebp - 0x28], 0
jmp 0x50b226
mov edx, dword [ebp - 0x28]
add edx, 1
mov dword [ebp - 0x28], edx
cmp dword [ebp - 0x28], 3
jge 0x50b25b
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + eax*8 - 0x44]
mov edx, dword [ebp + eax*8 - 0x40]
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x585c]
add esi, eax
mov eax, dword [ebp - 0x28]
mov dword [esi + eax*8 + 0x18], ecx
mov dword [esi + eax*8 + 0x1c], edx
jmp 0x50b21d
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x39b0], 0
je 0x50b2ba
push 0xffffffffffffffff
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x5d8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004f8120
add esp, 0xc
mov esi, eax
push 0x5a0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x500]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x39a4]
imul edx, edx, 0x10c
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3894]
mov edx, dword [ecx + edx + 0x7c]
push edx
call dword [sym.imp.KERNEL32.dll_MulDiv]
sub esi, eax
mov dword [ebp - 0x44], esi
jmp 0x50b2ee
push 0xffffffffffffffff
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x5d8]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004f8120
add esp, 0xc
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x2b44]
imul edx, edx, 0x58
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x2b38]
sub eax, dword [ecx + edx + 4]
mov dword [ebp - 0x44], eax
mov edx, dword [ebp - 0x44]
add edx, dword [ebp - 0x6c]
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x58]
add eax, dword [edx + 0x4f4]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x4f4]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [ebp - 0x44]
sub edx, eax
mov dword [ebp - 0x34], edx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4f4]
cdq
sub eax, edx
sar eax, 1
add eax, dword [ebp - 0x58]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x6a8], 0
je 0x50b385
mov dword [ebp - 0x28], 0
jmp 0x50b35a
mov edx, dword [ebp - 0x28]
add edx, 1
mov dword [ebp - 0x28], edx
cmp dword [ebp - 0x28], 3
jge 0x50b385
push 0
mov eax, dword [ebp - 0x5c]
push eax
push 0
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp + ecx*8 - 0x44]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004fcd30
add esp, 0x14
mov ecx, dword [ebp - 0x28]
mov dword [ebp + ecx*8 - 0x44], eax
jmp 0x50b351
push 3
lea edx, [ebp - 0x44]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xb3f8]
push ecx
call dword [sym.imp.GDI32.dll_Polygon]
mov edx, dword [ebp + 8]
cmp dword [edx + 0x39a4], 0
jl 0x50b3b7
mov eax, dword [ebp + 8]
cmp dword [eax + 0x39b0], 0
je 0x50b579
mov ecx, dword [ebp + 8]
push ecx
call fcn.00521a40
add esp, 4
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0
jl 0x50b579
mov edx, dword [ebp - 0xb8]
imul edx, edx, 0xf0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x585c]
mov dword [edx + ecx], 1
mov edx, dword [ebp - 0xb8]
imul edx, edx, 0xf0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x585c]
mov dword [ecx + edx + 8], 6
mov edx, dword [ebp - 0xb8]
imul edx, edx, 0xf0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x585c]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x2b44]
mov dword [ecx + edx + 0xc], eax
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x585c]
mov dword [eax + ecx + 0xdc], 1
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x585c]
mov edx, dword [ebp - 0x34]
mov dword [eax + ecx + 0x5c], edx
mov eax, dword [ebp - 0xbc]
add eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x585c]
mov dword [edx + ecx + 0x60], eax
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x585c]
mov ecx, dword [ebp - 0x44]
mov dword [edx + eax + 0x64], ecx
mov edx, dword [ebp + 8]
cmp dword [edx + 0x6a8], 0
je 0x50b4f3
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x585c]
lea eax, [edx + eax + 0x64]
push eax
mov ecx, dword [ebp - 0xb8]
imul ecx, ecx, 0xf0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x585c]
lea ecx, [eax + ecx + 0x5c]
push ecx
call fcn.004e0910
add esp, 8
mov edx, dword [ebp - 0xbc]
add edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x585c]
mov dword [ecx + eax + 0x68], edx
mov edx, dword [ebp - 0xb8]
imul edx, edx, 0xf0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x585c]
mov dword [ecx + edx + 0x48], 3
mov dword [ebp - 0x28], 0
jmp 0x50b544
mov edx, dword [ebp - 0x28]
add edx, 1
mov dword [ebp - 0x28], edx
cmp dword [ebp - 0x28], 3
jge 0x50b579
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + eax*8 - 0x44]
mov edx, dword [ebp + eax*8 - 0x40]
mov eax, dword [ebp - 0xb8]
imul eax, eax, 0xf0
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x585c]
add esi, eax
mov eax, dword [ebp - 0x28]
mov dword [esi + eax*8 + 0x18], ecx
mov dword [esi + eax*8 + 0x1c], edx
jmp 0x50b53b
push 2
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
call dword [sym.imp.GDI32.dll_SetBkMode]
mov eax, dword [ebp - 0x90]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [ebp - 0x64]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
push 0xcc0020
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xb3f8]
push eax
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp - 0x14]
add ecx, 1
push ecx
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0x18]
add edx, 1
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c0]
add ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov edx, dword [edx + 0x41c]
sub edx, dword [eax + 0x42c]
sub ecx, edx
push ecx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3a0]
push edx
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [ebp - 0x98]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push 0
push 0
push 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb3f8]
push edx
call dword [sym.imp.GDI32.dll_SetViewportOrgEx]
push 0
push 0
push 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xb3f8]
push ecx
call dword [sym.imp.GDI32.dll_SetWindowOrgEx]
mov edx, dword [ebp + 8]
push edx
call fcn.004b1ba0
add esp, 4
mov eax, dword [ebp + 8]
mov dword [eax + 0x6a8], 0
pop esi
mov ecx, dword [ebp - 0xa0]
xor ecx, ebp
call fcn.005aac48
mov esp, ebp
pop ebp
ret