Function at 0x401c70
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes
Query environment variable
Set current directory
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x708
push esi
push edi
xor edi, edi
mov dword [ebp - 0x18], 1
mov dword [ebp - 4], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x38], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x404564], eax
mov esi, 0x404100
lea eax, [ebp - 0x140]
push esi
push eax
call sub.MSVCRT.dll_strcpy
and byte [ebp - 0x2a8], 0
lea eax, [ebp - 0x3ac]
push esi
push eax
call sub.MSVCRT.dll_strcpy
add esp, 0x10
lea eax, [ebp - 0x2a8]
push 0x104
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x401ce8
mov dword [ebp - 4], 0x2714
lea eax, [ebp - 0x2a8]
push eax
push str.module
call fcn.00401025
cmp dword [ebp - 4], edi
pop ecx
pop ecx
mov dword [ebp - 0x28], 0x404588
jne 0x401d4a
lea eax, [ebp - 0x2a8]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
mov esi, eax
dec esi
js 0x401d4a
cmp byte [ebp + esi - 0x2a8], 0x5c
jne 0x401d16
lea eax, [ebp + esi - 0x2a7]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2a8]
push eax
lea eax, [ebp - 0x3ac]
push eax
call sub.MSVCRT.dll_strcpy
and byte [ebp + esi - 0x3ac], 0
pop ecx
pop ecx
lea eax, [ebp - 0x3ac]
push ebx
push eax
push str.moddir
call fcn.00401025
cmp dword [ebp - 4], edi
pop ecx
pop ecx
jne 0x401ed5
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2a8]
push eax
call fcn.00401297
mov ebx, eax
push ebx
push str.inlen
call fcn.00401061
push edi
push 0x56
push ebx
push dword [ebp - 0x14]
call fcn.00401404
mov esi, eax
add esp, 0x20
cmp esi, edi
jle 0x401da5
mov eax, dword [ebp - 0x14]
lea eax, [esi + eax + 0x1c]
mov dword [ebp - 8], eax
jmp 0x401da8
mov dword [ebp - 8], edi
push edi
push str.main
push dword [ebp - 8]
call fcn.004014b8
add esp, 0xc
cmp dword [0x40457c], edi
mov dword [0x404574], eax
jne 0x401de0
push 0x404518
push 0x404514
push dword [ebp - 8]
call fcn.004014b8
add esp, 0xc
mov dword [0x40457c], eax
cmp esi, edi
jge 0x401dee
neg esi
mov dword [ebp - 4], esi
jmp 0x401ed5
cmp ebx, edi
jge 0x401dfe
mov dword [ebp - 4], 0x2713
jmp 0x401ed5
cmp ebx, dword [0x404014]
jge 0x401e12
mov dword [ebp - 4], 0x276a
jmp 0x401ed5
push edi
push str.nosign
push dword [ebp - 8]
call fcn.004014b8
add esp, 0xc
test eax, eax
jne 0x401e47
push dword [0x404014]
push dword [ebp - 0x14]
call fcn.00401557
pop ecx
test eax, eax
pop ecx
jne 0x401e47
mov dword [ebp - 4], 0x276b
jmp 0x401ed5
push 0xffffffffffffffff
push 0x4a
push ebx
push dword [ebp - 0x14]
call fcn.00401404
add esp, 0x10
cmp eax, edi
jle 0x401e6b
push eax
push dword [ebp - 0x14]
call fcn.004013bd
pop ecx
mov dword [ebp - 0x20], eax
pop ecx
jmp 0x401e6e
mov dword [ebp - 0x20], edi
push 0xffffffffffffffff
push 0x46
push ebx
push dword [ebp - 0x14]
call fcn.00401404
add esp, 0x10
cmp eax, edi
jle 0x401e92
push eax
push dword [ebp - 0x14]
call fcn.004013bd
pop ecx
mov dword [ebp - 0x24], eax
pop ecx
jmp 0x401e95
mov dword [ebp - 0x24], edi
mov eax, dword [0x404580]
cmp eax, edi
jne 0x401eb3
push 0x404588
push str.target
push dword [ebp - 8]
call fcn.004014b8
add esp, 0xc
push 0xffffd8ee
push 0x42
push ebx
mov dword [ebp - 0x3c], eax
push dword [ebp - 0x14]
call fcn.00401404
add esp, 0x10
cmp eax, edi
mov dword [ebp - 0x30], eax
jge 0x401ed5
neg eax
mov dword [ebp - 4], eax
push edi
push 0x404234
push dword [ebp - 8]
call fcn.004014b8
push edi
push str.execwd
push dword [ebp - 8]
mov dword [0x404560], eax
call fcn.004014b8
add esp, 0x18
test eax, eax
je 0x401f0a
lea eax, [ebp - 0x3ac]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp dword [ebp - 4], edi
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
jne 0x402509
lea eax, [ebp - 0x140]
push eax
push 0xe6
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jle 0x401f81
cmp byte [ebp + eax - 0x141], 0x5c
je 0x401f4c
lea eax, [ebp - 0x140]
push 0x4044f8
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
lea eax, [ebp - 0x140]
push eax
push str.temppath
call fcn.00401025
pop ecx
lea eax, [ebp - 0x140]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401f75
test al, 0x10
jne 0x401f8d
mov dword [ebp - 4], 0x2719
jmp 0x40223e
mov dword [ebp - 4], 0x2717
jmp 0x40223e
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0x3e8
div ecx
and eax, 0xffff
push eax
lea eax, [ebp - 0x1a4]
push str.X_X_X
push eax
call esi
lea eax, [ebp - 0x1a4]
push eax
lea eax, [ebp - 0x140]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x140]
push eax
push str.tempdir
call fcn.00401025
add esp, 0x20
lea eax, [ebp - 0x140]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x4021fc
push 0
mov ebx, str.path
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x3ac]
push 1
push eax
call sub.MSVCRT.dll_strlen
mov edi, eax
lea eax, [ebp - 0x140]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
pop ecx
mov ecx, dword [ebp - 0x10]
add ecx, edi
mov edi, dword [sym.imp.MSVCRT.dll_calloc]
lea eax, [eax + ecx + 0x14]
push eax
call edi
lea ecx, [ebp - 0x3ac]
mov dword [ebp - 0xc], eax
push ecx
lea ecx, [ebp - 0x140]
push ecx
push str._s__s_
push eax
call esi
mov ecx, dword [ebp - 0xc]
add esp, 0x18
add eax, ecx
push dword [ebp - 0x10]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x40207f
push dword [ebp - 0xc]
push ebx
call fcn.00401025
pop ecx
pop ecx
jmp 0x402086
mov dword [ebp - 4], 0x2716
push dword [ebp - 0xc]
call dword [sym.imp.MSVCRT.dll_free]
cmp dword [ebp - 4], 0
pop ecx
jne 0x40223e
push 0
push str.jars
push dword [ebp - 8]
lea eax, [ebp - 0x140]
mov dword [ebp - 0xc], eax
call fcn.004014b8
add esp, 0xc
test eax, eax
je 0x40213d
push 0x4044c0
push eax
mov dword [ebp - 0x34], 1
call dword [sym.imp.MSVCRT.dll_strtok]
pop ecx
pop ecx
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x1c], ebx
je 0x40213d
cmp byte [ebx], 0x2e
lea eax, [ebp - 0x140]
jne 0x4020ec
lea eax, [ebp - 0x3ac]
push 1
push eax
mov dword [ebp - 0x10], eax
call sub.MSVCRT.dll_strlen
mov edx, eax
push ebx
mov ebx, edx
call sub.MSVCRT.dll_strlen
push dword [ebp - 0xc]
add ebx, eax
call sub.MSVCRT.dll_strlen
add esp, 0xc
lea eax, [ebx + eax + 0xa]
push eax
call edi
push dword [ebp - 0x1c]
mov ebx, eax
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push str._s__s_s
push ebx
call esi
push 0x4044c0
push 0
mov dword [ebp - 0xc], ebx
call dword [sym.imp.MSVCRT.dll_strtok]
add esp, 0x24
jmp 0x4020d2
push 1
push dword [ebp - 0xc]
call sub.MSVCRT.dll_strlen
mov ebx, eax
lea eax, [ebp - 0x3ac]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
lea eax, [ebx + eax + 0xa]
pop ecx
push eax
call edi
mov ebx, eax
lea eax, [ebp - 0x3ac]
push eax
mov dword [ebp - 0x10], ebx
push dword [ebp - 0xc]
push str._s__s
push ebx
call esi
add esp, 0x18
mov dword [ebp - 0xc], ebx
mov ebx, str.classpath
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
mov dword [ebp - 0x1c], eax
jle 0x4021c7
push 1
push dword [ebp - 0x10]
call sub.MSVCRT.dll_strlen
pop ecx
mov ecx, dword [ebp - 0x1c]
lea eax, [eax + ecx + 0xa]
push eax
call edi
push dword [ebp - 0x10]
mov edi, eax
push 0x40449c
push edi
call esi
add esp, 0x14
add eax, edi
push dword [ebp - 0x1c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov dword [ebp - 0xc], edi
mov edi, dword [ebp - 0xc]
push 0x404498
push edi
call sub.MSVCRT.dll_strcat
push 0x22
push edi
call section..text
push edi
push ebx
call fcn.00401025
add esp, 0x18
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x402205
mov dword [ebp - 4], 0x2716
jmp 0x40223e
mov dword [ebp - 4], 0x2718
jmp 0x40223e
push dword [0x404010]
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x4b0]
push str._s_sboot.class
push eax
call esi
push dword [ebp - 0x30]
push dword [ebp - 0x14]
call fcn.004013bd
push eax
lea eax, [ebp - 0x4b0]
push eax
call fcn.0040168b
add esp, 0x20
mov dword [ebp - 4], eax
xor edi, edi
push edi
push 0x404484
push dword [ebp - 8]
call fcn.004014b8
push edi
push str.minver
push dword [ebp - 8]
mov dword [ebp - 0x1c], eax
call fcn.004014b8
push 0x404588
push 0x404478
push dword [ebp - 8]
mov dword [ebp - 0x2c], eax
call fcn.004014b8
push dword [ebp - 0x14]
mov dword [0x404578], eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0x28
cmp dword [ebp - 4], edi
mov dword [ebp - 0x14], edi
jne 0x4024c3
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x604]
push str._sJz.Ky.Tx
push eax
call esi
xor ebx, ebx
add esp, 0xc
xor eax, eax
cmp dword [ebp - 0x20], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 8], 1
setne al
inc eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 8], eax
jg 0x4024c3
mov edi, dword [ebp - 0x3c]
mov dword [ebp - 0x18], 1
cmp byte [edi], 0
je 0x4023bc
xor eax, eax
cmp ebx, eax
jne 0x4024b6
cmp dword [ebp - 4], eax
jne 0x4023c4
cmp dword [ebp - 0x1c], eax
jne 0x4022fd
cmp dword [ebp - 0x34], eax
je 0x402304
mov eax, 0x404468
jmp 0x402309
mov eax, 0x404464
push 0
lea ecx, [ebp - 0x2a8]
push dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x140]
push dword [0x404010]
push ecx
push dword [ebp - 0xc]
push eax
mov al, byte [edi]
push eax
call fcn.00401b08
push eax
call fcn.0040108a
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x4023b6
push ebx
mov dword [ebp - 0x30], 1
call fcn.00401119
cmp eax, 0x3039
pop ecx
mov dword [ebp - 0x18], eax
jne 0x402397
push dword [ebp - 0x1c]
lea eax, [ebp - 0x2a8]
push dword [ebp + 8]
push eax
lea eax, [ebp - 0x140]
push dword [0x404010]
push eax
mov al, byte [edi]
push dword [ebp - 0xc]
push 0x404460
push eax
call fcn.00401b08
push eax
call fcn.0040108a
push eax
call fcn.00401119
add esp, 0x28
cmp dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], eax
jne 0x4023bc
lea eax, [ebp - 0x604]
push 0
push eax
call fcn.00401297
pop ecx
test eax, eax
pop ecx
jge 0x4023b6
xor ebx, ebx
cmp dword [ebp - 0x18], 0x2710
ja 0x4023cd
inc edi
jmp 0x4022d7
test ebx, ebx
jne 0x4024b6
cmp dword [ebp - 0x18], 0x2710
jbe 0x4023d8
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], eax
jmp 0x4024af
cmp dword [ebp - 0x30], 0
je 0x402446
cmp dword [ebp - 0x2c], 0
mov eax, str.__to_Java__s_
jne 0x4023ee
mov eax, 0x404588
push dword [ebp - 0x2c]
push eax
lea eax, [ebp - 0x500]
push eax
call esi
lea eax, [ebp - 0x500]
push eax
push str.upgraded
push str.Your
lea eax, [ebp - 0x474]
push str._s_Java_VM_needs_to_be__s_s_before_this_program_can_be_run.
push eax
call esi
add esp, 0x20
cmp dword [ebp - 8], 2
je 0x402438
push dword [ebp - 0x20]
lea eax, [ebp - 0x140]
push eax
call fcn.004016e1
pop ecx
test eax, eax
pop ecx
jne 0x4024af
xor edi, edi
push edi
push dword [ebp - 0x28]
push edi
push str.upgradejavavm
jmp 0x40248d
push 0x404588
push str.installed
push 0x4043e0
lea eax, [ebp - 0x474]
push str._s_Java_VM_needs_to_be__s_s_before_this_program_can_be_run.
push eax
call esi
add esp, 0x14
cmp dword [ebp - 8], 2
je 0x402481
push dword [ebp - 0x20]
lea eax, [ebp - 0x140]
push eax
call fcn.004016e1
pop ecx
test eax, eax
pop ecx
jne 0x4024af
xor edi, edi
push edi
push dword [ebp - 0x28]
push edi
push str.nojavavm
lea eax, [ebp - 0x474]
push eax
call fcn.004015cb
push dword [ebp - 0x24]
mov dword [ebp - 0x10], edi
push eax
lea eax, [ebp - 0x140]
push eax
call fcn.004019df
add esp, 0x20
mov dword [ebp - 0x18], 1
inc dword [ebp - 8]
cmp dword [ebp - 4], 0
je 0x4022c1
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x708]
push str._s_e_
push eax
call esi
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x708]
push eax
call fcn.00401297
add esp, 0x14
cmp dword [ebp - 4], 0x2715
je 0x402509
lea eax, [ebp - 0x1a4]
push eax
lea eax, [ebp - 0x140]
push eax
call fcn.0040115e
pop ecx
pop ecx
mov edi, dword [ebp - 4]
pop ebx
test edi, edi
jle 0x40257b
push edi
call fcn.00401c35
pop ecx
test eax, eax
mov ecx, str.____s
jne 0x402526
mov ecx, 0x404588
push eax
lea eax, [ebp - 0x1a4]
push ecx
push eax
call esi
lea eax, [ebp - 0x1a4]
push eax
push edi
push dword [0x404010]
lea eax, [ebp - 0x474]
push str.__s_ERROR__d_s_
push eax
call esi
push dword [ebp - 0x38]
lea eax, [ebp - 0x474]
push dword [ebp - 0x28]
push edi
push str.errorcodes
push eax
call fcn.004015cb
push dword [ebp - 0x24]
mov dword [ebp - 0x18], edi
push eax
lea eax, [ebp - 0x140]
push eax
call fcn.004019df
add esp, 0x40
push dword [ebp - 0x18]
push 0x40439c
call fcn.00401061
mov eax, dword [ebp - 0x18]
pop ecx
pop ecx
pop edi
pop esi
leave
ret