Function at 0x58a490
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f7012
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x6670f4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push esi
push edi
call fcn.00589d70
add esp, 8
mov dword [ebp - 0x21c], 0x64
or eax, 0xffffffff
mov dword [ebp - 0x234], eax
call fcn.004b4040
mov ecx, eax
test ecx, ecx
je 0x58abe2
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x224], eax
mov dword [ebp - 4], 0
call fcn.004b4040
mov ecx, eax
test ecx, ecx
je 0x58abec
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x238], eax
push edi
lea eax, [ebp - 0x224]
mov byte [ebp - 4], 1
push str._08x
push eax
call fcn.004c7330
push esi
lea eax, [ebp - 0x238]
push str._08x
push eax
call fcn.004c7330
mov edi, dword [ebp - 0x238]
add esp, 0x18
xor ebx, ebx
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x228], ebx
mov dword [ebp - 0x22c], ebx
nop word [eax + eax]
mov dword [ebp - 0x230], 0
mov byte [ebp - 4], 2
call fcn.004b4040
mov ecx, eax
test ecx, ecx
je 0x58abe2
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x23c], eax
mov eax, dword [0x66712c]
add eax, ebx
mov byte [ebp - 4], 3
push eax
push str.SoftwareMicrosoftCTFDirectSwitchHotkeys_
lea eax, [ebp - 0x23c]
push str._s_08x
push eax
call fcn.004c7330
mov esi, dword [ebp - 0x23c]
lea eax, [ebp - 0x214]
add esp, 0x10
mov dword [ebp - 0x214], 0
push eax
push 0x2001f
push 0
push esi
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x58a8bd
mov ebx, dword [ebp - 0x214]
push 0x80
push eax
lea eax, [ebp - 0x90]
mov dword [ebp - 0x230], ebx
push eax
call fcn.0058c8f0
push 0x80
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.0058c8f0
push 0x80
lea eax, [ebp - 0x190]
push 0
push eax
call fcn.0058c8f0
push 0x80
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.0058c8f0
add esp, 0x30
mov dword [ebp - 0x214], 0x80
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x190]
push eax
lea eax, [ebp - 0x244]
push eax
push 0
push str.Modifiers
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x58a69f
mov eax, dword [ebp - 0x244]
cmp eax, 1
je 0x58a68d
cmp eax, 2
jne 0x58a69f
cmp dword [ebp - 0x214], 0
jne 0x58a69f
xor eax, eax
mov word [ebp - 0x190], ax
lea eax, [ebp - 0x214]
mov dword [ebp - 0x214], 0x80
push eax
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x248]
push eax
push 0
push str.VirtualKey
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x58a6f2
mov eax, dword [ebp - 0x248]
cmp eax, 1
je 0x58a6e0
cmp eax, 2
jne 0x58a6f2
cmp dword [ebp - 0x214], 0
jne 0x58a6f2
xor eax, eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x190]
push eax
push dword [ebp - 0x224]
call fcn.005ad849
add esp, 8
test eax, eax
jne 0x58a723
lea eax, [ebp - 0x210]
push eax
push edi
call fcn.005ad849
add esp, 8
test eax, eax
je 0x58a888
lea eax, [ebp - 0x214]
mov dword [ebp - 0x214], 0x80
push eax
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x218]
push eax
push 0
push str.CLSID
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x58a77f
mov eax, dword [ebp - 0x218]
cmp eax, 1
je 0x58a764
cmp eax, 2
jne 0x58a77f
mov eax, dword [ebp - 0x214]
test eax, eax
je 0x58a7cb
test al, 1
jne 0x58a77f
shr eax, 1
cmp word [ebp + eax*2 - 0x92], 0
je 0x58a7d4
mov byte [ebp - 4], 2
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x58a79b
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test ebx, ebx
je 0x58a7b0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x230], 0
mov ebx, dword [ebp - 0x220]
inc ebx
mov dword [ebp - 0x220], ebx
cmp ebx, 0x64
jl 0x58a570
jmp 0x58a8df
xor eax, eax
mov word [ebp - 0x90], ax
push dword [0x667130]
lea eax, [ebp - 0x90]
push eax
call fcn.005ad849
add esp, 8
test eax, eax
jne 0x58a77f
lea eax, [ebp - 0x240]
mov dword [ebp - 0x240], 0x80
push eax
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x24c]
push eax
push 0
push str.Profile
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x58a77f
mov eax, dword [ebp - 0x24c]
cmp eax, 1
je 0x58a836
cmp eax, 2
jne 0x58a77f
mov eax, dword [ebp - 0x240]
test eax, eax
je 0x58a85a
test al, 1
jne 0x58a77f
shr eax, 1
cmp word [ebp + eax*2 - 0x112], 0
je 0x58a863
jmp 0x58a77f
xor eax, eax
mov word [ebp - 0x110], ax
push dword [0x667134]
lea eax, [ebp - 0x110]
push eax
call fcn.005ad849
add esp, 8
mov byte [ebp - 4], 2
add esi, 0xfffffff0
test eax, eax
je 0x58a88f
jmp 0x58a786
mov byte [ebp - 4], 2
add esi, 0xfffffff0
mov eax, dword [ebp - 0x220]
mov dword [ebp - 0x234], eax
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x58a8b0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test ebx, ebx
je 0x58a8df
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x58a8df
mov dword [ebp - 0x21c], ebx
add esi, 0xfffffff0
mov byte [ebp - 4], 2
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x58a8df
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x234], 0xffffffff
mov esi, dword [ebp - 0x21c]
cmovne esi, dword [ebp - 0x234]
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x250], 0
mov byte [ebp - 4], 4
call fcn.004b4040
mov ecx, eax
test ecx, ecx
je 0x58abf6
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x21c], eax
mov eax, dword [0x66712c]
add eax, esi
mov byte [ebp - 4], 5
push eax
push str.SoftwareMicrosoftCTFDirectSwitchHotkeys_
lea eax, [ebp - 0x21c]
push str._s_08x
push eax
call fcn.004c7330
mov esi, dword [ebp - 0x21c]
lea ecx, [ebp - 0x258]
add esp, 0x10
push 0
push 0
push 0x2001f
push 0
push 0
push esi
push SysReAllocString
call fcn.0057a7e0
mov ebx, dword [ebp - 0x258]
test eax, eax
je 0x58a994
mov dword [ebp - 0x21c], 0
jmp 0x58ab59
mov edx, dword [str.6AF21238_DB8B_45DB_8567_7F7023AFC493]
test edx, edx
je 0x58a9dc
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x218], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x58a9b0
sub ecx, dword [ebp - 0x218]
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push 0
push str.CLSID
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [str.CC73A514_2F8B_4603_9965_C61181A8FCE6]
test edx, edx
je 0x58aa1d
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x218], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x58a9f1
sub ecx, dword [ebp - 0x218]
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push 0
push str.Profile
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0x12
push str.00000804
push 1
push 0
push str.LangId
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [str.E7EA1398_69F8_11D7_A6EA_00065B844313]
test edx, edx
je 0x58aa7c
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x218], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x58aa50
sub ecx, dword [ebp - 0x218]
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push 0
push str.PreservedKeyId
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [ebp - 0x224]
test eax, eax
je 0x58aabd
mov edx, eax
lea ecx, [edx + 2]
mov dword [ebp - 0x218], ecx
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x58aa91
sub edx, dword [ebp - 0x218]
sar edx, 1
lea ecx, [edx*2 + 2]
push ecx
push eax
push 1
push 0
push str.Modifiers
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test edi, edi
je 0x58aaee
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x58aac6
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edi
push 1
push 0
push str.VirtualKey
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push ebx
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
push 0x2001f
push str.SoftwareMicrosoftCTFDirectSwitchHotkeys
push SysReAllocString
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 0
call fcn.0057b750
test eax, eax
mov eax, dword [ebp - 0x230]
jne 0x58ab44
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov eax, dword [ebp - 0x230]
mov dword [ebp - 0x21c], 1
test eax, eax
je 0x58ab59
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 4
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x58ab75
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test ebx, ebx
je 0x58ab80
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
or ebx, 0xffffffff
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x58ab9e
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x224]
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x58abc0
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x21c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050ed5c
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004b3510
push 0x80004005
call fcn.004b3510
push 0x80004005
call fcn.004b3510
int3