Function at 0x1008220
Capabilities:
Get inbound credentials handle via credssp

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2ac
mov eax, dword [0x1012854]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24c], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov dword [ebp - 0x234], eax
mov eax, dword [ebp + 0x10]
mov esi, dword [eax + 8]
xor ebx, ebx
cmp edx, ebx
mov dword [ebp - 0x214], esi
mov esi, dword [eax + 0xc]
mov eax, dword [eax + 4]
push edi
mov edi, dword [ecx + 0xc]
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x210], esi
mov esi, dword [sym.imp.msvcrt.dll_wcslen]
mov dword [ebp - 0x22c], edx
mov dword [ebp - 0x20c], edi
mov dword [ebp - 0x224], ecx
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x208], ebx
mov dword [ebp - 0x220], ebx
jne 0x10082b2
cmp edi, ebx
jne 0x10082bf
cmp ecx, ebx
jne 0x10082bf
push 2
pop edi
jmp 0x10083c6
push edx
call esi
inc eax
pop ecx
mov dword [ebp - 0x208], eax
jmp 0x10082c5
mov dword [ebp - 0x208], ebx
cmp edi, ebx
je 0x10082d2
push edi
call esi
mov edi, eax
pop ecx
inc edi
jmp 0x10082d4
xor edi, edi
cmp dword [ebp - 0x224], ebx
je 0x10082e8
push dword [ebp - 0x224]
call esi
pop ecx
inc eax
jmp 0x10082ea
xor eax, eax
add eax, edi
add eax, dword [ebp - 0x208]
lea eax, [eax + eax + 0x2c]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [ebp - 0x208], eax
je 0x1008447
cmp dword [ebp - 0x22c], ebx
mov dword [eax], 0x200
lea edi, [eax + 0x2c]
je 0x100834e
push dword [ebp - 0x22c]
call esi
mov ecx, dword [ebp - 0x208]
push dword [ebp - 0x22c]
mov dword [ecx + 0xc], eax
push edi
mov dword [ecx + 8], edi
call dword [sym.imp.msvcrt.dll_wcscpy]
push dword [ebp - 0x22c]
call esi
add esp, 0x10
lea edi, [edi + eax*2 + 2]
cmp dword [ebp - 0x20c], ebx
je 0x1008386
push dword [ebp - 0x20c]
call esi
mov ecx, dword [ebp - 0x208]
push dword [ebp - 0x20c]
mov dword [ecx + 0x14], eax
push edi
mov dword [ecx + 0x10], edi
call dword [sym.imp.msvcrt.dll_wcscpy]
push dword [ebp - 0x20c]
call esi
add esp, 0x10
lea edi, [edi + eax*2 + 2]
cmp dword [ebp - 0x224], ebx
je 0x10083ba
push dword [ebp - 0x224]
call esi
mov ecx, dword [ebp - 0x208]
push dword [ebp - 0x224]
mov dword [ecx + 0x1c], eax
push edi
mov dword [ecx + 0x18], edi
call dword [sym.imp.msvcrt.dll_wcscpy]
push dword [ebp - 0x224]
call esi
add esp, 0x10
mov eax, dword [ebp - 0x208]
push 2
pop edi
mov dword [eax + 0x20], edi
cmp dword [ebp - 0x214], ebx
jne 0x10083fe
cmp dword [ebp - 0x210], ebx
jne 0x10083e2
cmp dword [ebp - 0x218], ebx
je 0x1008505
mov dword [ebp - 0x20c], ebx
cmp dword [ebp - 0x210], ebx
je 0x1008410
push dword [ebp - 0x210]
call esi
mov edi, eax
pop ecx
inc edi
jmp 0x1008412
push dword [ebp - 0x214]
call esi
inc eax
pop ecx
mov dword [ebp - 0x20c], eax
jmp 0x10083e8
xor edi, edi
cmp dword [ebp - 0x218], ebx
je 0x1008426
push dword [ebp - 0x218]
call esi
pop ecx
inc eax
jmp 0x1008428
xor eax, eax
add eax, edi
add eax, dword [ebp - 0x20c]
lea eax, [eax + eax + 0x1c]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [ebp - 0x220], eax
jne 0x100844f
push 8
pop eax
jmp 0x10088a8
cmp dword [ebp - 0x214], ebx
lea edi, [eax + 0x1c]
je 0x1008489
push dword [ebp - 0x214]
call esi
mov ecx, dword [ebp - 0x220]
push dword [ebp - 0x214]
mov dword [ecx + 4], eax
push edi
mov dword [ecx], edi
call dword [sym.imp.msvcrt.dll_wcscpy]
push dword [ebp - 0x214]
call esi
add esp, 0x10
lea edi, [edi + eax*2 + 2]
cmp dword [ebp - 0x210], ebx
je 0x10084c1
push dword [ebp - 0x210]
call esi
mov ecx, dword [ebp - 0x220]
push dword [ebp - 0x210]
mov dword [ecx + 0xc], eax
push edi
mov dword [ecx + 8], edi
call dword [sym.imp.msvcrt.dll_wcscpy]
push dword [ebp - 0x210]
call esi
add esp, 0x10
lea edi, [edi + eax*2 + 2]
cmp dword [ebp - 0x218], ebx
je 0x10084f5
push dword [ebp - 0x218]
call esi
mov ecx, dword [ebp - 0x220]
push dword [ebp - 0x218]
mov dword [ecx + 0x14], eax
push edi
mov dword [ecx + 0x10], edi
call dword [sym.imp.msvcrt.dll_wcscpy]
push dword [ebp - 0x218]
call esi
add esp, 0x10
mov eax, dword [ebp - 0x220]
push 2
mov dword [eax + 0x18], 6
pop edi
mov esi, dword [sym.imp.msvcrt.dll__wgetenv]
push 0x10016a8
mov dword [ebp - 0x228], ebx
mov dword [ebp - 0x25c], ebx
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x250], ebx
call esi
mov dword [esp], 0x1001694
call esi
pop ecx
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x2ac]
push eax
call sub.Secur32.dll_EnumerateSecurityPackagesW
cmp eax, ebx
je 0x1008552
mov esi, eax
jmp 0x10088c8
lea eax, [ebp - 0x21c]
push eax
mov esi, 0x1001680
push esi
call sub.Secur32.dll_QuerySecurityPackageInfoW
cmp eax, ebx
jne 0x100854b
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x290]
push eax
push ebx
push ebx
push dword [ebp - 0x220]
push ebx
push 1
push esi
push ebx
call sub.Secur32.dll_AcquireCredentialsHandleW
cmp eax, ebx
jne 0x100854b
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x2a0]
push eax
push ebx
push ebx
push dword [ebp - 0x208]
push ebx
push edi
push esi
push ebx
call sub.Secur32.dll_AcquireCredentialsHandleW
cmp eax, ebx
jne 0x100854b
lea eax, [ebp - 0x228]
push eax
xor esi, esi
inc esi
push esi
lea eax, [ebp - 0x2a0]
push eax
call sub.Secur32.dll_QueryCredentialsAttributesW
cmp eax, ebx
je 0x10085d1
jge 0x10085dc
jmp 0x100854b
push dword [ebp - 0x228]
call sub.Secur32.dll_FreeContextBuffer
lea eax, [ebp - 0x228]
push eax
push esi
lea eax, [ebp - 0x290]
push eax
call sub.Secur32.dll_QueryCredentialsAttributesW
cmp eax, ebx
je 0x10085fb
jge 0x1008606
jmp 0x100854b
push dword [ebp - 0x228]
call sub.Secur32.dll_FreeContextBuffer
lea eax, [ebp - 0x264]
mov dword [ebp - 0x280], eax
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x288], ebx
mov dword [ebp - 0x284], esi
mov eax, dword [eax + 8]
push eax
push ebx
mov dword [ebp - 0x264], eax
mov dword [ebp - 0x260], edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [ebp - 0x25c], eax
je 0x10088b7
cmp dword [ebp - 0x214], ebx
je 0x1008692
cmp dword [ebp - 0x210], ebx
je 0x1008692
push dword [ebp - 0x214]
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
mov esi, dword [sym.imp.msvcrt.dll_wcscat]
lea eax, [ebp - 0x204]
push 0x100167c
push eax
call esi
push dword [ebp - 0x210]
lea eax, [ebp - 0x204]
push eax
call esi
add esp, 0x18
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x288]
push eax
lea eax, [ebp - 0x298]
push eax
push ebx
push ebx
push 0x10
push ebx
push 0x16
lea eax, [ebp - 0x204]
push eax
push ebx
lea eax, [ebp - 0x2a0]
push eax
call sub.Secur32.dll_InitializeSecurityContextW
cmp eax, ebx
mov dword [ebp - 0x20c], eax
jl 0x100854b
lea eax, [ebp - 0x240]
mov dword [ebp - 0x268], eax
mov eax, dword [ebp - 0x21c]
mov esi, 0x80000000
or dword [ebp - 0x260], esi
mov dword [ebp - 0x270], ebx
mov dword [ebp - 0x26c], 1
mov eax, dword [eax + 8]
push eax
push ebx
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x23c], edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [ebp - 0x238], eax
je 0x10088b7
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0x2a8]
push eax
push 0x10
push 0x8000
lea eax, [ebp - 0x288]
push eax
push ebx
lea eax, [ebp - 0x290]
push eax
call sub.Secur32.dll_AcceptSecurityContext
cmp eax, ebx
mov dword [ebp - 0x208], eax
jl 0x100854b
jmp 0x100887d
or dword [ebp - 0x23c], esi
cmp dword [ebp - 0x250], ebx
lea eax, [ebp - 0x258]
mov dword [ebp - 0x274], eax
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x27c], ebx
mov dword [ebp - 0x278], 1
mov eax, dword [eax + 8]
mov dword [ebp - 0x258], eax
mov dword [ebp - 0x254], edi
jne 0x10087c8
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [ebp - 0x250], eax
je 0x10088b7
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x27c]
push eax
lea eax, [ebp - 0x298]
push eax
push ebx
lea eax, [ebp - 0x270]
push eax
push 0x10
push ebx
push 0x16
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x298]
push eax
push ebx
call sub.Secur32.dll_InitializeSecurityContextW
cmp eax, ebx
mov dword [ebp - 0x20c], eax
je 0x1008815
jl 0x100854b
cmp dword [ebp - 0x208], ebx
je 0x100887d
mov eax, dword [ebp - 0x21c]
or dword [ebp - 0x254], esi
mov dword [ebp - 0x23c], edi
mov eax, dword [eax + 8]
mov dword [ebp - 0x240], eax
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0x2a8]
push eax
push 0x10
push 0x8000
lea eax, [ebp - 0x27c]
push eax
lea eax, [ebp - 0x2a8]
push eax
push ebx
call sub.Secur32.dll_AcceptSecurityContext
cmp eax, ebx
mov dword [ebp - 0x208], eax
je 0x100887d
cmp eax, ebx
jl 0x10088c2
cmp dword [ebp - 0x20c], ebx
jne 0x1008773
push dword [ebp - 0x24c]
push dword [ebp - 0x234]
push 0x1f96
call fcn.0100371a
mov eax, dword [ebp - 0x208]
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0100c7ad
leave
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x100854b
mov esi, dword [ebp - 0x208]
push dword [ebp - 0x234]
push dword [ebp - 0x24c]
push 0x1f97
call fcn.0100371a
mov eax, esi
jmp 0x10088a5