Function at 0x406e50
Capabilities:
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x522735
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x569f90]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
cmp dword [0x5712b0], 0
jne 0x407302
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [esp + 0x14]
push eax
push 0x20006
push 0
push str.SoftwareElantechSmartPad
push SysReAllocString
call ebp
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
or ebx, 0xffffffff
test eax, eax
jne 0x407060
push str.Button_Left
lea ecx, [esp + 0x1c]
call fcn.00409930
mov ecx, dword [0x5718bc]
mov eax, dword [esp + 0x18]
push 4
lea edx, [esp + 0x24]
push edx
push 4
push 0
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x24]
push eax
push ecx
call esi
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406f01
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [0x5718c0]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov edi, esp
push eax
call fcn.00409550
add eax, 0x10
mov dword [edi], eax
mov dword [esp + 0x38], 0
mov ecx, esp
mov dword [esp + 0x20], esp
push str.Button_Left_Ex
call fcn.00409930
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x38], ebx
call fcn.00403440
mov eax, dword [0x5718c4]
add esp, 4
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov edi, esp
push eax
call fcn.00409550
add eax, 0x10
mov dword [edi], eax
mov dword [esp + 0x38], 1
mov ecx, esp
mov dword [esp + 0x20], esp
push str.Button_Left_Path
call fcn.00409930
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x38], ebx
call fcn.00403440
add esp, 8
push str.Button_Right
lea ecx, [esp + 0x1c]
call fcn.00409930
mov ecx, dword [0x5718a4]
mov eax, dword [esp + 0x18]
push 4
lea edx, [esp + 0x24]
push edx
push 4
push 0
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x24]
push eax
push ecx
call esi
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406fd2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [0x5718a8]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov edi, esp
push eax
call fcn.00409550
add eax, 0x10
mov dword [edi], eax
mov dword [esp + 0x38], 2
mov ecx, esp
mov dword [esp + 0x20], esp
push str.Button_Right_Ex
call fcn.00409930
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x38], ebx
call fcn.00403440
mov eax, dword [0x5718ac]
add esp, 4
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov edi, esp
push eax
call fcn.00409550
add eax, 0x10
mov dword [edi], eax
mov dword [esp + 0x38], 3
mov ecx, esp
mov dword [esp + 0x2c], esp
push str.Button_Right_Path
call fcn.00409930
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x38], ebx
call fcn.00403440
mov ecx, dword [esp + 0x1c]
add esp, 8
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x14]
push edx
push 0x20006
push 0
push str.SoftwareElantechPointStick
push SysReAllocString
call ebp
test eax, eax
jne 0x40722c
push str.Button_Left
lea ecx, [esp + 0x1c]
call fcn.00409930
mov eax, dword [0x5719fc]
mov edx, dword [esp + 0x18]
push 4
lea ecx, [esp + 0x24]
push ecx
push 4
push 0
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x24]
push edx
push eax
call esi
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4070cd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [0x571a00]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov edi, esp
push eax
call fcn.00409550
add eax, 0x10
mov dword [edi], eax
mov dword [esp + 0x38], 4
mov ecx, esp
mov dword [esp + 0x20], esp
push str.Button_Left_Ex
call fcn.00409930
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x38], ebx
call fcn.00403440
mov eax, dword [0x571a04]
add esp, 4
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov edi, esp
push eax
call fcn.00409550
add eax, 0x10
mov dword [edi], eax
mov dword [esp + 0x38], 5
mov ecx, esp
mov dword [esp + 0x24], esp
push str.Button_Left_Path
call fcn.00409930
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x38], ebx
call fcn.00403440
add esp, 8
push str.Button_Right
lea ecx, [esp + 0x20]
call fcn.00409930
mov ecx, dword [0x5719e4]
mov eax, dword [esp + 0x1c]
push 4
lea edx, [esp + 0x28]
push edx
push 4
push 0
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x24]
push eax
push ecx
call esi
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40719e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [0x5719e8]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov esi, esp
push eax
call fcn.00409550
add eax, 0x10
mov dword [esi], eax
mov dword [esp + 0x38], 6
mov ecx, esp
mov dword [esp + 0x20], esp
push str.Button_Right_Ex
call fcn.00409930
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x38], ebx
call fcn.00403440
mov eax, dword [0x5719ec]
add esp, 4
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov esi, esp
push eax
call fcn.00409550
add eax, 0x10
mov dword [esi], eax
mov dword [esp + 0x38], 7
mov ecx, esp
mov dword [esp + 0x20], esp
push str.Button_Right_Path
call fcn.00409930
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x38], ebx
call fcn.00403440
mov ecx, dword [esp + 0x1c]
add esp, 8
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x571628
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x571a30
push 0x5719e0
push 0x5718a0
push 0x5712a8
push 0x571308
call dword [0x571218]
add esp, 0x14
push 0x571628
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 0x4c
mov edx, esp
mov dword [esp + 0x6c], esp
push edx
mov edi, 0x5719e0
call fcn.00407320
sub esp, 0x13c
mov dword [esp + 0x1b8], 8
mov eax, esp
mov dword [esp + 0x1a8], esp
push eax
mov edi, 0x5718a0
call fcn.00407440
sub esp, 0x5c
mov edi, esp
mov ecx, 0x17
mov esi, 0x5712a8
rep movsd dword es:[edi], dword [esi]
sub esp, 0x84
mov ecx, 0x21
mov esi, 0x571308
mov edi, esp
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x298], ebx
call dword [0x571398]
push 2
push 4
call dword [0x571214]
add esp, 0x270
push str.GlobalButtonPage_Realtime_UpdateUI
push 0
push 2
call dword [sym.imp.KERNEL32.dll_OpenEventA]
mov esi, eax
cmp esi, ebx
je 0x407302
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret