Function at 0x4050af
Capabilities:
Accept command line arguments
Create process on windows
Resolve function by parsing pe exports
Terminate process

Disassembly:
sub esp, 0x168
mov eax, dword [0x4282e0]
xor eax, esp
mov dword [esp + 0x164], eax
push ebx
push esi
mov esi, dword [esp + 0x174]
push edi
call fcn.00401bf2
mov edi, eax
mov ebx, 0x105
push ebx
lea eax, [esp + 0x6c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4053ff
cmp eax, 0x104
jg 0x4053ff
lea eax, [esp + 0x68]
push eax
push str.ExecJRE:_old:__s_n
call fcn.0040119a
push esi
push str.ExecJRE:_new:__s_n
call fcn.0040119a
push esi
call fcn.00409940
push eax
lea eax, [esp + 0x80]
push eax
push esi
call fcn.0041a2e4
add esp, 0x20
test eax, eax
je 0x405410
push ebp
push edi
push esi
push str._s_bin_s.exe
lea eax, [esp + 0x78]
push ebx
push eax
call fcn.00405ad0
add esp, 0x14
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call fcn.00401178
mov ebp, eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], ebp
call fcn.0040602d
mov ebx, dword [esp + 0x18]
push ebx
call fcn.00409940
mov esi, eax
lea eax, [esp + 0x78]
push eax
call fcn.00409940
add esi, 4
add eax, esi
push eax
call fcn.004010e8
mov esi, eax
lea eax, [esp + 0x80]
push 0x20
push eax
call fcn.0040cf60
add esp, 0x1c
test eax, eax
jne 0x4051be
lea eax, [esp + 0x6c]
push 9
push eax
call fcn.0040cf60
pop ecx
pop ecx
test eax, eax
jne 0x4051be
lea eax, [esp + 0x6c]
push eax
push esi
call fcn.0040aee0
jmp 0x4051e0
mov ecx, 0x41f8a4
lea eax, [esp + 0x6c]
push ecx
push eax
push ecx
push esi
call fcn.0040aee0
pop ecx
pop ecx
push eax
call fcn.0040aef0
pop ecx
pop ecx
push eax
call fcn.0040aef0
cmp byte [ebx], 0
mov edi, eax
pop ecx
pop ecx
je 0x4052fd
lea eax, [esp + 0x10]
push eax
call fcn.0040602d
mov ebx, eax
pop ecx
cmp byte [ebx], 0
je 0x4052b9
push ebx
call fcn.004060b9
mov esi, eax
pop ecx
cmp byte [esi], 0x2d
jne 0x4052c8
push str._classpath
push esi
call fcn.0040afe0
pop ecx
pop ecx
test eax, eax
je 0x405275
push 0x41e548
push esi
call fcn.0040afe0
pop ecx
pop ecx
test eax, eax
je 0x405275
push 9
push str._version:
push esi
call fcn.004099d0
add esp, 0xc
test eax, eax
je 0x4052b2
push str._jre_restrict_search
push esi
call fcn.0040afe0
pop ecx
pop ecx
test eax, eax
je 0x4052b2
push str._no_jre_restrict_search
push esi
call fcn.0040afe0
pop ecx
pop ecx
test eax, eax
je 0x4052b2
push ebx
mov ebx, 0x41edd0
jmp 0x40529f
push ebx
mov ebx, 0x41edd0
push ebx
push edi
call fcn.0040aef0
pop ecx
pop ecx
push eax
call fcn.0040aef0
mov edi, eax
lea eax, [esp + 0x18]
push eax
call fcn.0040602d
add esp, 0xc
cmp byte [eax], 0
je 0x4052b2
push eax
push ebx
push edi
call fcn.0040aef0
pop ecx
pop ecx
push eax
call fcn.0040aef0
pop ecx
mov edi, eax
pop ecx
push esi
call fcn.0040110a
pop ecx
mov eax, dword [esp + 0x10]
cmp byte [eax], 0
jne 0x4051ed
jmp 0x4052fd
push ebx
mov ebx, 0x41edd0
push ebx
push edi
call fcn.0040aef0
pop ecx
pop ecx
push eax
call fcn.0040aef0
pop ecx
pop ecx
push dword [esp + 0x10]
push ebx
push eax
call fcn.0040aef0
pop ecx
pop ecx
push eax
call fcn.0040aef0
push esi
mov edi, eax
call fcn.0040110a
add esp, 0xc
push ebp
call fcn.0040110a
pop ecx
call fcn.004010e2
pop ebp
test al, al
je 0x40534b
push edi
call fcn.00401178
mov esi, eax
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], esi
call fcn.0040602d
push eax
lea eax, [esp + 0x74]
push eax
push str.ReExec_Command:__s___s__n
call fcn.004090f7
push dword [esp + 0x20]
push str.ReExec_Args:__s_n
call fcn.004090f7
push esi
call fcn.0040110a
add esp, 0x20
call fcn.00409e6b
add eax, 0x20
push eax
call fcn.0040d7af
call fcn.00409e6b
add eax, 0x40
push eax
call fcn.0040d7af
push 0x44
pop esi
push esi
xor ebx, ebx
lea eax, [esp + 0x30]
push ebx
push eax
call fcn.0040ae50
push 0x10
lea eax, [esp + 0x2c]
mov dword [esp + 0x3c], esi
push ebx
push eax
call fcn.0040ae50
add esp, 0x20
lea eax, [esp + 0x14]
xor esi, esi
inc esi
push eax
lea eax, [esp + 0x28]
push eax
push ebx
push ebx
push ebx
push esi
push ebx
push ebx
push edi
lea eax, [esp + 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x405428
push 0xffffffffffffffff
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x4053d8
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x4053e7
jmp 0x4053e3
push str.Error:_WaitForSingleObject___failed.
call fcn.004058ff
pop ecx
mov dword [esp + 0x10], esi
push dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x14]
call esi
push dword [esp + 0x10]
jmp 0x40543a
push edi
push str.Error:_Unable_to_resolve__s
call fcn.00405982
pop ecx
pop ecx
push 1
jmp 0x40543a
mov ecx, dword [esp + 0x170]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040b10c
add esp, 0x168
ret
lea eax, [esp + 0x68]
push eax
push str.Error:_CreateProcess__s__...__failed:
call fcn.00405982
pop ecx
pop ecx
push esi
call fcn.00409649
int3