Function at 0x416237
Capabilities:
Get user security identifier

Disassembly:
push ebp
lea ebp, [esp - 0x3fac]
mov eax, 0x402c
call fcn.0041d7b0
mov eax, dword [0x450970]
xor eax, ebp
mov dword [ebp + 0x3fa8], eax
mov eax, dword [ebp + 0x3fbc]
mov dword [ebp - 0x78], eax
xor eax, eax
push ebx
xor ebx, ebx
cmp byte [ebp + 0x3fc0], bl
push esi
mov esi, dword [ebp + 0x3fd8]
sete al
push edi
mov edi, dword [ebp + 0x3fb4]
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x70], ebx
dec eax
and eax, 3
inc eax
mov dword [ebp - 0x80], eax
cmp byte [ebp + 0x3fc4], bl
je 0x416298
mov dword [ebp - 0x70], 0x80000000
cmp byte [ebp + 0x3fc8], bl
je 0x4162a7
or dword [ebp - 0x70], 0x40000000
cmp byte [ebp + 0x3fcc], bl
je 0x4162b6
or dword [ebp - 0x70], 0x20000000
cmp byte [ebp + 0x3fd0], bl
je 0x4162c5
or dword [ebp - 0x70], 0x10000000
cmp dword [ebp + 0x3fd4], 3
mov dword [ebp - 0x6c], ebx
jne 0x41635f
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 0x74], eax
cmp eax, ebx
je 0x4163f6
push esi
push edi
call fcn.0041b8f7
pop ecx
pop ecx
push str.ConvertStringSidToSidW
push dword [ebp - 0x74]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x416353
lea ecx, [ebp - 0x6c]
push ecx
push edi
call eax
test eax, eax
jne 0x416353
mov esi, 0x2000
push esi
push 0x40
mov dword [ebp - 0x60], esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
lea ecx, [ebp - 0x68]
push ecx
lea ecx, [ebp - 0x74]
push ecx
lea ecx, [ebp - 0x58]
push ecx
lea ecx, [ebp - 0x60]
push ecx
push eax
push edi
push ebx
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x74], esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x416353
push dword [ebp - 0x6c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x6c], ebx
push edi
call fcn.0041d558
pop ecx
jmp 0x4163f6
xor eax, eax
cmp dword [ebp + 0x3fd4], 5
mov byte [ebp - 0x68], bl
mov byte [ebp - 0x67], bl
mov byte [ebp - 0x66], bl
mov byte [ebp - 0x65], bl
mov byte [ebp - 0x64], bl
mov byte [ebp - 0x63], 1
jne 0x4163a9
push 6
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x68]
push eax
mov byte [ebp - 0x60], bl
mov byte [ebp - 0x5f], bl
mov byte [ebp - 0x5e], bl
mov byte [ebp - 0x5d], bl
mov byte [ebp - 0x5c], bl
mov byte [ebp - 0x5b], 2
call fcn.0041ec60
add esp, 0xc
mov eax, 0x223
jmp 0x4163da
cmp dword [ebp + 0x3fd4], 1
jne 0x4163da
push 6
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x68]
push eax
mov byte [ebp - 0x60], bl
mov byte [ebp - 0x5f], bl
mov byte [ebp - 0x5e], bl
mov byte [ebp - 0x5d], bl
mov byte [ebp - 0x5c], bl
mov byte [ebp - 0x5b], 5
call fcn.0041ec60
add esp, 0xc
push 0xb
pop eax
lea ecx, [ebp - 0x6c]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
push 1
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x416449
cmp dword [ebp - 0x6c], ebx
je 0x416449
push dword [ebp - 0x78]
push dword [ebp - 0x7c]
call fcn.0041b8f7
push 3
push 1
push dword [ebp - 0x70]
mov esi, eax
push dword [ebp - 0x6c]
push dword [ebp - 0x80]
call fcn.0041614f
mov ebx, eax
neg ebx
sbb bl, bl
push esi
inc bl
call fcn.0041d558
add esp, 0x20
cmp dword [ebp + 0x3fd4], 3
push dword [ebp - 0x6c]
jne 0x41643f
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x416445
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov al, bl
jmp 0x41644b
xor al, al
mov ecx, dword [ebp + 0x3fa8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041d798
add ebp, 0x3fac
leave
ret 0x28