Function at 0x40946c
Capabilities:
Delete registry value
Query or enumerate registry key
Set current directory
Set registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff98
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x18], ecx
mov byte [ebp - 0x11], dl
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x409e94
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 1], 1
xor eax, eax
mov dword [ebp - 0x40], eax
xor eax, eax
mov dword [ebp - 0x48], eax
mov dl, 1
mov eax, 0x407ef0
call fcn.004029f8
mov dword [ebp - 8], eax
mov dl, 1
mov eax, 0x407ef0
call fcn.004029f8
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x18], 0
je 0x4094e3
mov dl, 1
mov eax, 0x407ef0
call fcn.004029f8
mov dword [ebp - 0x1c], eax
jmp 0x4094e8
xor eax, eax
mov dword [ebp - 0x1c], eax
xor edx, edx
push ebp
push 0x409e5a
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x409d6e
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 0xc]
add eax, 0xf
call fcn.00405684
xor edx, edx
push ebp
push 0x409cf9
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax + 0xc]
cmp eax, 0xa
ja case.default.0x40953d
jmp dword [eax*4 + 0x409544]
cmp byte [ebp - 0x11], 0
je case.default.0x40953d
mov eax, dword [ebp - 0xc]
test byte [eax + 8], 4
jne 0x4095df
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 8]
test bl, 1
sete al
push eax
test bl, 2
setne al
push eax
push 0x409288
lea eax, [ebp - 0x30]
push eax
push ebp
lea edx, [ebp - 0x64]
mov eax, 2
call fcn.00409448
pop ecx
mov eax, dword [ebp - 0x64]
push eax
push ebp
lea edx, [ebp - 0x68]
mov eax, 1
call fcn.00409448
pop ecx
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x28]
pop ecx
call fcn.00408778
test al, al
jne case.default.0x40953d
mov byte [ebp - 1], 0
jmp case.default.0x40953d
lea eax, [ebp - 0x30]
push eax
push ebp
lea edx, [ebp - 0x64]
mov eax, 2
call fcn.00409448
pop ecx
mov eax, dword [ebp - 0x64]
push eax
push ebp
lea edx, [ebp - 0x68]
mov eax, 1
call fcn.00409448
pop ecx
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x28]
pop ecx
call fcn.004088d0
test al, al
jne case.default.0x40953d
mov byte [ebp - 1], 0
jmp case.default.0x40953d
cmp byte [ebp - 0x11], 0
jne 0x409635
mov eax, dword [ebp - 0xc]
test byte [eax + 8], 1
jne case.default.0x40953d
lea eax, [ebp - 0x64]
call fcn.00407170
mov eax, dword [ebp - 0x64]
call fcn.004035cc
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 8]
test bl, 8
setne al
push eax
push 0x409274
lea eax, [ebp - 0x20]
push eax
test bl, 4
setne cl
test bl, 2
setne dl
mov eax, dword [ebp - 0x28]
call fcn.0040854c
test al, al
je case.default.0x40953d
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
test al, 2
je case.default.0x40953d
test al, 0x10
je case.default.0x40953d
push 0
mov eax, dword [ebp - 0x28]
call fcn.004035cc
push eax
push 1
push 0x10
call sub.shell32.dll_SHChangeNotify
lea edx, [ebp - 0x68]
mov eax, dword [ebp - 0x28]
call fcn.004054d4
mov eax, dword [ebp - 0x68]
lea edx, [ebp - 0x64]
call fcn.00407060
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp - 8]
call fcn.004089c0
jmp case.default.0x40953d
push ebp
lea edx, [ebp - 0x64]
mov eax, 1
call fcn.00409448
pop ecx
mov edx, dword [ebp - 0x64]
lea eax, [ebp - 0x2c]
call fcn.00403328
cmp byte [ebp - 0x11], 0
jne 0x4096f3
cmp dword [ebp - 0x2c], 0
jne 0x4096fe
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
call fcn.00403328
cmp byte [ebp - 0x11], 0
jne 0x409711
mov eax, dword [ebp - 0xc]
test byte [eax + 8], 1
jne 0x40986d
mov eax, dword [ebp - 0xc]
test byte [eax + 8], 8
je 0x40976e
mov eax, dword [ebp - 0x28]
call fcn.00408bd4
test al, al
je case.default.0x40953d
mov eax, dword [ebp - 0x2c]
call fcn.00405414
test al, al
je case.default.0x40953d
cmp byte [ebp - 0x11], 0
je 0x40976e
push 0x24
mov eax, dword [0x40c5b8]
push eax
lea ecx, [ebp - 0x64]
mov edx, dword [ebp - 0x28]
mov al, 0x14
call fcn.00407654
mov eax, dword [ebp - 0x64]
call fcn.004035cc
push eax
push 0
call sub.user32.dll_MessageBoxA_1
cmp eax, 6
jne case.default.0x40953d
mov eax, dword [ebp - 0xc]
test byte [eax + 8], 0x10
je 0x40978c
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
call fcn.00403518
jne 0x40978c
mov eax, dword [ebp - 0x28]
call fcn.00408eac
mov eax, dword [ebp - 0xc]
test byte [eax + 8], 0x40
je 0x4097aa
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
call fcn.00403518
jne 0x4097aa
mov eax, dword [ebp - 0x28]
call fcn.00408f68
mov eax, dword [ebp - 0xc]
test byte [eax + 8], 4
je 0x409841
cmp dword [0x40b07c], 1
je 0x4097db
push 0
push ebp
mov eax, 2
call fcn.00409420
pop ecx
push eax
push 0x409ea8
call sub.kernel32.dll_WriteProfileStringA
jmp 0x40981b
lea eax, [ebp - 0x34]
push eax
push 2
push 0
push 0x409eb0
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x4097fc
mov byte [ebp - 1], 0
jmp 0x40981b
push ebp
mov eax, 2
call fcn.00409420
pop ecx
push eax
mov eax, dword [ebp - 0x34]
push eax
call sub.advapi32.dll_RegDeleteValueA
mov eax, dword [ebp - 0x34]
push eax
call sub.advapi32.dll_RegCloseKey
push ebp
mov eax, 3
call fcn.00409420
pop ecx
push eax
call sub.gdi32.dll_RemoveFontResourceA
test eax, eax
je 0x409841
push 0
push 0
push 0x1d
push 0xffff
call sub.user32.dll_SendNotifyMessageA
cmp byte [ebp - 0x11], 0
jne 0x409854
mov eax, dword [ebp - 0xc]
test byte [eax + 8], 2
jne case.default.0x40953d
push ebp
mov eax, dword [ebp - 0xc]
test byte [eax + 8], 0x20
setne dl
mov eax, dword [ebp - 0x2c]
call fcn.004092b4
pop ecx
jmp case.default.0x40953d
mov eax, dword [ebp - 0xc]
test byte [eax + 8], 8
je 0x40987e
mov eax, dword [ebp - 0x28]
call fcn.00408bd4
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
call fcn.00403518
je case.default.0x40953d
push ebp
mov eax, dword [ebp - 0xc]
test byte [eax + 8], 0x20
setne dl
mov eax, dword [ebp - 0x2c]
call fcn.004092b4
pop ecx
jmp case.default.0x40953d
xor eax, eax
push ebp
push 0x409a7d
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 0x40], 0
jne 0x4098ce
call fcn.00407a60
mov edx, 0x409ee8
call fcn.00407bbc
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x48], 0
jne 0x4098e7
call fcn.00407a60
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x40]
call fcn.00407c30
mov dword [ebp - 0x48], eax
push ebp
lea edx, [ebp - 0x64]
mov eax, 1
call fcn.00409448
pop ecx
mov edx, dword [ebp - 0x64]
lea eax, [ebp - 0x4c]
call fcn.00403328
cmp dword [ebp - 0x4c], 0
je 0x40996a
push 1
mov edx, 0x409ef8
lea eax, [ebp - 0x64]
call fcn.00403328
lea eax, [ebp - 0x64]
mov edx, dword [ebp - 0x28]
call fcn.00403410
lea eax, [ebp - 0x64]
mov edx, 0x409f10
call fcn.00403410
lea eax, [ebp - 0x64]
mov edx, 0x409f20
call fcn.00403410
lea eax, [ebp - 0x64]
mov edx, dword [ebp - 0x4c]
call fcn.00403410
lea eax, [ebp - 0x64]
mov edx, 0x409f38
call fcn.00403410
mov eax, dword [ebp - 0x64]
push eax
call fcn.00407a60
mov edx, dword [ebp - 0x48]
pop ecx
call fcn.00407d6c
jmp 0x409a70
call fcn.00407a60
mov edx, dword [ebp - 0x28]
call fcn.00407bbc
mov dword [ebp - 0x44], eax
xor eax, eax
push ebp
push 0x409a2a
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00407a60
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x48]
call fcn.00407d98
xor eax, eax
push ebp
push 0x409a08
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x30], eax
mov ebx, 0x40b1b4
mov dl, byte [ebx]
mov eax, dword [ebp - 0x54]
call fcn.00405640
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jne 0x4099d6
call fcn.00406134
inc dword [ebp - 0x54]
inc dword [ebp - 0x30]
inc ebx
cmp dword [ebp - 0x30], 4
jne 0x4099be
mov eax, dword [ebp - 0x54]
cmp byte [eax], 0x30
sete byte [ebp - 0x59]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409a0f
call fcn.00407a60
mov edx, dword [ebp - 0x50]
call fcn.00407e8c
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp case.default.0x40953d
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0xf], 0
je 0x409ac2
mov eax, dword [ebp - 0xc]
add eax, 0xf
push eax
push 0
push ebp
mov eax, 2
call fcn.00409420
pop ecx
push eax
push ebp
mov eax, 1
call fcn.00409420
pop ecx
push eax
call sub.kernel32.dll_WritePrivateProfileStringA
jmp case.default.0x40953d
push 0
push ebp
mov eax, 2
call fcn.00409420
pop ecx
push eax
push ebp
mov eax, 1
call fcn.00409420
pop ecx
push eax
call sub.kernel32.dll_WriteProfileStringA
jmp case.default.0x40953d
mov eax, dword [ebp - 0xc]
test byte [eax + 8], 1
je 0x409b10
push ebp
mov eax, 1
call fcn.00409420
pop ecx
mov edx, dword [ebp - 0xc]
add edx, 0xf
call fcn.004093cc
test al, al
je case.default.0x40953d
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0xf], 0
je 0x409b3b
mov eax, dword [ebp - 0xc]
add eax, 0xf
push eax
push 0
push 0
push ebp
mov eax, 1
call fcn.00409420
pop ecx
push eax
call sub.kernel32.dll_WritePrivateProfileStringA
jmp case.default.0x40953d
push 0
push 0
push ebp
mov eax, 1
call fcn.00409420
pop ecx
push eax
call sub.kernel32.dll_WriteProfileStringA
jmp case.default.0x40953d
lea eax, [ebp - 0x34]
push eax
push 1
push 0
mov eax, dword [ebp - 0xc]
add eax, 0xf
push eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
push eax
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne case.default.0x40953d
mov eax, dword [ebp - 0x34]
push eax
call sub.advapi32.dll_RegCloseKey
mov eax, dword [ebp - 0xc]
lea edx, [eax + 0xf]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
call fcn.004073c8
test al, al
jne case.default.0x40953d
mov byte [ebp - 1], 0
jmp case.default.0x40953d
lea eax, [ebp - 0x34]
push eax
push 2
push 0
mov eax, dword [ebp - 0xc]
add eax, 0xf
push eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
push eax
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne case.default.0x40953d
push 1
push 0x40b1b8
push 1
push 0
push ebp
mov eax, 1
call fcn.00409420
pop ecx
push eax
mov eax, dword [ebp - 0x34]
push eax
call sub.advapi32.dll_RegSetValueExA
test eax, eax
je 0x409bf0
mov byte [ebp - 1], 0
mov eax, dword [ebp - 0x34]
push eax
call sub.advapi32.dll_RegCloseKey
jmp case.default.0x40953d
lea eax, [ebp - 0x34]
push eax
push 1
push 0
mov eax, dword [ebp - 0xc]
add eax, 0xf
push eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
push eax
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne case.default.0x40953d
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x3c]
push eax
push 0
push 0
lea eax, [ebp - 0x38]
push eax
push 0
push 0
push 0
mov eax, dword [ebp - 0x34]
push eax
call sub.advapi32.dll_RegQueryInfoKeyA
test eax, eax
je 0x409c5a
mov eax, dword [ebp - 0x34]
push eax
call sub.advapi32.dll_RegCloseKey
mov byte [ebp - 1], 0
jmp case.default.0x40953d
mov eax, dword [ebp - 0x34]
push eax
call sub.advapi32.dll_RegCloseKey
cmp dword [ebp - 0x38], 0
jne case.default.0x40953d
cmp dword [ebp - 0x3c], 0
jne case.default.0x40953d
mov eax, dword [ebp - 0xc]
lea edx, [eax + 0xf]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
call fcn.004073c8
test al, al
jne case.default.0x40953d
mov byte [ebp - 1], 0
jmp case.default.0x40953d
lea eax, [ebp - 0x34]
push eax
push 0xb
push 0
mov eax, dword [ebp - 0xc]
add eax, 0xf
push eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
push eax
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne case.default.0x40953d
push ebp
mov eax, 1
call fcn.00409420
pop ecx
mov edx, eax
mov eax, dword [ebp - 0x34]
call fcn.00407358
test al, al
je case.default.0x40953d
push ebp
mov eax, 1
call fcn.00409420
pop ecx
push eax
mov eax, dword [ebp - 0x34]
push eax
call sub.advapi32.dll_RegDeleteValueA
test eax, eax
je case.default.0x40953d
mov byte [ebp - 1], 0
jmp case.default.0x40953d
mov eax, dword [ebp - 0x28]
call fcn.00408bd4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x409d4d
mov eax, dword [ebp - 0xc]
call fcn.004025bc
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
mov dword [eax + 8], edx
cmp dword [ebp - 0xc], 0
jne 0x409509
mov eax, dword [ebp - 0x10]
xor edx, edx
mov dword [eax + 4], edx
cmp dword [ebp - 0x18], 0
je 0x409db3
call dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov ebx, dword [eax + 8]
dec ebx
test ebx, ebx
jl 0x409db3
inc ebx
mov dword [ebp - 0x30], 0
lea ecx, [ebp - 0x64]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x1c]
call fcn.00408a58
mov eax, dword [ebp - 0x64]
xor ecx, ecx
mov edx, dword [ebp - 0x20]
call fcn.004090f0
inc dword [ebp - 0x30]
dec ebx
jne 0x409d92
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409e64
mov eax, dword [ebp - 0x1c]
call fcn.00402a20
mov eax, dword [ebp - 0x20]
call fcn.00402a20
mov eax, dword [ebp - 8]
mov ebx, dword [eax + 8]
dec ebx
test ebx, ebx
jl 0x409e2b
inc ebx
mov dword [ebp - 0x30], 0
lea ecx, [ebp - 0x64]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 8]
call fcn.00408a58
mov eax, dword [ebp - 0x64]
call fcn.00406fa8
test al, al
je 0x409e25
push 0
lea ecx, [ebp - 0x64]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 8]
call fcn.00408a58
mov eax, dword [ebp - 0x64]
call fcn.004035cc
push eax
push 0x1001
push 0x1000
call sub.shell32.dll_SHChangeNotify
inc dword [ebp - 0x30]
dec ebx
jne 0x409de3
mov eax, dword [ebp - 8]
call fcn.00402a20
cmp dword [ebp - 0x48], 0
je 0x409e46
call fcn.00407a60
lea edx, [ebp - 0x48]
call fcn.00407c78
cmp dword [ebp - 0x40], 0
je 0x409e59
call fcn.00407a60
lea edx, [ebp - 0x40]
call fcn.00407c18
ret