Function at 0x408450
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [0x410358]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push edi
push 0
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x4c], 0
call dword [sym.imp.KERNEL32.dll_SetThreadUILanguage]
push ecx
call fcn.004095a0
test al, al
je 0x4084b9
lea eax, [ebp - 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
test byte [ebp - 0x7c], 1
jne 0x40ab95
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x20], 0xffffffff
push eax
lea eax, [ebp - 0x58]
mov dword [ebp - 0x44], 0xffffffff
push eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x48], 0xffffffff
push eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x3c], 0xffffffff
push eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x30], 0xffffffff
push eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x34], 0xffffffff
push eax
lea eax, [ebp - 0x20]
mov edx, ebx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00409310
mov edi, eax
test edi, edi
jne 0x40879e
push esi
lea eax, [ebp - 0x34]
push eax
push 0x20019
push edi
push 0x403160
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40abb0
mov ecx, dword [ebp - 0x20]
cmp ecx, 2
je 0x40abfc
cmp ecx, 5
jne 0x40ac08
mov dword [ebp - 0x20], 3
mov esi, dword [ebp - 0x48]
cmp esi, 0xffffffff
jne 0x40ac16
mov byte [ebp - 0x21], 1
lea eax, [ebp - 0x4c]
push eax
push ecx
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x44]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00408850
mov ebx, dword [ebp - 0x4c]
mov edi, eax
test edi, edi
jne 0x40ade7
or ebx, 0xffffffff
cmp esi, ebx
jg 0x40ac1f
mov eax, dword [ebp - 0x30]
cmp eax, ebx
jg 0x40ac26
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
jg 0x40ac2d
inc ebx
cmp dword [ebp - 0x20], 2
je 0x40ac34
mov dword [ebp - 0x30], 3
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x44], ecx
test ecx, ecx
jne 0x40ac40
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x48], ecx
mov esi, dword [ebp - 0x28]
xor edx, edx
xor edi, edi
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x38], edx
test esi, esi
je 0x40ac68
push esi
mov dword [ebp - 0x20], edx
call fcn.00409200
test al, al
jne 0x40ad27
push 0xa
push 0xb
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.msvcrt.dll__itow_s]
add esp, 0x10
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], edi
push esi
call fcn.00409200
test al, al
jne 0x40acd4
xor eax, eax
cmp ax, word [ebp - 0x1c]
je 0x40acd4
lea eax, [ebp - 0x1c]
push eax
push 0x17
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x34]
push eax
push 0x4030e0
push 0x4106d0
call fcn.004090d0
add esp, 0x18
test al, al
mov eax, dword [ebp - 0x34]
je 0x40ac90
lea ecx, [ebp - 0x30]
push ecx
push 0x20019
push edi
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40ac9a
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40869d
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x4086b2
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x30], 0
test edi, edi
jne 0x408727
lea eax, [ebp - 0x1c]
push eax
push 0x17
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x403038
push 0x4106d0
call fcn.004090d0
add esp, 0x18
test al, al
je 0x40ad27
lea eax, [ebp - 0x40]
push eax
push 0x20019
push edi
push dword [ebp - 0x20]
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, eax
test ecx, ecx
jne 0x40acde
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x3c], eax
test edi, edi
jne 0x408727
lea eax, [ebp - 0x38]
push eax
push edi
push edi
push edi
push 0x40312c
push dword [ebp - 0x40]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40ad31
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x40873c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40874c
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [ebp - 0x2c]
test eax, eax
jne 0x40add9
test edi, edi
jne 0x4087b9
push dword [ebp - 0x5c]
push dword [ebp + 8]
push ebx
mov ebx, dword [ebp - 0x4c]
push ecx
push ebx
push dword [ebp - 0x44]
mov ecx, esi
push dword [ebp - 0x58]
call fcn.00407b60
mov edi, eax
mov eax, dword [ebp - 0x48]
test eax, eax
jne 0x40adf2
test ebx, ebx
je 0x40878e
push ebx
call sub.msvcrt.dll_free
add esp, 4
cmp byte [ebp - 0x21], 0
je 0x40879d
push esi
call sub.msvcrt.dll_free
add esp, 4
pop esi
mov eax, dword [0x4106e4]
test eax, eax
jne 0x4087be
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop ebx
call fcn.00409a40
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x4c]
jmp 0x408776
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4087a7
cmp word [ebp - 0x78], 0
je 0x4084b9
lea ecx, [ebp - 0xa8]
call fcn.0040c231
jmp 0x4084b9
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x20]
cmp ecx, 1
je 0x40abca
cmp ecx, 2
jne 0x40854a
mov eax, dword [0x4106dc]
sub esp, 8
fld qword [0x407720]
mov edi, 0x23
mov esi, dword [eax]
fstp qword [esp]
push ecx
push edi
mov esi, dword [esi + 4]
mov ecx, esi
push 0
push eax
call dword [0x411204]
call esi
add esp, 0x18
jmp 0x40879d
mov dword [ebp - 0x20], 1
jmp 0x40855a
cmp ecx, 4
je 0x408553
jmp 0x40855a
mov byte [ebp - 0x21], 0
jmp 0x40856a
mov ebx, esi
jmp 0x40859b
mov ebx, eax
jmp 0x4085a6
mov ebx, eax
jmp 0x4085b1
mov dword [ebp - 0x30], 1
jmp 0x4085c3
mov eax, dword [0x4106dc]
push ecx
push 0x24
push 0
mov esi, dword [eax]
push eax
mov esi, dword [esi + 4]
mov ecx, esi
call dword [0x411204]
call esi
mov eax, dword [ebp - 0x2c]
add esp, 0x10
mov dword [ebp - 0x48], eax
jmp 0x4085da
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00408d90
test al, al
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x3c], eax
je 0x40ad27
jmp 0x408706
mov edi, 0xfffb0000
jmp 0x408690
push dword [ebp - 0x28]
lea edi, [eax - 2]
mov eax, dword [0x4106d4]
neg edi
push 0x19
sbb edi, edi
mov esi, dword [eax]
and edi, 0x10000
push 0
push eax
add edi, 0xfffa0000
mov esi, dword [esi + 4]
mov ecx, esi
call dword [0x411204]
call esi
mov esi, dword [ebp - 0x28]
add esp, 0x10
jmp 0x40868d
mov edi, 0xfffb0000
jmp 0x4086b2
cmp ecx, 2
jne 0x40ad07
push dword [ebp - 0x28]
mov eax, dword [0x4106d4]
push dword [ebp - 0x20]
push 0x27
mov esi, dword [eax]
push 0
push eax
mov esi, dword [esi + 4]
mov ecx, esi
call dword [0x411204]
call esi
add esp, 0x14
jmp 0x40ad24
mov edi, dword [0x4106d4]
push dword [ebp - 0x20]
push 0x14
mov eax, dword [edi]
push ecx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x411204]
mov ecx, edi
call esi
mov esi, dword [ebp - 0x28]
mov edi, 0xfffb0000
jmp 0x408706
mov eax, dword [ebp - 0x38]
xor ecx, ecx
shr eax, 1
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040972e
add esp, 4
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x40ad60
mov edi, 0xffff0000
jmp 0x408727
push dword [ebp - 0x38]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x2c]
push 0
push 0
push 0x40312c
push dword [ebp - 0x40]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x408727
push 2
push 0x403324
push dword [ebp - 0x2c]
call dword [sym.imp.msvcrt.dll_wcsncmp]
add esp, 0xc
test eax, eax
jne 0x408727
push dword [ebp - 0x54]
mov eax, dword [0x4106dc]
mov edi, 0xffff0000
push dword [ebp - 0x44]
push 3
mov esi, dword [eax]
push 0
push eax
mov esi, dword [esi + 4]
mov ecx, esi
call dword [0x411204]
call esi
mov esi, dword [ebp - 0x28]
add esp, 0x14
jmp 0x408727
push eax
call sub.msvcrt.dll_free
add esp, 4
jmp 0x408757
mov eax, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x28]
jmp 0x408779
push eax
call sub.msvcrt.dll_free
add esp, 4
jmp 0x408781