Function at 0x10022940
Capabilities:
Delete registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
push esi
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
cmp dword [ebp + 8], 0x80000002
jne 0x10022c27
movzx ecx, word [0x100503bc]
cmp ecx, 9
jne 0x10022c27
cmp dword [0x100520cc], 0
je 0x10022c27
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x20], 0
push 0x9d0
call fcn.1001b7e0
add esp, 4
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], 0
cmp dword [ebp + 0x18], 0
je 0x10022c05
cmp dword [ebp + 0x14], 4
jne 0x100229e9
push 0x10051754
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax + 1]
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add esi, eax
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edx, [esi + eax + 0x28]
mov dword [ebp - 0x18], edx
jmp 0x10022a55
cmp dword [ebp + 0x14], 1
jne 0x10022a36
push 0x10051754
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax + 1]
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add esi, eax
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add esi, eax
mov eax, dword [ebp + 0x18]
add eax, 0x28
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add esi, eax
mov dword [ebp - 0x18], esi
jmp 0x10022a55
mov ecx, dword [ebp + 0x14]
push ecx
push str.RegistrySetValueW__:_dwDataType_u_unsupported___
push 0
call main
add esp, 0xc
mov dword [ebp - 0x14], 0xfffffffc
jmp 0x10022c05
mov edx, dword [ebp - 0x18]
lea eax, [edx + edx + 2]
push eax
call fcn.10019ae0
add esp, 4
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x10022a8e
push str.RegistrySetValueW__:_mem_alloc___failed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call main
add esp, 8
mov dword [ebp - 0x14], 0xfffffffb
jmp 0x10022c05
push 0x10051754
push str._s_system32_
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call fcn.10019e20
add esp, 0x10
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jge 0x10022ad0
mov eax, dword [ebp - 0x28]
push eax
push str.RegistrySetValueW__:_mycrt_snprintfW___returned_l_d
push 0
call main
add esp, 0xc
mov dword [ebp - 0x14], 0xfffffffa
jmp 0x10022c05
cmp dword [ebp + 0x14], 4
jne 0x10022b25
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
push edx
push 0x1004451c
push 0x40
lea eax, [ebp - 0xb0]
push eax
call fcn.10019e20
add esp, 0x10
lea ecx, [ebp - 0xb0]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push str.REG_DWORD
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x18]
sub edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x20]
lea edx, [ecx + eax*2]
push edx
call fcn.10019e20
add esp, 0x1c
jmp 0x10022b53
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push str.REG_SZ
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
sub ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x20]
lea ecx, [eax + edx*2]
push ecx
call fcn.10019e20
add esp, 0x1c
mov edx, dword [ebp - 0x20]
push edx
push str.RegistrySetValue__:_wszCmd_S
call fcn.10018570
add esp, 8
push str.Wow64DisableWow64FsRedirection
mov eax, dword [0x10052598]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x10022b92
lea ecx, [ebp - 0xb4]
push ecx
call dword [ebp - 0x2c]
add esp, 4
push 1
push 0x1388
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x20]
push eax
call fcn.10021250
add esp, 0x10
test eax, eax
jne 0x10022bc5
push str.RegistrySetValue__:_CreateProcessDirect___failed
push 0
call main
add esp, 8
mov dword [ebp - 0x14], 0xfffffff9
jmp 0x10022bd6
mov ecx, dword [ebp - 0x10]
push ecx
push str.RegistrySetValue__:_CreateProcessDirect___success_dwRet_u
call fcn.10018570
add esp, 8
push str.Wow64EnableWow64FsRedirection
mov edx, dword [0x10052598]
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x10022c05
lea eax, [ebp - 0xb8]
push eax
call dword [ebp - 0x24]
add esp, 4
push 0xfffffffffffffffe
lea ecx, [ebp - 0x20]
push ecx
call fcn.10019b10
add esp, 8
lea edx, [ebp - 0x1c]
push edx
call fcn.1001ba10
add esp, 4
mov eax, dword [ebp - 0x14]
jmp 0x10022d31
lea eax, [ebp - 4]
push eax
push 2
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x10022c63
mov eax, dword [ebp + 0xc]
push eax
push str.RegistrySetValueW__:_RegOpenKeyExW___KEY_SET_VALUE___s__failed
mov ecx, dword [ebp - 0xc]
push ecx
call main
add esp, 0xc
or eax, 0xffffffff
jmp 0x10022d31
cmp dword [ebp + 0x18], 0
je 0x10022ccf
mov edx, dword [ebp + 0x1c]
push edx
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
push 0
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x10022cb8
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push str.RegistrySetValueW__:_RegSetValueExW____S_S_failed
mov eax, dword [ebp - 0xc]
push eax
call main
add esp, 0x10
mov ecx, dword [ebp - 4]
push ecx
call dword [0x10052318]
mov eax, 0xfffffffe
jmp 0x10022d31
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
push str.RegistrySetValueW__:_Set_registry_value_success:__S_S
call fcn.10018570
add esp, 0xc
jmp 0x10022d25
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x10022d10
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push str.RegistrySetValueW__:_RegDeleteValue_____S_S__failed
mov edx, dword [ebp - 0xc]
push edx
call main
add esp, 0x10
mov eax, dword [ebp - 4]
push eax
call dword [0x10052318]
mov eax, 0xfffffffd
jmp 0x10022d31
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push str.RegistrySetValueW__:_registry_value_deleted_ok:___S_S_
call fcn.10018570
add esp, 0xc
mov eax, dword [ebp - 4]
push eax
call dword [0x10052318]
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret