Function at 0x475a10
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2b8
mov eax, dword [0x5322a8]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
mov dword [ebp - 0x2a8], esi
mov dword [ebp - 0x2a0], eax
mov dword [ebp - 0x29c], edi
cmp dword [0x53d020], edi
jne 0x475c61
push 0x104
push 0x53d020
call dword [0x5393b0]
push 0x1fe
lea edx, [ebp - 0x28a]
xor ecx, ecx
push edi
push edx
mov dword [ebp - 0x2b0], pe_nt_image_headers32
mov word [ebp - 0x28c], cx
call fcn.004e7d90
add esp, 0x14
lea esi, [ebp - 0x2b0]
lea ebx, [ebp - 0x28c]
call fcn.004a9de0
push 0x7e
lea ecx, [ebp - 0x8a]
xor eax, eax
push edi
push ecx
mov dword [ebp - 0x294], edi
mov word [ebp - 0x8c], ax
call fcn.004e7d90
mov esi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
add esp, 0xc
push edi
lea edx, [ebp - 0x298]
push edx
push edi
lea eax, [ebp - 0x294]
push eax
push edi
mov ecx, ebx
push ecx
push edi
mov dword [ebp - 0x298], edi
call esi
mov edx, dword [ebp - 0x294]
push edx
call fcn.004e4240
mov edi, eax
mov eax, dword [ebp - 0x294]
add esp, 4
push eax
push 0
push edi
call fcn.004e7d90
mov eax, dword [ebp - 0x298]
xor ecx, ecx
add esp, 0xc
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004e4240
mov ebx, eax
mov eax, dword [ebp - 0x298]
add esp, 4
push eax
push 0
push ebx
mov dword [ebp - 0x2ac], ebx
call fcn.004e7d90
add esp, 0xc
lea ecx, [ebp - 0x2b4]
push ecx
lea edx, [ebp - 0x298]
push edx
push ebx
lea eax, [ebp - 0x294]
push eax
push edi
lea ecx, [ebp - 0x28c]
push ecx
push 0
call esi
cmp eax, 1
jne 0x475c49
push edi
call dword [sym.imp.ADVAPI32.dll_GetSidIdentifierAuthority]
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
movzx edx, byte [eax]
mov dword [ebp - 0x2a4], edx
push 1
push 0x51d608
lea edx, [ebp - 0x8c]
call fcn.00471490
lea eax, [ebp - 0x8c]
add esp, 8
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x475b96
movzx ecx, byte [esi + 2]
sub eax, edx
movzx edx, byte [esi + 3]
shl ecx, 8
add ecx, edx
movzx edx, byte [esi + 4]
shl ecx, 8
add ecx, edx
movzx edx, byte [esi + 5]
shl ecx, 8
add ecx, edx
sar eax, 1
push ecx
push 0x51d618
lea edx, [ebp + eax*2 - 0x8c]
call fcn.00471490
xor esi, esi
add esp, 8
cmp dword [ebp - 0x2a4], esi
jbe 0x475c2f
lea eax, [ebp - 0x8c]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x475bf0
sub eax, edx
push esi
sar eax, 1
push edi
mov ebx, eax
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov eax, dword [eax]
push eax
push str.__lu
lea edx, [ebp + ebx*2 - 0x8c]
call fcn.00471490
inc esi
add esp, 8
cmp esi, dword [ebp - 0x2a4]
jb 0x475be3
mov ebx, dword [ebp - 0x2ac]
mov edx, dword [0x53d020]
lea ecx, [ebp - 0x8c]
push ecx
push str._RECYCLE.BIN_s_
call fcn.00471490
add esp, 8
push edi
call fcn.004e424b
add esp, 4
push ebx
call fcn.004e424b
mov esi, dword [ebp - 0x2a8]
add esp, 4
lea edx, [ebp - 0x290]
push 0x208
push edx
mov ebx, esi
mov dword [ebp - 0x290], 0
call dword [0x5393b0]
add esp, 8
cmp word [esi], 0
je 0x475d69
lea eax, [ebp - 0x290]
push 0x208
push eax
call dword [0x5393b4]
push 0x3b
push ebx
call fcn.004e46a9
mov edx, dword [ebp - 0x290]
mov ebx, eax
mov ecx, ebx
sub ecx, esi
sar ecx, 1
push ecx
push esi
push edx
call fcn.004e4726
mov edx, dword [0x53d020]
mov eax, edx
add esp, 0x1c
lea esi, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x475cd0
sub eax, esi
sar eax, 1
push eax
mov eax, dword [ebp - 0x290]
push edx
add eax, 6
push eax
call fcn.004e4207
add esp, 0xc
test eax, eax
je 0x475d5a
mov eax, dword [ebp - 0x290]
mov edx, eax
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x475d00
mov edi, dword [ebp - 0x2a0]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x475d16
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x2a0]
add edi, 0xfffffffe
jmp 0x475d40
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x475d40
mov ecx, dword [0x51d580]
inc dword [ebp - 0x29c]
mov dword [edi], ecx
add ebx, 2
cmp word [ebx], 0
mov esi, ebx
jne 0x475c8c
lea edx, [ebp - 0x290]
push 0x208
push edx
call dword [0x5393b8]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x29c]
add esp, 8
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e3946
mov esp, ebp
pop ebp
ret