Function at 0x414a50
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41fef7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x130
push ebp
push esi
push edi
push str.CEPUserProc::GetCurrentUserSID___n
mov esi, ecx
call fcn.00403770
xor ebp, ebp
add esp, 4
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], ebp
call fcn.00403d30
lea ecx, [esp + 0x18]
mov dword [esp + 0x144], ebp
call fcn.00403e70
test eax, eax
jne 0x414b72
push str.CEPUserProc::GetCurrentUserSID___Not_Terminal_Server_Mode_n
call fcn.00403770
add esp, 4
lea eax, [esp + 0xc]
push eax
push 0x20019
push ebp
push str.softwareMicrosoftWindows_NTCurrentVersionWinlogon
push 0x80000002
mov dword [esp + 0x20], ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebp
jne 0x414d49
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x34]
push edx
push ebp
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push str.DefaultUserName
push eax
mov dword [esp + 0x28], 0x104
call ebp
test eax, eax
jne 0x414b22
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esi + 8]
call fcn.004019c0
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x34]
push eax
push 0
push 0
push str.DefaultDomainName
push ecx
mov dword [esp + 0x28], 0x104
call ebp
test eax, eax
jne 0x414b62
lea edx, [esp + 0x30]
push edx
lea ecx, [esi + 0xc]
call fcn.004019c0
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x414d49
push str.CEPUserProc::GetCurrentUserSID___Terminal_Server_Mode_n
call fcn.00403770
add esp, 4
lea ecx, [esp + 0x18]
call fcn.00403d40
test eax, eax
je 0x414d49
push str.CEPUserProc::GetCurrentUserSID___WTSAPI_initialize_success_n
call fcn.00403770
push ebp
lea ecx, [esp + 0x2c]
push ecx
push ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x38], ebp
xor edi, edi
mov dword [esp + 0x34], ebp
call fcn.00410eb0
mov eax, dword [esp + 0x34]
add esp, 0x10
cmp eax, 5
lea ecx, [esp + 0x18]
jbe 0x414c60
call fcn.00404020
mov edi, eax
push edi
push str.CEPUserProc::GetCurrentUserSID___dwCurrentSessionId_Console__:__d_n
call fcn.00403770
add esp, 8
push 0x4202b4
lea ecx, [esp + 0x10]
call fcn.00402390
lea edx, [esp + 0xc]
push edx
push 5
push edi
lea eax, [esp + 0x24]
push eax
mov ecx, esi
mov byte [esp + 0x154], 1
call fcn.004149e0
test eax, eax
je 0x414c18
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esi + 8]
call fcn.00401940
push 0x4202b4
lea ecx, [esp + 0x14]
call fcn.00402390
lea edx, [esp + 0x10]
push edx
push 7
push edi
lea eax, [esp + 0x24]
push eax
mov ecx, esi
mov byte [esp + 0x154], 2
call fcn.004149e0
test eax, eax
je 0x414c53
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esi + 0xc]
call fcn.00401940
mov byte [esp + 0x144], 1
jmp 0x414d26
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x18]
push eax
push 4
push 0xffffffffffffffff
push ebp
call fcn.00403f90
mov ecx, dword [esp + 0x14]
cmp ecx, ebp
je 0x414d40
cmp eax, ebp
je 0x414c8c
cmp dword [esp + 0x28], ebp
jbe 0x414c8c
mov edi, dword [ecx]
push edi
push str.CEPUserProc::GetCurrentUserSID___dwCurrentSessionId_:__d_n
call fcn.00403770
mov ecx, dword [esp + 0x1c]
add esp, 8
push ecx
lea ecx, [esp + 0x1c]
call fcn.00403fe0
push 0x4202b4
lea ecx, [esp + 0x10]
call fcn.00402390
lea edx, [esp + 0xc]
push edx
push 5
push edi
lea eax, [esp + 0x24]
push eax
mov ecx, esi
mov byte [esp + 0x154], 3
call fcn.004149e0
test eax, eax
je 0x414ce3
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esi + 8]
call fcn.00401940
push 0x4202b4
lea ecx, [esp + 0x14]
call fcn.00402390
lea edx, [esp + 0x10]
push edx
push 7
push edi
lea eax, [esp + 0x24]
push eax
mov ecx, esi
mov byte [esp + 0x154], 4
call fcn.004149e0
test eax, eax
je 0x414d1e
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esi + 0xc]
call fcn.00401940
mov byte [esp + 0x144], 3
lea ecx, [esp + 0x10]
call fcn.00401910
lea ecx, [esp + 0xc]
mov byte [esp + 0x144], 0
call fcn.00401910
lea ecx, [esp + 0x18]
call fcn.00403d60
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
lea edi, [esi + 0xc]
add esi, 8
push edx
push eax
push str.CEPUserProc::GetCurrentUserSID___Target__UserName_:__s__DomainName_:__s_n
call fcn.00403770
add esp, 0xc
mov ecx, esi
call fcn.00401d50
test eax, eax
jne 0x414d82
mov ecx, edi
call fcn.00401d50
test eax, eax
jne 0x414d82
mov dword [esp + 0x2c], 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x144], 0xffffffff
call fcn.00403d60
mov ecx, dword [esp + 0x13c]
mov eax, dword [esp + 0x2c]
pop edi
mov dword fs:[0], ecx
pop esi
pop ebp
mov esp, ebp
pop ebp
ret