Function at 0x10013f80
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 0x1006371d
mov eax, dword fs:[0]
push eax
sub esp, 0x278
mov eax, dword [0x100ad040]
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 [0x100ae614]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x100aeef0]
mov dword [ebp - 0x248], ecx
cmp eax, dword [ecx + 4]
jle 0x10014025
push 0x100aeef0
call fcn.1004d8f7
add esp, 4
cmp dword [0x100aeef0], 0xffffffff
jne 0x10014025
mov dword [ebp - 4], 1
push 0x1006d5f0
call fcn.1004d866
mov byte [ebp - 4], 0
push 0x100aeef0
call fcn.1004d8a6
add esp, 8
cmp dword [0x100adb44], 0
jne 0x10014718
mov dword [ebp - 0x220], 0x10094084
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 [0x1006e578]
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 0x1001408b
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x100146b0
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 0x10014102
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x10014691
push dword [ebp - 0x23c]
lea ecx, [ebp - 0x240]
call fcn.100157a0
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 0x10014691
cmp dword [ebp - 0x23c], 0
je 0x10014691
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 0x10014697
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], 0x10094084
test eax, eax
je 0x100141aa
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x21c], 0
cmp edi, 1
jne 0x100146d9
mov ecx, dword [ebp - 0x248]
mov eax, dword [0x100aeef4]
cmp eax, dword [ecx + 4]
jle 0x10014210
push 0x100aeef4
call fcn.1004d8f7
add esp, 4
cmp dword [0x100aeef4], 0xffffffff
jne 0x10014210
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 [0x100aeef8], eax
mov byte [ebp - 4], 0
push 0x100aeef4
call fcn.1004d8a6
add esp, 4
mov esi, dword [0x100aeef8]
lea eax, [ebp - 0x218]
test esi, esi
je 0x10014238
push eax
push 0x104
mov ecx, esi
call dword [0x1006e578]
call esi
mov dword [ebp - 0x23c], eax
jmp 0x10014263
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.10053d7e
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x100145e8
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.10010980
push ecx
push 0x10000000
push str.S_1_5_32_544
lea ecx, [ebp - 0x278]
call fcn.10010980
mov eax, dword [ebp - 0x258]
test eax, eax
je 0x10014319
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x258], 0
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x10014334
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x25c], 0
mov eax, dword [ebp - 0x268]
test eax, eax
jle 0x100144b6
mov edx, dword [ebp - 0x260]
xor ecx, ecx
mov dword [ebp - 0x240], ecx
test edx, edx
je 0x100143b0
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 0x10014391
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x254], eax
jmp 0x100144b6
cmp dword [ebp - 0x244], 0
mov eax, dword [ebp - 0x268]
jne 0x100143aa
xor ecx, ecx
mov dword [ebp - 0x240], ecx
jmp 0x100143b0
mov ecx, dword [ebp - 0x240]
test eax, eax
jle 0x1001475a
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 0x100143dc
mov dword [ebp - 0x254], eax
jmp 0x100144b6
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x25c], eax
test eax, eax
jne 0x10014401
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x254], eax
jmp 0x100144b6
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x1001443b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x254], eax
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x100144b6
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x25c], 0
jmp 0x100144b6
push 0
push dword [ebp - 0x258]
push 1
push dword [ebp - 0x25c]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x1001447e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x254], eax
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x100144b6
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x25c], 0
jmp 0x100144b6
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x100144b6
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 0x10014500
test esi, esi
js 0x1001475a
cmp esi, edx
jge 0x1001475a
mov ecx, dword [eax + esi*8]
test ecx, ecx
je 0x100144fb
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 0x100144d1
test eax, eax
je 0x10014517
push eax
call fcn.10050fe0
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 0x10014548
push eax
call fcn.10050fe0
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 0x1001456d
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x1001457e
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x26c]
test eax, eax
je 0x1001459f
push eax
call fcn.10050fe0
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 0x100145d4
push eax
call fcn.10050fe0
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 0x10014718
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 0x10014620
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.10019030
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x21c]
cmp eax, 7
jbe 0x100146fb
mov ecx, dword [ebp - 0x230]
lea eax, [eax*2 + 2]
mov edx, ecx
cmp eax, 0x1000
jb 0x100146f0
mov ecx, dword [edx - 4]
sub edx, ecx
lea eax, [edx - 4]
cmp eax, 0x1f
ja 0x10014764
jmp 0x100146f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [ebp - 4], 2
test esi, esi
je 0x100146a6
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], 0x10094084
test eax, eax
je 0x100146d9
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 0x100145ee
test ecx, ecx
je 0x100146fb
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 0x100adb34
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.1004d40a
mov esp, ebp
pop ebp
ret
push ntohs
call fcn.10005390
call fcn.10050f8f
int3