Function at 0x405a39
Capabilities:
Delete file
Delete registry key
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x254
mov eax, dword [0x40f014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, edx
mov dword [ebp - 0x238], ecx
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x23c], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x22c], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x234], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x230], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 0x240], eax
mov eax, dword [ebp + 0x30]
mov dword [ebp - 0x244], eax
mov eax, dword [ebp + 0x34]
mov dword [ebp - 0x248], eax
mov eax, dword [ebp + 0x3c]
mov dword [ebp - 0x250], eax
mov eax, dword [ebp + 0x40]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x24c], eax
mov eax, dword [ebp + 0x48]
mov dword [ebp - 0x254], eax
xor eax, eax
mov edi, dword [ebp + 8]
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x210], eax
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x218], eax
call fcn.00403cc2
test eax, eax
jne 0x405af8
mov esi, 0x8007000e
jmp 0x4060b2
mov eax, dword [ebp - 0x238]
cmp dword [eax + 0x1c], 7
jge 0x405b0e
mov esi, 0x8007139f
jmp 0x4060b2
test esi, esi
je 0x4060ad
test edi, edi
je 0x4060ad
mov eax, dword [eax + 0x24]
mov cx, word [esi]
cmp cx, word [eax]
jne 0x405b47
test cx, cx
je 0x405b43
mov cx, word [esi + 2]
cmp cx, word [eax + 2]
jne 0x405b47
add esi, 4
add eax, 4
test cx, cx
jne 0x405b21
xor eax, eax
jmp 0x405b4c
sbb eax, eax
or eax, 1
test eax, eax
je 0x405b5a
mov esi, 0x80070005
jmp 0x4060b2
lea ecx, [ebp - 0x21c]
call fcn.0040a7f6
mov esi, eax
test esi, esi
jne 0x4060b2
lea eax, [ebp - 0x224]
push eax
push 0x2001f
xor eax, eax
push eax
push 0x4026b0
push dword [ebp - 0x21c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x405bb3
lea eax, [ebp - 0x224]
push eax
push 0x4026b0
push dword [ebp - 0x21c]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x4060a0
lea eax, [ebp - 0x210]
push eax
push 0x2001f
xor eax, eax
push eax
push edi
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x405bef
lea eax, [ebp - 0x210]
push eax
push edi
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x4060a0
xor edi, edi
test ebx, ebx
je 0x405c2a
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x405bfa
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push ebx
push 1
push edi
push edi
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4060a0
push 4
pop ebx
push ebx
lea eax, [ebp + 0x10]
push eax
push ebx
push edi
push 0x4027c4
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4060a0
push 0xc
push 0x402848
push 1
push edi
push 0x402808
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4060a0
mov eax, dword [ebp - 0x23c]
test eax, eax
je 0x405c97
push ebx
push eax
push ebx
push edi
push 0x402794
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4060a0
lea eax, [ebp - 0x214]
mov ebx, 0x4028c4
push eax
push 0x2001f
push edi
push ebx
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x405cd6
lea eax, [ebp - 0x214]
push eax
push ebx
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x4060a0
mov ebx, dword [ebp - 0x22c]
test ebx, ebx
je 0x405d19
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x405ce5
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push ebx
push 1
push edi
push 0x4027a4
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4060a0
mov edi, dword [ebp + 0x1c]
test edi, edi
jne 0x405efa
xor eax, eax
mov dword [ebp - 0x21c], 0x103
mov word [ebp - 6], ax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x22c]
push eax
xor eax, eax
push eax
push 0x4028a0
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405d9f
mov ebx, dword [ebp - 0x234]
test ebx, ebx
je 0x405d7d
lea eax, [ebp - 0x20c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x405d9f
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test ebx, ebx
jne 0x405d9f
push 0x4028a0
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
xor eax, eax
mov dword [ebp - 0x21c], 0x103
mov word [ebp - 6], ax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x22c]
push eax
xor eax, eax
push eax
push 0x40281c
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, dword [ebp - 0x230]
test eax, eax
jne 0x405e1a
test ebx, ebx
je 0x405df8
lea eax, [ebp - 0x20c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x405e1a
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test ebx, ebx
jne 0x405e1e
push 0x40281c
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test ebx, ebx
je 0x405e5d
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x228]
jne 0x405e23
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push ebx
push 1
xor eax, eax
push eax
push 0x40281c
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4060a0
mov ebx, dword [ebp - 0x234]
test ebx, ebx
je 0x405ea6
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x228]
jne 0x405e6c
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push ebx
push 1
xor eax, eax
push eax
push 0x4028a0
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4060a0
lea eax, [ebp - 0x218]
mov ebx, 0x402824
push eax
push 0x2001f
xor eax, eax
push eax
push ebx
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x405ee7
lea eax, [ebp - 0x218]
push eax
push ebx
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x4060a0
push 0x40287c
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
jmp 0x405f60
lea eax, [ebp - 0x218]
xor ebx, ebx
push eax
push 0x2001f
push ebx
push 0x40287c
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x405f3e
lea eax, [ebp - 0x218]
push eax
push 0x40287c
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x4060a0
push 4
lea eax, [ebp + 0x28]
push eax
push 4
push ebx
push 0x4028f4
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4060a0
mov ebx, dword [ebp - 0x240]
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x228]
jne 0x405f6b
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push ebx
push 1
xor eax, eax
push eax
push eax
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4060a0
test edi, edi
jne 0x4060b2
mov ebx, dword [ebp - 0x244]
xor esi, esi
test ebx, ebx
je 0x405fee
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x405fba
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push ebx
push 1
push esi
push 0x4028a8
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4060a0
mov ebx, dword [ebp - 0x248]
test ebx, ebx
je 0x40602d
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x405ffd
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push ebx
push 1
push esi
push 0x4027b8
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4060a0
lea eax, [ebp - 0x220]
push eax
push 0x2001f
push esi
mov esi, 0x4027f4
push esi
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x406068
lea eax, [ebp - 0x220]
push eax
push esi
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x4060a0
push dword [ebp - 0x24c]
push dword [ebp - 0x250]
push dword [ebp + 0x38]
push dword [ebp - 0x220]
call fcn.00404056
mov esi, eax
test esi, esi
js 0x4060b2
push dword [ebp - 0x254]
push dword [ebp + 0x44]
push dword [ebp - 0x220]
call fcn.00403fcb
mov esi, eax
jmp 0x4060b2
jle 0x40609c
movzx esi, ax
or esi, 0x80070000
jmp 0x4060b2
mov esi, 0x80070057
cmp dword [ebp - 0x220], 0
je 0x4060c7
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x214], 0
je 0x4060dc
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x218], 0
je 0x4060f1
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x210], 0
je 0x406106
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x224], 0
je 0x40611b
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x238]
call fcn.00403cde
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040dd40
mov esp, ebp
pop ebp
ret 0x50