Function at 0x4096c0
Capabilities:
Delete registry value
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x542318
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x593dc0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor edi, edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 4], edi
lea esi, [ebp - 0x14]
mov dword [ebp - 0x10], edi
call fcn.004095f0
mov eax, dword [eax]
push 0x2001f
push eax
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [ebp - 0x20]
call fcn.0040e8e0
test eax, eax
mov eax, dword [ebp - 0x14]
setne bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40973a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x409760
mov eax, dword [ebp - 0x20]
cmp eax, edi
je 0x40974c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0xc]
cmp esi, edi
mov edi, dword [ebp - 0x20]
je 0x4097e5
mov eax, dword [0x59be38]
lea ecx, [ebp - 0x10]
push ecx
push 0
lea edx, [ebp - 0x14]
push edx
push 0
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4097e5
cmp dword [ebp - 0x14], 3
jne 0x4097e5
mov ebx, dword [ebp - 0x10]
shr ebx, 1
jns 0x40979e
push 0x80070057
call fcn.00402460
mov eax, dword [esi]
mov edx, dword [eax - 8]
mov ecx, 1
sub ecx, dword [eax - 4]
sub edx, ebx
or ecx, edx
jge 0x4097b9
push ebx
mov ecx, esi
call fcn.004023c0
mov eax, dword [esi]
lea ecx, [ebp - 0x10]
push ecx
push eax
mov eax, dword [0x59be38]
lea edx, [ebp - 0x14]
push edx
push 0
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4097e5
cmp dword [ebp - 0x14], 3
jne 0x4097e5
push ebx
mov ecx, esi
call fcn.0040e9e0
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x409884
mov eax, dword [0x59be34]
lea ecx, [ebp - 0x10]
push ecx
push 0
lea edx, [ebp - 0x14]
push edx
push 0
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40987c
cmp dword [ebp - 0x14], 3
jne 0x40987c
mov esi, dword [ebp - 0x10]
shr esi, 1
jns 0x409824
push 0x80070057
call fcn.00402460
mov eax, dword [ebx]
mov edx, dword [eax - 8]
mov ecx, 1
sub ecx, dword [eax - 4]
sub edx, esi
or ecx, edx
jge 0x40983f
push esi
mov ecx, ebx
call fcn.004023c0
mov eax, dword [ebx]
lea ecx, [ebp - 0x10]
push ecx
push eax
mov eax, dword [0x59be34]
lea edx, [ebp - 0x14]
push edx
push 0
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x409879
cmp dword [ebp - 0x14], 3
jne 0x409879
mov ecx, dword [0x59be34]
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push esi
mov ecx, ebx
call fcn.0040e9e0
mov esi, dword [ebp + 0xc]
mov edx, dword [ebx]
cmp dword [edx - 0xc], 0
jne 0x409890
test esi, esi
je 0x409894
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
je 0x409894
mov bl, 1
jmp 0x409896
xor bl, bl
test edi, edi
je 0x4098a1
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret