Function at 0x407150
Capabilities:
Get common file path
Query environment variable
Set current directory
Set environment variable

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x58
xor r15d, r15d
mov ebp, r9d
mov rdi, r8
cmp rcx, r15
mov rbx, rcx
je 0x407199
mov rdx, rcx
lea rcx, str._JNILaunch__Switching_to__s_n
call fcn.0040bd0c
mov rcx, rbx
call fcn.0041c300
jmp 0x4071a5
lea rcx, str._JNILaunch__No_working_directory_specified_n
call fcn.0040bd0c
lea rcx, str._JAVA_OPTIONS
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea rcx, str.JAVA_TOOL_OPTIONS
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov rcx, rdi
call fcn.0040aea0
cmp rax, r15
jne 0x4071e6
lea rcx, str._JNILaunch___ERROR__Unable_to_load_JRE_library__n
call fcn.0040bd0c
mov eax, 1
jmp 0x407799
lea rdx, str.JNI_CreateJavaVM
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, 0x104
mov rcx, rdi
mov qword [rsp + 0x28], rax
call fcn.004171e0
lea rdx, [0x004511c0]
mov rcx, rax
mov rbx, rax
mov byte [rax], r15b
call fcn.004174b0
mov rdx, rbx
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea rcx, str._JNILaunch__CWD__s_n
mov rdx, rbx
call fcn.0040bd0c
mov rcx, rbx
call fcn.004171a0
lea rcx, str._JNILaunch__________JNI_Launch_call_________n
call fcn.0040bd0c
cmp ebp, r15d
mov ebx, r15d
mov esi, 1
jle 0x40727b
mov rdi, qword [rsp + 0xc0]
mov r8, qword [rdi]
lea rcx, str._JNILaunch__JVM_Argument__d___s_n
mov edx, ebx
call fcn.0040bd0c
add ebx, esi
add rdi, 8
cmp ebx, ebp
jl 0x407260
movsxd rbx, dword [rsp + 0xc8]
mov r14, qword [rsp + 0xd0]
mov edi, r15d
cmp ebx, r15d
jle 0x4072b2
mov rbp, r14
mov r8, qword [rbp]
lea rcx, str._JNILaunch__CP_Argument__d___s_n
mov edx, edi
call fcn.0040bd0c
add edi, esi
add rbp, 8
cmp edi, ebx
jl 0x407296
mov r12d, dword [rsp + 0xd8]
mov edi, r15d
cmp r12d, r15d
jle 0x4072e7
mov rbp, qword [rsp + 0xe0]
mov r8, qword [rbp]
lea rcx, str._JNILaunch__App_Argument__d___s_n
mov edx, edi
call fcn.0040bd0c
add edi, esi
add rbp, 8
cmp edi, r12d
jl 0x4072ca
cmp ebx, r15d
jle 0x407301
lea rax, [r14 + rbx*8 - 8]
cmp qword [rax], r15
jne 0x407301
sub ebx, esi
sub rax, 8
cmp ebx, r15d
jg 0x4072f1
mov ecx, 0x640
call fcn.004171e0
mov ecx, 0xc350
mov ebp, r15d
mov r12, rax
mov qword [rsp + 0x20], rax
call fcn.004171e0
movsxd rbx, ebx
mov r13, r15
mov byte [rax], r15b
cmp rbx, r15
mov rdi, rax
jle 0x407360
cmp r13, r15
mov rcx, rdi
lea rdx, str._Djava.class.path
je 0x407347
lea rdx, [0x0044caf4]
call fcn.004174b0
mov rdx, qword [r14 + r13*8]
mov rcx, rdi
call fcn.004174b0
add r13, rsi
cmp r13, rbx
jl 0x407331
mov rcx, rdi
call fcn.004173f0
cmp rax, r15
jbe 0x407373
mov qword [r12], rdi
mov ebp, esi
movsxd r14, dword [rsp + 0xb8]
movsxd r13, ebp
test r14, r14
jle 0x4073d0
shl r13, 4
add r13, r12
mov r12, qword [rsp + 0xc0]
add ebp, r14d
mov rdi, qword [r12 + r15*8]
mov rcx, rdi
call fcn.004173f0
lea rcx, [rsi + rax]
call fcn.004171e0
mov rdx, rdi
mov rcx, rax
mov rbx, rax
mov byte [rax], 0
call fcn.004174b0
add r15, rsi
mov qword [r13], rbx
add r13, 0x10
cmp r15, r14
jl 0x407395
mov r12, qword [rsp + 0x20]
mov ecx, 0x104
call fcn.004171e0
lea rdx, str._Djava.library.path
xor r15d, r15d
mov rcx, rax
mov rdi, rax
mov byte [rax], r15b
call fcn.004174b0
mov rdx, qword [rsp + 0xb0]
mov rcx, rdi
call fcn.004174b0
lea rdx, [0x0044c4cc]
mov rcx, rdi
call fcn.0040bc6c
lea rcx, str.SystemRoot
call fcn.0041c560
cmp rax, r15
mov rbx, rax
je 0x407432
mov rcx, rax
call fcn.004173f0
cmp rax, r15
jne 0x407441
lea rcx, str.windir
call fcn.0041c560
mov rbx, rax
cmp rbx, r15
je 0x407496
mov rcx, rbx
call fcn.004173f0
cmp rax, r15
jbe 0x407496
lea rdx, [0x0044caf4]
mov rcx, rdi
call fcn.004174b0
mov rdx, rbx
mov rcx, rdi
call fcn.004174b0
lea rdx, [0x0044caf4]
mov rcx, rdi
call fcn.004174b0
mov rdx, rbx
mov rcx, rdi
call fcn.004174b0
lea rdx, str._system32
mov rcx, rdi
call fcn.004174b0
movsxd rax, ebp
add ebp, esi
lea rcx, str._Djdk.attach.allowAttachSelftrue
add rax, rax
mov ebx, r15d
mov qword [r12 + rax*8], rdi
movsxd rax, ebp
add ebp, esi
add rax, rax
mov qword [r12 + rax*8], rcx
movsxd rax, ebp
add ebp, esi
add rax, rax
lea rcx, str.vfprintf
mov qword [r12 + rax*8], rcx
lea rcx, [0x004070e4]
mov qword [r12 + rax*8 + 8], rcx
movsxd rax, ebp
add ebp, esi
add rax, rax
lea rcx, str.exit
mov qword [r12 + rax*8], rcx
lea rcx, [0x00407134]
mov qword [r12 + rax*8 + 8], rcx
movsxd rax, ebp
add ebp, esi
add rax, rax
lea rcx, str.abort
movsxd rdi, ebp
cmp rdi, r15
mov qword [r12 + rax*8], rcx
lea rcx, [0x00407144]
mov qword [r12 + rax*8 + 8], rcx
mov dword [rsp + 0x38], 0x10006
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x3c], ebp
mov byte [rsp + 0x48], sil
jle 0x407550
mov r8, qword [r12]
lea rcx, str._JNILaunch__JNI_Option__d_s_n
mov edx, ebx
call fcn.0040bd0c
add ebx, esi
add r12, 0x10
sub rdi, rsi
jne 0x407533
lea rcx, str._JNILaunch__Creating_VM..._n
call fcn.0040bd0c
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x30]
call qword [rsp + 0x28]
cmp eax, r15d
je 0x40758a
lea rcx, str._JNILauncher__Create_Java_VM_Failed__n
call fcn.0040bd0c
mov eax, esi
jmp 0x407799
lea rcx, str._JNILaunch__Created_VM._n
call fcn.0040bd0c
mov ecx, 0x3e8
call fcn.004171e0
mov rdx, qword [rsp + 0xa8]
mov rcx, rax
mov rbx, rax
mov byte [rax], r15b
call fcn.004174b0
mov rcx, rbx
mov ebp, r15d
call fcn.004173f0
cmp eax, r15d
jle 0x4075e2
mov rdi, rbx
cmp byte [rdi], 0x2e
jne 0x4075d1
mov byte [rdi], 0x2f
mov rcx, rbx
add ebp, esi
add rdi, rsi
call fcn.004173f0
cmp ebp, eax
jl 0x4075c9
lea rcx, str._JNILauncher__Searching_for_clazz__s_n
mov rdx, rbx
call fcn.0040bd0c
mov rcx, qword [rsp + 0xa0]
mov rdx, rbx
mov rax, qword [rcx]
call qword [rax + 0x30]
cmp rax, r15
mov rdi, rax
jne 0x407616
lea rcx, str._JNILauncher__Searching_for_clazz_failed__n
jmp 0x40757e
lea rcx, str._JNILauncher__Searching_for_main_method__s_n
mov rdx, rbx
call fcn.0040bd0c
mov rcx, qword [rsp + 0xa0]
lea r9, str.__Ljava_lang_String__V
mov rax, qword [rcx]
lea r8, str.main
mov rdx, rdi
call qword [rax + 0x388]
mov rcx, qword [rsp + 0xa0]
lea rdx, str.java_lang_String
mov r8, qword [rcx]
mov r12, rax
call qword [r8 + 0x30]
mov rcx, qword [rsp + 0xa0]
mov r14d, dword [rsp + 0xd8]
mov r10, qword [rcx]
xor r9d, r9d
mov r8, rax
mov edx, r14d
call qword [r10 + 0x560]
cmp r14d, r15d
mov ebx, r15d
mov rbp, rax
jle 0x4076e3
mov r13, qword [rsp + 0xe0]
mov r8, qword [r13]
lea rcx, str._JNILauncher__Set_argument__d_to__.199s_n
mov edx, ebx
call fcn.0040bd0c
mov rcx, qword [rsp + 0xa0]
mov rdx, qword [r13]
mov rax, qword [rcx]
call qword [rax + 0x538]
mov rcx, qword [rsp + 0xa0]
mov r8d, ebx
mov r10, qword [rcx]
mov r9, rax
mov rdx, rbp
call qword [r10 + 0x570]
add ebx, esi
add r13, 8
cmp ebx, r14d
jl 0x407696
lea rcx, str._JNILauncher__About_to_execute_static_void_method._n
call fcn.0040bd0c
lea rcx, str._Utils__Closing_logging_file._n
call fcn.0040bd0c
mov rcx, qword [0x004691f0]
cmp rcx, r15
je 0x407713
call fcn.0041b550
mov qword [0x004691f0], r15
mov rcx, qword [rsp + 0xa0]
mov r9, rbp
mov r8, r12
mov rdx, rdi
call fcn.004070c0
mov rcx, qword [0x004691f8]
cmp rcx, r15
je 0x407744
call fcn.0040b4b0
cmp eax, r15d
je 0x407744
call fcn.0040bf48
lea rcx, str._JNILauncher__Run_complete._n
call fcn.0040bd0c
mov rcx, qword [rsp + 0xa0]
mov rax, qword [rcx]
call qword [rax + 0x78]
cmp rax, r15
je 0x407774
mov rcx, qword [rsp + 0xa0]
mov rax, qword [rcx]
call qword [rax + 0x80]
lea rcx, str._JNILauncher__Destroying_runtime._n
call fcn.0040bd0c
mov rcx, qword [rsp + 0x30]
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rcx, str._JNILauncher__Done__n
call fcn.0040bd0c
xor eax, eax
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret