Function at 0x140012430
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov rax, qword [rcx + 0x18]
mov ebp, 1
mov rbx, rcx
mov r8, qword [rax + 0x40]
cmp dword [r8 + 0xc], ebp
jbe 0x14001246c
mov rdx, qword [r8 + 0x10]
add rdx, 0x10
jmp 0x1400124a7
movzx ecx, byte [r8 + 0xb]
mov edx, ebp
shl edx, cl
dec edx
and edx, 2
shl rdx, 5
add rdx, qword [r8 + 0x18]
cmp dword [rdx + 0x18], 0x13
jne 0x14001248f
cmp qword [rdx + 0x10], 2
je 0x1400124a7
movsxd rax, dword [rdx + 0x1c]
test eax, eax
je 0x1400124a0
shl rax, 5
add rdx, rax
jmp 0x140012482
lea rdx, [0x140142280]
lea r8, str.premake
mov rcx, rbx
call fcn.1400160e0
mov rax, qword [rbx + 0x20]
lea r9, [0x1400acc8c]
mov r15, qword [rbx + 0x10]
mov esi, r9d
mov ecx, 0x2e
sub r15, qword [rax]
mov eax, 0x3521cfb3
mul r9d
mov eax, r9d
sub r15, 0x10
sub eax, edx
sar r15, 4
shr eax, 1
add eax, edx
shr eax, 5
imul eax, eax, 0x35
sub esi, eax
shl rsi, 4
add rsi, qword [rbx + 0x18]
xor edi, edi
mov eax, edi
nop dword [rax]
mov rdx, qword [rsi + rax*8 + 0x1e8]
cmp cl, byte [rdx + 0x18]
jne 0x140012513
cmp dil, byte [rdx + 0x19]
je 0x140012542
inc rax
cmp rax, 2
jl 0x140012500
mov rax, qword [rsi + 0x1e8]
mov r8, rbp
mov rdx, r9
mov qword [rsi + 0x1f0], rax
mov rcx, rbx
call fcn.1400244d0
mov rdx, rax
mov qword [rsi + 0x1e8], rax
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rdx
movzx eax, byte [rdx + 8]
or eax, 0x40
mov dword [rcx + 8], eax
mov rax, qword [rbx + 0x18]
add qword [rbx + 0x10], 0x10
cmp qword [rax + 0x18], rdi
jle 0x14001256a
mov rcx, rbx
call fcn.140021c00
cmp qword [0x140163d50], rdi
lea r13, [0x1400adc28]
mov r12d, 0x3b
je 0x140012664
mov eax, 0x3521cfb3
mov esi, r13d
mul r13d
mov eax, r13d
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 5
imul eax, eax, 0x35
sub esi, eax
mov rax, rdi
shl rsi, 4
add rsi, qword [rbx + 0x18]
nop dword [rax + rax]
mov rdx, qword [rsi + rax*8 + 0x1e8]
cmp r12b, byte [rdx + 0x18]
jne 0x1400125c4
cmp dil, byte [rdx + 0x19]
je 0x1400125f3
inc rax
cmp rax, 2
jl 0x1400125b0
mov rax, qword [rsi + 0x1e8]
mov r8, rbp
mov rdx, r13
mov qword [rsi + 0x1f0], rax
mov rcx, rbx
call fcn.140024340
mov rdx, rax
mov qword [rsi + 0x1e8], rax
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rdx
movzx eax, byte [rdx + 8]
or eax, 0x40
mov dword [rcx + 8], eax
add qword [rbx + 0x10], 0x10
mov rax, qword [rbx + 0x18]
mov rcx, qword [rbx + 0x10]
cmp qword [rax + 0x18], rdi
jle 0x140012623
mov rcx, rbx
call fcn.140021c00
mov rcx, qword [rbx + 0x10]
mov rdx, qword [0x140163d50]
test rdx, rdx
jne 0x140012634
mov dword [rcx + 8], edi
jmp 0x14001264d
mov rcx, rbx
call fcn.140024540
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rax
movzx eax, byte [rax + 8]
or eax, 0x40
mov dword [rcx + 8], eax
mov rax, qword [rbx + 0x18]
add qword [rbx + 0x10], 0x10
cmp qword [rax + 0x18], rdi
jle 0x140012664
mov rcx, rbx
call fcn.140021c00
lea rcx, str.PREMAKE_PATH
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov r14, rax
test rax, rax
je 0x14001274e
mov eax, 0x3521cfb3
mov esi, r13d
mul r13d
mov eax, r13d
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 5
imul eax, eax, 0x35
sub esi, eax
mov rax, rdi
shl rsi, 4
add rsi, qword [rbx + 0x18]
nop dword [rax]
nop dword [rax + rax]
mov rdx, qword [rsi + rax*8 + 0x1e8]
cmp r12b, byte [rdx + 0x18]
jne 0x1400126c4
cmp dil, byte [rdx + 0x19]
je 0x1400126f3
inc rax
cmp rax, 2
jl 0x1400126b0
mov rax, qword [rsi + 0x1e8]
mov r8, rbp
mov rdx, r13
mov qword [rsi + 0x1f0], rax
mov rcx, rbx
call fcn.140024340
mov rdx, rax
mov qword [rsi + 0x1e8], rax
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rdx
movzx eax, byte [rdx + 8]
or eax, 0x40
mov dword [rcx + 8], eax
mov rax, qword [rbx + 0x18]
add qword [rbx + 0x10], 0x10
cmp qword [rax + 0x18], rdi
jle 0x14001271b
mov rcx, rbx
call fcn.140021c00
mov rdx, r14
mov rcx, rbx
call fcn.140024540
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rax
movzx eax, byte [rax + 8]
or eax, 0x40
mov dword [rcx + 8], eax
mov rax, qword [rbx + 0x18]
add qword [rbx + 0x10], 0x10
cmp qword [rax + 0x18], rdi
jle 0x14001274e
mov rcx, rbx
call fcn.140021c00
mov eax, 0x3521cfb3
mov esi, r13d
mul r13d
mov eax, r13d
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 5
imul eax, eax, 0x35
sub esi, eax
mov rax, rdi
shl rsi, 4
add rsi, qword [rbx + 0x18]
nop word [rax + rax]
mov rdx, qword [rsi + rax*8 + 0x1e8]
cmp r12b, byte [rdx + 0x18]
jne 0x140012794
cmp dil, byte [rdx + 0x19]
je 0x1400127c3
inc rax
cmp rax, 2
jl 0x140012780
mov rax, qword [rsi + 0x1e8]
mov r8, rbp
mov rdx, r13
mov qword [rsi + 0x1f0], rax
mov rcx, rbx
call fcn.1400244d0
mov rdx, rax
mov qword [rsi + 0x1e8], rax
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rdx
movzx eax, byte [rdx + 8]
or eax, 0x40
mov dword [rcx + 8], eax
mov rax, qword [rbx + 0x18]
add qword [rbx + 0x10], 0x10
cmp qword [rax + 0x18], rdi
jle 0x1400127eb
mov rcx, rbx
call fcn.140021c00
mov rax, qword [rbx + 0x18]
mov r8, qword [rax + 0x40]
cmp dword [r8 + 0xc], ebp
jbe 0x140012803
mov rdx, qword [r8 + 0x10]
add rdx, 0x10
jmp 0x14001283d
movzx ecx, byte [r8 + 0xb]
shl ebp, cl
lea edx, [rbp - 1]
and edx, 2
shl rdx, 5
add rdx, qword [r8 + 0x18]
cmp dword [rdx + 0x18], 0x13
jne 0x140012825
cmp qword [rdx + 0x10], 2
je 0x14001283d
movsxd rax, dword [rdx + 0x1c]
test eax, eax
je 0x140012836
shl rax, 5
add rdx, rax
jmp 0x140012818
lea rdx, [0x140142280]
lea r8, str._USER_HOME_DIR
mov rcx, rbx
call fcn.1400160e0
lea r12, str._.premake
mov eax, 0x3521cfb3
mul r12d
mov r14d, r12d
mov eax, r12d
sub eax, edx
mov rsi, rdi
shr eax, 1
add eax, edx
shr eax, 5
imul eax, eax, 0x35
sub r14d, eax
shl r14, 4
add r14, qword [rbx + 0x18]
nop dword [rax + rax]
mov rbp, qword [r14 + rsi*8 + 0x1e8]
mov rcx, r12
lea rdx, [rbp + 0x18]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x1400128ca
inc rsi
cmp rsi, 2
jl 0x140012880
mov rax, qword [r14 + 0x1e8]
mov r8d, 9
mov rdx, r12
mov qword [r14 + 0x1f0], rax
mov rcx, rbx
call fcn.1400244d0
mov rbp, rax
mov qword [r14 + 0x1e8], rax
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rbp
movzx eax, byte [rbp + 8]
or eax, 0x40
mov dword [rcx + 8], eax
mov r8, qword [rbx + 0x18]
add qword [rbx + 0x10], 0x10
cmp qword [r8 + 0x18], rdi
jle 0x1400128f6
mov rcx, rbx
call fcn.140021c00
mov r8, qword [rbx + 0x18]
lea rbp, str.__usr_local_share_premake__usr_share_premake
mov eax, 0x3521cfb3
mul ebp
mov r14d, ebp
mov eax, ebp
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 5
imul eax, eax, 0x35
sub r14d, eax
shl r14, 4
add r14, r8
nop
mov rsi, qword [r14 + rdi*8 + 0x1e8]
mov rcx, rbp
lea rdx, [rsi + 0x18]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x14001296a
inc rdi
cmp rdi, 2
jl 0x140012920
mov rax, qword [r14 + 0x1e8]
mov r8d, 0x2c
mov rdx, rbp
mov qword [r14 + 0x1f0], rax
mov rcx, rbx
call fcn.1400244d0
mov rsi, rax
mov qword [r14 + 0x1e8], rax
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rsi
movzx eax, byte [rsi + 8]
or eax, 0x40
mov dword [rcx + 8], eax
mov rax, qword [rbx + 0x18]
add qword [rbx + 0x10], 0x10
cmp qword [rax + 0x18], 0
jle 0x140012993
mov rcx, rbx
call fcn.140021c00
mov rax, qword [rbx + 0x20]
mov rdi, qword [rbx + 0x10]
mov rcx, rdi
sub rcx, qword [rax]
sub rcx, 0x10
sar rcx, 4
sub ecx, r15d
cmp ecx, 2
jl 0x1400129bd
mov edx, ecx
mov rcx, rbx
call fcn.14001ca70
jmp 0x1400129e5
test ecx, ecx
jne 0x1400129e9
xor r8d, r8d
lea rdx, [0x1400aca43]
mov rcx, rbx
call fcn.140024340
mov qword [rdi], rax
movzx ecx, byte [rax + 8]
or ecx, 0x40
mov dword [rdi + 8], ecx
add qword [rbx + 0x10], 0x10
mov rdi, qword [rbx + 0x10]
mov rax, qword [rbx + 0x18]
cmp qword [rax + 0x18], 0
jle 0x140012a00
mov rcx, rbx
call fcn.140021c00
mov rdi, qword [rbx + 0x10]
lea rdx, [rdi - 0x20]
mov rcx, rbx
lea r8, str.path
call fcn.140016940
add qword [rbx + 0x10], 0xfffffffffffffff0
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret