Function at 0x4098c0
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0xb4
mov eax, dword [0x411398]
xor eax, esp
mov dword [esp + 0xb0], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push 0
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
call dword [sym.imp.KERNEL32.dll_SetThreadUILanguage]
push ecx
call fcn.0040b010
test al, al
je 0x409949
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
test byte [esp + 0x84], 1
je 0x409949
cmp word [esp + 0x88], 0
je 0x409949
lea ecx, [esp + 0x58]
call fcn.0040e10e
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x24]
mov dword [esp + 0x14], 0xffffffff
push eax
lea eax, [esp + 0x4c]
mov dword [esp + 0x2c], 0xffffffff
push eax
lea eax, [esp + 0x3c]
mov dword [esp + 0x34], 0xffffffff
push eax
lea eax, [esp + 0x44]
mov dword [esp + 0x40], 0xffffffff
push eax
lea eax, [esp + 0x3c]
mov dword [esp + 0x34], 0xffffffff
push eax
lea eax, [esp + 0x3c]
mov dword [esp + 0x44], 0xffffffff
push eax
lea eax, [esp + 0x2c]
mov edx, ebx
push eax
lea eax, [esp + 0x34]
push eax
call fcn.0040ad90
mov edi, eax
test edi, edi
jne 0x409e44
lea eax, [esp + 0x2c]
push eax
push 0x20019
push edi
push 0x404000
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x409a23
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x10]
cmp ecx, 1
je 0x4099f1
cmp ecx, 2
jne 0x409a36
mov eax, dword [0x411734]
sub esp, 8
fld qword [0x4068b0]
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 [0x412228]
call esi
add esp, 0x18
jmp 0x409e44
mov ecx, dword [esp + 0x10]
cmp ecx, 2
jne 0x409a36
mov dword [esp + 0x10], 1
jmp 0x409a48
cmp ecx, 4
je 0x409a40
cmp ecx, 5
jne 0x409a48
mov dword [esp + 0x10], 3
mov esi, dword [esp + 0x28]
lea eax, [esp + 0x38]
push eax
push ecx
lea eax, [esp + 0x14]
cmp esi, 0xffffffff
push eax
push dword [esp + 0x30]
lea eax, [esp + 0x20]
sete byte [esp + 0x2b]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.0040a2e0
mov edi, eax
test edi, edi
jne 0x409e6b
or eax, 0xffffffff
cmp esi, eax
jle 0x409a85
mov eax, esi
mov ecx, dword [esp + 0x20]
cmp ecx, eax
jle 0x409a8f
mov eax, ecx
mov ecx, dword [esp + 0x30]
cmp ecx, eax
jle 0x409a99
mov eax, ecx
mov ecx, dword [esp + 0x34]
xor ebx, ebx
inc eax
mov dword [esp + 0x24], ecx
cmp dword [esp + 0x10], 2
mov dword [esp + 0x4c], eax
setne bl
lea ebx, [ebx*2 + 1]
test ecx, ecx
jne 0x409ac9
mov eax, dword [esp + 0xc]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
jmp 0x409aee
mov eax, dword [0x411734]
push ecx
push 0x24
push 0
mov esi, dword [eax]
push eax
mov esi, dword [esi + 4]
mov ecx, esi
call dword [0x412228]
call esi
mov eax, dword [esp + 0x1c]
add esp, 0x10
mov dword [esp + 0x28], eax
mov esi, dword [esp + 0x14]
xor edi, edi
mov dword [esp + 0x40], esi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0xc], 0
test esi, esi
jne 0x409b46
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.00409e80
mov ebx, dword [esp + 0x3c]
test al, al
je 0x409cc4
jmp 0x409cc9
push esi
mov dword [esp + 0x34], edi
call fcn.0040ab70
test al, al
jne 0x409cc2
push 0xa
push 0xb
lea eax, [esp + 0xac]
push eax
push ebx
call dword [sym.imp.msvcrt.dll__itow_s]
add esp, 0x10
xor edi, edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x20], edi
push esi
call fcn.0040ab70
test al, al
jne 0x409c41
xor eax, eax
cmp ax, word [esp + 0xa4]
je 0x409c41
lea eax, [esp + 0xa4]
push eax
push 0x17
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x40]
push eax
push 0x404748
push 0x411728
call fcn.0040ab90
mov ebx, dword [esp + 0x4c]
add esp, 0x18
test al, al
jne 0x409bcb
mov edi, 0xfffb0000
jmp 0x409c1a
lea eax, [esp + 0x20]
push eax
push 0x20019
push 0
push ebx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x409c1a
push dword [esp + 0x14]
lea edi, [eax - 2]
mov eax, dword [0x41172c]
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 [0x412228]
call esi
add esp, 0x10
test ebx, ebx
je 0x409c28
push ebx
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
mov eax, dword [esp + 0x20]
test eax, eax
je 0x409c46
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x20], 0
jmp 0x409c46
mov edi, 0xfffb0000
test edi, edi
jne 0x409d40
lea eax, [esp + 0xa4]
push eax
push 0x17
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x3c]
push eax
push 0x404798
push 0x411728
call fcn.0040ab90
add esp, 0x18
test al, al
je 0x409cc2
mov ebx, dword [esp + 0x30]
lea eax, [esp + 0x1c]
push eax
push 0x20019
push edi
push ebx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, eax
test ecx, ecx
je 0x409cc9
cmp ecx, 2
jne 0x409d23
mov eax, dword [0x41172c]
push dword [esp + 0x14]
push ebx
mov esi, dword [eax]
push 0x27
push edi
push eax
mov esi, dword [esi + 4]
mov ecx, esi
call dword [0x412228]
call esi
add esp, 0x14
xor ebx, ebx
mov edi, 0xfffb0000
test edi, edi
jne 0x409dae
lea eax, [esp + 0xc]
push eax
push edi
push edi
push edi
push 0x404050
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x409dae
mov eax, dword [esp + 0xc]
xor ecx, ecx
shr eax, 1
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040b4cc
mov esi, eax
add esp, 4
mov dword [esp + 0x2c], esi
test esi, esi
jne 0x409d44
mov edi, 0xffff0000
jmp 0x409dae
mov edi, dword [0x41172c]
push ebx
push 0x14
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x412228]
mov ecx, edi
call esi
jmp 0x409cc2
xor ebx, ebx
jmp 0x409cc9
push dword [esp + 0xc]
push 0
push esi
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [esp + 0xc]
push eax
push esi
push 0
push 0
push 0x404050
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x409dae
push 2
push 0x404084
push esi
call dword [sym.imp.msvcrt.dll_wcsncmp]
add esp, 0xc
test eax, eax
jne 0x409dae
push dword [esp + 0x40]
mov eax, dword [0x411734]
mov edi, 0xffff0000
push dword [esp + 0x28]
push 3
mov esi, dword [eax]
push 0
push eax
mov esi, dword [esi + 4]
mov ecx, esi
call dword [0x412228]
call esi
add esp, 0x14
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x409dc5
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x1c], 0
test ebx, ebx
je 0x409dd3
push ebx
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x409de5
push eax
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
mov esi, dword [esp + 0x38]
mov ebx, dword [esp + 0x14]
test edi, edi
jne 0x409e13
push dword [esp + 0x48]
mov edx, dword [esp + 0x14]
push dword [ebp + 8]
push dword [esp + 0x54]
push ecx
push esi
push dword [esp + 0x38]
mov ecx, ebx
push dword [esp + 0x5c]
call fcn.00408ea0
mov edi, eax
mov eax, dword [esp + 0x28]
test eax, eax
je 0x409e25
push eax
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
test esi, esi
je 0x409e33
push esi
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
cmp byte [esp + 0x1b], 0
je 0x409e44
push ebx
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
mov eax, dword [0x411958]
test eax, eax
je 0x409e54
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + 0xbc]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040b7e0
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0xc]
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x38]
jmp 0x409e17