Function at 0x10049650
Capabilities:
Check if file exists
Check os version
Get file attributes

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1012c273
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x2d0
mov eax, dword [0x10188068]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push ecx
push str.ServerExecutable
sub esp, 8
lea ecx, [ebp - 0x280]
call fcn.10048940
mov dword [ebp - 4], 0
cmp dword [ebp - 0x270], 0
jne 0x100496c7
push 0x12
push str.GSoInputServer.exe
lea ecx, [ebp - 0x280]
call fcn.10043b50
cmp dword [ebp - 0x26c], 8
lea ecx, [ebp - 0x280]
cmovae ecx, dword [ebp - 0x280]
test ecx, ecx
je 0x100496f4
call fcn.10048eb0
test eax, eax
je 0x100496f4
mov byte [ebp - 0x2c9], 1
jmp 0x10049cd0
push ecx
push str.WeaselRoot
sub esp, 8
lea ecx, [ebp - 0x268]
call fcn.10048940
mov byte [ebp - 4], 1
cmp dword [ebp - 0x258], 0
jne 0x10049782
push 0x208
lea eax, [ebp - 0x220]
push 0
push eax
call fcn.100fc650
add esp, 0xc
lea eax, [ebp - 0x220]
push 0x104
push eax
push 0x1015a7a0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10049760
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x268]
call fcn.10043b50
push 0x101601ac
lea edx, [ebp - 0x268]
lea ecx, [ebp - 0x298]
call fcn.10043dd0
add esp, 4
mov ecx, eax
mov byte [ebp - 4], 2
lea eax, [ebp - 0x280]
cmp dword [ebp - 0x26c], 8
push dword [ebp - 0x270]
cmovae eax, dword [ebp - 0x280]
push eax
call fcn.10043c90
mov dword [ebp - 0x228], 0
xor ecx, ecx
mov dword [ebp - 0x224], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x238], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x228], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
lea ecx, [ebp - 0x298]
mov byte [ebp - 4], 4
call fcn.10043ac0
push 1
xor eax, eax
mov dword [ebp - 0x240], 0
push 0x101601a8
lea ecx, [ebp - 0x250]
mov dword [ebp - 0x23c], 7
mov word [ebp - 0x250], ax
call fcn.10043b50
push 0x101601a8
lea edx, [ebp - 0x238]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x298]
call fcn.10043dd0
add esp, 4
mov byte [ebp - 4], 6
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x10049868
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x250]
call fcn.10043c90
lea ecx, [ebp - 0x298]
mov byte [ebp - 4], 5
call fcn.10043ac0
mov eax, dword [0x10196c04]
test al, 1
jne 0x100498a1
or eax, 1
mov dword [0x10196c10], 0
mov dword [0x10196c04], eax
mov eax, dword [0x10196c18]
test eax, eax
je 0x10049b1a
cmp eax, 6
ja 0x100498b9
jb 0x10049b1a
call fcn.10048e40
test eax, eax
je 0x10049a99
cmp dword [ebp - 0x224], 8
lea ecx, [ebp - 0x238]
cmovae ecx, dword [ebp - 0x238]
call fcn.10049610
mov edx, eax
mov dword [ebp - 0x288], 0
mov ecx, edx
mov dword [ebp - 0x284], 0xf
mov byte [ebp - 0x298], 0
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10049901
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x298]
call fcn.10048640
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x268]
cmp dword [ebp - 0x254], 8
cmovae ecx, dword [ebp - 0x268]
call fcn.10049610
mov edx, eax
mov dword [ebp - 0x2a0], 0
mov ecx, edx
mov dword [ebp - 0x29c], 0xf
mov byte [ebp - 0x2b0], 0
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10049956
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x2b0]
call fcn.10048640
mov dword [ebp - 0x2b8], 0
mov dword [ebp - 0x2b4], 0xf
mov byte [ebp - 0x2c8], 0
lea eax, [ebp - 0x2b0]
mov byte [ebp - 4], 9
push eax
lea edx, [ebp - 0x2c8]
lea ecx, [ebp - 0x298]
call fcn.1004a4e0
mov edx, dword [ebp - 0x2b4]
add esp, 4
mov byte [ebp - 0x2c9], al
cmp edx, 0x10
jb 0x100499e6
mov ecx, dword [ebp - 0x2c8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x100499dc
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10049cff
push edx
push ecx
call fcn.100e2b31
add esp, 8
mov edx, dword [ebp - 0x29c]
mov dword [ebp - 0x2b8], 0
mov dword [ebp - 0x2b4], 0xf
mov byte [ebp - 0x2c8], 0
cmp edx, 0x10
jb 0x10049a3b
mov ecx, dword [ebp - 0x2b0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10049a31
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10049d04
push edx
push ecx
call fcn.100e2b31
add esp, 8
mov edx, dword [ebp - 0x284]
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x29c], 0xf
mov byte [ebp - 0x2b0], 0
cmp edx, 0x10
jb 0x10049caf
mov ecx, dword [ebp - 0x298]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10049a8a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10049d09
push edx
push ecx
call fcn.100e2b31
add esp, 8
jmp 0x10049caf
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push 0x110
mov esi, eax
mov dword [ebp - 0x2dc], 0
lea eax, [ebp - 0x12c]
push 0
push eax
call fcn.100fc650
add esp, 0xc
mov dword [ebp - 0x130], 0x114
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x12c], 6
jb 0x10049b1a
push esi
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x10049b1a
lea eax, [ebp - 0x2d4]
mov dword [ebp - 0x2d4], 0
push eax
push 8
push edi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x10049b4a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10049c87
mov byte [ebp - 0x2c9], 0
jmp 0x10049caf
mov esi, dword [ebp - 0x2d4]
lea eax, [ebp - 0x2d0]
push eax
push 0
push 0
push 0x19
push esi
mov dword [ebp - 0x2d0], 0
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x10049c0f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x10049c0f
mov eax, dword [ebp - 0x2d0]
test eax, eax
je 0x10049c0f
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x2d8], eax
test eax, eax
je 0x10049c0f
lea ecx, [ebp - 0x2d0]
push ecx
push dword [ebp - 0x2d0]
push eax
push 0x19
push dword [ebp - 0x2d4]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x10049bfa
mov eax, dword [ebp - 0x2d8]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
test eax, eax
je 0x10049bfa
movzx eax, byte [eax]
dec eax
push eax
mov eax, dword [ebp - 0x2d8]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov eax, dword [eax]
mov dword [ebp - 0x2dc], eax
push dword [ebp - 0x2d8]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call esi
cmp dword [ebp - 0x2dc], 0x1000
ja 0x10049b1a
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10049b3e
cmp dword [ebp - 0x254], 8
lea edx, [ebp - 0x268]
lea ecx, [ebp - 0x250]
cmovae edx, dword [ebp - 0x268]
cmp dword [ebp - 0x23c], 8
cmovae ecx, dword [ebp - 0x250]
call fcn.10048b70
test eax, eax
sete byte [ebp - 0x2c9]
jmp 0x10049caf
cmp dword [ebp - 0x23c], 8
lea ecx, [ebp - 0x250]
cmovae ecx, dword [ebp - 0x250]
sub esp, 0x10
call fcn.10048f70
add esp, 0x10
test eax, eax
setne byte [ebp - 0x2c9]
lea ecx, [ebp - 0x250]
call fcn.10043ac0
lea ecx, [ebp - 0x238]
call fcn.10043ac0
lea ecx, [ebp - 0x268]
call fcn.10043ac0
lea ecx, [ebp - 0x280]
call fcn.10043ac0
mov al, byte [ebp - 0x2c9]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.100e278d
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.10107f97
call fcn.10107f97
call fcn.10107f97
int3