Function at 0x102c3f0
Capabilities:
Impersonate user

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x102c422
test byte [eax + 0x1c], 1
je 0x102c422
cmp byte [eax + 0x19], 4
jb 0x102c422
push 0x1004afc
push 0x1c
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01005393
push esi
mov esi, dword [ebp + 0x14]
push edi
xor edi, edi
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], edi
mov byte [ebp - 1], 0
mov byte [ebp - 2], 0
cmp esi, edi
jne 0x102c452
push 0x1004b78
push 0x1e3
push 0x1004b1c
call fcn.01028938
or dword [esi], 0xffffffff
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call fcn.0102c2f5
cmp eax, edi
mov dword [ebp + 8], eax
jl 0x102c603
mov esi, dword [sym.imp.ADVAPI32.dll_LogonUserW]
push ebx
lea eax, [ebp - 8]
push eax
push edi
push 8
push dword [ebp + 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
call esi
test eax, eax
jne 0x102c5d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, 0xffff
mov edi, 0x80070000
test eax, eax
jle 0x102c4a9
and eax, ebx
or eax, edi
mov dword [ebp + 8], eax
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x102c4d9
test byte [eax + 0x1c], 1
je 0x102c4d9
cmp byte [eax + 0x19], 2
jb 0x102c4d9
push dword [ebp + 8]
push 0x1004afc
push 0x1d
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010053b9
cmp dword [ebp + 8], 0x8007052e
je 0x102c4f8
cmp dword [ebp + 8], 0x8007051f
je 0x102c4f8
cmp dword [ebp + 8], 0x8007052f
jne 0x102c602
and dword [ebp + 8], 0
lea eax, [ebp - 8]
push eax
push 3
push 9
push dword [ebp + 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
call esi
test eax, eax
jne 0x102c562
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x102c521
and eax, ebx
or eax, edi
mov dword [ebp + 8], eax
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x102c602
test byte [eax + 0x1c], 1
je 0x102c602
cmp byte [eax + 0x19], 2
jb 0x102c602
push dword [ebp + 8]
push 0x1004afc
push 0x1e
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010053b9
jmp 0x102c602
cmp dword [ebp + 0x10], 0
je 0x102c5af
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x102c602
lea eax, [ebp - 1]
push eax
push dword [ebp + 0x10]
mov byte [ebp - 2], 1
call fcn.0102ce32
mov dword [ebp + 8], eax
test eax, eax
jge 0x102c5a0
cmp eax, 0x80070005
jne 0x102c5eb
mov dword [ebp + 8], 0x8078006f
jmp 0x102c5eb
cmp byte [ebp - 1], 0
je 0x102c5af
mov dword [ebp + 8], 0x8007052e
jmp 0x102c5eb
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x102c5d9
test byte [eax + 0x1c], 1
je 0x102c5d9
cmp byte [eax + 0x19], 4
jb 0x102c5d9
push 0x1004afc
push 0x1f
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01005393
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0x14]
or dword [ebp - 8], 0xffffffff
cmp byte [ebp - 2], 0
mov dword [ecx], eax
je 0x102c602
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
test eax, eax
jge 0x102c602
push 0
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_RaiseException]
pop ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xc]
mov esi, dword [sym.imp.ole32.dll_CoTaskMemFree]
or dword [ebp - 8], 0xffffffff
call esi
push dword [ebp - 0x10]
call esi
mov eax, dword [0x1032370]
pop edi
pop esi
cmp eax, 0x1032370
je 0x102c64c
test byte [eax + 0x1c], 1
je 0x102c64c
cmp byte [eax + 0x19], 4
jb 0x102c64c
push 0x1004afc
push 0x20
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01005393
mov eax, dword [ebp + 8]
leave
ret 0x10