Function at 0x405a50
Capabilities:
Check mutex on windows
Extract resource via kernel32 functions
Get common file path
Get memory capacity
Query environment variable
Set environment variable

Disassembly:
push ebp
mov eax, 0x10468
mov ebp, esp
call fcn.00406960
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 [0x411680], eax
sub esp, 4
xor edx, edx
test eax, eax
jne 0x405a90
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 [0x411698], 0
mov eax, 0x6e75614c
mov edi, 0x6a346863
mov dword [0x411690], eax
mov esi, 9
xor ecx, ecx
mov dword [0x411694], edi
xor edx, edx
xor ebx, ebx
mov dword [0x4111d0], esi
mov eax, 0x104
xor edi, edi
mov dword [0x4111d4], ebx
lea esi, [ebp - 0x128]
mov ebx, 0x104
mov dword [0x4111d8], ecx
mov dword [0x4111dc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.msvcrt.dll_memset
mov dword [esp + 8], ebx
lea ecx, [ebp - 0x128]
mov dword [esp + 4], ecx
mov edx, dword [0x411680]
mov dword [esp], edx
call sub.KERNEL32.dll_GetModuleFileNameA
sub esp, 0xc
test eax, eax
je 0x406070
mov ecx, 0x5c
lea ebx, [ebp - 0x128]
mov dword [esp + 4], ecx
mov dword [esp], ebx
call sub.msvcrt.dll_strrchr
mov esi, eax
sub esi, ebx
cmp esi, 0xffffffff
je 0x406070
mov dword [esp + 8], esi
lea eax, [ebp - 0x128]
mov dword [esp + 4], eax
mov edi, dword [ebp + 8]
mov dword [esp], edi
call fcn.00401c10
xor edx, edx
test eax, eax
je 0x405a80
mov dword [esp], str.kernel32
call sub.KERNEL32.dll_GetModuleHandleA
sub esp, 4
mov edx, str.IsWow64Process
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_GetProcAddress
sub esp, 8
test eax, eax
mov ebx, eax
je 0x405b9e
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [esp], eax
mov ecx, 0x409020
mov dword [esp + 4], ecx
call ebx
sub esp, 8
mov eax, dword [0x409090]
test eax, eax
je 0x405bd0
mov ebx, dword [0x409020]
mov edx, 0x408102
test ebx, ebx
jne 0x405bbb
mov edx, 0x408106
mov dword [esp + 8], edx
mov edi, str.WOW64:_t_t_s_n
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov ecx, 0xa
mov edx, 0xa
mov ebx, 0x400
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov eax, dword [0x411680]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x4060ab
mov dword [esp + 4], eax
mov edi, dword [0x411680]
mov dword [esp], edi
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x405c55
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x405c55
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + 0x411690], al
inc edx
test al, al
jne 0x405c2f
mov edx, dword [0x409028]
test edx, edx
je 0x405c55
mov eax, dword [0x409090]
test eax, eax
jne 0x40613f
mov ecx, 0x16
mov edx, 0xa
mov ebx, 0x400
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov eax, dword [0x411680]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x4060c6
mov dword [esp + 4], eax
mov edi, dword [0x411680]
mov dword [esp], edi
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x405cda
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x405cda
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + 0x411b10], al
inc edx
test al, al
jne 0x405cb4
mov edx, dword [0x409028]
test edx, edx
je 0x405cda
mov eax, dword [0x409090]
test eax, eax
jne 0x406167
mov ecx, 0x65
mov edx, 0xa
mov ebx, 0x400
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov eax, dword [0x411680]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x406081
mov dword [esp + 4], eax
mov edi, dword [0x411680]
mov dword [esp], edi
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x406097
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x406097
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + 0x411710], al
inc edx
test al, al
jne 0x405d41
mov edx, dword [0x409028]
test edx, edx
je 0x405d67
mov eax, dword [0x409090]
test eax, eax
jne 0x406117
mov edx, pe_nt_image_headers32
xor eax, eax
lea ebx, [ebp - 0x1a8]
mov dword [esp + 8], edx
mov edi, 0x400
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_memset
mov dword [esp + 0xc], edi
mov ecx, 0x17
mov edx, 0xa
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov eax, dword [0x411680]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x4060e1
mov dword [esp + 4], eax
mov ecx, dword [0x411680]
mov dword [esp], ecx
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x405e06
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x405e06
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + ebx], al
inc edx
test al, al
jne 0x405de3
mov edi, dword [0x409028]
test edi, edi
je 0x405e06
mov eax, dword [0x409090]
test eax, eax
jne 0x4064b6
cmp byte [ebp - 0x1a8], 0
je 0x405e58
mov ecx, 0xc
mov edx, 1
xor edi, edi
mov dword [ebp - 0x1b8], ecx
xor eax, eax
mov dword [ebp - 0x1b0], edx
mov dword [ebp - 0x1b4], edi
mov dword [esp + 8], ebx
lea ebx, [ebp - 0x1b8]
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.KERNEL32.dll_CreateMutexA
sub esp, 0xc
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xb7
je 0x40618f
xor eax, eax
mov edi, 0x104
lea ebx, [ebp - 0x2c8]
mov dword [esp + 8], edi
lea edi, [ebp - 0x3d8]
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_memset
mov dword [esp], edi
xor edx, edx
mov ecx, 0x104
mov dword [esp + 8], ecx
mov edi, 0xa
mov dword [esp + 4], edx
call sub.msvcrt.dll_memset
mov dword [esp], 0x104
mov eax, 0x411570
mov dword [esp + 4], eax
call sub.KERNEL32.dll_GetCurrentDirectoryA
sub esp, 8
mov ecx, 0x400
mov edx, 8
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov eax, dword [0x411680]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x4060fc
mov dword [esp + 4], eax
mov edx, dword [0x411680]
mov dword [esp], edx
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x405f86
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x405f86
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + ebp - 0x3d8], al
inc edx
test al, al
jne 0x405f0d
mov ecx, dword [0x409028]
test ecx, ecx
je 0x405f34
mov eax, dword [0x409090]
test eax, eax
jne 0x4064d9
mov dword [esp + 8], esi
lea eax, [ebp - 0x128]
mov dword [esp + 4], eax
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 0x405f5f
mov word [eax + ebx], 0x5c
mov dword [esp], ebx
lea edi, [ebp - 0x3d8]
mov dword [esp + 4], edi
call sub.msvcrt.dll_strcat
mov dword [esp], ebx
call sub.msvcrt.dll__chdir
mov eax, dword [0x409090]
test eax, eax
jne 0x4061c6
mov dword [esp + 4], esi
lea edx, [ebp - 0x128]
mov dword [esp], edx
call fcn.00404580
xor edx, edx
test eax, eax
je 0x405a80
xor edx, edx
lea edi, [ebp - 0x3d8]
mov eax, 0x104
mov dword [esp + 4], edx
mov ebx, 0x7fff
mov dword [esp], edi
mov dword [esp + 8], eax
call sub.msvcrt.dll_memset
mov dword [esp], edi
mov ecx, 0x4090a0
mov dword [esp + 4], ecx
call sub.msvcrt.dll_strcpy
mov dword [esp], edi
xor edi, edi
call sub.msvcrt.dll_strlen
xor ecx, ecx
mov edx, 0x6e69625c
mov byte [eax + ebp - 0x3d4], cl
mov dword [eax + ebp - 0x3d8], edx
mov dword [esp + 4], edi
lea edi, [ebp - 0x83d8]
mov dword [esp + 8], ebx
mov ebx, 0x7ffe
mov dword [esp], edi
call sub.msvcrt.dll_memset
mov dword [esp + 4], edi
mov edx, 0x7fff
mov dword [esp + 8], edx
mov dword [esp], str.Path
call sub.KERNEL32.dll_GetEnvironmentVariableA
sub esp, 0xc
lea ecx, [ebp - 0x3d8]
sub ebx, eax
mov dword [esp], ecx
call sub.msvcrt.dll_strlen
cmp ebx, eax
jae 0x4061e0
mov eax, dword [0x409090]
test eax, eax
je 0x406070
mov esi, str.appendToPathVar_failed.
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
lea esi, [esi]
lea edi, [edi]
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
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [0x411710], 0
sub esp, 4
mov eax, dword [0x409090]
test eax, eax
je 0x406070
mov esi, str.Startup_error_message_not_defined.
mov dword [esp + 8], esi
jmp 0x406055
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [0x411690], 0
sub esp, 4
jmp 0x405c55
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [0x411b10], 0
sub esp, 4
jmp 0x405cda
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [ebp - 0x1a8], 0
sub esp, 4
jmp 0x405e06
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [ebp - 0x3d8], 0
sub esp, 4
jmp 0x405f86
mov dword [esp], eax
mov edi, 0x411710
mov ebx, 0x65
mov dword [esp + 0xc], edi
mov ecx, str.Resource__d:_t_s_n
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
call sub.msvcrt.dll_fprintf
jmp 0x405d67
mov dword [esp], eax
mov edi, 0x411690
mov ebx, 0xa
mov dword [esp + 0xc], edi
mov ecx, str.Resource__d:_t_s_n
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
call sub.msvcrt.dll_fprintf
jmp 0x405c55
mov dword [esp], eax
mov edi, 0x411b10
mov ebx, 0x16
mov dword [esp + 0xc], edi
mov ecx, str.Resource__d:_t_s_n
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
call sub.msvcrt.dll_fprintf
jmp 0x405cda
mov eax, dword [0x409090]
test eax, eax
jne 0x4061a2
mov edx, 0xb7
jmp 0x405a80
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 0x405a80
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 0x405f86
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov edx, 0x3b
lea ecx, [ebp - 0x3d8]
mov word [eax + ebp - 0x83d8], dx
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 0x406043
mov dword [esp + 4], esi
lea ebx, [ebp - 0x128]
mov dword [esp], ebx
call fcn.00404ee0
cld
xor eax, eax
lea edx, [ebp - 0x83f8]
mov edi, edx
mov ecx, 5
mov ebx, edx
rep stosd dword es:[edi], eax
mov edx, 0x14
mov ecx, 0xa
mov edi, 0x400
mov dword [esp + 0xc], edi
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov eax, dword [0x411680]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x406531
mov dword [esp + 4], eax
mov edx, dword [0x411680]
mov dword [esp], edx
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x4062e4
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x4062e4
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + ebx], al
inc edx
test al, al
jne 0x4062a7
mov ecx, dword [0x409028]
test ecx, ecx
je 0x4062e4
mov eax, dword [0x409090]
test eax, eax
je 0x4062e4
mov dword [esp + 0xc], ebx
mov edx, 0x14
mov edi, str.Resource__d:_t_s_n
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], ebx
call sub.msvcrt.dll_atoi
mov dword [0x4111c0], eax
mov ebx, dword [0x409024]
test ebx, ebx
je 0x406502
mov dword [esp], 0x4090a0
call sub.msvcrt.dll_strlen
cmp byte [eax + 0x40909f], 0x5c
je 0x406320
mov ecx, 0x5c
mov word [eax + 0x4090a0], cx
mov eax, str.binjava.exe
mov dword [esp + 4], eax
mov dword [esp], 0x4090a0
lea ebx, [ebp - 0x8438]
call sub.msvcrt.dll_strcat
mov ecx, 0x40
mov dword [ebp - 0x8438], ecx
mov dword [esp], ebx
mov ebx, 0x19
call sub.KERNEL32.dll_GlobalMemoryStatusEx
sub esp, 4
mov edx, str._Xms
mov ecx, 0x1a
mov dword [esp + 0x14], edx
mov eax, dword [ebp - 0x8428]
mov edi, dword [ebp - 0x8424]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edi
mov dword [esp + 4], ebx
mov ebx, 0x1b
mov dword [esp], 0x4091a4
call fcn.00403230
mov edx, str._Xmx
mov ecx, 0x1c
mov dword [esp + 0x14], edx
mov eax, dword [ebp - 0x8428]
mov edi, dword [ebp - 0x8424]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edi
xor edi, edi
mov dword [esp + 4], ebx
lea ebx, [ebp - 0x10438]
mov dword [esp], 0x4091a4
call fcn.00403230
mov dword [esp], ebx
mov edx, 0x8000
mov dword [esp + 8], edx
mov dword [esp + 4], edi
call sub.msvcrt.dll_memset
mov dword [esp], ebx
lea eax, [ebp - 0x128]
mov dword [esp + 4], eax
call fcn.004035d0
mov dword [esp + 0xc], esi
lea ecx, [ebp - 0x128]
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
lea ebx, [ebp - 0x128]
mov dword [esp], 0x4091a4
call fcn.00402f40
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00405090
mov esi, dword [ebp + 8]
mov dword [esp], esi
call fcn.00405880
mov eax, dword [0x409090]
test eax, eax
jne 0x406444
mov edx, 1
jmp 0x405a80
mov dword [esp], eax
mov edi, 0x4090a0
mov esi, str.Launcher:_t_s_n
mov dword [esp + 8], edi
mov dword [esp + 4], esi
call sub.msvcrt.dll_fprintf
mov eax, dword [0x409090]
test eax, eax
je 0x40643a
mov dword [esp], eax
mov ebx, 0x4091a4
mov edx, str.Launcher_args:_t_s_n
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
call sub.msvcrt.dll_fprintf
mov ebx, dword [0x409090]
test ebx, ebx
je 0x40643a
mov dword [esp], 0x4091a4
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 0x405a80
mov dword [esp + 0xc], ebx
mov ecx, 0x17
mov edx, str.Resource__d:_t_s_n
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x405e06
mov dword [esp], eax
lea ecx, [ebp - 0x3d8]
mov edx, 8
mov dword [esp + 0xc], ecx
mov edi, str.Resource__d:_t_s_n
mov dword [esp + 8], edx
mov dword [esp + 4], edi
call sub.msvcrt.dll_fprintf
jmp 0x405f34
mov dword [esp], 0x4090a0
call sub.msvcrt.dll_strlen
cmp byte [eax + 0x40909f], 0x5c
je 0x406523
mov edi, 0x5c
mov word [eax + 0x4090a0], di
mov edx, str.binjavaw.exe
mov dword [esp + 4], edx
jmp 0x406329
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [ebp - 0x83f8], 0
sub esp, 4
jmp 0x4062e4