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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x434
push ebx
push esi
push edi
lea eax, [ebp - 0x20]
mov dword [ebp - 0x28], ecx
push eax
lea eax, [ebp - 0x330]
mov dword [ebp - 0x20], 0xff
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea eax, [ebp - 0x2c]
mov dword [ebp - 4], 0xff
push eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0xff
push eax
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x330]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSidIdentifierAuthority]
sub esp, 0x18
mov edi, eax
mov ecx, esp
push 0x440538
call fcn.004147b0
lea ecx, [ebp - 0x1c]
call fcn.00402fb0
add esp, 0x18
cmp dword [eax + 0x14], 0x10
jb 0x403a1f
mov eax, dword [eax]
push 1
push eax
lea eax, [ebp - 0x130]
push eax
call fcn.004021b0
mov edx, dword [ebp - 8]
add esp, 0xc
mov dword [ebp - 4], eax
cmp edx, 0x10
jb 0x403a68
mov ecx, dword [ebp - 0x1c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x403a5e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403c2e
push edx
push ecx
call fcn.00415fcc
add esp, 8
lea esi, [ebp - 0x130]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x403a71
sub esp, 0x18
sub esi, ecx
mov ecx, esp
push 0x440220
call fcn.004147b0
lea ecx, [ebp - 0x1c]
call fcn.00402fb0
add esp, 0x18
cmp dword [eax + 0x14], 0x10
jb 0x403a9c
mov eax, dword [eax]
movzx ecx, byte [edi + 5]
push ecx
push eax
lea eax, [ebp - 0x130]
add eax, esi
push eax
call fcn.004021b0
add dword [ebp - 4], eax
add esp, 0xc
mov edx, dword [ebp - 8]
cmp edx, 0x10
jb 0x403aea
mov ecx, dword [ebp - 0x1c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x403ae0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403c33
push edx
push ecx
call fcn.00415fcc
add esp, 8
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
xor edi, edi
movzx ebx, byte [eax]
test ebx, ebx
je 0x403b8d
sub esp, 0x18
mov ecx, esp
push 0x43f9e0
call fcn.004147b0
lea ecx, [ebp - 0x1c]
call fcn.00402fb0
mov esi, eax
add esp, 0x18
cmp dword [esi + 0x14], 0x10
jb 0x403b28
mov esi, dword [esi]
push edi
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
lea ecx, [ebp - 0x130]
push dword [eax]
mov eax, dword [ebp - 4]
add eax, ecx
push esi
push eax
call fcn.004021b0
add dword [ebp - 4], eax
add esp, 0xc
mov edx, dword [ebp - 8]
cmp edx, 0x10
jb 0x403b84
mov ecx, dword [ebp - 0x1c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x403b7a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403c2e
push edx
push ecx
call fcn.00415fcc
add esp, 8
inc edi
cmp edi, ebx
jl 0x403b04
lea ecx, [ebp - 0x130]
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0xf
lea edx, [ecx + 1]
mov byte [ebp - 0x1c], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403ba8
sub ecx, edx
lea eax, [ebp - 0x130]
push ecx
push eax
lea ecx, [ebp - 0x1c]
call fcn.00414b30
mov ebx, dword [ebp - 0x28]
lea eax, [ebp - 0x1c]
mov ecx, 0x28
cmp dword [ebp - 0xc], ecx
cmovb ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], 0x10
push ecx
cmovae eax, dword [ebp - 0x1c]
mov ecx, ebx
push eax
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0xf
mov byte [ebx], 0
call fcn.00414b30
mov edx, dword [ebp - 8]
cmp edx, 0x10
jb 0x403c25
mov ecx, dword [ebp - 0x1c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x403c1b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403c38
push edx
push ecx
call fcn.00415fcc
add esp, 8
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0041bb2d
call fcn.0041bb2d
call fcn.0041bb2d
int3