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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4149ac
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x12b0
call fcn.0040ccd0
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov dword [ebp], 0x41638c
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 [0x416534]
lea esi, [eax + 1]
push esi
mov byte [esp + 0x12d0], 1
mov dword [esp + 0x18], eax
call fcn.0040bb01
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, 0x416530
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x4166bc
mov ecx, eax
push ecx
push edx
mov dword [esp + 0x28], edx
call fcn.00408650
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 0x4022c0
sub eax, edi
push eax
push esi
lea ecx, [ebp + 4]
call fcn.00402070
push esi
call fcn.0040ccc9
movzx eax, byte [0x4167e8]
lea esi, [eax + 1]
push esi
mov dword [esp + 0x1c], eax
call fcn.0040bb01
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.vh7:
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x4166bc
mov ecx, eax
push ecx
push edx
mov dword [esp + 0x2c], edx
call fcn.00408650
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 0x402338
sub eax, edi
push eax
lea edi, [ebp + 0x20]
push esi
mov ecx, edi
call fcn.00402070
push esi
call fcn.0040ccc9
mov eax, dword [ebp + 0x1c]
mov esi, 0x10
add esp, 4
cmp eax, esi
jb 0x402367
mov eax, dword [ebp + 8]
jmp 0x40236a
lea eax, [ebp + 8]
mov dword [ebp + 0x3c], eax
cmp dword [edi + 0x18], esi
jb 0x402377
mov edi, dword [edi + 4]
jmp 0x40237a
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 0x402482
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 0x402482
lea eax, [esp + 0x2c0]
push eax
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x402482
lea ecx, [esp + 0x2c0]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, eax
push esi
call fcn.0040bb01
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