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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [0x416afc]
mov dword [esp + 0x1c], eax
mov eax, dword [0x416ae0]
mov dword [esp + 8], eax
mov eax, dword [0x416adc]
mov dword [esp + 0x10], eax
mov eax, dword [0x416ad8]
push ebx
mov ebx, dword [0x416ad4]
mov dword [esp + 0x10], eax
mov eax, dword [0x416af8]
push esi
mov esi, dword [0x416ac8]
test esi, esi
push edi
mov edi, dword [0x416ad0]
mov dword [esp + 0x20], eax
mov eax, dword [0x416acc]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x30], edi
mov dword [esp + 0x38], eax
je 0x40132d
push esi
push str._JNILaunch__Switching_to__s_n
call fcn.00402538
push esi
call fcn.004030d2
add esp, 0xc
jmp 0x401338
push str._JNILaunch__No_working_directory_specified_n
call fcn.00402538
pop ecx
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0
push str._JAVA_OPTIONS
call esi
push 0
push str.JAVA_TOOL_OPTIONS
call esi
mov ecx, edi
call fcn.00401f6c
test eax, eax
jne 0x40136d
push str._JNILaunch___ERROR__Unable_to_load_JRE_library__n
call fcn.00402538
xor eax, eax
inc eax
jmp 0x401728
push str.JNI_CreateJavaVM
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, 0x104
push edi
mov dword [esp + 0x38], eax
call fcn.00402a4d
mov esi, eax
mov dword [esp], 0x413e43
push esi
mov byte [esi], 0
call fcn.00402bb0
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.00402538
push esi
call fcn.00402970
add esp, 0xc
push str._JNILaunch__________JNI_Launch_call_________n
call fcn.00402538
xor esi, esi
test ebx, ebx
pop ecx
jle 0x4013e3
mov eax, dword [esp + 0x20]
push dword [eax + esi*4]
push esi
push str._JNILaunch__JVM_Argument__d___s_n
call fcn.00402538
add esp, 0xc
inc esi
cmp esi, ebx
jl 0x4013c9
mov edi, dword [esp + 0x18]
xor esi, esi
test edi, edi
jle 0x401407
mov eax, dword [esp + 0x1c]
push dword [eax + esi*4]
push esi
push str._JNILaunch__CP_Argument__d___s_n
call fcn.00402538
add esp, 0xc
inc esi
cmp esi, edi
jl 0x4013ed
xor esi, esi
cmp dword [esp + 0x14], esi
jle 0x40142b
mov eax, dword [esp + 0x28]
push dword [eax + esi*4]
push esi
push str._JNILaunch__App_Argument__d___s_n
call fcn.00402538
add esp, 0xc
inc esi
cmp esi, dword [esp + 0x14]
jl 0x40140f
test edi, edi
jle 0x401448
mov eax, dword [esp + 0x1c]
lea eax, [eax + edi*4 - 4]
cmp dword [eax], 0
jne 0x401448
dec edi
sub eax, 4
test edi, edi
mov dword [esp + 0x18], edi
jg 0x401437
push 0x320
call fcn.00402a4d
mov edi, eax
xor esi, esi
mov dword [esp], 0xc350
call fcn.00402a4d
and dword [esp + 0x14], esi
cmp dword [esp + 0x1c], esi
mov ebx, eax
pop ecx
mov byte [ebx], 0
jle 0x4014ae
cmp dword [esp + 0x10], 0
jne 0x401480
push str._Djava.class.path
jmp 0x401485
push 0x4133d8
push ebx
call fcn.00402bb0
mov eax, dword [esp + 0x24]
pop ecx
pop ecx
mov ecx, dword [esp + 0x10]
push dword [eax + ecx*4]
push ebx
call fcn.00402bb0
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x20]
pop ecx
pop ecx
jl 0x401472
push ebx
call fcn.00402b10
test eax, eax
pop ecx
jbe 0x4014be
xor esi, esi
mov dword [edi], ebx
inc esi
and dword [esp + 0x10], 0
cmp dword [esp + 0x24], 0
jle 0x40150b
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
mov eax, dword [eax + ecx*4]
push eax
mov dword [esp + 0x30], eax
call fcn.00402b10
pop ecx
inc eax
push eax
call fcn.00402a4d
pop ecx
push dword [esp + 0x2c]
mov ebx, eax
push ebx
mov byte [ebx], 0
call fcn.00402bb0
mov dword [edi + esi*8], ebx
inc esi
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x2c]
pop ecx
pop ecx
jl 0x4014ca
push dword [esp + 0x30]
call fcn.00401184
mov dword [edi + esi*8], eax
inc esi
mov dword [edi + esi*8], str._Djdk.attach.allowAttachSelftrue
mov dword [edi + esi*8 + 0xc], 0x401226
inc esi
mov dword [edi + esi*8], str.vfprintf
mov dword [edi + esi*8 + 0xc], 0x401296
inc esi
mov dword [edi + esi*8], str.exit
inc esi
mov dword [edi + esi*8], str.abort
mov dword [edi + esi*8 + 4], 0x4012a9
inc esi
xor ebx, ebx
test esi, esi
pop ecx
mov dword [esp + 0x40], 0x10006
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], esi
mov byte [esp + 0x4c], 1
jle 0x401582
push dword [edi + ebx*8]
push ebx
push str._JNILaunch__JNI_Option__d_s_n
call fcn.00402538
add esp, 0xc
inc ebx
cmp ebx, esi
jl 0x40156c
push str._JNILaunch__Creating_VM..._n
call fcn.00402538
pop ecx
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x44]
push eax
call dword [esp + 0x40]
test eax, eax
je 0x4015ae
push str._JNILauncher__Create_Java_VM_Failed__n
jmp 0x401360
push str._JNILaunch__Created_VM._n
call fcn.00402538
mov dword [esp], 0x3e8
call fcn.00402a4d
pop ecx
push dword [esp + 0x38]
mov esi, eax
push esi
mov byte [esi], 0
call fcn.00402bb0
push esi
xor edi, edi
call fcn.00402b10
add esp, 0xc
test eax, eax
jle 0x4015f9
cmp byte [edi + esi], 0x2e
jne 0x4015ed
mov byte [edi + esi], 0x2f
push esi
inc edi
call fcn.00402b10
cmp edi, eax
pop ecx
jl 0x4015e3
push esi
push str._JNILauncher__Searching_for_clazz__s_n
call fcn.00402538
mov eax, dword [esp + 0x14]
pop ecx
pop ecx
mov ecx, dword [eax]
push esi
push eax
call dword [ecx + 0x18]
mov ebx, eax
test ebx, ebx
jne 0x401621
push str._JNILauncher__Searching_for_clazz_failed__n
jmp 0x401360
push esi
push str._JNILauncher__Searching_for_main_method__s_n
call fcn.00402538
mov eax, dword [esp + 0x14]
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 [esp + 0x2c], eax
mov eax, dword [esp + 0xc]
mov ecx, dword [eax]
push str.java_lang_String
push eax
call dword [ecx + 0x18]
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx]
push 0
push eax
push dword [esp + 0x1c]
push ecx
call dword [edx + 0x2b0]
xor esi, esi
cmp dword [esp + 0x14], esi
mov edi, eax
jle 0x4016bd
mov eax, dword [esp + 0x28]
lea eax, [eax + esi*4]
push dword [eax]
mov dword [esp + 0x38], eax
push esi
push str._JNILauncher__Set_argument__d_to__.199s_n
call fcn.00402538
mov eax, dword [esp + 0x40]
mov eax, dword [eax]
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
add esp, 0xc
push eax
push ecx
call dword [edx + 0x29c]
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx]
push eax
push esi
push edi
push ecx
call dword [edx + 0x2b8]
inc esi
cmp esi, dword [esp + 0x14]
jl 0x401677
push str._JNILauncher__About_to_execute_static_void_method._n
call fcn.00402538
pop ecx
call fcn.00402641
mov eax, dword [esp + 0xc]
push edi
push dword [esp + 0x30]
push ebx
call fcn.0040116d
add esp, 0xc
call fcn.00402627
push str._JNILauncher__Run_complete._n
call fcn.00402538
mov eax, dword [esp + 0x10]
pop ecx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3c]
test eax, eax
je 0x401707
mov eax, dword [esp + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x40]
push str._JNILauncher__Destroying_runtime._n
call fcn.00402538
mov eax, dword [esp + 0x40]
pop ecx
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
push str._JNILauncher__Done__n
call fcn.00402538
xor eax, eax
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret