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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0x4c], 0
push edi
mov dword [esp + 0x10], esi
je 0x523328
lea edi, [esi + 4]
push edi
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
jne 0x523328
push edi
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.USER32.dll_CopyRect]
push dword [ebp + 0x10]
lea eax, [esp + 0x4c]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [esi + 0x74]
test al, 1
je 0x522a01
push dword [0x61ef08]
jmp 0x522a0b
test al, 2
je 0x522a29
push dword [0x61ef0c]
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov edi, eax
push edi
lea eax, [esp + 0x4c]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_FillRect]
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [esi + 0xf8]
add dword [esp + 0x4c], eax
mov eax, dword [esp + 0x50]
sub eax, dword [esi + 0xfc]
mov ecx, dword [esp + 0x48]
add ecx, dword [esi + 0xf4]
mov edx, dword [esi + 0x100]
sub dword [esp + 0x54], edx
mov dword [esp + 0x50], eax
sub eax, ecx
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x114]
mov dword [esp + 0x48], ecx
test eax, eax
je 0x522b73
call fcn.00519d52
mov ecx, dword [eax]
mov edi, dword [eax + 4]
mov eax, ecx
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x44], edi
mov dword [esp + 0x40], eax
call fcn.005138c4
mov dword [esp + 0x20], eax
mov eax, edi
call fcn.005138c4
test byte [esi + 0x74], 3
mov dword [esp + 0x1c], eax
je 0x522b66
mov eax, dword [esp + 0x50]
sub eax, dword [esp + 0x48]
cmp eax, dword [esp + 0x20]
jl 0x522b66
mov eax, dword [esp + 0x54]
sub eax, dword [esp + 0x4c]
sub eax, dword [esp + 0x1c]
cdq
sub eax, edx
mov ebx, eax
xor eax, eax
sar ebx, 1
add ebx, dword [esp + 0x4c]
inc eax
call fcn.005138c4
mov edi, dword [esp + 0x50]
sub edi, eax
xor eax, eax
inc eax
call fcn.005138c4
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x50]
sub ecx, dword [esp + 0x20]
add edx, ebx
push edx
push edi
sub ecx, eax
push ebx
lea eax, [esi + 0x128]
push ecx
push eax
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [esi + 0x138]
xor eax, eax
test cl, 2
je 0x522b18
inc eax
jmp 0x522b20
test cl, 1
je 0x522b20
push 2
pop eax
mov ecx, dword [esp + 0x40]
cmp dword [esp + 0x20], ecx
jne 0x522b38
mov edx, dword [esp + 0x1c]
cmp edx, dword [esp + 0x44]
jne 0x522b38
xor edx, edx
jmp 0x522b3b
xor edx, edx
inc edx
mov ebx, dword [esi + 0x114]
imul eax, ecx
push 0
push dword [esp + 0x48]
lea edi, [esi + 0x128]
push ecx
push 0
push eax
push edx
push edi
push dword [ebp + 8]
call fcn.00519385
mov eax, dword [edi]
mov dword [esp + 0x50], eax
jmp 0x522b73
lea eax, [esi + 0x128]
push eax
call dword [sym.imp.USER32.dll_SetRectEmpty]
mov eax, dword [0x61ef00]
call fcn.005138c4
mov edi, eax
push 0x10
pop eax
call fcn.005138c4
cmp dword [esi + 0x24], 0xffffffff
mov ebx, eax
mov dword [esp + 0x1c], ebx
je 0x522bef
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x48]
sub eax, ecx
cmp eax, ebx
jl 0x522d7d
mov eax, dword [esp + 0x54]
sub eax, ebx
sub eax, dword [esp + 0x4c]
cdq
sub eax, edx
sar eax, 1
add eax, dword [esp + 0x4c]
lea edx, [eax + ebx]
push edx
lea edx, [ecx + ebx]
add edx, edi
push edx
push eax
add ecx, edi
push ecx
lea eax, [esi + 0x118]
push eax
call dword [sym.imp.USER32.dll_SetRect]
push dword [ebp + 8]
call fcn.0053f71a
push eax
mov eax, dword [esi + 0x24]
lea ecx, [esi + 0x118]
call fcn.0053f76c
jmp 0x522d7d
mov eax, dword [esi + 0x28]
test eax, eax
je 0x522cc8
mov ecx, dword [esi + 0x74]
and dword [esp + 0x18], 0
mov edx, ecx
shr edx, 0x10
not edx
test dl, 1
jne 0x522c16
push 3
pop edx
cmp dword [esi + 0x30], edx
ja 0x522c23
test cl, 2
je 0x522c29
xor edx, edx
inc edx
cmp dword [esi + 0x30], edx
jbe 0x522c29
mov dword [esp + 0x18], edx
jmp 0x522c3a
test cl, 1
je 0x522c3a
push 2
pop ecx
cmp dword [esi + 0x30], ecx
jbe 0x522c3a
mov dword [esp + 0x18], ecx
call fcn.00519d52
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x44], eax
mov eax, ecx
xor edx, edx
div dword [esi + 0x30]
mov ebx, eax
call fcn.005138c4
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x44]
call fcn.005138c4
mov ecx, eax
mov eax, dword [esp + 0x54]
sub eax, ecx
sub eax, dword [esp + 0x4c]
mov dword [esp + 0x34], ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x24]
sar eax, 1
add eax, dword [esp + 0x4c]
add ecx, eax
push ecx
mov ecx, dword [esp + 0x4c]
add edx, ecx
add edx, edi
push edx
push eax
add ecx, edi
push ecx
lea eax, [esi + 0x118]
push eax
call dword [sym.imp.USER32.dll_SetRect]
cmp dword [esp + 0x24], ebx
jne 0x522cb1
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x34], eax
jne 0x522cb1
xor ecx, ecx
jmp 0x522cb4
xor ecx, ecx
inc ecx
xor eax, eax
imul ebx, dword [esp + 0x18]
push eax
push eax
push eax
push eax
push ebx
mov ebx, dword [esi + 0x28]
jmp 0x522d69
mov eax, dword [0x63bc2c]
test eax, eax
je 0x522d7d
call fcn.00519d52
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x44], eax
mov eax, ecx
mov dword [esp + 0x40], ecx
call fcn.005138c4
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x44]
call fcn.005138c4
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x50]
sub eax, ecx
cmp eax, dword [esp + 0x24]
jl 0x522d7d
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x54]
sub eax, ebx
sub eax, dword [esp + 0x4c]
cdq
sub eax, edx
sar eax, 1
add eax, dword [esp + 0x4c]
lea edx, [eax + ebx]
mov ebx, dword [esp + 0x24]
push edx
lea edx, [ebx + ecx]
add edx, edi
push edx
push eax
add ecx, edi
push ecx
lea eax, [esi + 0x118]
push eax
call dword [sym.imp.USER32.dll_SetRect]
cmp ebx, dword [esp + 0x40]
jne 0x522d59
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x44]
jne 0x522d59
xor ecx, ecx
jmp 0x522d5c
xor ecx, ecx
inc ecx
mov ebx, dword [0x63bc2c]
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push ecx
lea eax, [esi + 0x118]
push eax
push dword [ebp + 8]
call fcn.00519385
mov ebx, dword [esp + 0x1c]
mov eax, dword [0x61ef04]
call fcn.005138c4
add eax, ebx
add eax, edi
add dword [esp + 0x48], eax
xor eax, eax
inc eax
call fcn.005138c4
mov edi, eax
mov eax, dword [esi + 0x140]
call fcn.005138c4
add dword [esp + 0x48], eax
sub dword [esp + 0x50], edi
dec dword [esp + 0x54]
lea eax, [esi + 0x128]
push eax
mov dword [esp + 0x44], eax
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
je 0x522dd1
push 0xa
pop eax
call fcn.005138c4
sub dword [esp + 0x50], eax
push 0xb
pop eax
call fcn.005138c4
add eax, dword [esp + 0x48]
cmp eax, dword [esp + 0x50]
jge 0x523305
mov eax, dword [esi + 0xc4]
xor ebx, ebx
mov dword [esp + 0x24], ebx
cmp eax, ebx
je 0x522e05
push eax
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x24], eax
push 1
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SetBkMode]
mov ecx, dword [esi + 0x74]
and ecx, 1
je 0x522e20
mov edi, dword [esi + 0xd4]
jmp 0x522e26
mov edi, dword [esi + 0xe4]
cmp ecx, ebx
je 0x522e32
mov edx, dword [esi + 0xd4]
jmp 0x522e38
mov edx, dword [esi + 0xec]
mov eax, dword [0x61ef10]
mov dword [esp + 0x30], edx
mov dword [esp + 0x28], edi
cmp ecx, ebx
jne 0x522e75
mov dword [esp + 0x28], eax
mov dword [esp + 0x34], eax
push edi
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [esp + 0x3c], eax
mov eax, 0xfa
call fcn.005138c4
cmp dword [esp + 0x14], eax
jge 0x522e7b
mov eax, dword [esp + 0x14]
jmp 0x522e8c
mov dword [esp + 0x34], edx
jmp 0x522e51
mov eax, dword [esi + 0x110]
imul eax, dword [esp + 0x14]
push 0x64
cdq
pop ecx
idiv ecx
mov ecx, dword [esp + 0x48]
add eax, ecx
cmp eax, dword [esp + 0x50]
jl 0x522e9c
mov eax, dword [esp + 0x50]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x64], eax
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x18], eax
lea eax, [esi + 0x144]
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
mov dword [esp + 0xc], ebx
sar ecx, 2
mov dword [esp + 0x20], ebx
mov ebx, dword [sym.imp.USER32.dll_DrawTextW]
mov dword [esp + 0x2c], eax
test ecx, ecx
jbe 0x523072
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x2c]
call fcn.004750c1
mov eax, dword [eax]
mov esi, dword [esp + 0x10]
mov edi, eax
movzx eax, ax
shr edi, 0x10
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
cmp dword [esp + 0xc], edi
jae 0x522f8f
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], edi
sub dword [esp + 0x1c], eax
lea eax, [ecx + eax*2]
mov ecx, dword [esi + 0xc8]
or ecx, 0x424
push ecx
lea ecx, [esp + 0x6c]
push ecx
push dword [esp + 0x24]
mov dword [esp + 0x18], eax
push eax
push dword [ebp + 8]
call ebx
mov eax, dword [esi + 0xc8]
or eax, dword [esi + 0xcc]
or eax, 0x40024
push eax
lea eax, [esp + 0x5c]
push eax
push dword [esp + 0x24]
push dword [esp + 0x18]
push dword [ebp + 8]
call ebx
mov eax, dword [esp + 0x70]
sub eax, dword [esp + 0x68]
add dword [esp + 0x58], eax
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.USER32.dll_SetRectEmpty]
mov dword [esp + 0xc], edi
jmp 0x522faa
mov eax, dword [esp + 0x14]
add eax, edi
cmp eax, dword [esp + 0xc]
jbe 0x522fa5
sub edi, dword [esp + 0xc]
add dword [esp + 0x14], edi
jmp 0x522faa
and dword [esp + 0x14], 0
mov eax, dword [0x63bc40]
and dword [esp + 0x1c], 0
test eax, eax
je 0x522fc6
push eax
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x1c], eax
push dword [esp + 0x28]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SetTextColor]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x18]
lea edi, [eax + ecx*2]
mov eax, dword [esi + 0xc8]
or eax, 0x424
push eax
lea eax, [esp + 0x6c]
push eax
push dword [esp + 0x1c]
push edi
push dword [ebp + 8]
call ebx
mov eax, dword [esi + 0xc8]
or eax, dword [esi + 0xcc]
or eax, 0x40024
push eax
lea eax, [esp + 0x5c]
push eax
push dword [esp + 0x1c]
push edi
push dword [ebp + 8]
call ebx
cmp dword [esp + 0x1c], 0
je 0x523032
push dword [esp + 0x1c]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SelectObject]
push dword [esp + 0x38]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SetTextColor]
mov eax, dword [esp + 0x70]
sub eax, dword [esp + 0x68]
add dword [esp + 0x58], eax
mov eax, dword [esp + 0x14]
add dword [esp + 0xc], eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
inc dword [esp + 0x20]
sar ecx, 2
cmp dword [esp + 0x20], ecx
jb 0x522ee4
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0xc8]
or eax, dword [esi + 0xcc]
mov ecx, dword [esp + 0xc]
or eax, 0x40024
push eax
lea eax, [esp + 0x5c]
push eax
mov eax, dword [esp + 0x20]
push 0xffffffffffffffff
lea eax, [eax + ecx*2]
push eax
push dword [ebp + 8]
call ebx
push 0xa
pop eax
call fcn.005138c4
add eax, dword [esp + 0x60]
cmp eax, dword [esp + 0x50]
jge 0x5232e4
push dword [esp + 0x30]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SetTextColor]
mov eax, dword [esp + 0x50]
mov edi, dword [esp + 0x54]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x38], eax
push 0xa
pop eax
call fcn.005138c4
add eax, dword [esp + 0x60]
and dword [esp + 0xc], 0
and dword [esp + 0x1c], 0
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x80], eax
mov eax, dword [esi + 0x10c]
mov dword [esp + 0x18], eax
lea eax, [esi + 0x15c]
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
mov dword [esp + 0x84], edi
sar ecx, 2
mov dword [esp + 0x30], eax
test ecx, ecx
jbe 0x5232ba
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x30]
call fcn.004750c1
mov eax, dword [eax]
mov esi, dword [esp + 0x10]
mov edi, eax
movzx eax, ax
shr edi, 0x10
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
cmp dword [esp + 0xc], edi
jae 0x5231d7
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x20], edi
sub dword [esp + 0x20], eax
lea eax, [ecx + eax*2]
mov ecx, dword [esi + 0xc8]
or ecx, 0x424
push ecx
lea ecx, [esp + 0x6c]
push ecx
push dword [esp + 0x28]
mov dword [esp + 0x18], eax
push eax
push dword [ebp + 8]
call ebx
mov eax, dword [esi + 0xc8]
or eax, dword [esi + 0xcc]
or eax, 0x40024
push eax
lea eax, [esp + 0x7c]
push eax
push dword [esp + 0x28]
push dword [esp + 0x18]
push dword [ebp + 8]
call ebx
mov eax, dword [esp + 0x70]
sub eax, dword [esp + 0x68]
add dword [esp + 0x78], eax
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.USER32.dll_SetRectEmpty]
mov dword [esp + 0xc], edi
jmp 0x5231f2
mov eax, dword [esp + 0x14]
add eax, edi
cmp eax, dword [esp + 0xc]
jbe 0x5231ed
sub edi, dword [esp + 0xc]
add dword [esp + 0x14], edi
jmp 0x5231f2
and dword [esp + 0x14], 0
mov eax, dword [0x63bc40]
and dword [esp + 0x20], 0
test eax, eax
je 0x52320e
push eax
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x20], eax
push dword [esp + 0x34]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SetTextColor]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x18]
lea edi, [eax + ecx*2]
mov eax, dword [esi + 0xc8]
or eax, 0x424
push eax
lea eax, [esp + 0x6c]
push eax
push dword [esp + 0x1c]
push edi
push dword [ebp + 8]
call ebx
mov eax, dword [esi + 0xc8]
or eax, dword [esi + 0xcc]
or eax, 0x40024
push eax
lea eax, [esp + 0x7c]
push eax
push dword [esp + 0x1c]
push edi
push dword [ebp + 8]
call ebx
cmp dword [esp + 0x20], 0
je 0x52327a
push dword [esp + 0x20]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SelectObject]
push dword [esp + 0x38]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SetTextColor]
mov eax, dword [esp + 0x70]
sub eax, dword [esp + 0x68]
add dword [esp + 0x78], eax
mov eax, dword [esp + 0x14]
add dword [esp + 0xc], eax
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
inc dword [esp + 0x1c]
sar ecx, 2
cmp dword [esp + 0x1c], ecx
jb 0x52312c
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0xc8]
or eax, dword [esi + 0xcc]
mov ecx, dword [esp + 0xc]
or eax, 0x40024
push eax
lea eax, [esp + 0x7c]
push eax
mov eax, dword [esp + 0x20]
push 0xffffffffffffffff
lea eax, [eax + ecx*2]
push eax
push dword [ebp + 8]
call ebx
push dword [esp + 0x3c]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SetTextColor]
cmp dword [esp + 0x24], 0
je 0x523305
push dword [esp + 0x24]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SelectObject]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
neg edi
push edi
neg ebx
push ebx
add esi, 0x118
push esi
mov esi, dword [sym.imp.USER32.dll_OffsetRect]
call esi
push edi
push ebx
push dword [esp + 0x48]
call esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc