Function at 0x409540
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push 0xffffffffffffffff
push 0x4277d1
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x436300]
xor eax, esp
mov dword [esp + 0x258], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x436300]
xor eax, esp
push eax
lea eax, [esp + 0x270]
mov dword fs:[0], eax
mov esi, dword [esp + 0x284]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x280]
xor ebx, ebx
mov ebp, 8
cmp dword [esi + 0x18], ebp
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], ebx
jb 0x4095b1
mov eax, dword [esi + 4]
lea edi, [esi + 4]
mov dword [esp + 0x14], edi
jmp 0x4095ba
lea eax, [esi + 4]
mov dword [esp + 0x14], eax
mov edi, eax
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x4095cd
mov al, 1
jmp 0x409791
cmp dword [esi + 0x18], ebp
jb 0x4095d6
mov eax, dword [edi]
jmp 0x4095d8
mov eax, edi
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push 0xf003f
push ebx
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, 2
je 0x4095c6
cmp eax, ebx
je 0x4095ff
xor al, al
jmp 0x409791
mov edx, dword [esp + 0x18]
push ebx
push ebx
push ebx
push ebx
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x78]
push ecx
push ebx
push edx
mov dword [esp + 0x44], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, ebx
jne 0x40976a
lea eax, [esp + 0x64]
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], bx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x409641
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x68]
push eax
lea esi, [esp + 0x50]
call fcn.00406050
mov ecx, esi
push ecx
lea edi, [esp + 0x30]
mov dword [esp + 0x27c], ebx
call fcn.004103d0
add esp, 4
push 0xffffffffffffffff
push ebx
mov ecx, esi
mov byte [esp + 0x280], 1
call fcn.004046b0
mov byte [esp + 0x278], bl
cmp dword [esp + 0x44], ebp
jb 0x4096a1
mov edx, dword [esp + 0x30]
push edx
call fcn.00411642
add esp, 4
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x48]
push eax
push ecx
lea edi, [esp + 0x34]
call fcn.00410320
add esp, 8
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x50]
mov byte [esp + 0x280], 2
call fcn.004046b0
mov byte [esp + 0x278], bl
cmp dword [esp + 0x44], ebp
jb 0x4096e5
mov edx, dword [esp + 0x30]
push edx
call fcn.00411642
add esp, 4
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x48]
push eax
push ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x4c], 7
mov dword [esp + 0x48], ebx
mov word [esp + 0x38], bx
call fcn.00409540
test al, al
je 0x409759
mov ecx, dword [esp + 0x18]
push ebx
push ebx
push ebx
push ebx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x78]
push eax
push ebx
push ecx
mov dword [esp + 0x44], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov dword [esp + 0x278], 0xffffffff
cmp dword [esp + 0x60], ebp
mov esi, eax
jb 0x40974f
mov edx, dword [esp + 0x4c]
push edx
call fcn.00411642
add esp, 4
cmp esi, ebx
je 0x409629
jmp 0x409762
lea esi, [esp + 0x48]
call fcn.00402c90
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esi + 0x18], ebp
jb 0x40977e
mov eax, dword [edi]
jmp 0x409780
mov eax, edi
mov ecx, dword [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
sete al
mov ecx, dword [esp + 0x270]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, esp
call fcn.004111ac
add esp, 0x268
ret 8