Function at 0x422e2b
Capabilities:
Delete registry key
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
xor ebx, ebx
mov esi, ecx
push edi
mov dword [ebp - 0x1c], ebx
lea ecx, [ebp - 0x10]
push ebx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], ebx
call fcn.004237ac
push eax
push ebx
mov edi, 0xf003f
push edi
push ebx
push ebx
push ebx
push 0x4028d8
push 0x80000001
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
test eax, eax
jne 0x4230b4
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], ebx
call fcn.004237ac
push ebx
push eax
push ebx
push edi
push ebx
push ebx
push ebx
push dword [esi + 8]
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
test eax, eax
jne 0x4230a5
call fcn.0040e4e9
mov byte [ebp - 1], al
test al, al
je 0x422ee0
push dword [esi + 8]
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], ebx
push dword [esi + 4]
push 0x402934
push eax
call fcn.004237de
add esp, 0x10
test eax, eax
jns 0x422ed2
mov dword [ebp - 8], ebx
cmp dword [ebp - 0x14], ebx
je 0x422ed8
push dword [ebp - 0x14]
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
jmp 0x422ed8
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
xor ecx, ecx
lea edx, [ebp - 8]
inc ecx
jmp 0x422ef4
push 0xffffffffffffffff
mov edx, 0x402234
lea ecx, [ebp - 0x1c]
call fcn.0040c996
push 2
mov edx, eax
pop ecx
mov eax, dword [edx]
mov dword [ebp - 0xc], eax
mov dword [edx], ebx
test cl, 2
je 0x422f17
and ecx, 0xfffffffd
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x1c], ebx
je 0x422f17
push dword [ebp - 0x1c]
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
mov ecx, dword [ebp - 0x14]
test cl, 1
je 0x422f2a
cmp dword [ebp - 8], ebx
je 0x422f2a
push dword [ebp - 8]
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
mov esi, dword [ebp - 0xc]
test esi, esi
je 0x4230a5
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, bx
jne 0x422f38
sub esi, ecx
mov dword [ebp - 8], ebx
sub esp, 0x48
sar esi, 1
mov ecx, esp
lea eax, [ecx + 8]
mov dword [ecx + 0x40], eax
lea ecx, [ebp - 8]
mov dword [eax], 0x4011d8
call fcn.00411a5a
test eax, eax
js 0x423087
mov ecx, dword [ebp - 8]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x422f71
sub ecx, edx
xor edx, edx
sar ecx, 1
add ecx, 4
add esi, ecx
lea ecx, [ebp - 0x1c]
push esi
call fcn.0040c996
push dword [ebp - 8]
mov edi, dword [ebp - 0x1c]
push dword [ebp - 0xc]
push dword [0x429e18]
push 0x402920
push esi
push edi
call fcn.00406803
add esp, 0x18
test eax, eax
js 0x42307c
mov ecx, dword [0x42a8cc]
mov esi, ebx
mov dword [ebp - 0x14], esi
mov edx, 0x4028c0
test ecx, ecx
je 0x422fe0
push ecx
lea edx, [ebp - 0x14]
call fcn.00411a26
mov esi, dword [ebp - 0x14]
test eax, eax
js 0x423071
mov edx, esi
mov ecx, edi
lea eax, [ecx + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x422fe8
sub ecx, dword [ebp - 0x1c]
sar ecx, 1
lea eax, [ecx*2 + 1]
push eax
push edi
push 1
push ebx
push edx
push dword [ebp - 0x18]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
test eax, eax
jne 0x423071
cmp byte [ebp - 1], bl
je 0x42306f
mov ecx, dword [ebp - 0x20]
call fcn.004235ac
test al, al
je 0x423071
mov eax, dword [0x429d8c]
lea edx, [ebp - 0xc]
push ebx
mov dword [ebp - 0x1c], eax
mov eax, dword [0x429e14]
push 1
mov dword [ebp - 0x14], eax
mov dword [0x429e14], 2
call fcn.0041096a
test al, al
jne 0x42305f
mov eax, dword [ebp - 0x20]
push ebx
push ebx
push dword [eax + 8]
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegDeleteKeyExW]
jmp 0x423071
mov eax, dword [ebp - 0x1c]
mov dword [0x429d8c], eax
mov eax, dword [ebp - 0x14]
mov dword [0x429e14], eax
mov bl, 1
test esi, esi
je 0x42307c
push esi
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
test edi, edi
je 0x423087
push edi
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
cmp dword [ebp - 8], 0
je 0x423096
push dword [ebp - 8]
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
cmp dword [ebp - 0xc], 0
je 0x4230a5
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
cmp dword [ebp - 0x18], 0
je 0x4230b4
push dword [ebp - 0x18]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
cmp dword [ebp - 0x10], 0
je 0x4230c3
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
pop edi
pop esi
mov al, bl
pop ebx
leave
ret