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

Disassembly:
push 0xffffffffffffffff
push 0x5a3810
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6336a0]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, edx
mov esi, dword [esp + 0x48]
lea eax, [esp + 0x1c]
push eax
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x497598
mov edx, dword [ebx]
mov eax, edx
lea esi, [eax + 2]
jmp 0x4973c0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4973c0
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sub eax, esi
sar eax, 1
lea ecx, [eax + eax + 2]
push ecx
push edx
mov edx, dword [esp + 0x24]
push 1
push 0
push 0x5d2b58
push edx
call edi
call fcn.00555692
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x497405
push 0x80004005
call fcn.00401f90
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 0x4c]
push ecx
lea edx, [esp + 0x30]
push 0x5f350c
push edx
mov dword [esp + 0x4c], 0
call fcn.00404650
mov eax, dword [esp + 0x28]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
add esp, 0xc
push str.open
push eax
call ebp
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x18]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push str.open
push eax
call esi
mov ecx, dword [esp + 0x14]
push str.command
push ecx
call ebp
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x1c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.command
push ecx
call esi
mov esi, dword [esp + 0x2c]
mov eax, dword [esi - 0xc]
lea edx, [eax + eax + 2]
mov eax, dword [esp + 0x18]
push edx
push esi
push 1
push 0
push 0x5d2b58
push eax
call edi
mov ecx, dword [esp + 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call edi
mov edx, dword [esp + 0x14]
push edx
call edi
mov eax, dword [ebx]
cmp dword [eax - 0xc], 0
je 0x497564
push eax
mov eax, dword [esp + 0x20]
push eax
call ebp
mov ebx, dword [ebx]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x18]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push eax
call ebx
mov ecx, dword [esp + 0x14]
push str.command
push ecx
call ebp
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x1c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.command
push ecx
call ebx
mov eax, dword [esi - 0xc]
lea edx, [eax + eax + 2]
mov eax, dword [esp + 0x18]
push edx
push esi
push 1
push 0
push 0x5d2b58
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [esp + 0x18]
push ecx
call edi
mov edx, dword [esp + 0x14]
push edx
call edi
mov eax, dword [esp + 0x1c]
push eax
call edi
add esi, 0xfffffff0
mov dword [esp + 0x40], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x497ae7
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
jmp 0x497ae7
push edi
lea ecx, [esp + 0x28]
call fcn.004023b0
mov dword [esp + 0x40], 1
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx - 0xc]
test eax, eax
jl 0x4978c6
push 0x5d616c
push ecx
call fcn.0057781d
add esp, 8
test eax, eax
je 0x4978c6
mov ecx, dword [esp + 0x24]
sub eax, ecx
sar eax, 1
js 0x4978c6
mov eax, dword [ecx - 0xc]
test eax, eax
jge 0x4975e9
or eax, 0xffffffff
jmp 0x497606
push 0x5d616c
push ecx
call fcn.0057781d
add esp, 8
test eax, eax
jne 0x497600
or eax, 0xffffffff
jmp 0x497606
sub eax, dword [esp + 0x24]
sar eax, 1
push eax
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x2c]
call fcn.00414630
mov byte [esp + 0x40], 2
mov eax, dword [esp + 0x24]
mov edi, dword [eax - 0xc]
test edi, edi
jge 0x49762a
or eax, 0xffffffff
jmp 0x497647
push 0x5d616c
push eax
call fcn.0057781d
add esp, 8
test eax, eax
jne 0x497641
or eax, 0xffffffff
jmp 0x497647
sub eax, dword [esp + 0x24]
sar eax, 1
sub edi, eax
sub edi, 1
push edi
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00401a60
mov byte [esp + 0x40], 3
mov ebp, dword [esp + 0x34]
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push ebp
push esi
call edi
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x20]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push esi
call ebp
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x1c]
push esi
push ecx
call edi
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x18]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push esi
push ecx
call ebp
mov ecx, dword [ebx]
mov eax, ecx
lea edx, [eax + 2]
mov si, word [eax]
add eax, 2
test si, si
jne 0x4976c1
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
mov eax, dword [esp + 0x14]
push edx
push ecx
push 1
push 0
push 0x5d2b58
push eax
call esi
call fcn.00555692
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x497706
push 0x80004005
call fcn.00401f90
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 0x4c]
push ecx
lea edx, [esp + 0x30]
push 0x5f350c
push edx
mov byte [esp + 0x4c], 4
call fcn.00404650
mov eax, dword [esp + 0x20]
add esp, 0xc
push str.open
push eax
call edi
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x1c]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push str.open
push eax
call ebp
mov ecx, dword [esp + 0x18]
push str.command
push ecx
call edi
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x2c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.command
push ecx
call ebp
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx - 0xc]
lea edx, [eax + eax + 2]
mov eax, dword [esp + 0x28]
push edx
push ecx
push 1
push 0
push 0x5d2b58
push eax
call esi
mov ecx, dword [esp + 0x28]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
mov edx, dword [esp + 0x18]
push edx
call esi
mov eax, dword [esp + 0x14]
push eax
call esi
mov eax, dword [ebx]
cmp dword [eax - 0xc], 0
je 0x497864
mov ecx, dword [esp + 0x14]
push eax
push ecx
call edi
mov ebx, dword [ebx]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x1c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push ebx
push ecx
call ebp
mov edx, dword [esp + 0x18]
push str.command
push edx
call edi
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push str.command
push edx
call ebp
mov edi, dword [esp + 0x2c]
mov eax, dword [edi - 0xc]
mov ecx, dword [esp + 0x28]
lea eax, [eax + eax + 2]
push eax
push edi
push 1
push 0
push 0x5d2b58
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [esp + 0x28]
push edx
call esi
mov eax, dword [esp + 0x18]
push eax
call esi
mov ecx, dword [esp + 0x14]
push ecx
call esi
jmp 0x497868
mov edi, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
push edx
call esi
lea eax, [edi - 0x10]
mov byte [esp + 0x40], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x497890
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x40], 2
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4978b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x40], 1
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
jmp 0x497aa6
mov ebp, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push edi
push esi
call ebp
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x20]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push esi
call edi
mov ecx, dword [ebx]
mov eax, ecx
lea esi, [eax + 2]
jmp 0x497900
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x497900
sub eax, esi
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push ecx
mov ecx, dword [esp + 0x24]
push 1
push 0
push 0x5d2b58
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
call fcn.00555692
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x497943
push 0x80004005
call fcn.00401f90
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x4c]
push ecx
lea edx, [esp + 0x38]
push 0x5f350c
push edx
mov byte [esp + 0x4c], 5
call fcn.00404650
mov eax, dword [esp + 0x28]
add esp, 0xc
push str.open
push eax
call ebp
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x18]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push str.open
push eax
call edi
mov ecx, dword [esp + 0x14]
push str.command
push ecx
call ebp
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x1c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.command
push ecx
call edi
mov esi, dword [esp + 0x34]
mov eax, dword [esi - 0xc]
lea edx, [eax + eax + 2]
mov eax, dword [esp + 0x18]
push edx
push esi
push 1
push 0
push 0x5d2b58
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [esp + 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call edi
mov edx, dword [esp + 0x14]
push edx
call edi
mov eax, dword [ebx]
cmp dword [eax - 0xc], 0
je 0x497a97
push eax
mov eax, dword [esp + 0x20]
push eax
call ebp
mov ebx, dword [ebx]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x18]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push eax
call ebx
mov ecx, dword [esp + 0x14]
push str.command
push ecx
call ebp
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x1c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.command
push ecx
call ebx
mov eax, dword [esi - 0xc]
lea edx, [eax + eax + 2]
mov eax, dword [esp + 0x18]
push edx
push esi
push 1
push 0
push 0x5d2b58
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [esp + 0x18]
push ecx
call edi
mov edx, dword [esp + 0x14]
push edx
call edi
mov eax, dword [esp + 0x1c]
push eax
call edi
mov byte [esp + 0x40], 1
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x497abf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x40], 0xffffffff
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x497ae7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret