Function at 0x402820
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x854
push esi
mov esi, ecx
cmp dword [esi + 8], 1
jne 0x40284d
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push 0x240
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_DefWindowProcW]
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0xc]
xor ecx, ecx
movzx eax, ax
mov edx, 0x28
push edi
mov dword [ebp - 4], eax
xor edi, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00403237
mov ecx, dword [ebp + 0x10]
add esp, 4
mov dword [ebp - 0x18], eax
test eax, eax
je 0x402ede
push 0x28
push eax
push dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_GetTouchInputInfo]
test eax, eax
je 0x402eb9
cmp dword [ebp - 4], edi
jbe 0x402eb4
mov ecx, dword [ebp - 0x18]
mov edi, dword [sym.imp.USER32.dll_keybd_event]
mov dword [ebp - 0x14], ecx
nop word [eax + eax]
movups xmm1, xmmword [ecx]
mov eax, 0x51eb851f
movups xmm2, xmmword [ecx + 0x10]
movq xmm0, qword [ecx + 0x20]
movd ecx, xmm1
psrldq xmm1, 4
movups xmmword [ebp - 0x28], xmm2
imul ecx
movd ecx, xmm1
movups xmmword [ebp - 0x40], xmm2
movq qword [ebp - 0x30], xmm0
movd dword [esi + 0x5c], xmm2
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0xc], eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_ScreenToClient]
movups xmm0, xmmword [ebp - 0x28]
movd eax, xmm0
test al, 2
je 0x402a72
push dword [ebp - 0x38]
lea eax, [ebp - 0x854]
push str.Touch_down____d_n
push eax
call fcn.004014c0
add esp, 0xc
lea eax, [ebp - 0x854]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov ecx, dword [esi + 0x58]
mov dword [esi + 0x10], edx
sub ecx, eax
sub edx, dword [esi + 0x54]
mov dword [esi + 0x14], eax
test edx, edx
js 0x4029c8
test ecx, ecx
js 0x40298e
movd xmm0, edx
movd xmm1, ecx
cvtdq2pd xmm0, xmm0
cvtdq2pd xmm1, xmm1
divsd xmm0, xmm1
call fcn.00405c50
mulsd xmm0, qword [0x4135f0]
divsd xmm0, qword [0x4135c0]
jmp 0x402a45
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
movd xmm1, edx
andps xmm0, xmmword [0x413630]
cvtdq2pd xmm1, xmm1
divsd xmm0, xmm1
call fcn.00405c50
mulsd xmm0, qword [0x4135f0]
divsd xmm0, qword [0x4135c0]
addsd xmm0, qword [0x4135d8]
jmp 0x402a45
test ecx, ecx
jns 0x402a0d
movd xmm0, edx
movd xmm1, ecx
cvtdq2pd xmm0, xmm0
cvtdq2pd xmm1, xmm1
andps xmm0, xmmword [0x413630]
andps xmm1, xmmword [0x413630]
divsd xmm0, xmm1
call fcn.00405c50
mulsd xmm0, qword [0x4135f0]
divsd xmm0, qword [0x4135c0]
addsd xmm0, qword [0x4135f0]
jmp 0x402a45
movd xmm1, edx
movd xmm0, ecx
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
andps xmm1, xmmword [0x413630]
divsd xmm0, xmm1
call fcn.00405c50
mulsd xmm0, qword [0x4135f0]
divsd xmm0, qword [0x4135c0]
addsd xmm0, qword [0x413608]
mov eax, dword [ebp - 0x38]
movsd qword [esi + 0x18], xmm0
xorps xmm0, xmm0
movsd qword [esi + 0x20], xmm0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0
mov dword [esi + 0x60], eax
mov dword [esi + 0x50], 1
jmp 0x402e94
test al, 1
je 0x402e85
push dword [ebp - 8]
lea eax, [esi + 0x28]
push dword [ebp - 0xc]
push eax
call dword [sym.imp.USER32.dll_PtInRect]
test eax, eax
je 0x402ea1
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov ecx, dword [esi + 0x58]
mov dword [esi + 0x10], edx
sub ecx, eax
sub edx, dword [esi + 0x54]
mov dword [esi + 0x14], eax
test edx, edx
js 0x402b37
test ecx, ecx
js 0x402aeb
movd xmm0, edx
movd xmm1, ecx
cvtdq2pd xmm0, xmm0
cvtdq2pd xmm1, xmm1
divsd xmm0, xmm1
call fcn.00405c50
movsd xmm3, qword [0x413608]
movaps xmm1, xmm0
mulsd xmm1, qword [0x4135f0]
divsd xmm1, qword [0x4135c0]
jmp 0x402bc6
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
movd xmm1, edx
andps xmm0, xmmword [0x413630]
cvtdq2pd xmm1, xmm1
divsd xmm0, xmm1
call fcn.00405c50
movaps xmm1, xmm0
movsd xmm3, qword [0x413608]
mulsd xmm1, qword [0x4135f0]
movsd xmm0, qword [0x4135d8]
divsd xmm1, qword [0x4135c0]
addsd xmm1, xmm0
jmp 0x402bce
test ecx, ecx
jns 0x402b87
movd xmm0, edx
movd xmm1, ecx
cvtdq2pd xmm0, xmm0
cvtdq2pd xmm1, xmm1
andps xmm0, xmmword [0x413630]
andps xmm1, xmmword [0x413630]
divsd xmm0, xmm1
call fcn.00405c50
movaps xmm1, xmm0
movsd xmm3, qword [0x413608]
mulsd xmm1, qword [0x4135f0]
divsd xmm1, qword [0x4135c0]
addsd xmm1, qword [0x4135f0]
jmp 0x402bc6
movd xmm1, edx
movd xmm0, ecx
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
andps xmm1, xmmword [0x413630]
divsd xmm0, xmm1
call fcn.00405c50
movaps xmm1, xmm0
movsd xmm3, qword [0x413608]
mulsd xmm1, qword [0x4135f0]
divsd xmm1, qword [0x4135c0]
addsd xmm1, xmm3
movsd xmm0, qword [0x4135d8]
comisd xmm0, xmm1
movsd qword [ebp - 0x20], xmm1
jbe 0x402bf5
movsd xmm2, qword [esi + 0x18]
comisd xmm2, xmm3
jbe 0x402bf5
movaps xmm0, xmm1
addsd xmm0, qword [0x413620]
subsd xmm0, xmm2
jmp 0x402bfd
movaps xmm0, xmm1
subsd xmm0, qword [esi + 0x18]
mov eax, dword [ebp - 0x38]
addsd xmm0, qword [esi + 0x20]
push eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x854]
push str.Touch_move____d_n
push eax
movsd qword [esi + 0x20], xmm0
movsd qword [esi + 0x18], xmm1
call fcn.004014c0
add esp, 0xc
lea eax, [ebp - 0x854]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
movsd xmm0, qword [esi + 0x20]
andps xmm0, xmmword [0x413630]
movsd xmm1, qword [0x4135c8]
comisd xmm0, xmm1
jbe 0x402ca9
cmp dword [esi + 0x4c], 0
jne 0x402ca9
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_InvalidateRect]
movsd xmm0, qword [esi + 0x20]
comisd xmm0, xmmword [0x4135b8]
push 0
push 1
push 0
jbe 0x402c84
push 0x26
call edi
push 0
push 3
push 0
push 0x26
jmp 0x402c90
push 0x28
call edi
push 0
push 3
push 0
push 0x28
call edi
movsd xmm1, qword [0x4135c8]
xorps xmm0, xmm0
movsd qword [esi + 0x20], xmm0
mov dword [esi + 0x48], 1
cmp dword [esi + 0xc], 0
jne 0x402d52
cmp dword [esi + 0x48], 0
jne 0x402ea1
mov eax, dword [ebp - 0x10]
sub eax, dword [esi + 0x60]
cmp eax, 0x1f4
jbe 0x402ea1
movsd xmm0, qword [ebp - 0x20]
comisd xmm0, xmmword [0x413618]
mov dword [esi + 0x4c], 1
ja 0x402d2e
comisd xmm1, xmm0
ja 0x402d2e
comisd xmm0, xmmword [0x4135e8]
jbe 0x402ea1
movsd xmm1, qword [0x4135f8]
comisd xmm1, xmm0
jbe 0x402ea1
push 0
push 1
push 0
push 0x28
call edi
push 0
push 3
push 0
push 0x28
call edi
push str.Press_DOWN_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x402ea1
push 0
push 1
push 0
push 0x26
call edi
push 0
push 3
push 0
push 0x26
call edi
push str.Press_UP_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x402ea1
cmp dword [esi + 0x48], 0
jne 0x402ea1
mov eax, dword [ebp - 0x10]
sub eax, dword [esi + 0x60]
cmp eax, 0x1f4
ja 0x402d73
cmp dword [esi + 0x50], 1
jne 0x402ea1
movsd xmm0, qword [ebp - 0x20]
comisd xmm0, xmmword [0x413618]
mov dword [esi + 0x4c], 1
ja 0x402e5d
comisd xmm1, xmm0
ja 0x402e5d
comisd xmm0, xmmword [0x4135e8]
jbe 0x402dda
movsd xmm1, qword [0x4135f8]
comisd xmm1, xmm0
jbe 0x402dda
push 0
push 1
push 0
push 0x28
call edi
push 0
push 3
push 0
push 0x28
call edi
push str.Press_DOWN_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [esi + 0x50], 0
jmp 0x402ea1
comisd xmm0, xmmword [0x413600]
jbe 0x402e1d
movsd xmm1, qword [0x413610]
comisd xmm1, xmm0
jbe 0x402e1d
push 0
push 1
push 0
push 0x25
call edi
push 0
push 3
push 0
push 0x25
call edi
push str.Press_LEFT_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [esi + 0x50], 0
jmp 0x402ea1
comisd xmm0, xmmword [0x4135d0]
jbe 0x402e7c
movsd xmm1, qword [0x4135e0]
comisd xmm1, xmm0
jbe 0x402e7c
push 0
push 1
push 0
push 0x27
call edi
push 0
push 3
push 0
push 0x27
call edi
push str.Press_RIGHT_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [esi + 0x50], 0
jmp 0x402ea1
push 0
push 1
push 0
push 0x26
call edi
push 0
push 3
push 0
push 0x26
call edi
push str.Press_UP_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [esi + 0x50], 0
jmp 0x402ea1
test al, 4
je 0x402ea1
push str.Touch_up_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [ebp - 0x14]
add ecx, 0x28
sub dword [ebp - 4], 1
mov dword [ebp - 0x14], ecx
jne 0x4028b0
mov edi, 1
push dword [ebp - 0x18]
call fcn.00403240
add esp, 4
test edi, edi
je 0x402edb
push dword [ebp + 0x10]
call dword [sym.imp.USER32.dll_CloseTouchInputHandle]
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp + 0x10]
push ecx
push dword [ebp + 0xc]
push 0x240
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_DefWindowProcW]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc