Function at 0x405d89
Capabilities:
Get common file path
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
je 0x405db3
push dword [ebp + 8]
push str._JNILaunch__Switching_to__s_n
call fcn.00409ab5
push dword [ebp + 8]
call fcn.0041c014
add esp, 0xc
jmp 0x405dbe
push str._JNILaunch__No_working_directory_specified_n
call fcn.00409ab5
pop ecx
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
push str._JAVA_OPTIONS
call esi
push ebx
push str.JAVA_TOOL_OPTIONS
call esi
mov ecx, dword [ebp + 0x10]
call fcn.00408e6c
cmp eax, ebx
jne 0x405df2
push str._JNILaunch___ERROR__Unable_to_load_JRE_library__n
call fcn.00409ab5
xor eax, eax
inc eax
jmp 0x406177
push str.JNI_CreateJavaVM
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, 0x104
push edi
mov dword [ebp - 0x10], eax
call fcn.00418af7
mov esi, eax
mov dword [esp], 0x4442c4
push esi
mov byte [esi], bl
call fcn.00418d20
pop ecx
pop ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push esi
push str._JNILaunch__CWD__s_n
call fcn.00409ab5
push esi
call fcn.00418a1a
add esp, 0xc
push str._JNILaunch__________JNI_Launch_call_________n
call fcn.00409ab5
xor esi, esi
cmp dword [ebp + 0x14], ebx
pop ecx
jle 0x405e67
mov eax, dword [ebp + 0x18]
push dword [eax + esi*4]
push esi
push str._JNILaunch__JVM_Argument__d___s_n
call fcn.00409ab5
add esp, 0xc
inc esi
cmp esi, dword [ebp + 0x14]
jl 0x405e4d
mov edi, dword [ebp + 0x1c]
xor esi, esi
cmp edi, ebx
jle 0x405e89
mov eax, dword [ebp + 0x20]
push dword [eax + esi*4]
push esi
push str._JNILaunch__CP_Argument__d___s_n
call fcn.00409ab5
add esp, 0xc
inc esi
cmp esi, edi
jl 0x405e70
xor esi, esi
cmp dword [ebp + 0x24], ebx
jle 0x405eaa
mov eax, dword [ebp + 0x28]
push dword [eax + esi*4]
push esi
push str._JNILaunch__App_Argument__d___s_n
call fcn.00409ab5
add esp, 0xc
inc esi
cmp esi, dword [ebp + 0x24]
jl 0x405e90
cmp edi, ebx
jle 0x405ec4
mov eax, dword [ebp + 0x20]
lea eax, [eax + edi*4 - 4]
cmp dword [eax], ebx
jne 0x405ec4
dec edi
sub eax, 4
cmp edi, ebx
mov dword [ebp + 0x1c], edi
jg 0x405eb5
push 0x320
call fcn.00418af7
mov edi, eax
xor esi, esi
mov dword [esp], 0xc350
call fcn.00418af7
and dword [ebp + 8], esi
cmp dword [ebp + 0x1c], esi
mov ebx, eax
pop ecx
mov byte [ebx], 0
jle 0x405f22
cmp dword [ebp + 8], 0
jne 0x405ef9
push str._Djava.class.path
jmp 0x405efe
push 0x440288
push ebx
call fcn.00418d20
mov eax, dword [ebp + 0x20]
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
push dword [eax + ecx*4]
push ebx
call fcn.00418d20
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x1c]
pop ecx
pop ecx
jl 0x405eec
push ebx
call fcn.00418c80
test eax, eax
pop ecx
jbe 0x405f32
xor esi, esi
mov dword [edi], ebx
inc esi
and dword [ebp + 8], 0
cmp dword [ebp + 0x14], 0
jle 0x405f76
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + ecx*4]
push eax
mov dword [ebp - 0xc], eax
call fcn.00418c80
pop ecx
inc eax
push eax
call fcn.00418af7
pop ecx
push dword [ebp - 0xc]
mov ebx, eax
push ebx
mov byte [ebx], 0
call fcn.00418d20
mov dword [edi + esi*8], ebx
inc esi
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
pop ecx
pop ecx
jl 0x405f3c
push dword [ebp + 0x10]
call fcn.00405c56
mov dword [edi + esi*8], eax
inc esi
mov dword [edi + esi*8], str._Djdk.attach.allowAttachSelftrue
mov dword [edi + esi*8 + 0xc], 0x405cf8
inc esi
mov dword [edi + esi*8], str.vfprintf
mov dword [edi + esi*8 + 0xc], 0x405d68
inc esi
mov dword [edi + esi*8], str.exit
inc esi
mov dword [edi + esi*8], str.abort
mov dword [edi + esi*8 + 4], 0x405d7b
inc esi
xor ebx, ebx
test esi, esi
pop ecx
mov dword [ebp - 0x24], 0x10006
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], esi
mov byte [ebp - 0x18], 1
jle 0x405fe8
push dword [edi + ebx*8]
push ebx
push str._JNILaunch__JNI_Option__d_s_n
call fcn.00409ab5
add esp, 0xc
inc ebx
cmp ebx, esi
jl 0x405fd2
push str._JNILaunch__Creating_VM..._n
call fcn.00409ab5
pop ecx
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x14]
push eax
call dword [ebp - 0x10]
test eax, eax
je 0x406010
push str._JNILauncher__Create_Java_VM_Failed__n
jmp 0x405de5
push str._JNILaunch__Created_VM._n
call fcn.00409ab5
mov dword [esp], 0x3e8
call fcn.00418af7
pop ecx
push dword [ebp + 0xc]
mov esi, eax
push esi
mov byte [esi], 0
call fcn.00418d20
push esi
xor edi, edi
call fcn.00418c80
add esp, 0xc
test eax, eax
jle 0x40605a
cmp byte [edi + esi], 0x2e
jne 0x40604e
mov byte [edi + esi], 0x2f
push esi
inc edi
call fcn.00418c80
cmp edi, eax
pop ecx
jl 0x406044
push esi
push str._JNILauncher__Searching_for_clazz__s_n
call fcn.00409ab5
mov eax, dword [ebp - 8]
pop ecx
pop ecx
mov ecx, dword [eax]
push esi
push eax
call dword [ecx + 0x18]
mov ebx, eax
test ebx, ebx
jne 0x406081
push str._JNILauncher__Searching_for_clazz_failed__n
jmp 0x405de5
push esi
push str._JNILauncher__Searching_for_main_method__s_n
call fcn.00409ab5
mov eax, dword [ebp - 8]
pop ecx
pop ecx
mov ecx, dword [eax]
push str.__Ljava_lang_String__V
push str.main
push ebx
push eax
call dword [ecx + 0x1c4]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push str.java_lang_String
push eax
call dword [ecx + 0x18]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
push 0
push eax
push dword [ebp + 0x24]
push ecx
call dword [edx + 0x2b0]
xor esi, esi
cmp dword [ebp + 0x24], esi
mov edi, eax
jle 0x406111
mov eax, dword [ebp + 0x28]
lea eax, [eax + esi*4]
push dword [eax]
mov dword [ebp + 8], eax
push esi
push str._JNILauncher__Set_argument__d_to__.199s_n
call fcn.00409ab5
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
add esp, 0xc
push eax
push ecx
call dword [edx + 0x29c]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
push eax
push esi
push edi
push ecx
call dword [edx + 0x2b8]
inc esi
cmp esi, dword [ebp + 0x24]
jl 0x4060d1
push str._JNILauncher__About_to_execute_static_void_method._n
call fcn.00409ab5
pop ecx
call fcn.00409d0b
mov eax, dword [ebp - 8]
push edi
push dword [ebp - 0x10]
push ebx
call fcn.00405c3f
add esp, 0xc
call fcn.00409cf1
push str._JNILauncher__Run_complete._n
call fcn.00409ab5
mov eax, dword [ebp - 8]
pop ecx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3c]
test eax, eax
je 0x406157
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x40]
push str._JNILauncher__Destroying_runtime._n
call fcn.00409ab5
mov eax, dword [ebp - 0x14]
pop ecx
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
push str._JNILauncher__Done__n
call fcn.00409ab5
xor eax, eax
pop ecx
pop edi
pop esi
pop ebx
leave
ret