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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x129c
call fcn.004035c0
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp dword [ebp + 0xc], ebx
mov dword [esi + 4], eax
je 0x401028
mov eax, dword [ebp + 0xc]
push 0x24
mov dword [esi + 8], eax
pop ecx
xor eax, eax
lea edi, [ebp - 0x98]
mov dword [ebp - 0x9c], 0x94
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x9c]
mov dword [esi + 0xc], ebx
push eax
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], 7
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x44], ebx
mov dword [esi + 0x48], 0xf01ff
mov dword [esi + 0x4c], 0x10
mov dword [esi + 0x50], 2
mov dword [esi + 0x54], 1
mov dword [esi + 0x58], ebx
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x60], ebx
mov dword [esi + 0x64], ebx
mov dword [esi + 0x68], ebx
mov dword [esi], 0x4847cc
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x70], ebx
mov dword [esi + 0x74], ebx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
xor eax, eax
cmp dword [ebp - 0x8c], 2
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 1
sete al
mov dword [esi + 0x40], eax
pop eax
push ebx
push ebx
push eax
mov dword [0x497fa0], eax
mov dword [0x497fa4], esi
push ebx
mov dword [esi + 0x18], 0x10
mov dword [esi + 0x28], ebx
call edi
mov ecx, dword [0x497fa4]
push ebx
push ebx
push 1
push ebx
mov dword [ecx + 0x6c], eax
call edi
mov ecx, dword [0x497fa4]
push ebx
push ebx
push 1
push ebx
mov dword [ecx + 0x70], eax
call edi
mov ecx, dword [0x497fa4]
mov dword [ecx + 0x74], eax
mov eax, dword [0x497fa4]
cmp dword [eax + 0x6c], ebx
je 0x401227
cmp dword [eax + 0x70], ebx
je 0x401227
cmp dword [eax + 0x74], ebx
je 0x401227
cmp dword [esi + 0x40], ebx
je 0x401227
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x129b]
mov byte [ebp - 0x129c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x3f
xor eax, eax
pop ecx
lea edi, [ebp - 0x19b]
mov byte [ebp - 0x19c], bl
push 0x3f
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x29b]
mov byte [ebp - 0x29c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, 0x100
lea eax, [ebp - 0x19c]
push edi
mov edx, 0xff
push ebx
push eax
mov dword [ebp + 0xc], 0x1000
mov dword [ebp + 8], edx
mov dword [ebp - 4], edx
call fcn.00403560
push edi
lea eax, [ebp - 0x29c]
push ebx
push eax
call fcn.00403560
push dword [ebp + 0xc]
lea eax, [ebp - 0x129c]
push ebx
push eax
call fcn.00403560
add esp, 0x24
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x19c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x29c]
push eax
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x129c]
push eax
lea eax, [ebp - 0x19c]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
je 0x401227
lea eax, [ebp - 0x129c]
push eax
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x401227
lea eax, [ebp - 0x129c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edi, eax
push edi
call fcn.0047310d
pop ecx
mov dword [esi + 0x3c], eax
lea ecx, [ebp - 0x129c]
push ecx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CopySid]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 8