Function at 0x404d90
Capabilities:
Check mutex on windows
Get common file path
Get memory capacity
Query environment variable
Set environment variable

Disassembly:
push ebp
mov eax, 0x10468
mov ebp, esp
call fcn.004058d0
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], esi
mov dword [ebp - 4], edi
mov dword [esp], 0
call sub.KERNEL32.dll_GetModuleHandleA
mov dword [0x410880], eax
sub esp, 4
xor edx, edx
test eax, eax
jne 0x404dd0
mov ebx, dword [ebp - 0xc]
mov eax, edx
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov byte [0x410898], 0
mov edi, 0x6e75614c
mov esi, 0x6a346863
mov dword [0x410890], edi
mov ecx, 9
xor edx, edx
mov dword [0x410894], esi
xor ebx, ebx
xor eax, eax
mov dword [0x4102d0], ecx
mov edi, 0x104
lea ecx, [ebp - 0x128]
mov dword [0x4102d4], ebx
xor esi, esi
mov ebx, 0x104
mov dword [0x4102d8], edx
mov dword [0x4102dc], eax
mov dword [esp + 8], edi
lea edi, [ebp - 0x128]
mov dword [esp + 4], esi
mov dword [esp], ecx
call sub.msvcrt.dll_memset
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov edx, dword [0x410880]
mov dword [esp], edx
call sub.KERNEL32.dll_GetModuleFileNameA
sub esp, 0xc
test eax, eax
je 0x404f70
mov dword [esp], edi
mov edx, 0x5c
mov dword [esp + 4], edx
call sub.msvcrt.dll_strrchr
mov esi, eax
sub esi, edi
cmp esi, 0xffffffff
je 0x404f70
mov dword [esp + 8], esi
lea ecx, [ebp - 0x128]
mov dword [esp + 4], ecx
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call fcn.00401c30
xor edx, edx
test eax, eax
je 0x404dc0
mov dword [esp], str.kernel32
mov edi, str.IsWow64Process
call sub.KERNEL32.dll_GetModuleHandleA
sub esp, 4
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.KERNEL32.dll_GetProcAddress
sub esp, 8
test eax, eax
mov ebx, eax
je 0x404ed8
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [esp], eax
mov edx, 0x408020
mov dword [esp + 4], edx
call ebx
sub esp, 8
mov eax, dword [0x408090]
test eax, eax
je 0x404f0a
mov ebx, dword [0x408020]
mov edx, 0x407103
test ebx, ebx
jne 0x404ef5
mov edx, 0x407107
mov dword [esp + 8], edx
mov ecx, str.WOW64:_t_t_s_n
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 0xa
mov edx, 0x410890
mov edi, 0x410d10
mov dword [esp + 4], edx
call fcn.004020c0
mov dword [esp + 4], edi
mov dword [esp], 0x16
call fcn.004020c0
mov dword [esp], 0x65
mov eax, 0x410910
mov dword [esp + 4], eax
call fcn.004020c0
test eax, eax
jne 0x404f81
mov eax, dword [0x408090]
test eax, eax
je 0x404f70
mov esi, str.Startup_error_message_not_defined.
mov dword [esp + 8], esi
mov dword [esp], eax
mov edi, str.Error:_t_t_s_n
mov dword [esp + 4], edi
call sub.msvcrt.dll_fprintf
mov ebx, dword [ebp - 0xc]
xor edx, edx
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
mov eax, edx
pop ebp
ret
xor ecx, ecx
lea ebx, [ebp - 0x1a8]
mov eax, pe_nt_image_headers32
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp], ebx
call sub.msvcrt.dll_memset
mov dword [esp + 4], ebx
mov dword [esp], 0x17
call fcn.004020c0
cmp byte [ebp - 0x1a8], 0
je 0x40500d
mov eax, dword [0x408090]
test eax, eax
jne 0x4051c7
xor ecx, ecx
mov eax, 1
mov edi, 0xc
mov dword [ebp - 0x1b4], ecx
xor edx, edx
mov dword [ebp - 0x1b8], edi
mov dword [ebp - 0x1b0], eax
mov dword [esp + 8], ebx
lea ebx, [ebp - 0x1b8]
mov dword [esp + 4], edx
mov dword [esp], ebx
call sub.KERNEL32.dll_CreateMutexA
sub esp, 0xc
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xb7
je 0x4051e1
xor ecx, ecx
mov eax, 0x104
lea ebx, [ebp - 0x2c8]
mov dword [esp + 4], ecx
xor edi, edi
mov dword [esp + 8], eax
mov dword [esp], ebx
call sub.msvcrt.dll_memset
mov dword [esp + 4], edi
mov edx, 0x104
lea eax, [ebp - 0x3d8]
mov dword [esp + 8], edx
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [esp], 0x104
mov ecx, 0x410770
mov dword [esp + 4], ecx
call sub.KERNEL32.dll_GetCurrentDirectoryA
sub esp, 8
lea edx, [ebp - 0x3d8]
mov dword [esp + 4], edx
mov dword [esp], 8
call fcn.004020c0
test eax, eax
jne 0x40515b
mov dword [esp + 4], esi
lea ecx, [ebp - 0x128]
mov dword [esp], ecx
call fcn.00404150
xor edx, edx
test eax, eax
je 0x404dc0
mov edx, 0x104
lea edi, [ebp - 0x3d8]
xor ebx, ebx
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov ebx, 0x7fff
mov dword [esp], edi
call sub.msvcrt.dll_memset
mov dword [esp], edi
mov ecx, 0x4081a4
mov dword [esp + 4], ecx
call sub.msvcrt.dll_strcpy
mov dword [esp], edi
mov edi, 0x6e69625c
call sub.msvcrt.dll_strlen
mov dword [eax + ebp - 0x3d8], edi
xor edx, edx
xor ecx, ecx
mov byte [eax + ebp - 0x3d4], dl
lea edx, [ebp - 0x83d8]
mov edi, 0x7fff
mov dword [esp + 8], ebx
mov ebx, 0x7ffe
mov dword [esp + 4], ecx
mov dword [esp], edx
call sub.msvcrt.dll_memset
mov dword [esp + 8], edi
lea edi, [ebp - 0x83d8]
mov dword [esp + 4], edi
mov dword [esp], str.Path
call sub.KERNEL32.dll_GetEnvironmentVariableA
sub esp, 0xc
sub ebx, eax
lea eax, [ebp - 0x3d8]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
cmp ebx, eax
jae 0x405218
mov eax, dword [0x408090]
test eax, eax
je 0x404f70
mov esi, str.appendToPathVar_failed.
mov dword [esp + 8], esi
jmp 0x404f5f
mov dword [esp + 8], esi
lea edi, [ebp - 0x128]
mov dword [esp + 4], edi
mov dword [esp], ebx
call sub.msvcrt.dll_strncpy
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
cmp byte [eax + ebx - 1], 0x5c
je 0x405186
mov word [eax + ebx], 0x5c
mov dword [esp], ebx
lea edx, [ebp - 0x3d8]
mov dword [esp + 4], edx
call sub.msvcrt.dll_strcat
mov dword [esp], ebx
call sub.msvcrt.dll__chdir
mov eax, dword [0x408090]
test eax, eax
je 0x40507d
mov dword [esp + 8], ebx
mov ebx, str.Working_dir:_t_s_n
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x40507d
mov dword [esp + 8], ebx
mov edi, str.Create_mutex:_t_s_n
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x404fc4
mov eax, dword [0x408090]
test eax, eax
jne 0x4051f4
mov edx, 0xb7
jmp 0x404dc0
mov dword [esp], eax
mov ebx, str.Instance_already_exists.
mov esi, str.Error:_t_t_s_n
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
call sub.msvcrt.dll_fprintf
mov edx, 0xb7
jmp 0x404dc0
mov dword [esp], edi
mov ebx, 0x3b
call sub.msvcrt.dll_strlen
mov word [eax + ebp - 0x83d8], bx
lea ecx, [ebp - 0x3d8]
mov dword [esp + 4], ecx
mov dword [esp], edi
call sub.msvcrt.dll_strcat
mov dword [esp + 4], edi
mov dword [esp], str.Path
call sub.KERNEL32.dll_SetEnvironmentVariableA
sub esp, 8
test eax, eax
je 0x405140
mov dword [esp + 4], esi
lea edx, [ebp - 0x128]
lea ebx, [ebp - 0x83f8]
mov dword [esp], edx
mov edi, ebx
call fcn.00404610
cld
xor eax, eax
mov ecx, 5
rep stosd dword es:[edi], eax
mov dword [esp + 4], ebx
mov dword [esp], 0x14
call fcn.004020c0
mov dword [esp], ebx
call sub.msvcrt.dll_atoi
mov dword [0x4102c0], eax
mov edx, dword [0x408024]
test edx, edx
je 0x405460
mov dword [esp], 0x4081a4
call sub.msvcrt.dll_strlen
cmp byte [eax + 0x4081a3], 0x5c
je 0x4052ca
mov ebx, 0x5c
mov word [eax + 0x4081a4], bx
mov ecx, str.binjava.exe
mov dword [esp + 4], ecx
mov dword [esp], 0x4081a4
mov ebx, 0x40
lea edi, [ebp - 0x8438]
call sub.msvcrt.dll_strcat
mov dword [ebp - 0x8438], ebx
mov ebx, 0x1a
mov dword [esp], edi
mov edi, 0x19
call sub.KERNEL32.dll_GlobalMemoryStatusEx
sub esp, 4
mov edx, str._Xms
mov dword [esp + 0x14], edx
mov eax, dword [ebp - 0x8428]
mov ecx, dword [ebp - 0x8424]
mov dword [esp + 8], ebx
mov ebx, 0x1c
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 4], edi
mov edi, 0x1b
mov dword [esp], 0x4082a8
call fcn.004036b0
mov edx, str._Xmx
mov dword [esp + 0x14], edx
mov ecx, dword [ebp - 0x8424]
mov eax, dword [ebp - 0x8428]
mov dword [esp + 8], ebx
lea ebx, [ebp - 0x10438]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 4], edi
lea edi, [ebp - 0x128]
mov dword [esp], 0x4082a8
call fcn.004036b0
mov dword [esp], ebx
mov edx, 0x8000
xor eax, eax
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memset
mov dword [esp], ebx
lea ecx, [ebp - 0x128]
mov dword [esp + 4], ecx
call fcn.00403900
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], 0x4082a8
call fcn.004033a0
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.00404710
mov esi, dword [ebp + 8]
mov dword [esp], esi
call fcn.00404c60
mov eax, dword [0x408090]
test eax, eax
jne 0x4053e8
mov edx, 1
jmp 0x404dc0
mov dword [esp], eax
mov ecx, 0x4081a4
mov esi, str.Launcher:_t_s_n
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
call sub.msvcrt.dll_fprintf
mov eax, dword [0x408090]
test eax, eax
je 0x4053de
mov dword [esp], eax
mov edx, str.Launcher_args:_t_s_n
mov edi, 0x4082a8
mov dword [esp + 8], edi
mov dword [esp + 4], edx
call sub.msvcrt.dll_fprintf
mov ebx, dword [0x408090]
test ebx, ebx
je 0x4053de
mov dword [esp], 0x4082a8
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
mov eax, str.Args_length:_t_d_32768_chars_n
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fprintf
mov edx, 1
jmp 0x404dc0
mov dword [esp], 0x4081a4
call sub.msvcrt.dll_strlen
cmp byte [eax + 0x4081a3], 0x5c
je 0x405481
mov edi, 0x5c
mov word [eax + 0x4081a4], di
mov eax, str.binjavaw.exe
mov dword [esp + 4], eax
jmp 0x4052d3