Function at 0x405d30
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.00406c70
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 [0x412880], eax
sub esp, 4
xor edx, edx
test eax, eax
jne 0x405d70
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 [0x412898], 0
mov eax, 0x6e75614c
mov edi, 0x6a346863
mov dword [0x412890], eax
mov esi, 9
xor ecx, ecx
mov dword [0x412894], edi
xor edx, edx
xor ebx, ebx
mov dword [0x4122d0], esi
mov eax, 0x104
xor edi, edi
mov dword [0x4122d4], ebx
lea esi, [ebp - 0x128]
mov ebx, 0x104
mov dword [0x4122d8], ecx
mov dword [0x4122dc], 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 [0x412880]
mov dword [esp], edx
call sub.KERNEL32.dll_GetModuleFileNameA
sub esp, 0xc
test eax, eax
je 0x406350
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 0x406350
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.00401c30
xor edx, edx
test eax, eax
je 0x405d60
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 0x405e7e
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [esp], eax
mov ecx, 0x40a020
mov dword [esp + 4], ecx
call ebx
sub esp, 8
mov eax, dword [0x40a090]
test eax, eax
je 0x405eb0
mov ebx, dword [0x40a020]
mov edx, 0x409102
test ebx, ebx
jne 0x405e9b
mov edx, 0x409106
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 [0x412880]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x40638b
mov dword [esp + 4], eax
mov edi, dword [0x412880]
mov dword [esp], edi
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x405f35
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x405f35
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + 0x412890], al
inc edx
test al, al
jne 0x405f0f
mov edx, dword [0x40a028]
test edx, edx
je 0x405f35
mov eax, dword [0x40a090]
test eax, eax
jne 0x40641f
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 [0x412880]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x4063a6
mov dword [esp + 4], eax
mov edi, dword [0x412880]
mov dword [esp], edi
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x405fba
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x405fba
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + 0x412d10], al
inc edx
test al, al
jne 0x405f94
mov edx, dword [0x40a028]
test edx, edx
je 0x405fba
mov eax, dword [0x40a090]
test eax, eax
jne 0x406447
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 [0x412880]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x406361
mov dword [esp + 4], eax
mov edi, dword [0x412880]
mov dword [esp], edi
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x406377
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x406377
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + 0x412910], al
inc edx
test al, al
jne 0x406021
mov edx, dword [0x40a028]
test edx, edx
je 0x406047
mov eax, dword [0x40a090]
test eax, eax
jne 0x4063f7
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 [0x412880]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x4063c1
mov dword [esp + 4], eax
mov ecx, dword [0x412880]
mov dword [esp], ecx
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x4060e6
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x4060e6
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + ebx], al
inc edx
test al, al
jne 0x4060c3
mov edi, dword [0x40a028]
test edi, edi
je 0x4060e6
mov eax, dword [0x40a090]
test eax, eax
jne 0x406796
cmp byte [ebp - 0x1a8], 0
je 0x406138
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 0x40646f
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, 0x412770
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 [0x412880]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x4063dc
mov dword [esp + 4], eax
mov edx, dword [0x412880]
mov dword [esp], edx
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x406266
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x406266
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + ebp - 0x3d8], al
inc edx
test al, al
jne 0x4061ed
mov ecx, dword [0x40a028]
test ecx, ecx
je 0x406214
mov eax, dword [0x40a090]
test eax, eax
jne 0x4067b9
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 0x40623f
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 [0x40a090]
test eax, eax
jne 0x4064a6
mov dword [esp + 4], esi
lea edx, [ebp - 0x128]
mov dword [esp], edx
call fcn.00404740
xor edx, edx
test eax, eax
je 0x405d60
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, 0x40a1a4
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 0x4064c0
mov eax, dword [0x40a090]
test eax, eax
je 0x406350
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 [0x412910], 0
sub esp, 4
mov eax, dword [0x40a090]
test eax, eax
je 0x406350
mov esi, str.Startup_error_message_not_defined.
mov dword [esp + 8], esi
jmp 0x406335
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [0x412890], 0
sub esp, 4
jmp 0x405f35
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [0x412d10], 0
sub esp, 4
jmp 0x405fba
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [ebp - 0x1a8], 0
sub esp, 4
jmp 0x4060e6
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [ebp - 0x3d8], 0
sub esp, 4
jmp 0x406266
mov dword [esp], eax
mov edi, 0x412910
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 0x406047
mov dword [esp], eax
mov edi, 0x412890
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 0x405f35
mov dword [esp], eax
mov edi, 0x412d10
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 0x405fba
mov eax, dword [0x40a090]
test eax, eax
jne 0x406482
mov edx, 0xb7
jmp 0x405d60
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 0x405d60
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 0x406266
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 0x406323
mov dword [esp + 4], esi
lea ebx, [ebp - 0x128]
mov dword [esp], ebx
call fcn.004051e0
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 [0x412880]
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceExA
sub esp, 0x10
test eax, eax
je 0x406811
mov dword [esp + 4], eax
mov edx, dword [0x412880]
mov dword [esp], edx
call sub.KERNEL32.dll_LoadResource
sub esp, 8
test eax, eax
je 0x4065c4
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
test eax, eax
mov ecx, eax
je 0x4065c4
xor edx, edx
movzx eax, byte [edx + ecx]
mov byte [edx + ebx], al
inc edx
test al, al
jne 0x406587
mov ecx, dword [0x40a028]
test ecx, ecx
je 0x4065c4
mov eax, dword [0x40a090]
test eax, eax
je 0x4065c4
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 [0x4122c0], eax
mov ebx, dword [0x40a024]
test ebx, ebx
je 0x4067e2
mov dword [esp], 0x40a1a4
call sub.msvcrt.dll_strlen
cmp byte [eax + 0x40a1a3], 0x5c
je 0x406600
mov ecx, 0x5c
mov word [eax + 0x40a1a4], cx
mov eax, str.binjava.exe
mov dword [esp + 4], eax
mov dword [esp], 0x40a1a4
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], 0x40a2a8
call fcn.004033f0
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], 0x40a2a8
call fcn.004033f0
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.00403790
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], 0x40a2a8
call fcn.00403100
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00405390
mov esi, dword [ebp + 8]
mov dword [esp], esi
call fcn.00405b60
mov eax, dword [0x40a090]
test eax, eax
jne 0x406724
mov edx, 1
jmp 0x405d60
mov dword [esp], eax
mov edi, 0x40a1a4
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 [0x40a090]
test eax, eax
je 0x40671a
mov dword [esp], eax
mov ebx, 0x40a2a8
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 [0x40a090]
test ebx, ebx
je 0x40671a
mov dword [esp], 0x40a2a8
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 0x405d60
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 0x4060e6
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 0x406214
mov dword [esp], 0x40a1a4
call sub.msvcrt.dll_strlen
cmp byte [eax + 0x40a1a3], 0x5c
je 0x406803
mov edi, 0x5c
mov word [eax + 0x40a1a4], di
mov edx, str.binjavaw.exe
mov dword [esp + 4], edx
jmp 0x406609
mov dword [esp], 0
call sub.KERNEL32.dll_SetLastError
mov byte [ebp - 0x83f8], 0
sub esp, 4
jmp 0x4065c4