Function at 0x10016fd0
Capabilities:
Check if file exists
Compare security identifiers
Create directory
Get common file path
Get token privileges

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1007130d
mov eax, dword fs:[0]
push eax
sub esp, 0x278
mov eax, dword [0x100c0040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x27c], eax
mov dword [ebp - 0x248], eax
mov dword [ebp - 0x284], eax
mov dword [ebp - 0x280], 0
mov eax, dword fs:[0x2c]
mov ecx, dword [0x100c17cc]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x100c20b8]
mov dword [ebp - 0x248], ecx
cmp eax, dword [ecx + 4]
jle 0x10017075
push 0x100c20b8
call fcn.10054367
add esp, 4
cmp dword [0x100c20b8], 0xffffffff
jne 0x10017075
mov dword [ebp - 4], 1
push 0x1007c820
call fcn.100542d6
mov byte [ebp - 4], 0
push 0x100c20b8
call fcn.10054316
add esp, 8
cmp dword [0x100c0b54], 0
jne 0x10017768
mov dword [ebp - 0x220], 0x100a46cc
mov dword [ebp - 0x21c], 0
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x220]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1007d584]
lea ecx, [ebp - 0x220]
call esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [ebp - 0x21c]
push ecx
push 8
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x100170db
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10017700
xor esi, esi
mov dword [ebp - 0x240], esi
mov byte [ebp - 4], 3
lea eax, [ebp - 0x23c]
push eax
push esi
push esi
push 1
push dword [ebp - 0x21c]
mov dword [ebp - 0x23c], esi
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x10017152
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x100176e1
push dword [ebp - 0x23c]
lea ecx, [ebp - 0x240]
call fcn.1001a7e0
mov esi, dword [ebp - 0x240]
lea eax, [ebp - 0x23c]
push eax
push dword [ebp - 0x23c]
push esi
push 1
push dword [ebp - 0x21c]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x100176e1
cmp dword [ebp - 0x23c], 0
je 0x100176e1
lea eax, [ebp - 0x244]
mov dword [ebp - 0x238], 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0x12
push 1
lea eax, [ebp - 0x238]
mov word [ebp - 0x234], 0x500
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x100176e7
push dword [ebp - 0x244]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
push dword [ebp - 0x244]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov byte [ebp - 4], 2
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x240], 0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x220], 0x100a46cc
test eax, eax
je 0x100171fa
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x21c], 0
cmp edi, 1
jne 0x10017729
mov ecx, dword [ebp - 0x248]
mov eax, dword [0x100c20bc]
cmp eax, dword [ecx + 4]
jle 0x10017260
push 0x100c20bc
call fcn.10054367
add esp, 4
cmp dword [0x100c20bc], 0xffffffff
jne 0x10017260
mov dword [ebp - 4], 4
push str.GetTempPath2W
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100c20c0], eax
mov byte [ebp - 4], 0
push 0x100c20bc
call fcn.10054316
add esp, 4
mov esi, dword [0x100c20c0]
lea eax, [ebp - 0x218]
test esi, esi
je 0x10017288
push eax
push 0x104
mov ecx, esi
call dword [0x1007d584]
call esi
mov dword [ebp - 0x23c], eax
jmp 0x100172b3
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.SystemTemp_
mov dword [ebp - 0x23c], eax
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.1005c15b
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10017638
mov dword [ebp - 0x278], eax
mov dword [ebp - 0x274], eax
mov dword [ebp - 0x270], eax
mov dword [ebp - 4], 5
mov dword [ebp - 0x26c], eax
mov dword [ebp - 0x268], eax
mov dword [ebp - 0x264], eax
mov byte [ebp - 4], 6
mov dword [ebp - 0x260], eax
mov dword [ebp - 0x25c], eax
mov dword [ebp - 0x258], eax
mov dword [ebp - 0x254], eax
mov dword [ebp - 0x250], eax
mov dword [ebp - 0x24c], eax
mov dword [ebp - 4], 7
push ecx
push 0x10000000
push str.S_1_5_18
lea ecx, [ebp - 0x278]
call fcn.10013be0
push ecx
push 0x10000000
push str.S_1_5_32_544
lea ecx, [ebp - 0x278]
call fcn.10013be0
mov eax, dword [ebp - 0x258]
test eax, eax
je 0x10017369
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x258], 0
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x10017384
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x25c], 0
mov eax, dword [ebp - 0x268]
test eax, eax
jle 0x10017506
mov edx, dword [ebp - 0x260]
xor ecx, ecx
mov dword [ebp - 0x240], ecx
test edx, edx
je 0x10017400
lea eax, [ebp - 0x248]
mov dword [ebp - 0x244], ecx
push eax
lea eax, [ebp - 0x240]
mov dword [ebp - 0x248], ecx
push eax
lea eax, [ebp - 0x244]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x100173e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x254], eax
jmp 0x10017506
cmp dword [ebp - 0x244], 0
mov eax, dword [ebp - 0x268]
jne 0x100173fa
xor ecx, ecx
mov dword [ebp - 0x240], ecx
jmp 0x10017400
mov ecx, dword [ebp - 0x240]
test eax, eax
jle 0x100177aa
lea edx, [ebp - 0x258]
push edx
push ecx
push dword [ebp - 0x26c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
je 0x1001742c
mov dword [ebp - 0x254], eax
jmp 0x10017506
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x25c], eax
test eax, eax
jne 0x10017451
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x254], eax
jmp 0x10017506
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x1001748b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x254], eax
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x10017506
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x25c], 0
jmp 0x10017506
push 0
push dword [ebp - 0x258]
push 1
push dword [ebp - 0x25c]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x100174ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x254], eax
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x10017506
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x25c], 0
jmp 0x10017506
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x10017506
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x218]
mov dword [ebp - 0x224], 0xc
push eax
mov dword [ebp - 0x21c], 0
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 4], 9
xor esi, esi
mov edx, dword [ebp - 0x274]
mov edi, edx
mov eax, dword [ebp - 0x278]
test edi, edi
jle 0x10017550
test esi, esi
js 0x100177aa
cmp esi, edx
jge 0x100177aa
mov ecx, dword [eax + esi*8]
test ecx, ecx
je 0x1001754b
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 0x274]
mov eax, dword [ebp - 0x278]
inc esi
cmp esi, edi
jl 0x10017521
test eax, eax
je 0x10017567
push eax
call fcn.10059120
add esp, 4
mov dword [ebp - 0x278], 0
mov eax, dword [ebp - 0x26c]
mov dword [ebp - 0x274], 0
mov dword [ebp - 0x270], 0
test eax, eax
je 0x10017598
push eax
call fcn.10059120
add esp, 4
mov dword [ebp - 0x26c], 0
mov eax, dword [ebp - 0x258]
mov dword [ebp - 0x268], 0
mov dword [ebp - 0x264], 0
test eax, eax
je 0x100175bd
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x100175ce
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x26c]
test eax, eax
je 0x100175ef
push eax
call fcn.10059120
add esp, 4
mov dword [ebp - 0x26c], 0
mov dword [ebp - 0x268], 0
mov dword [ebp - 0x264], 0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x278]
test eax, eax
je 0x10017624
push eax
call fcn.10059120
add esp, 4
mov dword [ebp - 0x278], 0
mov dword [ebp - 0x274], 0
mov dword [ebp - 0x270], 0
mov eax, dword [ebp - 0x23c]
test eax, eax
je 0x10017768
xorps xmm0, xmm0
mov dword [ebp - 0x220], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x21c], 0
movups xmmword [ebp - 0x230], xmm0
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10017670
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x230]
call fcn.10002cb0
mov dword [ebp - 4], 0xa
lea eax, [ebp - 0x230]
push eax
call fcn.1001e8f0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x21c]
cmp eax, 7
jbe 0x1001774b
mov ecx, dword [ebp - 0x230]
lea eax, [eax*2 + 2]
mov edx, ecx
cmp eax, 0x1000
jb 0x10017740
mov ecx, dword [edx - 4]
sub edx, ecx
lea eax, [edx - 4]
cmp eax, 0x1f
ja 0x100177b4
jmp 0x10017740
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [ebp - 4], 2
test esi, esi
je 0x100176f6
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x240], 0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x220], 0x100a46cc
test eax, eax
je 0x10017729
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x21c], 0
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x1001763e
test ecx, ecx
je 0x1001774b
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
mov ecx, dword [ebp - 0x27c]
push 0x100c0b44
call fcn.100057f0
mov dword [ebp - 4], 0
mov dword [ebp - 0x280], 1
mov eax, dword [ebp - 0x27c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10053e7d
mov esp, ebp
pop ebp
ret
push ntohs
call fcn.10005390
call fcn.100590cf
int3