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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41477c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x12b0
call fcn.0040caa0
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov dword [ebp], 0x416374
xor ebx, ebx
mov eax, 0xf
mov dword [ebp + 0x1c], eax
mov dword [ebp + 0x18], ebx
mov dword [esp + 0x24], ebp
mov byte [ebp + 8], bl
mov dword [ebp + 0x38], eax
mov dword [ebp + 0x34], ebx
mov dword [esp + 0x12cc], ebx
mov byte [ebp + 0x24], bl
mov eax, 1
mov dword [ebp + 0x44], ebx
mov dword [ebp + 0x48], ebx
mov dword [ebp + 0x4c], ebx
mov dword [ebp + 0x6c], ebx
mov dword [ebp + 0x70], eax
mov dword [ebp + 0x74], ebx
mov dword [ebp + 0x7c], ebx
mov dword [ebp + 0x80], 0xf01ff
mov dword [ebp + 0x84], 0x10
mov dword [ebp + 0x88], 2
mov dword [ebp + 0x8c], eax
mov dword [ebp + 0x90], ebx
mov dword [ebp + 0x94], ebx
mov dword [ebp + 0x98], ebx
mov dword [ebp + 0x9c], ebx
mov dword [ebp + 0xa0], ebx
movzx eax, byte [0x416525]
lea esi, [eax + 1]
push esi
mov byte [esp + 0x12d0], 1
mov dword [esp + 0x18], eax
call fcn.0040b8d1
mov edx, eax
mov ecx, esi
shr ecx, 2
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x18]
mov eax, ecx
shr ecx, 2
mov edi, edx
mov esi, 0x416520
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x4166ac
mov ecx, eax
push ecx
push edx
mov dword [esp + 0x28], edx
call fcn.00408400
mov esi, dword [esp + 0x28]
mov eax, esi
add esp, 0x10
lea edi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402220
sub eax, edi
push eax
push esi
lea ecx, [ebp + 4]
call fcn.00401fd0
push esi
call fcn.0040ca99
movzx eax, byte [0x4167d9]
lea esi, [eax + 1]
push esi
mov dword [esp + 0x1c], eax
call fcn.0040b8d1
mov edx, eax
mov ecx, esi
shr ecx, 2
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x1c]
mov eax, ecx
shr ecx, 2
mov edi, edx
mov esi, str.vhmsw
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x4166ac
mov ecx, eax
push ecx
push edx
mov dword [esp + 0x2c], edx
call fcn.00408400
mov esi, dword [esp + 0x2c]
mov eax, esi
add esp, 0x14
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402298
sub eax, edi
push eax
lea edi, [ebp + 0x20]
push esi
mov ecx, edi
call fcn.00401fd0
push esi
call fcn.0040ca99
mov eax, dword [ebp + 0x1c]
mov esi, 0x10
add esp, 4
cmp eax, esi
jb 0x4022c7
mov eax, dword [ebp + 8]
jmp 0x4022ca
lea eax, [ebp + 8]
mov dword [ebp + 0x3c], eax
cmp dword [edi + 0x18], esi
jb 0x4022d7
mov edi, dword [edi + 4]
jmp 0x4022da
add edi, 4
lea edx, [esp + 0x28]
push edx
mov dword [ebp + 0x40], edi
mov dword [esp + 0x2c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esp + 0x38]
xor eax, eax
cmp ecx, 2
sete al
mov dword [0x41ad04], ebp
mov dword [ebp + 0x78], eax
mov dword [0x41ad00], 1
cmp dword [ebp + 0x78], ebx
mov dword [ebp + 0x50], esi
mov dword [ebp + 0x60], ebx
je 0x4023e2
mov eax, 0xff
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0xc0]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x1c0]
rep stosd dword es:[edi], eax
mov ecx, 0x400
lea edi, [esp + 0x2c0]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0xc4]
push edx
mov dword [esp + 0x24], 0x1000
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x1c8]
push edx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x2d0]
push ecx
lea edx, [esp + 0xd4]
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
je 0x4023e2
lea eax, [esp + 0x2c0]
push eax
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x4023e2
lea ecx, [esp + 0x2c0]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, eax
push esi
call fcn.0040b8d1
add esp, 4
lea edx, [esp + 0x2c0]
push edx
push eax
push esi
mov dword [ebp + 0x74], eax
call dword [sym.imp.ADVAPI32.dll_CopySid]
mov ecx, dword [esp + 0x12c4]
pop edi
mov eax, ebp
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret