Function at 0x408c90
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x410358]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x18], 0
mov byte [ebp - 5], 1
test edi, edi
je 0x408d81
push dword [ebp + 0x10]
call fcn.00409200
test al, al
jne 0x408d81
cmp dword [ebp + 0x14], esi
je 0x408d81
push ebx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x18]
push eax
push esi
lea eax, [ebp - 0x20]
push eax
push esi
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40b03f
cmp dword [ebp - 0x20], 1
jne 0x40b0f9
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x408d75
shr ebx, 1
xor ecx, ecx
mov edx, 2
lea eax, [ebx + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040972e
mov esi, eax
add esp, 4
test esi, esi
je 0x408d7d
xor eax, eax
mov word [esi + ebx*2], ax
lea eax, [ebp - 0x18]
mov ebx, dword [ebp + 0xc]
push eax
push esi
push 0
push 0
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40b104
cmp ax, word [esi]
je 0x40b1d0
mov al, byte [ebp - 5]
pop ebx
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov dword [edi], esi
pop edi
pop esi
call fcn.00409a40
mov esp, ebp
pop ebp
ret 0x10
mov ebx, dword [ebp + 0xc]
jmp 0x40b1d0
xor al, al
jmp 0x408d5d
xor al, al
jmp 0x408d5e
push 0
push 0
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], esi
push ecx
push 0
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x408d7d
inc eax
xor ecx, ecx
mov dword [ebp - 0x1c], eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040972e
mov edi, eax
add esp, 4
mov dword [ebp - 0x10], edi
test edi, edi
je 0x40b0ab
push dword [ebp - 0xc]
mov edx, dword [ebp - 0x1c]
mov ecx, edi
call fcn.0040ce50
test eax, eax
jns 0x40b0ab
push edi
mov dword [ebp - 0x14], esi
call sub.msvcrt.dll_free
add esp, 4
mov dword [ebp - 0x10], esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x14], esi
jbe 0x408d7d
push dword [ebp - 0x10]
mov eax, dword [0x4106d4]
push ebx
push dword [ebp + 0x10]
mov edi, dword [eax]
push 0x16
push 0
push eax
mov edi, dword [edi + 4]
mov ecx, edi
call dword [0x411204]
call edi
mov eax, dword [ebp - 0x10]
add esp, 0x18
test eax, eax
je 0x408d7d
push eax
call sub.msvcrt.dll_free
add esp, 4
jmp 0x408d7d
push ebx
push dword [ebp + 0x10]
push 0x18
jmp 0x40b1d6
push 0
push 0
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push ecx
push 0
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40b1be
inc eax
xor ecx, ecx
mov dword [ebp - 0x1c], eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040972e
mov edi, eax
add esp, 4
mov dword [ebp - 0xc], edi
test edi, edi
je 0x40b17c
push dword [ebp - 0x10]
mov edx, dword [ebp - 0x1c]
mov ecx, edi
call fcn.0040ce50
test eax, eax
jns 0x40b17c
push edi
mov dword [ebp - 0x14], 0
call sub.msvcrt.dll_free
add esp, 4
mov dword [ebp - 0xc], 0
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x14], 0
jbe 0x40b1be
push dword [ebp - 0xc]
mov eax, dword [0x4106d4]
push ebx
push dword [ebp + 0x10]
mov edi, dword [eax]
push 0x16
push 0
push eax
mov edi, dword [edi + 4]
mov ecx, edi
call dword [0x411204]
call edi
mov eax, dword [ebp - 0xc]
add esp, 0x18
test eax, eax
je 0x40b1be
push eax
call sub.msvcrt.dll_free
add esp, 4
push esi
call sub.msvcrt.dll_free
add esp, 4
xor esi, esi
xor al, al
jmp 0x408d5d
push ebx
push dword [ebp + 0x10]
push 0xe
mov eax, dword [0x4106d4]
push 0
push eax
mov edi, dword [eax]
mov edi, dword [edi + 4]
mov ecx, edi
call dword [0x411204]
call edi
add esp, 0x14
jmp 0x408d7d