Function at 0x140012170
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov edi, r8d
mov rbx, rcx
test r8b, 1
je 0x140012268
lea rdx, str.src__premake_main.lua
call fcn.14000b3c0
test eax, eax
je 0x140012268
mov rax, qword [rbx + 0x10]
lea rcx, [0x14000ea30]
lea rdx, str.src__premake_main.lua
mov qword [rax], rcx
mov rcx, rbx
mov dword [rax + 8], socket
add qword [rbx + 0x10], 0x10
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], 0
jle 0x1400121f0
mov rcx, rbx
call fcn.140021c00
movzx eax, word [rbx + 0xc6]
mov ecx, 0xc8
mov rdx, qword [rbx + 0x10]
inc ax
inc word [rbx + 0xc4]
sub rdx, 0x20
mov word [rbx + 0xc6], ax
cmp ax, cx
jb 0x14001222e
je 0x140012406
mov ecx, 0xe1
cmp ax, cx
jae 0x140012416
mov r8d, 1
mov rcx, rbx
call fcn.14001aa60
test eax, eax
jne 0x140012248
mov rcx, rbx
call fcn.14001cf40
mov eax, 0xffff
add word [rbx + 0xc6], ax
add word [rbx + 0xc4], ax
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov r8, qword [0x140163d50]
test r8, r8
je 0x140012291
test dil, 2
je 0x140012291
lea rdx, str.src__premake_main.lua
mov rcx, rbx
call fcn.14000c240
test eax, eax
jne 0x1400123e9
test dil, 4
je 0x1400122c3
lea rcx, str.PREMAKE_PATH
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x1400122c3
mov r8, rax
lea rdx, str.src__premake_main.lua
mov rcx, rbx
call fcn.14000c240
test eax, eax
jne 0x1400123e9
test dil, 8
je 0x1400123f6
lea rcx, str.src__premake_main.lua
call fcn.140012eb0
test rax, rax
je 0x1400123f6
lea r10, [0x1400ad4a0]
mov eax, 0x3521cfb3
mul r10d
mov edi, r10d
mov eax, r10d
sub eax, edx
mov r9d, 0x24
shr eax, 1
mov r8d, 0x2f
add eax, edx
shr eax, 5
imul eax, eax, 0x35
sub edi, eax
shl rdi, 4
add rdi, qword [rbx + 0x18]
xor edx, edx
mov ecx, edx
nop dword [rax]
mov rax, qword [rdi + rcx*8 + 0x1e8]
cmp r9b, byte [rax + 0x18]
jne 0x140012339
cmp r8b, byte [rax + 0x19]
jne 0x140012339
cmp dl, byte [rax + 0x1a]
je 0x140012368
inc rcx
cmp rcx, 2
jl 0x140012320
mov rax, qword [rdi + 0x1e8]
mov r8d, 2
mov rdx, r10
mov qword [rdi + 0x1f0], rax
mov rcx, rbx
call fcn.1400244d0
mov qword [rdi + 0x1e8], rax
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], 0
jle 0x140012391
mov rcx, rbx
call fcn.140021c00
lea rdx, str.src__premake_main.lua
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], 0
jle 0x1400123c9
mov rcx, rbx
call fcn.140021c00
mov edx, 2
mov rcx, rbx
call fcn.14001ca70
mov rax, qword [rbx + 0x18]
cmp qword [rax + 0x18], 0
jle 0x1400123e9
mov rcx, rbx
call fcn.140021c00
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov rbx, qword [rsp + 0x30]
mov eax, 1
add rsp, 0x20
pop rdi
ret
lea rdx, str.C_stack_overflow
mov rcx, rbx
call fcn.140019540
int3
mov edx, 6
mov rcx, rbx
call fcn.14001a3e0
int3