Function at 0x401810
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push ebp
push esi
push edi
push 0x104
lea eax, [esp + 0x228]
push eax
push 0
call ebx
mov ebp, dword [esp + 0x43c]
mov dword [esp + 0x14], eax
test eax, eax
jbe 0x401a33
cmp dword [ebp + 0x18], 0
je 0x401970
lea ecx, [esp + 0x224]
push ecx
lea edx, [esp + 0x32c]
push 0x104
push edx
call fcn.00401fb0
lea eax, [esp + 0x334]
push eax
call fcn.00402000
mov esi, eax
add esp, 0x10
test esi, esi
jbe 0x40196c
lea edi, [esp + 0x328]
dec edi
lea ebx, [ebx]
cmp byte [edi + esi], 0x5c
je 0x4018a1
test esi, esi
jbe 0x4018a3
dec esi
cmp byte [edi + esi], 0x5c
jne 0x401896
test esi, esi
je 0x40196c
lea ecx, [esp + 0x328]
push ecx
lea edx, [esp + 0x124]
push 0x104
dec esi
push edx
mov byte [esp + esi + 0x334], 0
call fcn.00401fb0
mov eax, dword [ebp + 0x18]
add esp, 0xc
push eax
push 0x104
push 0x40b3e8
lea eax, [esp + 0x12c]
push 0x104
push eax
call fcn.00401f90
add esp, 0xc
push eax
call fcn.00401f90
lea ecx, [esp + 0x12c]
add esp, 0xc
test ecx, ecx
je 0x401964
mov edx, ecx
push edx
call fcn.00402000
add esp, 4
test eax, eax
jbe 0x401964
mov eax, dword [esp + 0x430]
push eax
push 0x104
push 0x40b3e8
lea ecx, [esp + 0x12c]
push 0x104
push ecx
call fcn.00401f90
add esp, 0xc
push eax
call fcn.00401f90
add esp, 0xc
lea edx, [esp + 0x120]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test eax, eax
je 0x401964
cmp eax, 0xffffffff
je 0x401964
test al, 0x10
je 0x401ce0
test esi, esi
ja 0x401890
mov eax, dword [esp + 0x14]
cmp dword [ebp + 0x14], 0
je 0x401a33
mov ecx, 0x108
push str..ini
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x228]
push edx
call fcn.00401fb0
mov edx, dword [ebp + 0x14]
add esp, 0xc
lea eax, [esp + 0x224]
push eax
push 0x104
lea ecx, [esp + 0x24]
push ecx
push 0x40b438
push str.DLLPath
push edx
mov byte [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x1c]
push eax
call fcn.00402000
add esp, 4
test eax, eax
je 0x401a33
lea ecx, [esp + 0x1c]
test ecx, ecx
je 0x401a33
mov edx, ecx
push edx
call fcn.00402000
add esp, 4
test eax, eax
jbe 0x401a33
mov eax, dword [esp + 0x430]
push eax
push 0x104
push 0x40b3e8
lea ecx, [esp + 0x28]
push 0x104
push ecx
call fcn.00401f90
add esp, 0xc
push eax
call fcn.00401f90
add esp, 0xc
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test eax, eax
je 0x401a33
cmp eax, 0xffffffff
je 0x401a33
test al, 0x10
je 0x401e0f
push 0x104
lea eax, [esp + 0x20]
push eax
push 0
call ebx
mov dword [esp + 0x14], eax
test eax, eax
jbe 0x401ac5
cmp byte [esp + eax + 0x1b], 0x5c
je 0x401a60
lea ecx, [esp + 0x1c]
dec ecx
dec eax
cmp byte [ecx + eax], 0x5c
jne 0x401a55
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x1c]
mov byte [esp + eax + 0x1b], 0
test ecx, ecx
je 0x401ac5
mov edx, ecx
push edx
call fcn.00402000
add esp, 4
test eax, eax
jbe 0x401ac5
mov eax, dword [esp + 0x430]
push eax
push 0x104
push 0x40b3e8
lea ecx, [esp + 0x28]
push 0x104
push ecx
call fcn.00401f90
add esp, 0xc
push eax
call fcn.00401f90
add esp, 0xc
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test eax, eax
je 0x401ac5
cmp eax, 0xffffffff
je 0x401ac5
test al, 0x10
je 0x401e0f
cmp dword [ebp], 0
je 0x401ece
mov eax, dword [ebp + 0x10]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov dword [esp + 0x10], 0
test eax, eax
je 0x401c40
push eax
lea eax, [esp + 0x124]
push 0xc8
push eax
call fcn.00401fb0
mov eax, dword [ebp]
add esp, 0xc
push eax
push 0xc8
push 0x40b3e8
lea ecx, [esp + 0x12c]
push 0xc8
push ecx
call fcn.00401f90
add esp, 0xc
push eax
call fcn.00401f90
add esp, 0xc
lea edx, [esp + 0x10]
push edx
push 1
xor edi, edi
push edi
lea eax, [esp + 0x12c]
push eax
push 0x80000002
mov dword [esp + 0x28], 0x104
mov dword [esp + 0x2c], edi
call ebx
test eax, eax
jne 0x401c2d
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x20]
push eax
push edi
push str.Path
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401c2d
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0x18], 2
mov dword [esp + 0x10], edi
jne 0x401bcd
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x228]
push 0x104
push ecx
call fcn.00401fb0
add esp, 0xc
push 0x104
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x22c]
push eax
call esi
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x1c]
test ecx, ecx
je 0x401c2d
mov edx, ecx
push edx
call fcn.00402000
add esp, 4
test eax, eax
jbe 0x401c2d
mov eax, dword [esp + 0x430]
push eax
push 0x104
push 0x40b3e8
lea ecx, [esp + 0x28]
push 0x104
push ecx
call fcn.00401f90
add esp, 0xc
push eax
call fcn.00401f90
add esp, 0xc
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, edi
je 0x401c2d
cmp eax, 0xffffffff
je 0x401c2d
test al, 0x10
je 0x401e0f
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0x401c3c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x10], edi
mov eax, dword [ebp + 4]
test eax, eax
je 0x401d0d
push 0x104
lea ecx, [esp + 0x20]
push ecx
push eax
call esi
mov dword [esp + 0x14], eax
dec eax
cmp eax, 0x102
ja 0x401d0d
cmp byte [esp + 0x1c], 0x25
je 0x401d0d
mov eax, dword [ebp]
push eax
push 0x104
push 0x40b3e8
lea edx, [esp + 0x28]
push 0x104
push edx
call fcn.00401f90
add esp, 0xc
push eax
call fcn.00401f90
mov eax, dword [esp + 0x43c]
push eax
mov edi, 0x104
lea esi, [esp + 0x2c]
call fcn.004017c0
add esp, 0x10
test al, al
je 0x401d0d
mov edx, dword [esp + 0x438]
mov eax, dword [esp + 0x434]
lea ecx, [esp + 0x1c]
push ecx
push edx
push eax
call fcn.00401fb0
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x41c
ret
lea eax, [esp + 0x120]
mov ecx, dword [esp + 0x438]
mov edx, dword [esp + 0x434]
push eax
push ecx
push edx
call fcn.00401fb0
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x41c
ret
cmp dword [ebp + 0xc], 0
je 0x401e27
lea ecx, [esp + 0x10]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call ebx
test eax, eax
jne 0x401e18
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x20]
push eax
push 0
push 0
push str.ProgramFilesDir
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401e18
mov eax, dword [ebp + 0xc]
push eax
push 0x104
push 0x40b3e8
lea edx, [esp + 0x28]
push 0x104
push edx
call fcn.00401f90
add esp, 0xc
push eax
call fcn.00401f90
mov ecx, dword [ebp]
add esp, 0xc
push ecx
push 0x104
push 0x40b3e8
push 0x104
push eax
call fcn.00401f90
add esp, 0xc
push eax
call fcn.00401f90
lea eax, [esp + 0x28]
add esp, 0xc
test eax, eax
je 0x401e18
mov ecx, eax
push ecx
call fcn.00402000
add esp, 4
test eax, eax
jbe 0x401e18
mov edx, dword [esp + 0x430]
push edx
push 0x104
push 0x40b3e8
lea eax, [esp + 0x28]
push 0x104
push eax
call fcn.00401f90
add esp, 0xc
push eax
call fcn.00401f90
add esp, 0xc
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test eax, eax
je 0x401e18
cmp eax, 0xffffffff
je 0x401e18
test al, 0x10
jne 0x401e18
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x1c]
jmp 0x401ce7
mov eax, dword [esp + 0x10]
test eax, eax
je 0x401e27
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 8]
test eax, eax
je 0x401ece
push eax
lea eax, [esp + 0x20]
push 0x104
push eax
call fcn.00401fb0
mov eax, dword [ebp]
add esp, 0xc
push eax
push 0x104
push 0x40b3e8
lea ecx, [esp + 0x28]
push 0x104
push ecx
call fcn.00401f90
add esp, 0xc
push eax
call fcn.00401f90
lea edx, [esp + 0x28]
add esp, 0xc
test edx, edx
je 0x401ece
mov eax, edx
push eax
call fcn.00402000
add esp, 4
test eax, eax
jbe 0x401ece
mov ecx, dword [esp + 0x430]
push ecx
push 0x104
push 0x40b3e8
lea edx, [esp + 0x28]
push 0x104
push edx
call fcn.00401f90
add esp, 0xc
push eax
call fcn.00401f90
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test eax, eax
je 0x401ece
cmp eax, 0xffffffff
je 0x401ece
test al, 0x10
je 0x401cb6
mov ecx, dword [esp + 0x430]
mov edx, dword [esp + 0x438]
mov eax, dword [esp + 0x434]
push ecx
push edx
push eax
call fcn.00401fb0
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x485
pop ebx
add esp, 0x41c
ret