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

Disassembly:
sub esp, 0x2c8
push ebx
mov ebx, dword [esp + 0x2d0]
mov ecx, dword [ebx]
push ebp
push esi
push edi
lea eax, [esp + 0x90]
push eax
push ecx
call dword [sym.imp.USER32.dll_BeginPaint]
mov edi, eax
push 1
push edi
call dword [sym.imp.GDI32.dll_SetBkMode]
mov eax, dword [ebx]
lea edx, [esp + 0x38]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov edx, dword [ebx]
lea ecx, [esp + 0x38]
push ecx
xor ebp, ebp
push ebp
push 0x1328
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
add dword [esp + 0x44], 3
mov eax, 2
sub dword [esp + 0x3c], eax
add dword [esp + 0x40], eax
cmp byte [ebx + 0x10], 0
mov dword [esp + 0x38], ebp
je 0x501d2d
test byte [0x7b7d54], 1
jne 0x501d07
or dword [0x7b7d54], 1
mov dword [0x7b7d50], 0x4b4b4b
mov eax, dword [0x7b7d50]
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov esi, eax
push esi
lea ecx, [esp + 0x3c]
push ecx
push edi
call dword [sym.imp.USER32.dll_FillRect]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov byte [ebx + 0x10], 0
lea eax, [esp + 0x34]
lea esi, [esp + 0x38]
mov dword [esp + 0x34], ebp
call fcn.004f6f80
cmp dword [ebx + 4], ebp
mov byte [esp + 0x13], 0
mov dword [esp + 0x24], ebp
jle 0x5020ed
mov ebp, dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esp + 0x24]
mov ecx, dword [ebx]
lea edx, [esp + 0x14]
push edx
push eax
xor esi, esi
push 0x130a
push ecx
mov dword [esp + 0x30], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [esp + 0x24]
cmp ecx, esi
jne 0x501e9b
mov eax, dword [ebx]
lea edx, [esp + 0x48]
push edx
push eax
mov dword [esp + 0x5c], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x50], esi
call dword [sym.imp.USER32.dll_GetClientRect]
mov edx, dword [ebx + 4]
mov eax, dword [ebx]
lea ecx, [esp + 0x64]
push ecx
sub edx, 1
push edx
push 0x130a
push eax
mov dword [esp + 0x80], esi
mov dword [esp + 0x7c], esi
mov dword [esp + 0x78], esi
mov dword [esp + 0x74], esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [esp + 0x48]
sub ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x6c]
lea eax, [ecx + edx + 4]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x20]
add edx, ecx
test byte [0x7b7d54], 1
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], edx
jne 0x501e13
or dword [0x7b7d54], 1
mov dword [0x7b7d50], 0x4b4b4b
mov eax, dword [0x7b7d50]
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov esi, eax
push esi
lea ecx, [esp + 0x4c]
push ecx
push edi
call dword [sym.imp.USER32.dll_FillRect]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp dword [ebx + 8], 0
je 0x501e95
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x14]
push 0
push 1
push 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x64], eax
call dword [sym.imp.GDI32.dll_CreatePen]
mov esi, eax
push esi
push edi
call ebp
push 0
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
push eax
push 1
push edi
call dword [sym.imp.GDI32.dll_MoveToEx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
push ecx
push edx
push edi
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0x28]
push eax
push edi
call ebp
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0x24]
xor esi, esi
cmp ecx, dword [ebx + 8]
jne 0x501ec1
test byte [0x7b7d54], 1
jne 0x501eba
or dword [0x7b7d54], 1
mov dword [0x7b7d50], 0x4b4b4b
mov eax, dword [0x7b7d50]
jmp 0x501f06
cmp ecx, dword [ebx + 0xc]
jne 0x501ee7
test byte [0x7b7cfc], 1
jne 0x501ee0
or dword [0x7b7cfc], 1
mov dword [0x7b7cf8], 0x965a3c
mov eax, dword [0x7b7cf8]
jmp 0x501f06
test byte [0x7b7d04], 1
jne 0x501f01
or dword [0x7b7d04], 1
mov dword [0x7b7d00], 0x646464
mov eax, dword [0x7b7d00]
add dword [esp + 0x20], 1
cmp ecx, esi
je 0x501f14
sub dword [esp + 0x14], 1
cmp ecx, dword [ebx + 8]
jne 0x50200b
mov ecx, 2
sub dword [esp + 0x18], ecx
sub dword [esp + 0x14], ecx
add dword [esp + 0x1c], ecx
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov esi, eax
push esi
lea ecx, [esp + 0x18]
push ecx
push edi
call dword [sym.imp.USER32.dll_FillRect]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
push 0
push 1
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov esi, eax
push esi
push edi
call ebp
mov edx, dword [esp + 0x20]
push 0
add edx, 0xffffffff
mov ebx, eax
mov eax, dword [esp + 0x18]
push edx
push eax
push edi
call dword [sym.imp.GDI32.dll_MoveToEx]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push ecx
push edx
push edi
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
push eax
add ecx, 0xffffffff
push ecx
push edi
call dword [sym.imp.GDI32.dll_LineTo]
push ebx
push edi
call ebp
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push 0
push 1
push 0
mov dword [esp + 0x3c], edx
add esi, 0xffffffff
mov dword [esp + 0x34], eax
call dword [sym.imp.GDI32.dll_CreatePen]
mov ebx, eax
push ebx
push edi
call ebp
mov ecx, dword [esp + 0x28]
push 0
push ecx
push esi
push edi
mov dword [esp + 0x3c], eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov edx, dword [esp + 0x30]
push edx
push esi
push edi
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0x2c]
push eax
push edi
call ebp
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ebx, dword [esp + 0x2dc]
mov byte [esp + 0x13], 1
jmp 0x502049
cmp byte [esp + 0x13], 0
je 0x50201f
mov ecx, 2
add dword [esp + 0x14], ecx
add dword [esp + 0x1c], ecx
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov esi, eax
push esi
lea ecx, [esp + 0x18]
push ecx
push edi
call dword [sym.imp.USER32.dll_FillRect]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
lea eax, [esp + 0x34]
lea esi, [esp + 0x14]
call fcn.004f6f80
mov ecx, dword [esp + 0x24]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [esp + 0x74]
push eax
lea edx, [esp + 0xd4]
push ecx
mov dword [esp + 0x88], edx
mov edx, dword [ebx]
push 0x133c
push edx
mov dword [esp + 0x84], 1
mov dword [esp + 0x94], 0x104
call esi
cmp word [esp + 0xd0], 0
je 0x5020d9
mov eax, dword [ebx]
push 0
push 0
push 0x31
push eax
call esi
push eax
push edi
call ebp
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x2c]
mov esi, eax
push edx
lea edx, [esp + 0xd8]
lea eax, [esp + 0x1c]
mov dword [esp + 0x68], 0
mov dword [esp + 0x64], 0x50000201
mov dword [esp + 0x30], 0xffffff
call fcn.004f71a0
push esi
push edi
call ebp
mov eax, dword [esp + 0x24]
add eax, 1
cmp eax, dword [ebx + 4]
mov dword [esp + 0x24], eax
jl 0x501d56
mov ecx, dword [ebx]
lea eax, [esp + 0x90]
push eax
push ecx
call dword [sym.imp.USER32.dll_EndPaint]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c8
ret 4