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

Disassembly:
mov eax, 0x12a4
call fcn.00403d50
mov eax, dword [esp + 0x12a8]
push ebx
push esi
mov esi, ecx
mov ecx, dword [esp + 0x12b4]
xor ebx, ebx
cmp ecx, ebx
push edi
mov dword [esi + 4], eax
je 0x401038
mov eax, ecx
mov dword [esi + 8], eax
mov ecx, 0x24
xor eax, eax
lea edi, [esp + 0x20]
mov dword [esp + 0x1c], 0x94
mov dword [esi + 0xc], ebx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
mov dword [esi + 0x10], ebx
push eax
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], 0x40a1b0
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x70], ebx
mov dword [esi + 0x74], ebx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov edx, dword [esp + 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
xor ecx, ecx
cmp edx, 2
sete cl
push ebx
push ebx
mov dword [esi + 0x40], ecx
push 1
mov dword [0x40ed38], 1
mov dword [0x40ed3c], esi
push ebx
mov dword [esi + 0x18], 0x10
mov dword [esi + 0x28], ebx
call edi
mov edx, dword [0x40ed3c]
push ebx
push ebx
push 1
push ebx
mov dword [edx + 0x6c], eax
call edi
mov ecx, dword [0x40ed3c]
push ebx
push ebx
push 1
push ebx
mov dword [ecx + 0x70], eax
call edi
mov edx, dword [0x40ed3c]
mov dword [edx + 0x74], eax
mov eax, dword [0x40ed3c]
cmp dword [eax + 0x6c], ebx
je 0x401248
cmp dword [eax + 0x70], ebx
je 0x401248
cmp dword [eax + 0x74], ebx
je 0x401248
cmp dword [esi + 0x40], ebx
je 0x401248
mov ecx, 0x3ff
xor eax, eax
lea edi, [esp + 0x2b1]
mov byte [esp + 0x2b0], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0xb1]
mov byte [esp + 0xb0], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x1b1]
mov byte [esp + 0x1b0], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xb0]
mov edx, 0xff
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x1b0]
rep stosd dword es:[edi], eax
mov ecx, 0x400
lea edi, [esp + 0x2b0]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
lea ecx, [esp + 0xb0]
push eax
push ecx
mov dword [esp + 0x1c], 0x1000
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], edx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea edx, [esp + 0x18]
lea eax, [esp + 0xc]
push edx
lea ecx, [esp + 0x1b4]
push eax
lea edx, [esp + 0x1c]
push ecx
lea eax, [esp + 0x2bc]
push edx
lea ecx, [esp + 0xc0]
push eax
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
je 0x401248
lea edx, [esp + 0x2b0]
push edx
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x401248
lea eax, [esp + 0x2b0]
push eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edi, eax
push edi
call fcn.00403d39
add esp, 4
lea ecx, [esp + 0x2b0]
mov dword [esi + 0x3c], eax
push ecx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CopySid]
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x12a4
ret 8