Function at 0x402039
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov eax, 0x6167c8
call fcn.0044c384
sub esp, 0x178
and dword [ebp - 4], 0
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
call fcn.005989f0
mov dword [ebp - 0x3c], eax
mov ecx, dword [eax]
mov dword [ebp - 0x44], ecx
lea ecx, [ebp - 0x44]
mov dword [eax], ecx
mov dword [ebp - 0x40], 0x5989d1
mov byte [ebp - 4], 1
call fcn.004e3919
mov ecx, dword [ebp - 0x44]
or dword [ebp - 4], 0xffffffff
and dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x3c]
mov dword [eax], ecx
mov dword [ebp - 0x24], 0x7d
xor edi, edi
mov eax, dword [ebp - 0x1c]
push edi
lea ecx, [ebp - 0x2c]
mov esi, dword [ebp + 8]
push edi
push ecx
inc dword [ebp - 0x1c]
lea ecx, [ebp - 0x24]
push edi
push ecx
lea ecx, [ebp - 0x134]
push ecx
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x402695
cmp byte [ebp - 0x134], 0x61
mov dword [ebp - 0x24], 0x7d
jl 0x40208f
cmp byte [ebp - 0x134], 0x7a
jg 0x40208f
lea eax, [ebp - 0x134]
push eax
call fcn.00598476
cmp eax, 2
pop ecx
jb 0x40208f
movsx eax, byte [ebp - 0x134]
cmp eax, 0x6e
jg 0x402436
je 0x4023c2
sub eax, 0x61
je 0x402316
dec eax
je 0x402265
dec eax
dec eax
je 0x4021b2
sub eax, 5
jne 0x40208f
push 4
pop eax
cmp dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], eax
jne 0x40208f
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x54]
push eax
push edi
lea eax, [ebp - 0x134]
push edi
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40208f
mov dword [ebp - 4], 6
call fcn.005989f0
mov dword [ebp - 0x70], eax
mov ecx, dword [eax]
mov dword [ebp - 0x78], ecx
lea ecx, [ebp - 0x78]
mov dword [eax], ecx
mov dword [ebp - 0x74], 0x5989d1
push dword [ebp - 0x54]
lea eax, [ebp - 0x133]
mov byte [ebp - 4], 7
push eax
push dword [ebp - 0x14]
call fcn.004e45a2
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x78]
add esp, 0xc
jmp 0x402667
lea eax, [ebp - 0x134]
push eax
push esi
call fcn.004027b3
mov esi, eax
pop ecx
cmp esi, edi
pop ecx
je 0x40208f
lea eax, [ebp - 0xb4]
push eax
push 0x674388
push esi
call fcn.0059be2c
push esi
call fcn.005989b0
add esp, 0x10
mov dword [ebp - 4], 0xc
call fcn.005989f0
mov dword [ebp - 0x98], eax
mov ecx, dword [eax]
mov dword [ebp - 0xa0], ecx
lea ecx, [ebp - 0xa0]
mov dword [eax], ecx
mov dword [ebp - 0x9c], 0x5989d1
fld qword [ebp - 0xb4]
push ecx
push ecx
lea eax, [ebp - 0x133]
mov byte [ebp - 4], 0xd
fstp qword [esp]
push eax
push dword [ebp - 0x14]
call fcn.004e4606
mov eax, dword [ebp - 0x98]
mov ecx, dword [ebp - 0xa0]
add esp, 0x10
jmp 0x402667
push 4
pop ebx
cmp dword [ebp - 0x2c], ebx
mov dword [ebp - 0x18], ebx
jne 0x40208f
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x20]
push eax
push edi
lea eax, [ebp - 0x134]
push edi
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40208f
cmp dword [ebp - 0x20], edi
je 0x4022a3
cmp dword [ebp - 0x20], 1
jne 0x40208f
mov dword [ebp - 4], 3
call fcn.005989f0
mov dword [ebp - 0x48], eax
mov ecx, dword [eax]
mov dword [ebp - 0x50], ecx
lea ecx, [ebp - 0x50]
mov dword [eax], ecx
mov dword [ebp - 0x4c], 0x5989d1
xor eax, eax
cmp dword [ebp - 0x20], edi
mov byte [ebp - 4], bl
setne al
push eax
lea eax, [ebp - 0x133]
push eax
push dword [ebp - 0x14]
call fcn.004e4570
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x50]
add esp, 0xc
jmp 0x402667
or dword [ebp - 4], 0xffffffff
jmp 0x40208f
lea eax, [ebp - 0x134]
push eax
push esi
call fcn.004027b3
pop ecx
cmp eax, edi
pop ecx
mov dword [ebp - 0x18], eax
je 0x40208f
mov dword [ebp - 4], 9
call fcn.005989f0
mov dword [ebp - 0x64], eax
mov ecx, dword [eax]
mov dword [ebp - 0x6c], ecx
lea ecx, [ebp - 0x6c]
mov dword [eax], ecx
mov dword [ebp - 0x68], 0x5989d1
push dword [ebp - 0x18]
mov byte [ebp - 4], 0xa
call fcn.0059bd1f
pop ecx
push eax
lea eax, [ebp - 0x133]
push eax
push dword [ebp - 0x14]
call fcn.004e45d3
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x6c]
add esp, 0xc
mov dword [eax], ecx
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x18], 0
je 0x40208f
push dword [ebp - 0x18]
call fcn.005989b0
pop ecx
jmp 0x40208f
cmp dword [ebp - 0x2c], 1
jne 0x40208f
mov dword [ebp - 4], 0x1b
call fcn.005989f0
mov dword [ebp - 0x7c], eax
mov ecx, dword [eax]
mov dword [ebp - 0x84], ecx
lea ecx, [ebp - 0x84]
mov dword [eax], ecx
mov dword [ebp - 0x80], 0x5989d1
lea eax, [ebp - 0x133]
mov byte [ebp - 4], 0x1c
push eax
push dword [ebp - 0x14]
call fcn.004e48f9
mov eax, dword [ebp - 0x7c]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x84]
jmp 0x402667
sub eax, 0x73
je 0x40260e
dec eax
je 0x4024f7
sub eax, 4
jne 0x40208f
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x134]
push eax
push esi
call fcn.00402834
add esp, 0xc
cmp eax, edi
mov dword [ebp - 0x18], eax
je 0x40208f
mov dword [ebp - 4], 0x18
call fcn.005989f0
mov dword [ebp - 0x8c], eax
mov ecx, dword [eax]
mov dword [ebp - 0x94], ecx
lea ecx, [ebp - 0x94]
mov dword [eax], ecx
mov dword [ebp - 0x90], 0x5989d1
push dword [ebp - 0x88]
lea eax, [ebp - 0x133]
mov byte [ebp - 4], 0x19
push dword [ebp - 0x18]
push eax
push dword [ebp - 0x14]
call fcn.004e49e8
mov eax, dword [ebp - 0x8c]
mov ecx, dword [ebp - 0x94]
add esp, 0x10
jmp 0x402667
lea eax, [ebp - 0x134]
push eax
push esi
call fcn.004027b3
mov esi, eax
pop ecx
cmp esi, edi
pop ecx
mov dword [ebp - 0x28], esi
je 0x40208f
mov dword [ebp - 0x18], edi
mov dword [ebp - 4], 0x12
call fcn.005989f0
mov dword [ebp - 0xa4], eax
mov ecx, dword [eax]
mov dword [ebp - 0xac], ecx
lea ecx, [ebp - 0xac]
mov dword [eax], ecx
mov dword [ebp - 0xa8], 0x5989d1
push 2
push esi
mov byte [ebp - 4], 0x13
call fcn.004e72c9
pop ecx
pop ecx
mov dword [ebp - 0x18], eax
push esi
call fcn.005989b0
mov eax, dword [ebp - 0xa4]
pop ecx
mov ecx, dword [ebp - 0xac]
mov dword [eax], ecx
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x18], 0
je 0x40208f
mov dword [ebp - 4], 0x15
call fcn.005989f0
mov dword [ebp - 0x58], eax
mov ecx, dword [eax]
mov dword [ebp - 0x60], ecx
lea ecx, [ebp - 0x60]
mov dword [eax], ecx
mov dword [ebp - 0x5c], 0x5989d1
mov byte [ebp - 4], 0x16
push dword [ebp - 0x18]
lea eax, [ebp - 0x133]
push eax
push dword [ebp - 0x14]
call fcn.004e488c
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x60]
add esp, 0xc
jmp 0x402667
lea eax, [ebp - 0x134]
push eax
push esi
call fcn.004027b3
pop ecx
cmp eax, edi
pop ecx
mov dword [ebp - 0x18], eax
je 0x40208f
mov dword [ebp - 4], 0xf
call fcn.005989f0
mov dword [ebp - 0x30], eax
mov ecx, dword [eax]
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 0x38]
mov dword [eax], ecx
mov dword [ebp - 0x34], 0x5989d1
push dword [ebp - 0x18]
lea eax, [ebp - 0x133]
mov byte [ebp - 4], 0x10
push eax
push dword [ebp - 0x14]
call fcn.004e49b0
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x38]
add esp, 0xc
mov dword [eax], ecx
jmp 0x40230d
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], 0x7d
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x15c]
push ecx
push edi
inc dword [ebp - 0x1c]
push edi
lea ecx, [ebp - 0x24]
push edi
push ecx
lea ecx, [ebp - 0x134]
push ecx
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x402797
cmp byte [ebp - 0x134], 0x63
mov dword [ebp - 0x24], 0x7d
jne 0x40269f
lea eax, [ebp - 0x134]
push eax
call fcn.00598476
cmp eax, 2
pop ecx
jb 0x40269f
lea eax, [ebp - 0x28]
push eax
push 0x20019
lea eax, [ebp - 0x134]
push edi
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40269f
push dword [ebp - 0x28]
call fcn.00402039
cmp eax, edi
pop ecx
mov dword [ebp - 0x20], eax
je 0x402760
mov dword [ebp - 4], 0x1e
call fcn.005989f0
mov dword [ebp - 0x30], eax
mov ecx, dword [eax]
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 0x38]
mov dword [eax], ecx
mov dword [ebp - 0x34], 0x5989d1
push dword [ebp - 0x20]
lea eax, [ebp - 0x133]
mov byte [ebp - 4], 0x1f
push eax
push dword [ebp - 0x14]
call fcn.004e480f
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x38]
add esp, 0xc
mov dword [eax], ecx
or dword [ebp - 4], 0xffffffff
mov esi, dword [ebp + 8]
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
jmp 0x40269f
mov eax, dword [ebp - 0x14]
jmp 0x4027a4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret