Function at 0x416105
Capabilities:
Get session user name
Get user security identifier

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc3c
mov eax, dword [0x425124]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0xc38], eax
xor eax, eax
mov dword [ebp - 0xc20], edi
mov esi, ecx
mov dword [ebp - 0xc14], eax
push 0x1fc
mov edx, 0x4028a0
mov dword [ebp - 0xc10], eax
lea ecx, [ebp - 0x800]
mov dword [ebp - 0xc1c], eax
mov dword [ebp - 0xc0c], eax
mov ebx, eax
mov dword [ebp - 0xc2c], eax
mov word [ebp - 0x800], ax
mov word [ebp - 0x208], ax
call fcn.0041bc68
mov ecx, esi
call fcn.0041bcfd
test eax, eax
je 0x4165b1
mov ecx, esi
call fcn.00416d4e
test eax, eax
jne 0x4165b1
test esi, esi
je 0x4161f2
movzx eax, word [esi]
mov ecx, esi
test ax, ax
je 0x4161e0
push 0x5c
mov edx, eax
pop edi
cmp dx, di
jne 0x4161b9
add ecx, 2
inc ebx
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x4161a6
mov edi, dword [ebp - 0xc20]
push 2
pop eax
cmp bx, ax
jne 0x4161db
push 0x1fc
mov edx, esi
lea ecx, [ebp - 0x800]
call fcn.0041bc68
jmp 0x4161f2
test bx, bx
jne 0x4161f2
push 0x1fc
mov edx, esi
lea ecx, [ebp - 0x800]
call fcn.0041bcc8
xor ebx, ebx
lea eax, [ebp - 0xa08]
mov ecx, 0x103
mov dword [ebp - 0xc20], ebx
mov dword [ebp - 0xc28], ebx
mov dword [ebp - 0xc24], ebx
mov dword [ebp - 0xc18], ebx
mov dword [ebp - 0xc30], ecx
mov byte [eax], bl
inc eax
sub ecx, 1
jne 0x41621d
mov ecx, edi
call fcn.0041bcfd
test eax, eax
jne 0x41626f
lea eax, [ebp - 0xc30]
push eax
lea eax, [ebp - 0xa08]
push eax
push 2
pop edi
push edi
call dword [sym.imp.SspiCli.dll_GetUserNameExW]
test al, al
jne 0x416269
push edi
call fcn.004208bb
pop ecx
mov edx, 0x10001
mov ecx, eax
call fcn.0041b108
mov eax, 0x80004005
jmp 0x41665d
lea edi, [ebp - 0xa08]
push 0x5c
pop eax
push eax
push ebx
push edi
call dword [sym.imp.api_ms_win_core_shlwapi_obsolete_l1_1_0.dll_StrRChrIW]
test eax, eax
je 0x416282
lea edi, [eax + 2]
lea eax, [ebp - 0xc34]
push eax
lea eax, [ebp - 0xc28]
push eax
push ebx
lea eax, [ebp - 0xc20]
push eax
push ebx
push edi
push esi
call dword [sym.imp.api_ms_win_security_lsalookup_l2_1_0.dll_LookupAccountNameW]
cmp eax, 1
je 0x4162c9
mov ecx, dword [ebp - 0xc20]
test ecx, ecx
je 0x4162c9
call fcn.0041c508
mov ebx, eax
mov dword [ebp - 0xc18], ebx
test ebx, ebx
jne 0x4162d2
push 0xe
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
push 2
pop eax
push eax
jmp 0x41624d
mov eax, dword [ebp - 0xc28]
lea ecx, [eax + eax]
call fcn.0041c508
mov dword [ebp - 0xc24], eax
test eax, eax
jne 0x416318
push 0xe
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
push 2
pop eax
push eax
call fcn.004208bb
pop ecx
mov edx, 0x10001
mov ecx, eax
call fcn.0041b108
lea ecx, [ebp - 0xc18]
call fcn.0041c464
jmp 0x41625f
lea ecx, [ebp - 0xc34]
push ecx
lea ecx, [ebp - 0xc28]
push ecx
push eax
lea eax, [ebp - 0xc20]
push eax
push ebx
push edi
push esi
call dword [sym.imp.api_ms_win_security_lsalookup_l2_1_0.dll_LookupAccountNameW]
test eax, eax
jne 0x416364
push 2
pop eax
push eax
call fcn.004208bb
pop ecx
mov edx, 0x10001
mov ecx, eax
call fcn.0041b108
lea ecx, [ebp - 0xc18]
call fcn.0041c464
lea ecx, [ebp - 0xc24]
jmp 0x41630e
lea edx, [ebp - 0xc08]
mov ecx, ebx
call fcn.004166e5
test eax, eax
je 0x41633b
lea ecx, [ebp - 0xc18]
call fcn.0041c464
lea ecx, [ebp - 0xc24]
call fcn.0041c464
mov esi, 0xfe
lea edx, [ebp - 0xc08]
push esi
lea ecx, [ebp - 0x208]
call fcn.0041bc68
push esi
mov edx, 0x40217c
lea ecx, [ebp - 0x208]
call fcn.0041bcc8
mov ebx, 0x4029f8
lea ecx, [ebp - 0x208]
push esi
mov edx, ebx
call fcn.0041bcc8
lea eax, [ebp - 0xc10]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
lea eax, [ebp - 0x800]
push eax
call dword [sym.imp.api_ms_win_core_registry_l2_1_0.dll_RegConnectRegistryW]
mov esi, eax
test esi, esi
je 0x41642e
lea eax, [ebp - 0x800]
mov ecx, 0x9dc
push eax
call fcn.0041b2d7
push eax
lea eax, [ebp - 0x408]
push 0x100
push eax
call fcn.0040719d
push 2
pop ebx
push ebx
call fcn.004208bb
add esp, 0x14
lea edx, [ebp - 0x408]
mov ecx, eax
call fcn.0041bd93
push esi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
push ebx
jmp 0x41624d
lea eax, [ebp - 0xc1c]
push eax
push SysStringLen
lea eax, [ebp - 0x800]
push eax
call dword [sym.imp.api_ms_win_core_registry_l2_1_0.dll_RegConnectRegistryW]
mov edi, eax
test edi, edi
je 0x41648c
lea eax, [ebp - 0x800]
mov ecx, 0x9dc
push eax
call fcn.0041b2d7
push eax
lea eax, [ebp - 0x408]
push 0x100
push eax
call fcn.0040719d
push 2
pop ebx
push ebx
call fcn.004208bb
add esp, 0x14
lea edx, [ebp - 0x408]
mov ecx, eax
call fcn.0041bd93
push edi
jmp 0x416422
mov eax, dword [ebp - 0xc10]
test eax, eax
je 0x4164e1
lea ecx, [ebp - 0xc0c]
mov esi, 0x20019
push ecx
push esi
push 0
push ebx
push eax
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov ecx, dword [ebp - 0xc0c]
mov edi, eax
test ecx, ecx
jne 0x4164ef
mov eax, dword [ebp - 0xc1c]
test eax, eax
je 0x416585
lea ecx, [ebp - 0xc0c]
push ecx
push esi
push 0
lea ecx, [ebp - 0x208]
push ecx
push eax
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov edi, eax
mov ecx, dword [ebp - 0xc0c]
test ecx, ecx
je 0x416585
lea eax, [ebp - 0xc2c]
push eax
call fcn.0041666e
test eax, eax
jne 0x416569
push edi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
push 2
pop eax
push eax
call fcn.004208bb
pop ecx
mov edx, 0x10001
mov ecx, eax
call fcn.0041b108
push dword [ebp - 0xc0c]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
and dword [ebp - 0xc0c], 0
cmp dword [ebp - 0xc10], 0
je 0x41654b
push dword [ebp - 0xc10]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
and dword [ebp - 0xc10], 0
cmp dword [ebp - 0xc1c], 0
je 0x41625f
push dword [ebp - 0xc1c]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
jmp 0x41625f
cmp dword [ebp - 0xc0c], 0
je 0x416585
push dword [ebp - 0xc0c]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
and dword [ebp - 0xc0c], 0
mov eax, dword [ebp - 0xc10]
test eax, eax
je 0x41659d
push eax
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
and dword [ebp - 0xc10], 0
mov eax, dword [ebp - 0xc1c]
test eax, eax
je 0x41664d
push eax
jmp 0x416647
lea eax, [ebp - 0xc14]
mov esi, 0x20019
push eax
push esi
push 0
mov ebx, 0x4029f8
push ebx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov edi, eax
test edi, edi
je 0x4165f8
mov ecx, dword [ebp - 0xc14]
test ecx, ecx
jne 0x416602
lea eax, [ebp - 0xc14]
push eax
push esi
push ecx
push ebx
push SysReAllocString
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov edi, eax
mov ecx, dword [ebp - 0xc14]
test ecx, ecx
je 0x41664d
lea eax, [ebp - 0xc2c]
push eax
call fcn.0041666e
test eax, eax
jne 0x416638
push edi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
push 2
call fcn.004208bb
pop ecx
mov edx, 0x10001
mov ecx, eax
call fcn.0041b108
push dword [ebp - 0xc14]
jmp 0x41655e
cmp dword [ebp - 0xc14], 0
je 0x41664d
push dword [ebp - 0xc14]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc38]
mov eax, dword [ebp - 0xc2c]
mov dword [ecx], eax
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004201e0
leave
ret 8