Function at 0x413160
Capabilities:
Query or enumerate registry key

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x465f1c
push eax
mov dword fs:[0], esp
sub esp, 0x340
push ebx
push esi
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
jne 0x4131ac
call fcn.004021a3
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
mov dword fs:[0], ecx
add esp, 0x34c
ret
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.ConvertStringSidToSidA
push esi
call edi
cmp eax, ebx
jne 0x4131dc
call fcn.004021a3
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
mov dword fs:[0], ecx
add esp, 0x34c
ret
push ebp
push str.LookupAccountSidA
push esi
mov dword [esp + 0x40], eax
call edi
mov ebp, eax
cmp ebp, ebx
jne 0x4131f9
call fcn.004021a3
jmp 0x4133ee
mov dword [esp + 0x14], ebx
push 0x20019
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionProfileList_
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x20]
mov dword [esp + 0x364], ebx
call fcn.004022e5
test eax, eax
je 0x41323d
call fcn.004021a3
mov esi, eax
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x413236
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x4133ee
mov edi, dword [esp + 0x360]
xor esi, esi
lea eax, [esp + 0x3c]
push eax
mov eax, dword [esp + 0x18]
push ebx
push ebx
push ebx
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x15c]
push edx
push esi
push eax
mov dword [esp + 0x44], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x4133e0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x14c]
push edx
call dword [esp + 0x40]
test eax, eax
je 0x4133a5
mov eax, 0x104
mov dword [esp + 0x34], eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x254]
push edx
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x54]
push ecx
push edx
push ebx
call ebp
test eax, eax
je 0x41339a
cmp dword [esp + 0x30], 1
jne 0x41339a
push edi
lea ecx, [esp + 0x14]
call fcn.00409a7c
lea ecx, [esp + 0x10]
mov byte [esp + 0x358], 1
call fcn.00411c20
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x20]
call fcn.00409a7c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x358], 2
call fcn.00411c20
lea ecx, [esp + 0x24c]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00409a7c
lea ecx, [esp + 0x18]
mov byte [esp + 0x358], 3
call fcn.00411c20
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x413378
mov ecx, dword [esp + 0x10]
cmp dword [ecx - 0xc], ebx
jl 0x413378
push eax
push ecx
call fcn.0044b7cc
add esp, 8
cmp eax, ebx
je 0x413378
mov ecx, dword [esp + 0x10]
sub eax, ecx
js 0x413378
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x413378
cmp dword [ecx - 0xc], ebx
jl 0x413378
push eax
push ecx
call fcn.0044b7cc
add esp, 8
cmp eax, ebx
je 0x413378
sub eax, dword [esp + 0x10]
jns 0x4133ad
lea ecx, [esp + 0x18]
call fcn.00402073
lea ecx, [esp + 0x1c]
call fcn.00402073
lea ecx, [esp + 0x10]
mov byte [esp + 0x358], bl
call fcn.00402073
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
add esi, 1
jmp 0x413246
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea ecx, [esp + 0x18]
call fcn.00402073
lea ecx, [esp + 0x1c]
call fcn.00402073
lea ecx, [esp + 0x10]
call fcn.00402073
lea ecx, [esp + 0x14]
call fcn.00402895
xor eax, eax
jmp 0x4133ee
lea ecx, [esp + 0x14]
call fcn.00402895
mov eax, 1
mov ecx, dword [esp + 0x350]
pop ebp
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x34c
ret