Function at 0x401080
Capabilities:
Access peb ldr_data
Get ntdll base address
Get session user name
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41169b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1aac
call fcn.004076f0
push ebx
xor ebx, ebx
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0xc]
mov dword [esi], 0x4132e4
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], 1
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
call fcn.00405b5e
mov byte [esp + 0x2b8], bl
xor eax, eax
mov ecx, 0xff
lea edi, [esp + 0x2b9]
rep stosd dword es:[edi], eax
mov cl, byte [0x4132c4]
stosw word es:[edi], ax
push 0x4132d0
stosb byte es:[edi], al
mov eax, dword [0x4132c0]
push 5
lea edx, [esp + 0x2c0]
mov byte [esp + 0x2c4], cl
push edx
lea ecx, [esp + 0x18]
mov dword [esp + 0x1ad0], ebx
mov dword [esp + 0x2c4], eax
call fcn.00405b6e
mov byte [esp + 0x6b8], bl
xor eax, eax
mov ecx, 0xff
lea edi, [esp + 0x6b9]
rep stosd dword es:[edi], eax
mov cl, byte [0x4132cc]
stosw word es:[edi], ax
push 0x4132d0
stosb byte es:[edi], al
mov eax, dword [0x4132c8]
push 5
lea edx, [esp + 0x6c0]
mov byte [esp + 0x6c4], cl
push edx
lea ecx, [esp + 0x18]
mov dword [esp + 0x6c4], eax
call fcn.00405b6e
lea edx, [esp + 0x20]
lea eax, [esp + 0x2b8]
lea ecx, [esp + 0x6b8]
push edx
mov dword [esi + 4], eax
mov dword [esi + 8], ecx
mov dword [esp + 0x24], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esp + 0x30]
xor eax, eax
cmp ecx, 2
sete al
mov dword [0x4182c4], esi
mov dword [esi + 0x40], eax
mov dword [0x4182c0], 1
mov eax, dword [esi + 0x40]
mov dword [esi + 0x18], 0x10
mov dword [esi + 0x28], ebx
cmp eax, ebx
je 0x4012bc
mov eax, 0xff
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], eax
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0xb8]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x1b8]
rep stosd dword es:[edi], eax
mov ecx, 0x400
lea edi, [esp + 0xab8]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0xbc]
push edx
mov dword [esp + 0x1c], 0x1000
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1c0]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0xac8]
push ecx
lea edx, [esp + 0xcc]
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
je 0x4012bc
lea eax, [esp + 0xab8]
push eax
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x4012bc
lea ecx, [esp + 0xab8]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edi, eax
push edi
call fcn.004076e2
add esp, 4
lea edx, [esp + 0xab8]
push edx
push eax
push edi
mov dword [esi + 0x3c], eax
call dword [sym.imp.ADVAPI32.dll_CopySid]
lea ecx, [esp + 0xc]
mov dword [esp + 0x1ac4], 0xffffffff
call fcn.00405b67
mov ecx, dword [esp + 0x1abc]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret