Function at 0x402120
Capabilities:
Get user security identifier

Disassembly:
sub esp, 0xbc
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], 0
push 0x400
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x40
mov dword [esp + 0x18], 0x400
call edi
mov ebx, eax
push 0x400
push 0x40
mov dword [esp + 0x28], ebx
call edi
mov ebp, eax
push 0x400
push 0x40
mov dword [esp + 0x2c], ebp
call edi
push 0x400
push 0x40
mov dword [esp + 0x24], eax
call edi
mov dword [esp + 0x18], eax
lea eax, [esi + 4]
push eax
lea ecx, [esp + 0x50]
push str._s
push ecx
call fcn.00406c3a
mov edx, dword [esp + 0x28]
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x10]
push edx
push eax
push ebp
push ecx
push ebx
lea edx, [esp + 0x60]
push str.guest
push edx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
je 0x40246b
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSidIdentifierAuthority]
push ebx
mov dword [esp + 0x2c], eax
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
xor ecx, ecx
xor edi, edi
mov cl, byte [eax]
mov ebp, ecx
test ebp, ebp
jle 0x402204
lea ebx, [esp + 0x2c]
mov edx, dword [esp + 0x20]
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov eax, dword [eax]
inc edi
mov dword [ebx], eax
add ebx, 4
cmp edi, ebp
jl 0x4021e8
mov ebx, dword [esp + 0x20]
xor edi, edi
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
lea ecx, [esp + 0x14]
mov dword [esp + 0x10], 0x400
push ecx
mov ecx, dword [esp + 0x44]
push edx
push eax
mov eax, dword [esp + 0x44]
lea edx, [edi + 0x1f4]
push ecx
mov ecx, dword [esp + 0x44]
push edx
mov edx, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x44]
push edx
push eax
push ebp
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x40246b
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x10]
push edx
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x20]
push edx
push eax
lea edx, [esp + 0x60]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidA]
test eax, eax
je 0x402310
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x458]
push 0x3f
push eax
push ecx
call fcn.00406980
mov edx, dword [esi + 0x458]
push 0x1f
add edx, 0x40
push str.Unknow
push edx
call fcn.00406980
mov ecx, dword [esi + 0x450]
add esp, 0x18
inc ecx
mov eax, ecx
mov dword [esi + 0x450], ecx
cmp eax, 1
jne 0x4022d0
mov eax, dword [esi + 0x458]
mov dword [esi + 0x454], eax
jmp 0x4022df
mov ecx, dword [esi + 0x45c]
mov edx, dword [esi + 0x458]
mov dword [ecx + 0x60], edx
mov eax, dword [esi + 0x458]
push 0x64
mov dword [esi + 0x45c], eax
call fcn.00406bae
mov ecx, dword [esp + 0x18]
add esp, 4
mov dword [esi + 0x458], eax
push ecx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
inc edi
cmp edi, 0x20
jl 0x402206
xor ebx, ebx
mov edx, dword [esp + 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_FreeSid]
push edx
call edi
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x44]
lea eax, [esp + 0x14]
mov dword [esp + 0x10], 0x400
push eax
mov eax, dword [esp + 0x44]
push ecx
push edx
mov edx, dword [esp + 0x44]
lea ecx, [ebx + 0x3e8]
push eax
mov eax, dword [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x44]
push edx
mov edx, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x44]
push ecx
push edx
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x40241d
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x10]
push ecx
push edx
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x18]
push eax
mov eax, dword [esp + 0x20]
push ecx
push edx
lea ecx, [esp + 0x60]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidA]
test eax, eax
je 0x402410
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 0x458]
push 0x3f
push edx
push eax
call fcn.00406980
mov ecx, dword [esi + 0x458]
push 0x1f
add ecx, 0x40
push str.Unknow
push ecx
call fcn.00406980
mov ecx, dword [esi + 0x450]
add esp, 0x18
inc ecx
mov eax, ecx
mov dword [esi + 0x450], ecx
cmp eax, 1
jne 0x4023e5
mov edx, dword [esi + 0x458]
mov dword [esi + 0x454], edx
jmp 0x4023f4
mov eax, dword [esi + 0x45c]
mov ecx, dword [esi + 0x458]
mov dword [eax + 0x60], ecx
mov edx, dword [esi + 0x458]
push 0x64
mov dword [esi + 0x45c], edx
call fcn.00406bae
add esp, 4
mov dword [esi + 0x458], eax
inc ebx
cmp ebx, 0x80
jl 0x402312
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
push eax
call edi
push ebx
call edi
mov ecx, dword [esp + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
push ecx
call edi
mov edx, dword [esp + 0x1c]
push edx
call edi
mov eax, dword [esi + 0x45c]
mov dword [eax + 0x60], 0
mov eax, dword [esi + 0x450]
cmp eax, 1
jl 0x402473
mov byte [esi + 0x444], 1
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xbc
ret
mov edi, dword [sym.imp.ADVAPI32.dll_FreeSid]
jmp 0x402421
mov byte [esi + 0x444], 0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xbc
ret