Function at 0x40f790
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0xcc]
sub esp, 0x14c
mov eax, dword [0x46e780]
xor eax, ebp
mov dword [ebp + 0xc8], eax
push ebx
push esi
push edi
call dword [0x46fb44]
mov esi, dword [ebp + 0xd4]
mov dword [ebp - 0x44], eax
mov eax, dword [esi - 0xc]
xor edi, edi
cmp eax, edi
jl 0x40f7e1
push 0x460f50
push esi
call fcn.0043a895
add esp, 8
cmp eax, edi
je 0x40f7e1
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x40f84e
lea eax, [ebp - 0x48]
push str._ReadReg__Invalid_arguments__Missing_operator_____:
push eax
lea ecx, [ebp + 0xd4]
call fcn.004022b0
mov ebx, dword [eax]
add esp, 8
cmp ebx, edi
jne 0x40f803
mov dword [ebp - 0x40], edi
jmp 0x40f834
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x40f819
mov dword [ebp - 0x40], edi
jmp 0x40f834
lea esi, [eax + eax]
mov eax, esi
call fcn.004411d0
mov ecx, dword [ebp - 0x44]
mov eax, esp
push ecx
push esi
push ebx
push eax
call fcn.00408520
mov dword [ebp - 0x40], eax
lea edx, [ebp - 0x40]
push edx
lea ecx, [ebp - 0x64]
call fcn.0043a782
push 0x468880
lea eax, [ebp - 0x64]
push eax
call fcn.0043e4e2
cmp dword [esi - 0xc], edi
jge 0x40f858
or eax, 0xffffffff
jmp 0x40f873
push 0x460f50
push esi
call fcn.0043a895
add esp, 8
cmp eax, edi
jne 0x40f86f
or eax, 0xffffffff
jmp 0x40f873
sub eax, esi
sar eax, 1
push eax
lea ecx, [ebp - 0x40]
push ecx
lea ecx, [ebp + 0xd4]
call fcn.004079f0
cmp dword [esi - 0xc], edi
jge 0x40f88d
or eax, 0xffffffff
jmp 0x40f8a8
push 0x460f50
push esi
call fcn.0043a895
add esp, 8
cmp eax, edi
jne 0x40f8a4
or eax, 0xffffffff
jmp 0x40f8a8
sub eax, esi
sar eax, 1
add eax, 2
lea ebx, [ebp + 0xd4]
call fcn.00407860
mov eax, dword [ebp + 0xd4]
add eax, 0xfffffff0
push eax
mov dword [ebp - 0x48], eax
call fcn.00402490
add esp, 4
add eax, 0x10
push 0xa
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x4c], eax
call fcn.00428c5c
mov eax, dword [ebp - 0x40]
lea edx, [ebp - 0x80]
push edx
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x50], esp
mov esi, esp
push eax
mov dword [ebp - 0x50], eax
call fcn.00402490
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.0040bb40
add esp, 8
cmp eax, 3
je 0x40f949
lea eax, [ebp - 0x48]
push str._ReadReg__Invalid_arguments__nArg_3_:
push eax
mov ecx, ebx
call fcn.004022b0
mov ebx, dword [eax]
xor esi, esi
add esp, 8
cmp ebx, esi
jne 0x40f92c
mov dword [ebp - 0x40], esi
jmp 0x40f834
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x40f819
mov dword [ebp - 0x40], esi
jmp 0x40f834
push 0
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x40], reloc.OLEAUT32.dll_SysReAllocString
call fcn.00428c38
test eax, eax
jne 0x40f963
jmp fcn.00423c33
add eax, 8
push str.HKEY_CURRENT_USER
push eax
call fcn.004038c0
add esp, 8
test al, al
je 0x40f981
mov dword [ebp - 0x40], SysReAllocString
jmp 0x40f9b0
push 0
lea ecx, [ebp - 0x80]
call fcn.00428c38
test eax, eax
jne 0x40f994
jmp fcn.00423c33
add eax, 8
push str.HKEY_CLASSES_ROOT
push eax
call fcn.004038c0
add esp, 8
test al, al
je 0x40f9b0
mov dword [ebp - 0x40], SysReAllocString
push 1
lea ecx, [ebp - 0x80]
call fcn.00428c38
test eax, eax
jne 0x40f9c3
jmp fcn.00423c33
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.00402490
add esp, 4
mov edi, eax
push 2
lea ecx, [ebp - 0x80]
add edi, 0x10
call fcn.00428c38
test eax, eax
jne 0x40f9ea
jmp fcn.00423c33
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.00402490
mov ebx, eax
add esp, 4
add ebx, 0x10
test edi, edi
jne 0x40fa06
xor eax, eax
jmp 0x40fa33
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x40fa1b
xor eax, eax
jmp 0x40fa33
lea esi, [eax + eax]
mov eax, esi
call fcn.004411d0
mov ecx, dword [ebp - 0x44]
mov eax, esp
push ecx
push esi
push edi
push eax
call fcn.00408520
lea edx, [ebp - 0x54]
push edx
push 0xf003f
push 0
push eax
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40fb17
push 0x103
push eax
lea ecx, [ebp - 0x3b]
push ecx
mov byte [ebp - 0x3c], al
call fcn.0043c6b0
add esp, 0xc
test ebx, ebx
mov dword [ebp - 0x40], 0x104
mov dword [ebp - 0x58], 1
jne 0x40fa7c
xor eax, eax
jmp 0x40faa9
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x40fa91
xor eax, eax
jmp 0x40faa9
lea esi, [eax + eax]
mov eax, esi
call fcn.004411d0
mov edx, dword [ebp - 0x44]
mov eax, esp
push edx
push esi
push ebx
push eax
call fcn.00408520
lea ecx, [ebp - 0x40]
push ecx
lea edx, [ebp - 0x3c]
push edx
mov edx, dword [ebp - 0x54]
lea ecx, [ebp - 0x58]
push ecx
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
add esi, 1
cmp esi, 0x3fffffff
jle 0x40fadd
xor eax, eax
jmp 0x40faf6
lea eax, [esi + esi]
call fcn.004411d0
mov ecx, dword [ebp - 0x44]
mov eax, esp
push ecx
push esi
lea edx, [ebp - 0x3c]
push edx
push eax
call fcn.00414ed0
mov ecx, dword [0x472cac]
mov edx, dword [ebp - 0x4c]
push ecx
push eax
push edx
push 0x460ad0
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add ebx, 0xfffffff0
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fb33
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
add edi, 0xfffffff0
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40fb4f
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
lea ecx, [ebp - 0x80]
call fcn.00428d94
mov eax, dword [ebp - 0x4c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fb76
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x50]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fb92
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x48]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fbae
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esp, [ebp - 0x8c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xc8]
xor ecx, ebp
call fcn.00439e3e
add ebp, 0xcc
mov esp, ebp
pop ebp
ret