Function at 0x40fda0
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x447cc8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4650f0]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esp + 0x58]
test eax, eax
mov ebx, 1
mov dword [esp + 0x3c], ebx
jle 0x40feae
cmp eax, 2
jle 0x40fe9e
cmp eax, 3
jne 0x40feae
mov edi, dword [esp + 0x54]
push ebx
push edi
sub esp, 8
lea eax, [esp + 0x5c]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
call fcn.00401050
sub esp, 8
lea edx, [esp + 0x5c]
mov ecx, esp
mov dword [esp + 0x38], esp
push edx
mov byte [esp + 0x58], 2
call fcn.00401050
mov eax, dword [esi]
add eax, 0xc
mov eax, dword [eax]
mov ecx, esi
mov byte [esp + 0x54], bl
call eax
test eax, eax
je 0x410002
push 2
push edi
sub esp, 8
lea edx, [esp + 0x5c]
mov ecx, esp
mov dword [esp + 0x64], esp
push edx
call fcn.00401050
sub esp, 8
lea eax, [esp + 0x5c]
mov ecx, esp
mov dword [esp + 0x38], esp
push eax
mov byte [esp + 0x58], 3
call fcn.00401050
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
add eax, 0xc
mov ecx, esi
mov byte [esp + 0x54], bl
call edx
lea ecx, [esp + 0x44]
mov esi, eax
mov byte [esp + 0x3c], 0
call fcn.00411520
lea ecx, [esp + 0x4c]
mov dword [esp + 0x3c], 0xffffffff
call fcn.00411520
mov eax, esi
jmp 0x41008d
push eax
call fcn.0040ed80
add esp, 4
mov esi, eax
jmp 0x410006
cmp dword [0x466c08], 0
jne 0x40fec9
mov dword [0x466c08], ebx
call fcn.0041bd80
mov dword [0x466c04], eax
jmp 0x40fece
mov eax, dword [0x466c04]
neg eax
sbb eax, eax
and eax, 0xfffffe00
add eax, 0x20219
mov esi, eax
mov eax, dword [esp + 0x48]
cmp dword [eax - 4], ebx
mov edi, 0x2bc
jle 0x40fefd
mov eax, dword [eax - 0xc]
push eax
lea ecx, [esp + 0x4c]
call fcn.00401df0
mov eax, dword [esp + 0x48]
lea ecx, [esp + 0x18]
push ecx
push esi
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x41006c
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x14], ebx
cmp dword [eax - 4], ebx
jle 0x40ff3b
mov edx, dword [eax - 0xc]
push edx
lea ecx, [esp + 0x54]
call fcn.00401df0
mov eax, dword [esp + 0x50]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [esp + 0x58]
push ecx
push 0
lea edx, [esp + 0x1c]
push edx
push 0
push eax
mov eax, dword [esp + 0x2c]
push eax
call ebp
test eax, eax
jne 0x410061
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x40ff70
cmp eax, 2
jne 0x41005c
mov eax, dword [esp + 0x58]
test eax, eax
jbe 0x41005c
lea edi, [eax + eax]
push edi
mov dword [esp + 0x28], vtable.CPMemBlock_unsigned_short_int_.0
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], eax
call dword [0x46436c]
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x30], esi
je 0x40ffaf
push edi
push 0
push esi
call fcn.00433810
add esp, 0xc
test esi, esi
mov byte [esp + 0x3c], 4
je 0x410048
lea ecx, [esp + 0x58]
push ecx
push esi
lea edx, [esp + 0x1c]
push edx
push 0
lea ecx, [esp + 0x5c]
call fcn.0040ef00
push eax
mov eax, dword [esp + 0x2c]
push eax
call ebp
xor edi, edi
cmp eax, edi
jne 0x410034
mov ecx, dword [esp + 0x58]
mov word [esi + ecx*2 - 2], di
mov ecx, dword [esp + 0x54]
push esi
call fcn.0040fd30
lea ecx, [esp + 0x24]
mov byte [esp + 0x3c], bl
call fcn.0040edf0
jmp 0x410061
mov esi, dword [esp + 0x54]
test esi, esi
jne 0x40fede
lea ecx, [esp + 0x44]
mov byte [esp + 0x3c], 0
call fcn.00411520
lea ecx, [esp + 0x4c]
mov dword [esp + 0x3c], 0xffffffff
call fcn.00411520
mov eax, 0x2bc
jmp 0x41008d
lea ecx, [esp + 0x24]
mov edi, 0x2bd
mov byte [esp + 0x3c], bl
call fcn.0040edf0
jmp 0x410061
lea ecx, [esp + 0x24]
mov edi, 0x69
mov byte [esp + 0x3c], bl
call fcn.0040edf0
jmp 0x410061
mov edi, 0x2be
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x44]
mov byte [esp + 0x3c], 0
call fcn.00411520
lea ecx, [esp + 0x4c]
mov dword [esp + 0x3c], 0xffffffff
call fcn.00411520
mov eax, edi
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 0x18