Function at 0x100496f0
Capabilities:
Check if file exists
Get common file path
Get token membership

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101107b0
mov eax, dword fs:[0]
push eax
mov eax, 0x1324
call fcn.10067fc0
mov eax, dword [0x1015a4dc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x1e
call fcn.10035330
movzx eax, ax
add esp, 4
test ax, ax
jne 0x1004973d
mov eax, 1
jmp 0x10049ac7
call fcn.10034b20
test eax, eax
jne 0x10049750
mov eax, 2
jmp 0x10049ac7
mov eax, dword [0x1015ed94]
test al, 1
jne 0x1004978f
or eax, 1
mov dword [0x1015ed94], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x101172f0
mov dword [0x1015ed88], 0x1011a950
mov dword [0x1015ed8c], eax
mov byte [0x1015ed90], 0
call fcn.10067fa4
mov eax, dword [0x1015ed94]
add esp, 4
test al, 2
jne 0x100497eb
or eax, 2
mov dword [0x1015ed98], 0x1011a968
mov dword [0x1015ed94], eax
xor eax, eax
push 0x10117320
mov dword [0x1015ed9c], 0x1015ed88
mov dword [0x1015edac], 2
mov dword [0x1015eda4], 0
mov dword [0x1015eda8], 0
mov dword [0x1015edb0], eax
mov dword [0x1015eda0], 0x1015ed98
call fcn.10067fa4
add esp, 4
mov eax, dword [0x1015ed98]
mov ecx, 0x1015ed98
mov eax, dword [eax + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x132c], esi
push 0x800
lea eax, [ebp - 0x1310]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.10094be0
push 0x800
lea eax, [ebp - 0xb10]
push 0
push eax
call fcn.10094be0
add esp, 0x18
lea eax, [ebp - 0x1310]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0xfe
lea eax, [ebp - 0x10e]
push 0
push eax
call fcn.10094be0
add esp, 0xc
xor edi, edi
nop dword [eax]
xor eax, eax
xorps xmm0, xmm0
mov word [ebp - 0x110], ax
lea eax, [ebp - 0x1328]
push eax
movups xmmword [ebp - 0x1328], xmm0
call dword [sym.imp.ole32.dll_CoCreateGuid]
push 0x200
lea eax, [ebp - 0x310]
push 0
push eax
call fcn.10094be0
movzx eax, byte [ebp - 0x1319]
push eax
movzx eax, byte [ebp - 0x131a]
push eax
movzx eax, byte [ebp - 0x131b]
push eax
movzx eax, byte [ebp - 0x131c]
push eax
movzx eax, byte [ebp - 0x131d]
push eax
movzx eax, byte [ebp - 0x131e]
push eax
movzx eax, byte [ebp - 0x131f]
push eax
movzx eax, byte [ebp - 0x1320]
push eax
movzx eax, word [ebp - 0x1322]
push eax
movzx eax, word [ebp - 0x1324]
push eax
push dword [ebp - 0x1328]
lea eax, [ebp - 0x310]
push str._08X__04X__04x__02X_02X__02X_02X_02X_02X_02X_02X
push eax
call fcn.100040e0
lea eax, [ebp - 0x310]
add esp, 0x40
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10049906
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.100b073e
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x1310]
push eax
lea eax, [ebp - 0xb10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push str..tmp
lea eax, [ebp - 0xb10]
push 0x400
push eax
call fcn.100b0538
add esp, 0xc
lea eax, [ebp - 0xb10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10049982
inc edi
cmp edi, 0xa
jl 0x10049860
jmp 0x1004999a
lea eax, [ebp - 0xb10]
push eax
lea ecx, [ebp - 0x132c]
call fcn.10027e10
mov esi, dword [ebp - 0x132c]
push 0xa
push esi
call fcn.10034ae0
add esp, 8
test eax, eax
jne 0x100499b1
lea edi, [eax + 3]
jmp 0x10049aa6
mov ecx, dword [0x1016198c]
test ecx, ecx
jne 0x10049a1a
push 0x10157f5c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x1016198c], 0
jne 0x10049a09
push 0x90
call fcn.10032d00
add esp, 4
mov dword [ebp - 0x1330], eax
mov byte [ebp - 4], 1
test eax, eax
je 0x100499f3
mov ecx, eax
call fcn.100161e0
jmp 0x100499f5
xor eax, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1330]
xor edx, edx
lock or dword [ecx], edx
mov dword [0x1016198c], eax
push 0x10157f5c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [0x1016198c]
call fcn.1001bd00
test eax, eax
jne 0x10049aa4
mov dword [ebp - 0x1318], eax
lea eax, [ebp - 0x1330]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x1318]
mov word [ebp - 0x1314], 0x500
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [ebp - 0x132c], eax
test eax, eax
je 0x10049a9d
lea eax, [ebp - 0x132c]
push eax
push dword [ebp - 0x1330]
push 0
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
push dword [ebp - 0x1330]
neg eax
sbb eax, eax
and dword [ebp - 0x132c], eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x132c], 0
jne 0x10049aa4
mov edi, 4
jmp 0x10049aa6
xor edi, edi
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10049ac5
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
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.10067b98
mov esp, ebp
pop ebp
ret