Function at 0x407f62
Capabilities:
Create process on windows

Disassembly:
push ebp
sub esp, 0x44
mov eax, 0x425089
call fcn.004121ac
sub esp, 0x148
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp + 0x44], ebx
mov eax, dword [ebp + 0x58]
mov dword [ebp - 4], ebx
mov dword [eax], ebx
cmp dword [ebp + 0x54], ebx
jne 0x4080e0
lea eax, [ebp + 0x3c]
push eax
push dword [ebp + 0x50]
call sub.WTSAPI32.dll_WTSQueryUserToken
mov esi, 0x4320c0
cmp eax, ebx
jne 0x40808a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x408044
mov dword [ebp + 0x34], ebx
push esi
lea ecx, [ebp + 0x38]
call fcn.0040287b
push dword [ebp + 0x50]
lea eax, [ebp + 0x38]
push str.LaunchProxy:_WTSQueryUserToken_failed_with_error_1008._dwSessionId___d.__Retrying...
push eax
mov byte [ebp - 4], 1
call fcn.00404610
mov edi, dword [ebp + 0x38]
push edi
call fcn.004016c6
add esp, 0x10
call fcn.00405c1d
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
lea ecx, [ebp + 0x3c]
push ecx
push eax
mov dword [ebp + 0x50], eax
call sub.WTSAPI32.dll_WTSQueryUserToken
mov dword [ebp + 0x2c], eax
cmp eax, 1
je 0x408034
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x408034
lea ecx, [edi - 0x10]
mov byte [ebp - 4], bl
call fcn.004016ac
inc dword [ebp + 0x34]
cmp dword [ebp + 0x34], 0xa
jl 0x407fbc
jmp 0x40803f
lea ecx, [edi - 0x10]
mov byte [ebp - 4], bl
call fcn.004016ac
cmp dword [ebp + 0x2c], ebx
jne 0x40808a
push esi
lea ecx, [ebp + 0x54]
call fcn.0040287b
push dword [ebp + 0x50]
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp + 0x54]
push str.LaunchProxy_Error:__WTSQueryUserToken_failed_with_error__d._dwSessionId___d
push eax
call fcn.00404610
mov esi, dword [ebp + 0x54]
push esi
call fcn.004016c6
add esp, 0x14
call fcn.00405c1d
lea ecx, [esi - 0x10]
call fcn.004016ac
push dword [ebp + 0x44]
jmp 0x408372
push esi
lea ecx, [ebp + 0x38]
call fcn.0040287b
push dword [ebp + 0x50]
lea eax, [ebp + 0x38]
push str.LaunchProxy:_WTSQueryUserToken_succeeded._dwSessionId___d
push eax
mov byte [ebp - 4], 3
call fcn.00404610
mov ecx, dword [ebp + 0x38]
add esp, 0xc
add ecx, 0xfffffff0
mov byte [ebp - 4], bl
call fcn.004016ac
lea eax, [ebp + 0x40]
push eax
xor edi, edi
inc edi
push edi
push ebx
push ebx
push 0x2000000
push dword [ebp + 0x3c]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
cmp eax, ebx
jne 0x408114
push dword [ebp + 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x408082
cmp dword [ebp + 0x54], 1
jne 0x408371
lea eax, [ebp + 0x3c]
push eax
push 0xf01ff
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4080b9
push str.LaunchProxy_Error:__OpenProcessToken_failed
call fcn.004016c6
pop ecx
jmp 0x408082
push 0x2000
push dword [ebp + 0x40]
call fcn.0040bd34
pop ecx
pop ecx
test eax, eax
jne 0x40813e
push dword [ebp + 0x40]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp + 0x3c]
call esi
push str.LaunchProxy_Error:__SetTokenIntegrityLevel_failed
jmp 0x408109
cmp dword [ebp + 0x54], edi
jne 0x4081a1
push dword [ebp + 0x40]
call fcn.0040bd9d
pop ecx
test eax, eax
jge 0x408170
push str.LaunchProxy_Error:__EnablePrivileges_failed
call fcn.004016c6
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
push dword [ebp + 0x40]
call esi
push dword [ebp + 0x3c]
call esi
jmp 0x408082
push 4
lea eax, [ebp + 0x50]
push eax
push 0xc
push dword [ebp + 0x40]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
jne 0x40818c
push str.LaunchProxy_Error:__SetTokenInformation_failed
jmp 0x408155
lea eax, [ebp + 0x44]
push eax
call fcn.0040b5ad
cmp eax, ebx
pop ecx
jge 0x4081f4
push str.LaunchProxy_Error:__GetUpgradeRunLine_failed
jmp 0x408155
cmp dword [ebp + 0x54], ebx
jne 0x408082
call fcn.004074e7
push dword [ebp + 0x40]
lea eax, [ebp + 0x10]
push eax
call fcn.004054e2
pop ecx
pop ecx
push 0xffffffffffffffff
push ebx
push eax
mov ecx, 0x430080
mov byte [ebp - 4], 4
call fcn.0040435c
push ebx
push edi
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], bl
call fcn.00403537
lea eax, [ebp + 0x44]
push eax
call fcn.0040b49e
cmp eax, ebx
pop ecx
jge 0x4081f4
push str.LaunchProxy_Error:__GetRunLine_failed
jmp 0x408155
push 0x44
pop esi
push esi
lea eax, [ebp - 0x50]
push ebx
push eax
call fcn.00412380
add esp, 0xc
push ebx
push dword [ebp + 0x40]
lea eax, [ebp + 0x30]
push eax
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x48], str.winsta0default
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
push dword [ebp + 0x44]
lea eax, [ebp - 0x150]
lea ecx, [ebp - 0x154]
mov dword [ebp - 0x154], eax
call fcn.00402a93
lea eax, [ebp]
push eax
lea eax, [ebp - 0x50]
push eax
push ebx
push dword [ebp + 0x30]
push 0x420
push ebx
push ebx
push ebx
push dword [ebp - 0x154]
push ebx
push dword [ebp + 0x40]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov esi, eax
lea eax, [ebp - 0x150]
cmp dword [ebp - 0x154], eax
je 0x408277
push dword [ebp - 0x154]
call fcn.004110f2
pop ecx
push dword [ebp + 0x30]
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
cmp esi, ebx
jne 0x4082dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.LaunchProxy_Error:__CreateProcessAsUser_failed
mov dword [ebp + 0x1c], vtable._com_error.0
mov dword [ebp + 0x20], eax
mov dword [ebp + 0x24], ebx
mov dword [ebp + 0x28], ebx
call fcn.004016c6
mov esi, dword [ebp + 0x20]
pop ecx
lea ecx, [ebp + 0x1c]
call fcn.00402573
push eax
push esi
push str.__Error__d:__s
call fcn.004016c6
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0xc
push dword [ebp + 0x40]
call esi
push dword [ebp + 0x3c]
call esi
lea ecx, [ebp + 0x1c]
call fcn.0040143e
jmp 0x408082
push dword [ebp + 8]
push str.LaunchProxy:_OSSProxy__pid:_d__successfully_created
call fcn.004016c6
pop ecx
pop ecx
cmp dword [ebp + 0x54], ebx
jne 0x408340
call fcn.00405f91
cmp dword [0x4300b4], 8
mov eax, dword [0x4300a0]
jae 0x408308
mov eax, 0x4300a0
push eax
lea ecx, [ebp - 0xd4]
call fcn.004034de
push dword [eax]
mov byte [ebp - 4], 5
push str.WajamInternetEnhancerService.exe
call fcn.0040c706
lea eax, [ebp - 0xd0]
pop ecx
pop ecx
cmp dword [ebp - 0xd4], eax
je 0x408340
push dword [ebp - 0xd4]
call fcn.004110f2
pop ecx
mov eax, dword [ebp]
mov ecx, dword [ebp + 0x58]
mov dword [ecx], eax
mov eax, dword [ebp + 0x5c]
cmp eax, ebx
je 0x408354
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
push dword [ebp + 0x40]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp + 0x3c]
call esi
push dword [ebp + 0x44]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, edi
jmp 0x40837a
push ebx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add ebp, 0x48
leave
ret