Function at 0x42e510
Capabilities:
Delete registry key
Query or enumerate registry value
Resolve function by parsing pe exports
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5a25c8
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x5f13cc]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
lea eax, [esp + 0x54]
mov edi, 1
push eax
mov ecx, str.Keyboard_LayoutPreload_
mov dword [esp + 0x40], edi
call fcn.00404460
xor esi, esi
mov dword [esp + 0x80], esi
call fcn.004642e0
mov dword [esp + 0x20], eax
mov byte [eax + 0x15], 1
mov eax, dword [esp + 0x20]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x20]
mov dword [eax], eax
mov eax, dword [esp + 0x20]
mov dword [eax + 8], eax
mov dword [esp + 0x24], esi
mov byte [esp + 0x80], 1
mov edx, dword [esp + 0x54]
lea ecx, [esp + 0x44]
push ecx
push edx
push closesocket
mov dword [esp + 0x50], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
cmp eax, esi
jne 0x42e86e
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
mov dword [esp + 0x28], 0x18
mov dword [esp + 0x40], esi
mov dword [esp + 0x2c], esi
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x80], 2
mov dword [esp + 0x48], edi
jmp 0x42e5f0
mov eax, dword [esp + 0x48]
push eax
push 0x5bede8
lea edi, [esp + 0x20]
call fcn.004126f0
add esp, 8
xor eax, eax
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x5c]
push edx
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
lea eax, [esp + 0x48]
push eax
push esi
push ecx
push edx
mov dword [esp + 0x40], 0x18
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, esi
jne 0x42e846
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x5c]
call fcn.00404460
lea edi, [esp + 0x14]
mov byte [esp + 0x80], 3
call fcn.00431730
mov ecx, dword [0x5fff6c]
mov ebx, dword [ecx]
mov esi, 0x5fff68
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], esi
test esi, esi
mov edi, dword [0x5fff6c]
je 0x42e696
cmp esi, 0x5fff68
je 0x42e69b
call fcn.00578ff3
cmp ebx, edi
je 0x42e79e
test esi, esi
jne 0x42e6ac
call fcn.00578ff3
cmp ebx, dword [esi + 4]
jne 0x42e6b6
call fcn.00578ff3
cmp dword [ebx + 0x10], 0
jne 0x42e731
mov edx, dword [0x5fcd20]
mov eax, dword [edx + 0xc]
mov ecx, 0x5fcd20
call eax
add eax, 0x10
mov dword [esp + 0x30], eax
mov byte [esp + 0x80], 4
cmp ebx, dword [esi + 4]
jne 0x42e6e5
call fcn.00578ff3
mov ecx, dword [ebx + 0x54]
push ecx
push str._08X
lea edi, [esp + 0x38]
call fcn.004126f0
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x38]
push edx
push edi
call fcn.00579288
add esp, 0x10
test eax, eax
je 0x42e747
lea eax, [edi - 0x10]
mov byte [esp + 0x80], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42e731
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x34]
call fcn.00433210
mov ebx, dword [esp + 0x38]
mov esi, dword [esp + 0x34]
jmp 0x42e684
cmp ebx, dword [esi + 4]
jne 0x42e751
call fcn.00578ff3
cmp dword [ebx + 0x5c], 0
je 0x42e778
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x1c]
call fcn.00431c50
mov edi, eax
lea eax, [esp + 0x14]
call fcn.004035d0
add dword [esp + 0x2c], 1
mov edi, dword [esp + 0x30]
lea eax, [edi - 0x10]
mov byte [esp + 0x80], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42e806
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x42e806
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x1c]
call fcn.00431c50
mov ecx, dword [esp + 0x14]
mov edi, eax
mov esi, dword [edi]
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x42e801
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x42e7f6
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x42e7f6
call fcn.00403ce0
mov dword [esp + 0x30], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x42e7eb
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [esp + 0x30]
add ecx, 0x10
mov dword [edi], ecx
jmp 0x42e801
mov ebx, dword [ecx - 0xc]
push ecx
mov eax, edi
call fcn.00404050
add dword [esp + 0x2c], 1
mov byte [esp + 0x80], 2
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x42e82e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x48]
add eax, 1
xor esi, esi
cmp eax, 0x3e8
mov dword [esp + 0x48], eax
jl 0x42e5f0
mov byte [esp + 0x80], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42e86e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x44]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [0x5fff6c]
mov edi, dword [edx]
mov ebx, 0x5fff68
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], ebx
mov edi, edi
cmp ebx, esi
mov eax, dword [0x5fff6c]
mov dword [esp + 0x4c], eax
je 0x42e8a5
cmp ebx, 0x5fff68
je 0x42e8aa
call fcn.00578ff3
cmp edi, dword [esp + 0x4c]
je 0x42e9fd
cmp ebx, esi
jne 0x42e8bd
call fcn.00578ff3
cmp edi, dword [ebx + 4]
jne 0x42e8c7
call fcn.00578ff3
cmp dword [edi + 0x10], esi
jne 0x42e9e5
cmp edi, dword [ebx + 4]
jne 0x42e8da
call fcn.00578ff3
cmp dword [edi + 0x5c], esi
je 0x42e9e5
mov edx, dword [0x5fcd20]
mov eax, dword [edx + 0xc]
mov ecx, 0x5fcd20
call eax
add eax, 0x10
mov dword [esp + 0x28], eax
mov byte [esp + 0x80], 5
cmp edi, dword [ebx + 4]
jne 0x42e90c
call fcn.00578ff3
mov ecx, dword [edi + 0x54]
push ecx
push str._08X
lea edi, [esp + 0x30]
call fcn.004126f0
mov edi, dword [esp + 0x30]
add esp, 8
cmp dword [esp + 0x24], esi
mov dword [esp + 0x18], esi
jbe 0x42e95a
nop
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1c]
call fcn.00431c50
mov eax, dword [eax]
push edi
push eax
call fcn.00579288
add esp, 8
test eax, eax
je 0x42e9c1
add esi, 1
cmp esi, dword [esp + 0x24]
mov dword [esp + 0x18], esi
jb 0x42e930
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1c]
call fcn.00431c50
mov ecx, eax
mov esi, dword [ecx]
lea eax, [edi - 0x10]
sub esi, 0x10
cmp eax, esi
mov dword [esp + 0x18], ecx
je 0x42e9c1
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x42e9b6
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x42e9b6
call fcn.00403ce0
mov dword [esp + 0x40], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x42e9a7
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x18]
add ecx, 0x10
mov dword [edx], ecx
jmp 0x42e9c1
mov ebx, dword [edi - 0xc]
push edi
mov eax, ecx
call fcn.00404050
lea eax, [edi - 0x10]
mov byte [esp + 0x80], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42e9e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x34]
call fcn.00433210
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
xor esi, esi
jmp 0x42e890
push str.Keyboard_LayoutPreload_
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
lea ecx, [esp + 0x50]
push ecx
push str.Keyboard_LayoutPreload_
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
cmp eax, esi
je 0x42ea2f
mov dword [esp + 0x3c], esi
jmp 0x42eaf8
cmp dword [esp + 0x24], esi
mov ebx, 1
mov dword [esp + 0x14], esi
jbe 0x42eaed
lea ecx, [esp + 0x14]
lea edx, [esp + 0x1c]
call fcn.00431c50
mov edx, dword [eax]
cmp dword [edx - 0xc], esi
je 0x42eaed
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x28], eax
push ebx
push 0x5bede8
lea edi, [esp + 0x30]
mov byte [esp + 0x88], 6
call fcn.004126f0
add esp, 8
lea ecx, [esp + 0x14]
lea edx, [esp + 0x1c]
call fcn.00431c50
mov eax, dword [eax]
push 0x10
push eax
mov eax, dword [esp + 0x58]
push 1
push esi
mov esi, dword [esp + 0x38]
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [esi - 0x10]
add ebx, 1
mov byte [esp + 0x80], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42ead6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 1
xor esi, esi
cmp eax, dword [esp + 0x24]
mov dword [esp + 0x14], eax
jb 0x42ea42
mov ecx, dword [esp + 0x50]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 4]
push eax
lea ecx, [esp + 0x20]
call fcn.004324a0
mov eax, dword [esp + 0x20]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], esi
mov dword [eax], eax
mov eax, dword [esp + 0x20]
mov dword [eax + 8], eax
mov byte [esp + 0x80], 0
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
push eax
lea ecx, [esp + 0x20]
push ecx
mov edi, ecx
push edx
push edi
lea ecx, [esp + 0x44]
push ecx
call fcn.00432cc0
mov edx, dword [esp + 0x20]
push edx
call fcn.00578327
mov dword [esp + 0x84], 0xffffffff
mov eax, dword [esp + 0x58]
add eax, 0xfffffff0
add esp, 4
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42eb83
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.005787fd
mov esp, ebp
pop ebp
ret