Function at 0x70018491
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
xor edi, edi
xor esi, esi
test byte [ebp + 0x14], 0xc0
je 0x7001860c
lea eax, [ebp - 4]
push eax
push edi
push 0xf003f
push dword [ebp + 0xc]
call fcn.700181ea
mov esi, eax
cmp esi, edi
jl 0x70018782
test byte [ebp + 0x14], 0x40
je 0x700185d0
lea eax, [ebp + 0x10]
push eax
push edi
push edi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, 0x70001af4
push esi
push dword [ebp - 4]
call edi
cmp eax, 2
jne 0x700184fa
xor eax, eax
mov dword [ebp + 0x10], 4
test eax, eax
jne 0x7001854e
cmp dword [ebp + 0x10], 4
ja 0x70018565
push 4
lea eax, [ebp + 0x10]
push eax
push 3
push esi
push dword [ebp - 4]
call fcn.70017f54
mov eax, dword [ebp + 0x10]
and eax, 0xff000000
or eax, dword [ebx + 0x628]
mov dword [ebp + 0x10], eax
je 0x7001853d
push 4
lea eax, [ebp + 0x10]
push eax
push 3
push esi
push dword [ebp - 4]
call fcn.70018134
mov esi, eax
jmp 0x70018559
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
cmp eax, 2
jne 0x7001854e
xor eax, eax
xor esi, esi
mov si, ax
or esi, 0x80070000
test esi, esi
jge 0x700185d0
xor esi, esi
inc esi
jmp 0x700185f9
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x10]
call fcn.7000dd31
test eax, eax
jl 0x7001855d
lea eax, [ebp + 0x10]
push eax
push dword [ebp - 8]
push 0
push 0
push esi
push dword [ebp - 4]
call edi
test eax, eax
jne 0x700185c0
mov eax, dword [ebp - 8]
and dword [eax], 0xff000000
mov ecx, dword [ebx + 0x628]
mov eax, dword [ebp - 8]
or dword [eax], ecx
push dword [ebp + 0x10]
push dword [ebp - 8]
push 3
push 0
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
neg esi
sbb esi, esi
and esi, 0x80004005
jmp 0x700185c5
mov esi, 0x80004005
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x70018559
test byte [ebp + 0x14], 0x80
je 0x700185f7
push 0x200
lea eax, [ebx + 0x62c]
push eax
xor esi, esi
inc esi
push esi
push 0x70001788
push dword [ebp - 4]
call fcn.70018134
test eax, eax
jl 0x700185f9
xor esi, esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
cmp esi, edi
jne 0x70018782
test byte [ebp + 0x14], 0x3f
je 0x70018782
mov esi, dword [ebp + 0x14]
push edi
push edi
push 0x104
lea eax, [ebp - 0x140]
push eax
push 0xffffffffffffffff
push dword [ebp + 0xc]
shr esi, 0x1f
push edi
push edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [ebp + 0xc]
push eax
push esi
push 0xf003f
lea eax, [ebp - 0x140]
push eax
push dword [ebp + 8]
call fcn.7001af2c
test eax, eax
jl 0x7001877d
test byte [ebp + 0x14], 1
je 0x7001867d
push 8
lea eax, [ebx + 4]
push eax
push 3
push 0x70001b04
push dword [ebp + 0xc]
call fcn.70018134
mov esi, eax
cmp esi, edi
jl 0x70018772
test byte [ebp + 0x14], 2
je 0x700186dd
lea eax, [ebx + 0xc]
push 4
pop ecx
mov edi, 0x70030b10
mov esi, eax
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x700186ad
push 0x70001f28
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
cmp eax, 2
jne 0x700186cf
xor eax, eax
jmp 0x700186cf
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.7001a058
push 0x27
lea eax, [ebp - 0x30]
push eax
push 1
push 0
push 0x70001f28
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x700186dd
mov esi, 0x80004005
jmp 0x70018772
test byte [ebp + 0x14], 4
je 0x70018701
push 0x200
lea eax, [ebx + 0x1c]
push eax
push 1
push 0x70001b94
push dword [ebp + 0xc]
call fcn.70018134
mov esi, eax
test esi, esi
jl 0x70018772
test byte [ebp + 0x14], 8
je 0x70018722
push 0x208
lea eax, [ebx + 0x21c]
push eax
push 1
push 0x70001b88
push dword [ebp + 0xc]
call fcn.70018134
test byte [ebp + 0x14], 0x10
je 0x70018749
push 0x200
lea eax, [ebx + 0x424]
push eax
xor esi, esi
inc esi
push esi
push 0x70001b78
push dword [ebp + 0xc]
call fcn.70018134
test eax, eax
jl 0x70018772
test byte [ebp + 0x14], 0x20
je 0x70018770
push 4
add ebx, 0x624
push ebx
push 3
push 0x70001794
push dword [ebp + 0xc]
call fcn.70018134
test eax, eax
jge 0x70018770
xor esi, esi
inc esi
jmp 0x70018772
xor esi, esi
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x70018782
mov esi, 0x80004005
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0x10