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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x78
mov eax, dword [0x5f3008]
xor eax, esp
mov dword [esp + 0x74], eax
mov ecx, dword [0x6167b8]
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [ecx + 0x217f8]
add eax, dword [ecx + 0x217e8]
mov dword [esp + 0x64], eax
mov eax, dword [ecx + 0x217fc]
add eax, dword [ecx + 0x217ec]
mov dword [esp + 0x68], eax
mov eax, dword [ecx + 0x217f0]
sub eax, dword [ecx + 0x21800]
mov dword [esp + 0x6c], eax
mov eax, dword [ecx + 0x217f4]
sub eax, dword [ecx + 0x21804]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov dword [esp + 0x78], eax
lea eax, [esp + 0xc]
push eax
push edx
lea eax, [esp + 0x74]
mov dword [esp + 0x24], edx
push eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x54], ecx
call fcn.0051d530
movzx edx, byte [esi + 0x814]
mov edi, eax
movzx ecx, byte [esi + 0x813]
shl edx, 8
or edx, ecx
movzx ecx, byte [esi + 0x812]
mov esi, dword [sym.imp.GDI32.dll_CreatePen]
shl edx, 8
or edx, ecx
push edx
push 1
push 0
call esi
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x24]
movzx edx, byte [eax + 0x817]
movzx ecx, byte [eax + 0x816]
shl edx, 8
or edx, ecx
movzx ecx, byte [eax + 0x815]
shl edx, 8
or edx, ecx
push edx
push 1
push 0
call esi
push 5
mov dword [esp + 0x48], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
mov esi, dword [esp + 0x18]
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
push eax
push esi
mov dword [esp + 0x54], eax
call dword [sym.imp.GDI32.dll_SelectClipRgn]
test edi, edi
je 0x51c728
mov edx, dword [esp + 0xc]
mov dword [esp + 0xc], edx
movups xmm0, xmmword [edi + 8]
mov ecx, dword [esp + 0x1c]
movaps xmmword [esp + 0x50], xmm0
psrldq xmm0, 4
mov ecx, dword [ecx + 4]
movd eax, xmm0
sub eax, ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x5c]
sub eax, ecx
inc eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov eax, dword [esp + 0x50]
sub eax, ecx
mov dword [esp + 0x30], eax
mov eax, 1
sub eax, ecx
mov ecx, dword [esp + 0x58]
add ecx, eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x28], ecx
cmp dword [esp + 0x14], eax
jge 0x51c728
mov ecx, dword [esp + 0x70]
mov eax, ecx
cmp dword [esp + 0x14], ecx
mov esi, dword [esp + 0x78]
cmovge eax, dword [esp + 0x14]
cmp dword [esp + 0x10], esi
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x20], eax
mov eax, esi
cmovle eax, dword [esp + 0x10]
mov esi, dword [esp + 0x6c]
cmp dword [esp + 0x30], esi
mov dword [esp + 8], eax
mov eax, esi
mov esi, dword [esp + 0x28]
cmovge eax, dword [esp + 0x30]
cmp esi, ecx
cmovle ecx, esi
mov esi, dword [esp + 8]
cmp esi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
jl 0x51c719
cmp ecx, eax
jl 0x51c719
cmp dword [esp + 0x20], 0
jne 0x51c6b7
cmp dword [esp + 8], 0
jne 0x51c6b7
test eax, eax
jne 0x51c6b7
test ecx, ecx
je 0x51c719
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x70]
jl 0x51c719
mov eax, dword [esp + 0x24]
cmp byte [eax + 0x2f2], 0
je 0x51c719
mov eax, dword [esp + 0x48]
cmp edi, dword [eax + 8]
jne 0x51c6e3
push dword [esp + 0x44]
mov dword [eax + 0x217d8], edx
jmp 0x51c6e7
push dword [esp + 0x40]
mov eax, dword [sym.imp.GDI32.dll_SelectObject]
push esi
call eax
push dword [esp + 0x10]
mov dword [esp + 0xc], eax
push dword [esp + 0x2c]
push dword [esp + 0x1c]
push dword [esp + 0x3c]
push esi
call dword [sym.imp.GDI32.dll_Rectangle]
push dword [esp + 8]
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esp + 0xc]
mov edi, dword [edi]
inc edx
mov dword [esp + 0xc], edx
test edi, edi
jne 0x51c5f0
push dword [esp + 0x4c]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
call esi
mov eax, dword [esp + 0x18]
push 0
push eax
call dword [sym.imp.GDI32.dll_SelectClipRgn]
push dword [esp + 0x40]
call esi
push dword [esp + 0x44]
call esi
mov ecx, dword [esp + 0x7c]
pop edi
pop esi
xor ecx, esp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 0xc