Function at 0x40c25a
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5349ea
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
mov dword [ebp - 0x5c], ecx
mov eax, dword [ebp - 0x5c]
cmp dword [eax + 0x18], 0
je 0x40c288
xor eax, eax
jmp 0x40c542
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x18]
call fcn.00513d5b
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.0040c890
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jle 0x40c2fb
mov edx, dword [ebp - 0x14]
sub edx, 1
push edx
lea ecx, [ebp - 0x18]
call fcn.00476de0
movsx eax, al
cmp eax, 0x5c
jne 0x40c2fb
mov ecx, dword [ebp - 0x14]
sub ecx, 1
push ecx
lea edx, [ebp - 0x2c]
push edx
lea ecx, [ebp - 0x18]
call fcn.0050ca92
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x64], eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x64]
push ecx
lea ecx, [ebp - 0x18]
call fcn.00513e26
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.00513ced
lea edx, [ebp - 0x10]
push edx
push 0xf003f
push 0
lea ecx, [ebp - 0x18]
call fcn.00409600
push eax
xor eax, eax
cmp dword [ebp + 0xc], 0
setne al
add eax, 0x80000001
push eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExA]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x40c34b
mov dword [ebp - 0x30], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00513ced
mov eax, dword [ebp - 0x30]
jmp 0x40c542
mov dword [ebp - 0x1c], 1
cmp dword [ebp - 0x1c], 0
jbe 0x40c4bf
mov dword [ebp - 0x1c], 0
push 0
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0x1c]
push edx
push 0
push 0
push 0
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyA]
test eax, eax
je 0x40c3b3
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0x34], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00513ced
mov eax, dword [ebp - 0x34]
jmp 0x40c542
cmp dword [ebp - 0x1c], 0
jbe 0x40c4ba
mov edx, dword [ebp - 0x24]
add edx, 1
push edx
call fcn.005142b0
add esp, 4
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x24]
add ecx, 1
push ecx
mov edx, dword [ebp - 0x28]
push edx
push 0
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.advapi32.dll_RegEnumKeyA]
test eax, eax
jne 0x40c46e
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x28]
push edx
push 0x55d6ec
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x40]
push ecx
call fcn.00513f82
mov dword [ebp - 0x68], eax
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x6c], edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.00513f82
mov dword [ebp - 0x70], eax
mov edx, dword [ebp - 0x70]
mov dword [ebp - 0x74], edx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x74]
call fcn.00409600
push eax
mov ecx, dword [ebp - 0x5c]
call fcn.0040c25a
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0x3c], al
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x44]
call fcn.00513ced
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x40]
call fcn.00513ced
mov eax, dword [ebp - 0x3c]
and eax, 0xff
test eax, eax
je 0x40c4a8
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x48]
push edx
call fcn.005142d9
add esp, 4
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0x4c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00513ced
mov eax, dword [ebp - 0x4c]
jmp 0x40c542
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
push edx
call fcn.005142d9
add esp, 4
jmp 0x40c352
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
lea ecx, [ebp - 0x18]
call fcn.00409600
push eax
xor ecx, ecx
cmp dword [ebp + 0xc], 0
setne cl
add ecx, 0x80000001
push ecx
call dword [sym.imp.advapi32.dll_RegDeleteKeyA]
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x20]
mov dword [edx + 4], eax
mov ecx, dword [ebp - 0x5c]
mov dword [ecx + 8], 0
mov edx, dword [ebp - 0x5c]
mov dword [edx + 0xc], 0
cmp dword [ebp - 0x20], 0
jne 0x40c529
mov dword [ebp - 0x54], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00513ced
mov eax, dword [ebp - 0x54]
jmp 0x40c542
mov dword [ebp - 0x58], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00513ced
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8