Function at 0x402c50
Capabilities:
Check if file exists
Check mutex on windows
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x419c4c
mov eax, dword fs:[0]
push eax
sub esp, 0x2ec
mov eax, dword [0x423004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x27c], eax
mov byte [ebp - 0x276], 0
mov byte [ebp - 0x275], 0
mov dword [ebp - 0x294], 0
cmp ebx, 2
jge 0x402cb1
mov eax, 1
jmp 0x4036b3
jne 0x402cc1
mov eax, dword [eax + 4]
mov dword [ebp - 0x294], eax
jmp 0x402d67
jle 0x402d67
mov esi, 1
cmp ebx, esi
jle 0x402d67
mov edi, dword [eax + esi*4]
mov ecx, str.__oneshot
mov eax, edi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402d00
test dl, dl
je 0x402cfc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402d00
add eax, 2
add ecx, 2
test dl, dl
jne 0x402ce0
xor eax, eax
jmp 0x402d05
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402d12
mov byte [ebp - 0x276], 1
jmp 0x402d58
mov ecx, str.__log
mov eax, edi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402d40
test dl, dl
je 0x402d3c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402d40
add eax, 2
add ecx, 2
test dl, dl
jne 0x402d20
xor eax, eax
jmp 0x402d45
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402d52
mov byte [ebp - 0x275], 1
jmp 0x402d58
mov dword [ebp - 0x294], edi
mov eax, dword [ebp - 0x27c]
inc esi
cmp esi, ebx
jl 0x402cd4
push 0x104
lea eax, [ebp - 0x128]
push 0
push eax
call fcn.00405d40
add esp, 0xc
lea eax, [ebp - 0x128]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea esi, [ebp - 0x128]
mov byte [ebp - 0x27c], 0
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402da3
push dword [ebp - 0x27c]
sub ecx, edx
lea eax, [ebp - 0x25c]
push ecx
push esi
push eax
call section..text
mov ebx, dword [ebp - 0x248]
lea edi, [ebp - 0x25c]
mov esi, dword [ebp - 0x24c]
cmp ebx, 8
mov dword [ebp - 4], 1
cmovae edi, dword [ebp - 0x25c]
lea eax, [edi + esi*2]
push eax
push edi
call fcn.00401b50
mov ecx, eax
add esp, 0x18
sub ecx, edi
sar ecx, 1
cmp esi, ecx
jb 0x4036cf
cmp ebx, 8
mov dword [ebp - 0x24c], ecx
lea eax, [ebp - 0x25c]
cmovae eax, dword [ebp - 0x25c]
xor edx, edx
mov byte [ebp - 0x27c], dl
push dword [ebp - 0x27c]
mov byte [ebp - 4], dl
push 0xf
mov word [eax + ecx*2], dx
lea eax, [ebp - 0x244]
push str.ElevateShim.log
push eax
call section..text
add esp, 0x10
lea eax, [ebp - 0x244]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x25c]
call fcn.004018c0
mov edx, dword [ebp - 0x230]
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x402e99
mov ecx, dword [ebp - 0x244]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402e8f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4036d4
push edx
push ecx
call fcn.00404046
add esp, 8
cmp dword [ebp - 0x248], 8
lea ecx, [ebp - 0x295]
push ecx
push dword [ebp - 0x24c]
lea eax, [ebp - 0x25c]
cmovae eax, dword [ebp - 0x25c]
push eax
call fcn.00403ada
push eax
lea eax, [ebp - 0x274]
push eax
call fcn.00401140
add esp, 0x14
cmp byte [ebp - 0x275], 0
mov byte [ebp - 4], 3
je 0x402f06
cmp dword [ebp - 0x260], 0x10
lea eax, [ebp - 0x274]
push 0x41a2cc
cmovae eax, dword [ebp - 0x274]
push eax
call fcn.00407bf8
add esp, 8
mov dword [0x423b28], eax
jmp 0x402f0b
mov eax, dword [0x423b28]
mov ebx, dword [ebp - 0x294]
test ebx, ebx
jne 0x402f76
test eax, eax
je 0x4030e0
push ebx
call fcn.00409429
mov dword [ebp - 0x290], eax
lea eax, [ebp - 0x290]
push eax
mov dword [ebp - 0x28c], edx
call fcn.00409235
push eax
push str._Y__m__d__H:_M:_S
lea eax, [ebp - 0x24]
push 0x14
push eax
call fcn.0040938b
lea eax, [ebp - 0x24]
push eax
push str.__s_DEBUG:_ElevateShim:_Elevate_target_is_empty_n
push dword [0x423b28]
call fcn.00402c20
push dword [0x423b28]
call fcn.00407ade
add esp, 0x28
lea edi, [ebx + 1]
jmp 0x403620
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x402fe9
cmp dword [0x423b28], eax
je 0x4030e0
push eax
call fcn.00409429
mov dword [ebp - 0x290], eax
lea eax, [ebp - 0x290]
push eax
mov dword [ebp - 0x28c], edx
call fcn.00409235
push eax
push str._Y__m__d__H:_M:_S
lea eax, [ebp - 0x24]
push 0x14
push eax
call fcn.0040938b
push ebx
lea eax, [ebp - 0x24]
push eax
push str.__s_DEBUG:_ElevateShim:__s_is_not_exist_n
push dword [0x423b28]
call fcn.00402c20
push dword [0x423b28]
call fcn.00407ade
add esp, 0x2c
mov edi, 1
jmp 0x403620
push str.Wtsapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
jne 0x403048
cmp dword [0x423b28], eax
je 0x4030e0
push eax
call fcn.00409429
mov dword [ebp - 0x290], eax
lea eax, [ebp - 0x290]
push eax
mov dword [ebp - 0x28c], edx
call fcn.00409235
push eax
push str._Y__m__d__H:_M:_S
lea eax, [ebp - 0x24]
push 0x14
push eax
call fcn.0040938b
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x24]
push eax
push str.__s_DEBUG:_ElevateShim:_Load_Wtsapi32.dll_failed___d_n
jmp 0x4030a4
push str.WTSQueryUserToken
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
jne 0x4030c7
cmp dword [0x423b28], eax
je 0x4030e0
push eax
call fcn.00409429
mov dword [ebp - 0x290], eax
lea eax, [ebp - 0x290]
push eax
mov dword [ebp - 0x28c], edx
call fcn.00409235
push eax
push str._Y__m__d__H:_M:_S
lea eax, [ebp - 0x24]
push 0x14
push eax
call fcn.0040938b
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x24]
push eax
push str.__s_DEBUG:_ElevateShim:_GetProcAddress_WTSQueryUserToken_failed___d_n
push dword [0x423b28]
call fcn.00402c20
push dword [0x423b28]
call fcn.00407ade
add esp, 0x14
mov edi, 1
jmp 0x403620
push str.D3873E06_1B5F_4924_B74E_C1ABD6870917
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp - 0x29c], eax
test eax, eax
jne 0x4030ea
mov edi, 1
jmp 0x403620
mov dword [ebp - 0x2b4], eax
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xb7
je 0x403613
nop dword [eax + eax]
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40318b
cmp dword [0x423b28], 0
je 0x40317e
push 0
call fcn.00409429
mov dword [ebp - 0x2a8], eax
lea eax, [ebp - 0x2a8]
push eax
mov dword [ebp - 0x2a4], edx
call fcn.00409235
push eax
push str._Y__m__d__H:_M:_S
lea eax, [ebp - 0x240]
push 0x14
push eax
call fcn.0040938b
lea eax, [ebp - 0x240]
push eax
push str.__s_DEBUG:_ElevateShim:_Can_not_find_active_console_session__try_again_later._n
push dword [0x423b28]
call fcn.00402c20
push dword [0x423b28]
call fcn.00407ade
add esp, 0x28
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x403110
lea eax, [ebp - 0x27c]
push eax
push edi
call ebx
test eax, eax
je 0x4035a6
lea eax, [ebp - 0x280]
push eax
push 1
push 2
push 0
push 0x2000000
push dword [ebp - 0x27c]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x403530
push dword [ebp - 0x27c]
call esi
push dword [ebp - 0x280]
call fcn.00402850
add esp, 4
test al, al
je 0x403247
cmp dword [0x423b28], 0
je 0x4032f3
push 0
call fcn.00409429
mov dword [ebp - 0x2b0], eax
lea eax, [ebp - 0x2b0]
push eax
mov dword [ebp - 0x2ac], edx
call fcn.00409235
push eax
push str._Y__m__d__H:_M:_S
lea eax, [ebp - 0x240]
push 0x14
push eax
call fcn.0040938b
lea eax, [ebp - 0x240]
push eax
push str.__s_DEBUG:_ElevateShim:_Token_dont_need_elevation_n
push dword [0x423b28]
call fcn.00402c20
push dword [0x423b28]
call fcn.00407ade
add esp, 0x28
jmp 0x4032f3
cmp dword [0x423b28], 0
je 0x4032a8
push 0
call fcn.00409429
mov dword [ebp - 0x288], eax
lea eax, [ebp - 0x288]
push eax
mov dword [ebp - 0x284], edx
call fcn.00409235
push eax
push str._Y__m__d__H:_M:_S
lea eax, [ebp - 0x240]
push 0x14
push eax
call fcn.0040938b
lea eax, [ebp - 0x240]
push eax
push str.__s_DEBUG:_ElevateShim:_Token_need_elevation_n
push dword [0x423b28]
call fcn.00402c20
push dword [0x423b28]
call fcn.00407ade
add esp, 0x28
lea eax, [ebp - 0x28c]
push eax
push 4
lea eax, [ebp - 0x2a0]
push eax
push 0x13
push dword [ebp - 0x280]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x4034b7
push dword [ebp - 0x280]
call esi
mov eax, dword [ebp - 0x2a0]
push eax
mov dword [ebp - 0x280], eax
call fcn.00402850
add esp, 4
test al, al
je 0x403449
xorps xmm0, xmm0
mov dword [ebp - 0x2f8], 0x44
push 0x104
lea eax, [ebp - 0x22c]
movlpd qword [ebp - 0x2f4], xmm0
push 0
push eax
movlpd qword [ebp - 0x2ec], xmm0
movlpd qword [ebp - 0x2e4], xmm0
movlpd qword [ebp - 0x2dc], xmm0
movlpd qword [ebp - 0x2d4], xmm0
movlpd qword [ebp - 0x2cc], xmm0
movlpd qword [ebp - 0x2c4], xmm0
movlpd qword [ebp - 0x2bc], xmm0
call fcn.00405d40
push 0x103
push dword [ebp - 0x294]
lea eax, [ebp - 0x22c]
push eax
call fcn.004077f0
add esp, 0x18
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2f8]
push eax
push 0
push 0
push 0x8000000
push 0
push 0
push 0
lea eax, [ebp - 0x22c]
push eax
push 0
push dword [ebp - 0x280]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
je 0x4033c9
push dword [ebp - 0x1c]
call esi
push 0xffffffffffffffff
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x20]
call esi
cmp byte [ebp - 0x276], 0
je 0x403110
xor edi, edi
jmp 0x403618
cmp dword [0x423b28], 0
je 0x40343c
push 0
call fcn.00409429
mov dword [ebp - 0x288], eax
lea eax, [ebp - 0x288]
push eax
mov dword [ebp - 0x284], edx
call fcn.00409235
push eax
push str._Y__m__d__H:_M:_S
lea eax, [ebp - 0x240]
push 0x14
push eax
call fcn.0040938b
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x18
call eax
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x240]
push eax
push str.__s_DEBUG:_ElevateShim:_CreateProcess__s_failed___d_n
push dword [0x423b28]
call fcn.00402c20
push dword [0x423b28]
call fcn.00407ade
add esp, 0x18
push dword [ebp - 0x280]
call esi
jmp 0x403613
cmp dword [0x423b28], 0
je 0x4034aa
push 0
call fcn.00409429
mov dword [ebp - 0x288], eax
lea eax, [ebp - 0x288]
push eax
mov dword [ebp - 0x284], edx
call fcn.00409235
push eax
push str._Y__m__d__H:_M:_S
lea eax, [ebp - 0x240]
push 0x14
push eax
call fcn.0040938b
lea eax, [ebp - 0x240]
push eax
push str.__s_DEBUG:_ElevateShim:_Cant_found_a_elevation_token_n
push dword [0x423b28]
call fcn.00402c20
push dword [0x423b28]
call fcn.00407ade
add esp, 0x28
push dword [ebp - 0x280]
call esi
jmp 0x403613
cmp dword [0x423b28], 0
je 0x403523
push 0
call fcn.00409429
mov dword [ebp - 0x288], eax
lea eax, [ebp - 0x288]
push eax
mov dword [ebp - 0x284], edx
call fcn.00409235
push eax
push str._Y__m__d__H:_M:_S
lea eax, [ebp - 0x240]
push 0x14
push eax
call fcn.0040938b
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x18
call eax
push eax
lea eax, [ebp - 0x240]
push eax
push str.__s_DEBUG:_ElevateShim:_Get_linked_token_failed___d_n
push dword [0x423b28]
call fcn.00402c20
push dword [0x423b28]
call fcn.00407ade
add esp, 0x14
push dword [ebp - 0x280]
call esi
jmp 0x403613
cmp dword [0x423b28], 0
je 0x40359c
push 0
call fcn.00409429
mov dword [ebp - 0x288], eax
lea eax, [ebp - 0x288]
push eax
mov dword [ebp - 0x284], edx
call fcn.00409235
push eax
push str._Y__m__d__H:_M:_S
lea eax, [ebp - 0x240]
push 0x14
push eax
call fcn.0040938b
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x18
call eax
push eax
lea eax, [ebp - 0x240]
push eax
push str.__s_DEBUG:_ElevateShim:_DuplicateTokenEx_failed___d_n
push dword [0x423b28]
call fcn.00402c20
push dword [0x423b28]
call fcn.00407ade
add esp, 0x14
push dword [ebp - 0x27c]
call esi
jmp 0x403613
cmp dword [0x423b28], 0
je 0x403613
push 0
call fcn.00409429
mov dword [ebp - 0x288], eax
lea eax, [ebp - 0x288]
push eax
mov dword [ebp - 0x284], edx
call fcn.00409235
push eax
push str._Y__m__d__H:_M:_S
lea eax, [ebp - 0x240]
push 0x14
push eax
call fcn.0040938b
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x18
call eax
push eax
push edi
lea eax, [ebp - 0x240]
push eax
push str.__s_DEBUG:_ElevateShim:_QueryUserToken_of_sid_d_failed___d_n
push dword [0x423b28]
call fcn.00402c20
push dword [0x423b28]
call fcn.00407ade
add esp, 0x18
mov edi, 1
push dword [ebp - 0x29c]
call esi
mov edx, dword [ebp - 0x260]
cmp edx, 0x10
jb 0x40365a
mov ecx, dword [ebp - 0x274]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x403650
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4036d9
push edx
push ecx
call fcn.00404046
add esp, 8
mov edx, dword [ebp - 0x248]
mov dword [ebp - 0x264], 0
mov dword [ebp - 0x260], 0xf
mov byte [ebp - 0x274], 0
cmp edx, 8
jb 0x4036b1
mov ecx, dword [ebp - 0x25c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4036a7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4036de
push edx
push ecx
call fcn.00404046
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00404054
mov esp, ebp
pop ebp
ret
call fcn.00401d30
call fcn.00407799
call fcn.00407799
call fcn.00407799
int3