Function at 0x51aec0
Capabilities:
Log keystrokes via polling
Resolve function by parsing pe exports

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5f3e27
push eax
mov dword fs:[0], esp
sub esp, 0x154
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov eax, dword [ebp + 0x90]
test eax, eax
je 0x51b6eb
mov ecx, dword [eax + 0x1c]
test ecx, ecx
je 0x51b6eb
mov eax, dword [0x68280c]
test eax, eax
jne 0x51b06b
mov eax, dword [ebp + 0x4c]
cmp dword [eax + 0x18], 8
jle 0x51b06b
lea ecx, [esp + 0x90]
push ecx
call dword [sym.imp.USER32.dll_GetCursorPos]
test eax, eax
je 0x51b06b
mov edx, dword [esp + 0x94]
mov ecx, dword [esp + 0x90]
xor edx, ecx
test dl, 3
jne 0x51b06b
mov eax, dword [0x675c48]
test eax, eax
je 0x51b06b
cmp eax, 1
mov dword [0x68280c], 1
jne 0x51b02e
mov eax, dword [0x675c4c]
mov dword [esp + 0x60], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [esp + 0x94]
mov ecx, dword [esp + 0x90]
xor eax, edx
xor edx, edx
xor eax, ecx
mov ecx, 0x64
div ecx
test edx, edx
jge 0x51af95
xor edx, edx
jmp 0x51af9f
cmp edx, 0x64
jb 0x51af9f
mov edx, 0x63
lea esi, [edx + edx*2]
lea eax, [esp + 0x38]
lea ecx, [esp + 0x14]
push eax
mov edx, dword [esi*4 + 0x66fc60]
push ecx
mov dword [esp + 0x18], edx
lea edx, [esp + 0x38]
lea eax, [esp + 0x3c]
push edx
lea ecx, [esp + 0x54]
push eax
lea edx, [esp + 0x20]
push ecx
lea eax, [esp + 0x60]
push edx
lea ecx, [esp + 0x78]
push eax
push ecx
push 8
call fcn.00401240
add esp, 0x24
test ax, ax
jne 0x51b026
mov edx, dword [esi*4 + 0x66fc64]
shr edx, 0x10
cmp word [esp + 0x48], dx
jne 0x51b026
mov ax, word [esp + 0x34]
cmp ax, word [esi*4 + 0x66fc64]
jne 0x51b026
mov ecx, dword [esi*4 + 0x66fc68]
lea eax, [esi*4 + 0x66fc68]
shr ecx, 0x10
cmp word [esp + 0x30], cx
jne 0x51b026
mov dx, word [esp + 0x14]
cmp dx, word [eax]
je 0x51b06b
mov eax, dword [0x675b4c]
push eax
jmp 0x51b065
mov edx, dword [0x675c50]
lea ecx, [esp + 0x18]
push ecx
push 0x20
push 0x670110
push edx
call fcn.0053e5b0
test eax, eax
jne 0x51b05e
mov ecx, 4
mov edi, 0x670130
lea esi, [esp + 0x18]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x51b06b
mov ecx, dword [0x675b4c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [0x67602c]
lea ecx, [edx + 0x10b8]
call fcn.00514a60
mov edi, dword [esp + 0x178]
mov esi, eax
lea edx, [esp + 0x28]
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x90]
mov dword [esp + 0x2c], ecx
push edx
mov eax, dword [eax + 0x1c]
push eax
call dword [sym.imp.USER32.dll_ScreenToClient]
mov ecx, ebp
call fcn.0051d630
cmp esi, 0xffffffff
mov ebx, eax
je 0x51b27e
lea ecx, [esp + 0xfc]
xor edi, edi
mov dword [esp + 0xfc], vtable.CRectTracker.0
call fcn.005d7661
xor eax, eax
mov dword [esp + 0xfc], 0x5ff064
mov dword [esp + 0x144], 0xff
mov dword [esp + 0x114], eax
mov dword [esp + 0x118], eax
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push eax
mov dword [esp + 0x170], eax
mov eax, dword [ebp + 0x90]
push 1
push ecx
push edx
push eax
lea ecx, [esp + 0x110]
call fcn.004fa550
test eax, eax
jne 0x51b128
mov edi, 1
lea ecx, [esp + 0x104]
call fcn.005d4e56
mov eax, dword [esp + 0x108]
mov ecx, dword [esp + 0x110]
cmp edi, 1
je 0x51b16b
mov edx, dword [esp + 0x10c]
sub edx, dword [esp + 0x104]
cmp edx, 8
jl 0x51b25c
mov edx, ecx
sub edx, eax
cmp edx, 8
jl 0x51b25c
mov edx, esi
mov dword [esp + 0x88], ecx
and edx, 0xffff
mov ecx, ebx
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x104]
neg ecx
shr esi, 0x10
mov dword [esp + 0x7c], edx
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x10c]
push ecx
lea edx, [esp + 0x80]
mov dword [esp + 0x7c], esi
mov esi, dword [sym.imp.USER32.dll_OffsetRect]
push 0
push edx
mov dword [esp + 0x90], eax
mov dword [esp + 0x98], edi
call esi
test edi, edi
jne 0x51b1d6
lea eax, [esp + 0x7c]
push eax
call fcn.005004d0
add esp, 4
jmp 0x51b1f4
cmp dword [0x6755bc], 1
jne 0x51b1f4
lea ecx, [esp + 0x80]
lea edx, [esp + 0x7c]
push ecx
push edx
call fcn.00500430
add esp, 8
push ebx
lea eax, [esp + 0x80]
push 0
push eax
call esi
lea ecx, [esp + 0x7c]
push ecx
mov ecx, dword [ebp + 0x90]
call fcn.005c50f9
mov edx, dword [ebp]
lea eax, [esp + 0x74]
push 0
push eax
push 2
push 0x202003c
mov ecx, ebp
call dword [edx + 0xe0]
push 0x10
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jl 0x51b248
mov ecx, dword [0x67602c]
add ecx, 0x10b8
call fcn.005149f0
mov edx, dword [0x67602c]
push 0
push ebp
lea ecx, [edx + 0x594]
call fcn.00523c70
mov dword [esp + 0x16c], 0xffffffff
mov dword [esp + 0xfc], 0x5ff064
lea ecx, [esp + 0xfc]
jmp 0x51bdad
lea ecx, [esp + 0x98]
mov dword [esp + 0x98], vtable.CRectTracker.0
call fcn.005d7661
xor esi, esi
mov dword [esp + 0x98], 0x5ff064
mov dword [esp + 0xe0], 0xff
mov dword [esp + 0xb0], esi
mov dword [esp + 0xb4], esi
lea eax, [esp + 0x98]
mov ecx, ebp
push eax
mov dword [esp + 0x170], 1
call fcn.0051d7d0
cmp eax, 1
jne 0x51b4da
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0xa4]
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0xac]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x44], ecx
push edx
push eax
lea ecx, [esp + 0xa0]
call fcn.005d77f1
mov esi, eax
cmp esi, 0xffffffff
je 0x51b4d8
cmp esi, 8
je 0x51b4d8
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov eax, dword [ebp + 0x90]
push 0
push 1
push ecx
push edx
push eax
lea ecx, [esp + 0xac]
call fcn.004fa500
cmp eax, 1
jne 0x51bd90
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0xa4]
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0xac]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0xa0]
mov dword [esp + 0x20], eax
call fcn.005d4e56
mov edi, dword [sym.imp.USER32.dll_OffsetRect]
mov edx, ebx
neg edx
push edx
lea eax, [esp + 0xa4]
push 0
push eax
call edi
lea ecx, [esp + 0xa0]
push ecx
call fcn.005004d0
add esp, 4
lea edx, [esp + 0xa0]
push ebx
push 0
push edx
call edi
cmp dword [0x6755bc], 1
jne 0x51b49d
test esi, esi
je 0x51b437
cmp esi, 3
je 0x51b409
cmp esi, 7
je 0x51b409
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
cmp eax, ecx
jg 0x51b3fe
mov ecx, dword [esp + 0x38]
mov dword [esp + 0xa8], ecx
jmp 0x51b409
mov edx, dword [esp + 0x38]
mov dword [esp + 0xa0], edx
cmp esi, 1
je 0x51b46a
cmp esi, 4
je 0x51b437
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
cmp eax, ecx
jg 0x51b42c
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0xac], ecx
jmp 0x51b437
mov edx, dword [esp + 0x3c]
mov dword [esp + 0xa4], edx
cmp esi, 1
je 0x51b46a
cmp esi, 2
je 0x51b46a
cmp esi, 5
je 0x51b46a
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
cmp ecx, eax
jle 0x51b45f
mov ecx, dword [esp + 0x40]
mov dword [esp + 0xa0], ecx
jmp 0x51b46a
mov edx, dword [esp + 0x40]
mov dword [esp + 0xa8], edx
cmp esi, 3
je 0x51b49d
cmp esi, 2
je 0x51b49d
cmp esi, 6
je 0x51b49d
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
jle 0x51b492
mov ecx, dword [esp + 0x44]
mov dword [esp + 0xa4], ecx
jmp 0x51b49d
mov edx, dword [esp + 0x44]
mov dword [esp + 0xac], edx
mov ecx, dword [ebp + 0x90]
lea eax, [esp + 0xa0]
push eax
call fcn.005c50f9
mov ecx, dword [ebp + 0x84]
mov edx, dword [ebp]
lea eax, [esp + 0xa0]
push eax
mov eax, dword [ecx]
push eax
push 2
push 0x202003a
mov ecx, ebp
call dword [edx + 0xe0]
jmp 0x51bd90
xor esi, esi
lea ecx, [esp + 0xe4]
push ecx
push esi
push esi
push esi
push edi
mov ecx, ebp
call fcn.0051a9f0
cmp eax, 0xffffffff
jne 0x51b4f6
xor ebx, ebx
jmp 0x51b504
mov ecx, dword [ebp + 0x4c]
push eax
add ecx, 0x14
call fcn.004f4160
mov ebx, eax
push 0x10
mov dword [esp + 0x18], ebx
call dword [sym.imp.USER32.dll_GetKeyState]
xor edx, edx
test ax, ax
setl dl
mov eax, edx
cmp ebx, esi
mov dword [esp + 0x10], eax
je 0x51bab5
cmp eax, 1
je 0x51bab5
mov ebx, dword [esp + 0x174]
push 0
push ebx
mov ecx, ebp
call fcn.0051adb0
mov esi, eax
test esi, esi
je 0x51b5a5
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0x1304
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
cmp eax, 1
jle 0x51b5a5
mov ecx, dword [edi]
mov edx, dword [edi + 4]
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ecx
push eax
push ebx
mov dword [esp + 0x24], edx
call dword [sym.imp.USER32.dll_ScreenToClient]
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push 0
push 0x130d
push edx
mov dword [esp + 0x30], 0
call dword [sym.imp.USER32.dll_SendMessageA]
cmp eax, 0xffffffff
je 0x51b5a5
test byte [esp + 0x20], 6
jne 0x51b6c9
mov esi, dword [esp + 0x14]
mov ecx, ebp
push esi
call fcn.0051ac70
test eax, eax
jne 0x51b5bd
push esi
mov ecx, ebp
call fcn.0051a3d0
lea ecx, [esp + 0x74]
call fcn.004918b0
lea ecx, [esp + 0xe8]
mov byte [esp + 0x16c], 3
call fcn.004918b0
lea eax, [esp + 0xe8]
lea ecx, [esp + 0x74]
push eax
push ecx
mov ecx, ebp
mov byte [esp + 0x174], 4
call fcn.0051c0a0
mov eax, dword [esp + 0x84]
mov edx, dword [esp + 0x7c]
mov esi, eax
shr esi, 2
neg eax
sbb eax, eax
xor ebx, ebx
and eax, edx
mov dword [esp + 0x10], esi
test esi, esi
jle 0x51b675
mov edi, eax
mov edx, dword [edi]
mov ecx, dword [ebp + 0x4c]
push 0
push 0
push edx
add ecx, 0x14
call fcn.004f4200
test eax, eax
je 0x51b66d
lea esi, [eax + 0x18]
push esi
call fcn.00492830
add esi, eax
push esi
call fcn.00492830
mov ecx, dword [esi + eax + 0x1c]
lea eax, [esi + eax + 0x1c]
mov edx, dword [eax + ecx*4 + 4]
lea eax, [eax + ecx*4 + 4]
lea esi, [eax + edx + 4]
push esi
call fcn.00492830
mov cl, byte [eax + esi + 4]
add esp, 0xc
test cl, 0x10
jne 0x51ba67
mov esi, dword [esp + 0x10]
inc ebx
add edi, 4
cmp ebx, esi
jl 0x51b618
mov esi, dword [sym.imp.USER32.dll_GetCapture]
call esi
test eax, eax
je 0x51b68e
push 0
push 0
push 0x1f
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
call esi
test eax, eax
je 0x51b6f2
mov esi, 0x5f7940
lea ecx, [esp + 0xe8]
mov byte [esp + 0x16c], 3
mov dword [esp + 0xe8], esi
call fcn.00491ab0
lea ecx, [esp + 0x74]
mov byte [esp + 0x16c], 1
mov dword [esp + 0x74], esi
call fcn.00491ab0
lea ecx, [esp + 0x98]
mov dword [esp + 0x16c], 0xffffffff
mov dword [esp + 0x98], 0x5ff064
call fcn.005d77ea
xor eax, eax
jmp 0x51bdb7
mov eax, dword [ebp + 0x90]
mov eax, dword [eax + 0x1c]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, dword [ebp + 0x90]
push 0x22
push 0
mov ecx, dword [eax + 0x1c]
push ecx
call dword [sym.imp.USER32.dll_GetDCEx]
push eax
call fcn.005c49a8
mov esi, eax
push 1
mov ecx, esi
call fcn.005c4bd2
push 7
mov ecx, esi
call fcn.005c4c00
push 0xffffff
push 0
push 2
lea ecx, [esp + 0x44]
call fcn.005c551c
lea edx, [esp + 0x38]
mov ecx, esi
push edx
mov byte [esp + 0x170], 5
call fcn.005c4b3b
mov dword [esp + 0x60], eax
mov eax, dword [esi]
push 5
mov ecx, esi
call dword [eax + 0x24]
mov dword [esp + 0x4c], eax
mov eax, dword [ebp + 0x90]
mov ecx, dword [eax + 0x1c]
push ecx
call dword [sym.imp.USER32.dll_SetCapture]
push eax
call fcn.005bde79
call fcn.005c2eb4
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
xor ebx, ebx
xor edi, edi
mov dword [esp + 0x48], ebx
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], ecx
call dword [sym.imp.USER32.dll_GetCapture]
mov edx, dword [ebp + 0x90]
cmp eax, dword [edx + 0x1c]
jne 0x51b92a
test ebx, ebx
jne 0x51b92a
push ebx
push ebx
lea eax, [esp + 0x150]
push ebx
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x51b91d
mov eax, dword [esp + 0x14c]
cmp eax, 0x100
jne 0x51b7f6
cmp dword [esp + 0x150], 0x1b
je 0x51b92a
jmp 0x51b801
cmp eax, 0x204
je 0x51b92a
mov ecx, dword [ebp + 0x90]
mov edx, dword [esp + 0x148]
cmp edx, dword [ecx + 0x1c]
je 0x51b826
lea eax, [esp + 0x148]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x51b906
sub eax, 0x200
je 0x51b853
sub eax, 2
je 0x51b845
lea ecx, [esp + 0x148]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x51b906
mov ebx, 1
mov dword [esp + 0x48], ebx
jmp 0x51b906
cmp edi, 1
jne 0x51b872
lea edx, [esp + 0x50]
lea eax, [esp + 0x64]
push edx
lea ecx, [esp + 0xec]
push eax
push ecx
push esi
mov ecx, ebp
call fcn.0051be20
mov eax, dword [esp + 0x160]
mov edx, dword [esp + 0x15c]
mov dword [esp + 0x54], eax
mov eax, dword [ebp + 0x90]
mov dword [esp + 0x50], edx
lea ecx, [esp + 0x50]
mov edx, dword [eax + 0x1c]
push ecx
push edx
call dword [sym.imp.USER32.dll_ScreenToClient]
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x64]
sub eax, ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x68]
sub ecx, eax
lea edx, [esp + 0x34]
lea eax, [esp + 0x30]
push edx
push eax
mov dword [esp + 0x3c], ecx
call fcn.00500430
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x3c]
add edx, ecx
mov ecx, dword [esp + 0x70]
add esp, 8
mov dword [esp + 0x50], edx
add ecx, eax
lea edx, [esp + 0x50]
mov dword [esp + 0x54], ecx
lea eax, [esp + 0x64]
push edx
lea ecx, [esp + 0xec]
push eax
push ecx
push esi
mov ecx, ebp
call fcn.0051be20
mov edi, 1
call dword [sym.imp.USER32.dll_GetCapture]
mov edx, dword [ebp + 0x90]
cmp eax, dword [edx + 0x1c]
je 0x51b7b7
jmp 0x51b92a
mov eax, dword [esp + 0x150]
push eax
call fcn.005dd9ef
call dword [sym.imp.USER32.dll_ReleaseCapture]
push 0
call fcn.005c2ebd
cmp edi, 1
jne 0x51b956
lea ecx, [esp + 0x50]
lea edx, [esp + 0x64]
push ecx
lea eax, [esp + 0xec]
push edx
push eax
push esi
mov ecx, ebp
call fcn.0051be20
mov ecx, dword [esp + 0x60]
push ecx
mov ecx, esi
call fcn.005c4b3b
mov edx, dword [esp + 0x4c]
mov ecx, esi
push edx
call fcn.005c4b3b
mov eax, dword [ebp + 0x90]
mov ecx, dword [esi + 4]
push ecx
mov edx, dword [eax + 0x1c]
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [ebp + 0x8c]
mov ecx, dword [ebp + 0x78]
and al, 0xfc
neg eax
sbb eax, eax
inc eax
cmp ecx, eax
je 0x51b9a7
mov dword [ebp + 0x78], eax
mov eax, dword [ebp + 0x1c]
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [0x67602c]
push 0
push ebp
add ecx, 0x594
call fcn.00523c70
cmp dword [esp + 0x48], 1
jne 0x51ba4c
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x51ba4c
mov esi, dword [esp + 0x50]
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
sub esi, ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x30], esi
sub ecx, eax
mov eax, esi
cdq
xor eax, edx
mov dword [esp + 0x34], ecx
sub eax, edx
cmp eax, 2
jg 0x51ba23
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 2
jg 0x51ba23
mov edx, dword [esp + 0x14]
mov ecx, ebp
push edx
call fcn.0051a3d0
mov eax, dword [0x67602c]
push 0
push ebp
lea ecx, [eax + 0x594]
call fcn.00523c70
jmp 0x51ba4c
mov edx, dword [ebp]
and ecx, 0xffff
shl ecx, 0x10
and esi, 0xffff
lea eax, [esp + 0x74]
or ecx, esi
push ecx
push eax
push 2
push 0x202003d
mov ecx, ebp
call dword [edx + 0xe0]
mov dword [esp + 0x38], vtable.CGdiObject.0
lea ecx, [esp + 0x38]
mov byte [esp + 0x16c], 6
call fcn.005c5506
jmp 0x51ba7b
mov ecx, dword [0x67602c]
push 0
push ebp
add ecx, 0x594
call fcn.00523c70
mov esi, 0x5f7940
lea ecx, [esp + 0xe8]
mov byte [esp + 0x16c], 3
mov dword [esp + 0xe8], esi
call fcn.00491ab0
lea ecx, [esp + 0x74]
mov byte [esp + 0x16c], 1
mov dword [esp + 0x74], esi
call fcn.00491ab0
jmp 0x51bd90
cmp eax, esi
jne 0x51bac3
push esi
push 1
mov ecx, ebp
call fcn.0051a550
lea ecx, [esp + 0xfc]
mov dword [esp + 0xfc], vtable.CRectTracker.0
call fcn.005d7661
mov dword [esp + 0xfc], 0x5ff064
mov dword [esp + 0x144], 0xff
mov dword [esp + 0x114], esi
mov dword [esp + 0x118], esi
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x4c]
mov byte [esp + 0x16c], 2
push edx
mov edx, dword [ebp + 0x90]
push 1
push eax
push ecx
push edx
lea ecx, [esp + 0x110]
call fcn.004fa550
cmp dword [esp + 0x4c], 1
jne 0x51bb67
cmp ebx, esi
je 0x51bd39
mov eax, dword [esp + 0x10]
test eax, eax
je 0x51bb5a
push ebx
mov ecx, ebp
call fcn.0051ac70
test eax, eax
je 0x51bb5a
push ebx
mov ecx, ebp
call fcn.0051ae80
jmp 0x51bd39
push ebx
mov ecx, ebp
call fcn.0051ae50
jmp 0x51bd39
cmp eax, 1
jne 0x51bd39
xor esi, esi
lea ecx, [esp + 0x104]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
call fcn.005d4e56
xor ebx, ebx
mov edi, 1
mov ecx, dword [ebp + 0x4c]
push 0
push edi
add ecx, 0x14
call fcn.004f4110
mov esi, eax
test esi, esi
je 0x51bcf7
mov ecx, dword [ebp + 0x4c]
push edi
add ecx, 0x14
call fcn.004f4b90
cmp eax, 1
jne 0x51bbc1
inc edi
jmp 0x51bb95
add esi, 0x18
push esi
call fcn.00492830
add esi, eax
push esi
call fcn.00492830
add esi, eax
add esp, 8
mov esi, dword [esi]
test esi, esi
je 0x51bcf1
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x51bcf1
mov ecx, dword [esp + 0xe4]
test ecx, ecx
je 0x51bc07
push eax
push ecx
call dword [sym.imp.USER32.dll_IsChild]
test eax, eax
je 0x51bcf1
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x50]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ecx, dword [ebp + 0x90]
lea edx, [esp + 0x50]
push edx
call fcn.005c50bd
lea eax, [esp + 0x104]
lea ecx, [esp + 0x50]
push eax
lea edx, [esp + 0x3c]
push ecx
push edx
call dword [sym.imp.USER32.dll_IntersectRect]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x68], ecx
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x44]
lea ecx, [esp + 0x64]
mov dword [esp + 0x6c], edx
push ecx
mov dword [esp + 0x74], eax
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
jne 0x51bcf1
mov ecx, dword [ebp + 0x4c]
push edi
add ecx, 0x14
call fcn.004f4160
mov ecx, dword [ebp + 0x8c]
mov edx, 0
shr ecx, 2
dec ecx
js 0x51bcaf
mov esi, dword [ebp + 0x84]
cmp dword [esi], eax
je 0x51bcab
inc edx
add esi, 4
cmp edx, ecx
jle 0x51bc94
push eax
lea ecx, [ebp + 0x7c]
call fcn.00491be0
jmp 0x51bcc8
cmp edx, ecx
jle 0x51bcba
push eax
lea ecx, [ebp + 0x7c]
call fcn.00491be0
jmp 0x51bcc8
shl edx, 2
push 4
push edx
lea ecx, [ebp + 0x7c]
call fcn.004922f0
push 9
lea eax, [esp + 0x54]
push 9
push eax
mov ebx, 1
call dword [sym.imp.USER32.dll_InflateRect]
lea ecx, [esp + 0x50]
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.USER32.dll_UnionRect]
inc edi
jmp 0x51bb95
test ebx, ebx
jne 0x51bd2b
mov esi, dword [esp + 0x14]
test esi, esi
je 0x51bd2b
mov eax, dword [esp + 0x10]
test eax, eax
je 0x51bd21
push esi
mov ecx, ebp
call fcn.0051ac70
test eax, eax
je 0x51bd21
push esi
mov ecx, ebp
call fcn.0051ae80
jmp 0x51bd39
push esi
mov ecx, ebp
call fcn.0051ae50
jmp 0x51bd39
lea ecx, [esp + 0x18]
push 0
push ecx
mov ecx, ebp
call fcn.0051a2a0
mov eax, dword [ebp + 0x8c]
mov ecx, dword [ebp + 0x78]
and al, 0xfc
neg eax
sbb eax, eax
inc eax
cmp ecx, eax
je 0x51bd5e
mov edx, dword [ebp + 0x1c]
push 0
push 0
push edx
mov dword [ebp + 0x78], eax
call dword [sym.imp.USER32.dll_InvalidateRect]
mov eax, dword [0x67602c]
push 0
push ebp
lea ecx, [eax + 0x594]
call fcn.00523c70
lea ecx, [esp + 0xfc]
mov byte [esp + 0x16c], 1
mov dword [esp + 0xfc], 0x5ff064
call fcn.005d77ea
mov dword [esp + 0x16c], 0xffffffff
mov dword [esp + 0x98], 0x5ff064
lea ecx, [esp + 0x98]
call fcn.005d77ea
mov eax, 1
mov ecx, dword [esp + 0x164]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x160
ret 8