Function at 0x140059a30
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
movups xmmword [rsp + 0x50], xmm6
movups xmmword [rsp + 0x60], xmm7
mov rsi, r9
xor r9d, r9d
mov rbp, rcx
mov r14d, edx
mov qword [rsp + 0x48], r9
mov r12, r8
test r8, r8
jne 0x140059a6e
mov r13d, 0x7f2bb747
jmp 0x14005a5c4
mov rcx, r8
call fcn.14005223a
test rax, rax
je 0x140059a63
lea rdx, [rsp + 0x38]
mov ecx, 0x160
call fcn.14005a7f5
mov r13d, eax
test eax, eax
jne 0x14005a5c4
mov rbx, qword [rsp + 0x38]
mov ecx, 0x58
mov rdi, rbx
rep stosd dword [rdi], eax
mov eax, r14d
mov dword [rbx], 0x7f2bb701
lea rcx, [0x1400a6120]
mov dword [rbx + 0xa8], 0x12
or eax, 1
mov dword [rbx + 0x10], eax
mov word [rbx + 0xbc], 2
call sub.msvcrt.dll_getenv
mov rcx, rax
test rax, rax
je 0x140059aed
xor r8d, r8d
xor edx, edx
call sub.msvcrt.dll_strtoul
mov eax, eax
mov qword [rbx + 0xb0], rax
mov eax, r14d
and eax, 0x4000
cmp eax, 1
sbb edx, edx
and edx, 0xfffffffe
add edx, 3
bt r14d, 0x13
jae 0x140059b0a
or edx, 4
or dh, 0x80
lea r8, [rbx + 8]
mov rcx, rbp
call qword [rsi + 0x10]
test eax, eax
jne 0x14005a5a9
mov rax, qword [rbx + 8]
mov rcx, rbp
mov qword [rbx + 0xe8], rax
mov qword [rax + 0x78], rbx
call sub.msvcrt.dll_strlen
lea rdx, [rbx + 0x18]
lea ecx, [rax + 1]
call fcn.14005a7f5
test eax, eax
jne 0x14005a5a9
mov rcx, qword [rbx + 0x18]
mov rdx, rbp
call sub.msvcrt.dll_strcpy
lea rdx, [rsp + 0x40]
mov ecx, 0x400
call fcn.14005a7f5
mov r13d, eax
test eax, eax
jne 0x14005a5a9
mov rsi, qword [rsp + 0x40]
mov ecx, 0x100
mov rdi, rsi
mov qword [rbx + 0x20], rsi
rep stosd dword [rdi], eax
mov dword [rsi + 0x38], 0x1ef53
mov eax, dword [r12 + 0x64]
mov edx, dword [r12 + 0x18]
mov r15d, eax
mov dword [rsi + 0x18], edx
and r15d, 0x200
je 0x140059bc0
mov ecx, dword [r12 + 0x1c]
test ecx, ecx
jne 0x140059baf
lea ecx, [rdx + 4]
mov dword [rsi + 0x1c], ecx
cmp ecx, edx
jae 0x140059bc3
mov eax, 0x7f2bb747
jmp 0x14005a5a9
mov dword [rsi + 0x1c], edx
mov edx, dword [r12 + 0x14]
test edx, edx
jne 0x140059bd5
xor edx, edx
cmp dword [rsi + 0x1c], 0
sete dl
mov dword [rsi + 0x14], edx
mov dx, word [r12 + 0x36]
mov ecx, 1
mov word [rsi + 0x36], dx
mov edx, dword [r12 + 0x3c]
test dx, dx
cmove edx, ecx
mov ecx, dword [r12 + 0x100]
mov word [rsi + 0x3c], dx
mov edx, dword [r12 + 0x5c]
mov dword [rsi + 0x5c], edx
mov edx, dword [r12 + 0x60]
mov dword [rsi + 0x100], ecx
mov ecx, dword [r12 + 0x104]
mov dword [rsi + 0x60], edx
and edx, 0xfffc1921
mov dword [rsi + 0x104], ecx
mov ecx, dword [r12 + 0x164]
mov dword [rsi + 0x64], eax
mov word [rsi + 0x164], cx
mov ecx, dword [r12 + 0x170]
mov dword [rsi + 0x170], ecx
mov cl, byte [r12 + 0x174]
mov byte [rsi + 0x174], cl
mov ecx, dword [r12 + 0x160]
mov dword [rsi + 0x160], ecx
mov ecx, dword [r12 + 0x24c]
mov dword [rsi + 0x24c], ecx
mov ecx, dword [r12 + 0x250]
mov dword [rsi + 0x250], ecx
mov ecx, dword [r12 + 0x27c]
mov word [rsi + 0x27c], cx
mov cx, word [r12 + 0x27e]
mov word [rsi + 0x27e], cx
jne 0x14005a58f
test eax, 0xffff0884
jne 0x14005a596
mov eax, dword [r12 + 0x4c]
mov dword [rsi + 0x4c], eax
test eax, eax
je 0x140059d16
mov eax, dword [r12 + 0x54]
test eax, eax
jne 0x140059cca
mov eax, 0xb
mov dword [rsi + 0x54], eax
mov eax, dword [r12 + 0x58]
test ax, ax
je 0x140059d1d
mov word [rsi + 0x58], ax
cmp ax, 0x9f
jbe 0x140059d23
mov eax, dword [r12 + 0x15c]
test ax, ax
jne 0x140059cf3
mov eax, 0x20
mov word [rsi + 0x15c], ax
mov ax, word [r12 + 0x15e]
test ax, ax
jne 0x140059d0d
mov eax, 0x20
mov word [rsi + 0x15e], ax
jmp 0x140059d23
mov dword [rsi + 0x54], 0xb
mov word [rsi + 0x58], pe_nt_image_headers64
mov eax, dword [r12 + 0x44]
mov dword [rsi + 0x44], eax
mov rax, qword [rbx + 0xb0]
test rax, rax
jne 0x140059d3f
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__time64]
mov dword [rsi + 0x40], eax
mov edx, dword [rsi + 0x1c]
mov r9d, 0x400
xor r8d, r8d
mov dword [rsi + 0x108], eax
mov eax, dword [rsi + 0x18]
mov dword [rsi + 0x48], r8d
mov r8d, dword [r12 + 0x20]
mov ecx, eax
shl r9d, cl
mov ecx, edx
sub ecx, eax
mov dword [rbx + 0x28], r9d
mov dword [rbx + 0x2c], r9d
mov dword [rbx + 0xb8], ecx
test r15d, r15d
je 0x140059de5
mov eax, dword [r12 + 0x24]
test r8d, r8d
je 0x140059d9a
test eax, eax
je 0x140059da0
mov edx, eax
shl rdx, cl
cmp rdx, r8
jne 0x140059bb6
jmp 0x140059dc0
test eax, eax
jne 0x140059dc0
jmp 0x140059da8
shr r8, cl
mov rax, r8
jmp 0x140059dc0
add edx, 0xf
lea eax, [r9*8]
cmp edx, 0x1f
jbe 0x140059dc0
lea eax, [r9*8 - 8]
mov edx, 0xfff8
cmp eax, edx
cmova eax, edx
mov edx, 0xffffffff
mov dword [rsi + 0x24], eax
mov eax, eax
shl rax, cl
cmp rdx, rax
jb 0x140059bb6
mov dword [rsi + 0x20], eax
jmp 0x140059e12
test r8d, r8d
jne 0x140059df2
lea r8d, [r9*8]
mov ecx, edx
mov eax, 0x400
shl eax, cl
cdq
idiv r9d
imul eax, eax, 0xfff8
cmp eax, r8d
cmova eax, r8d
mov dword [rsi + 0x20], eax
mov dword [rsi + 0x24], eax
mov rcx, r12
call fcn.14005223a
mov ecx, dword [rbx + 0xb8]
or rdx, 0xffffffffffffffff
shl rdx, cl
mov rcx, rsi
and rdx, rax
call fcn.1400522c1
mov rcx, r12
call fcn.1400522eb
mov rcx, rsi
mov rdx, rax
call fcn.140052304
mov rcx, rsi
call fcn.1400522eb
mov rcx, r12
mov rdi, rax
call fcn.14005223a
cmp rdi, rax
jae 0x140059bb6
mov ax, word [r12 + 0x166]
movsd xmm7, qword [0x1400a6158]
mov word [rsi + 0x166], ax
test byte [rsi + 0x60], 8
je 0x140059fb9
xor ecx, ecx
or dword [rbx + 0x10], 6
mov dword [rbx + 0x30], ecx
jmp 0x14005a582
mov r8w, word [r12 + 0xfe]
mov ebp, dword [rsi + 0x60]
and ebp, 0x80
setne al
test r8w, r8w
jne 0x140059eb4
movzx r8d, al
shl r8d, 6
mov word [rsi + 0xfe], r8w
test r8w, r8w
je 0x140059fed
mov ecx, dword [rsi + 0x18]
mov eax, 0x400
mov edx, 0x20
mov edi, 1
shl eax, cl
test ebp, ebp
mov ecx, r9d
cmove r8d, edx
cdq
movzx r8d, r8w
idiv r8d
mov edx, eax
call fcn.14005a9f8
mov ecx, dword [rbx + 0x28]
mov dword [rbx + 0x34], eax
cmp ecx, 0xfff
ja 0x140059f0b
mov eax, 0x1000
xor edx, edx
div ecx
mov edi, eax
test ebp, ebp
je 0x140059ffa
mov rcx, rsi
call fcn.14005223a
mov ecx, edi
xor edx, edx
div rcx
mov ecx, 0xffffffff
cmp rcx, rax
jae 0x140059ffa
mov eax, dword [r12]
test eax, eax
jne 0x140059f3b
or eax, 0xffffffff
mov rdx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x40]
mov dword [rdx], eax
mov r14d, dword [rbp + 0x4c]
mov eax, 0xc
mov edx, dword [rbp]
test r14d, r14d
je 0x140059f5d
mov eax, dword [rbp + 0x54]
inc eax
cmp edx, eax
jae 0x140059f64
mov dword [rbp], eax
mov edi, dword [rbx + 0x30]
mov ecx, dword [rbp]
mov edx, edi
call fcn.14005a9f8
mov r8d, eax
mov eax, dword [rbx + 0x28]
shl eax, 3
cmp eax, r8d
jae 0x14005a0dc
test r15d, r15d
jne 0x14005a0d2
mov eax, dword [rbp + 0x20]
cmp eax, 0xff
jbe 0x14005a0d2
sub eax, 8
mov rcx, r12
mov dword [rbp + 0x20], eax
call fcn.14005223a
mov rcx, rbp
mov rdx, rax
call fcn.1400522c1
mov eax, dword [rbp + 0x20]
mov dword [rbp + 0x24], eax
mov rcx, rsi
mov edi, dword [rsi + 0x20]
call fcn.14005223a
mov edx, dword [rsi + 0x14]
sub rax, rdx
mov rdx, rdi
mov rcx, rax
call fcn.14005aa09
mov dword [rbx + 0x30], eax
mov r9d, eax
test eax, eax
jne 0x140059e91
mov eax, 0x7f2bb72c
jmp 0x14005a5a9
test al, al
je 0x140059ec6
jmp 0x14005a59d
mov eax, dword [r12]
test eax, eax
jne 0x140059f3b
mov rcx, qword [rsp + 0x40]
call fcn.14005223a
xor edx, edx
div rdi
jmp 0x140059f3b
imul r8d, eax
mov cl, byte [rsp + 0x24]
mov dword [rbp + 0x28], eax
xor edx, edx
imul edi, eax
add r8d, r11d
shr r8d, cl
mov dword [rbx + 0x40], r8d
mov dword [rbp], edi
mov dword [rbp + 0x10], edi
test byte [rbp + 0x5c], 0x10
jne 0x14005a175
mov ax, word [r12 + 0xce]
mov ecx, dword [rbp + 0x18]
test ax, ax
cmove eax, edx
mov edx, 0x400
shl edx, cl
movsxd rdx, edx
movzx r8d, ax
mov word [rbp + 0xce], ax
shr rdx, 2
cmp rdx, r8
jb 0x14005a5a4
mov ecx, dword [rbp + 0x20]
mov r8d, dword [rbx + 0x34]
movzx eax, ax
mov rdx, qword [rbx + 0x20]
lea r9d, [rcx + rcx*2]
add eax, r8d
shr r9d, 2
cmp r9d, eax
jae 0x14005a0ae
mov ax, word [r12 + 0xce]
or dword [rdx + 0x60], 0x10
and dword [rdx + 0x5c], 0xffffffef
mov word [rbp + 0xce], ax
mov edi, dword [rbx + 0x40]
movzx eax, word [rbp + 0xce]
add eax, edi
lea r8d, [r8 + rax + 3]
test byte [rdx + 0x60], 0x10
je 0x14005a0c9
lea r8d, [rax + 4]
cmp ecx, r8d
jae 0x14005a200
mov eax, 0x7f2bb75b
jmp 0x14005a5a9
mov ecx, dword [rbp + 0x18]
mov r10d, 0x400
mov r9d, pe_nt_image_headers64
shl r10d, cl
test r14d, r14d
je 0x14005a0f8
movzx r9d, word [rbp + 0x58]
mov eax, r10d
lea r11d, [r10 - 1]
cdq
idiv r9d
mov r9d, 0x10000
sub r9d, eax
lea eax, [rcx + 0xa]
mov dword [rsp + 0x24], eax
mov eax, edi
cmp r9d, r8d
mov qword [rsp + 0x28], rax
cmova r9d, r8d
mov r8d, pe_nt_image_headers64
test r14d, r14d
je 0x14005a131
movzx r8d, word [rbp + 0x58]
mov eax, r9d
mov cl, byte [rsp + 0x24]
xor edx, edx
imul eax, r8d
add eax, r11d
shr eax, cl
mov rcx, qword [rsp + 0x28]
imul eax, r10d
div r8d
mov edx, 8
cmp eax, edx
cmovb eax, edx
and eax, 0xfffffff8
mov edx, eax
imul rdx, rcx
mov ecx, 0xffffffff
cmp rcx, rdx
jae 0x14005a01a
dec r9d
jmp 0x14005a121
mov r14, qword [rbx + 0x20]
mov eax, 0x400
mov ecx, dword [r14 + 0x18]
mov edi, dword [r14 + 0x20]
shl eax, cl
mov ecx, 0x20
test byte [r14 + 0x60], 0x80
je 0x14005a19c
movzx ecx, word [r14 + 0xfe]
cdq
idiv ecx
mov rcx, r14
mov dword [rsp + 0x24], eax
call fcn.14005223a
mov rdx, rax
or eax, 0xffffffff
cmp rdx, 0x3ffffe
ja 0x14005a1c5
mov rcx, r14
call fcn.14005223a
shl eax, 0xa
sub eax, dword [r14 + 0x14]
mov edx, edi
mov ecx, eax
call fcn.14005a9f8
mov edx, dword [rsp + 0x24]
mov ecx, eax
call fcn.14005a9f8
mov ecx, dword [r14 + 0x18]
sub eax, dword [rbx + 0x34]
mov edx, eax
mov eax, 0x400
shl eax, cl
mov ecx, edx
cdqe
shr rax, 2
cmp rax, rcx
cmovb edx, eax
jmp 0x14005a044
mov edx, dword [rbx + 0x30]
add edi, 2
test byte [rbp + 0x5d], 2
je 0x14005a22d
cmp edx, 2
jne 0x14005a21c
cmp dword [r12 + 0x24c], 0
jmp 0x14005a225
cmp dword [r12 + 0x250], 0
setne al
movzx eax, al
jmp 0x14005a237
dec edx
mov rcx, rbx
call fcn.14005378e
test eax, eax
je 0x14005a24b
mov eax, dword [rbx + 0x34]
lea eax, [rdi + rax + 1]
movzx edi, word [rbp + 0xce]
add edi, eax
mov rcx, rbp
call fcn.14005223a
mov edx, dword [rbp + 0x14]
mov ecx, dword [rbp + 0x20]
sub rax, rdx
xor edx, edx
div rcx
mov eax, dword [rbx + 0x30]
mov r14, rdx
cmp eax, 1
jne 0x14005a27d
test rdx, rdx
je 0x14005a366
cmp edi, edx
ja 0x140059fe3
test r14, r14
je 0x14005a366
add edi, 0x32
cmp r14d, edi
jae 0x14005a366
mov rcx, rbp
call fcn.14005223a
mov rcx, rbp
sub rax, r14
mov rdx, rax
call fcn.1400522c1
mov rcx, r12
call fcn.1400522eb
test rax, rax
js 0x14005a2bc
cvtsi2sd xmm0, rax
jmp 0x14005a2d1
mov rdx, rax
and eax, 1
shr rdx, 1
or rdx, rax
cvtsi2sd xmm0, rdx
addsd xmm0, xmm0
movaps xmm6, xmm0
mov rcx, r12
mulsd xmm6, xmm7
call fcn.14005223a
test rax, rax
js 0x14005a2ec
cvtsi2sd xmm1, rax
jmp 0x14005a301
mov rdx, rax
and eax, 1
shr rdx, 1
or rdx, rax
cvtsi2sd xmm1, rdx
addsd xmm1, xmm1
divsd xmm6, xmm1
mov rcx, rbp
call fcn.14005223a
test rax, rax
js 0x14005a319
cvtsi2sd xmm0, rax
jmp 0x14005a32e
mov rdx, rax
and eax, 1
shr rdx, 1
or rdx, rax
cvtsi2sd xmm0, rdx
addsd xmm0, xmm0
mulsd xmm0, xmm6
movsd xmm1, qword [0x1400a6160]
divsd xmm0, xmm7
comisd xmm0, xmm1
jae 0x14005a34b
cvttsd2si rdx, xmm0
jmp 0x14005a359
subsd xmm0, xmm1
cvttsd2si rdx, xmm0
btc rdx, 0x3f
mov rcx, rbp
call fcn.140052304
jmp 0x140059fb9
test byte [rbp + 0x5d], 2
je 0x14005a3b9
cmp dword [rbp + 0x24c], eax
jb 0x14005a37d
lea edx, [rax - 1]
mov dword [rbp + 0x24c], edx
cmp dword [rbp + 0x250], eax
jb 0x14005a38d
dec eax
mov dword [rbp + 0x250], eax
mov eax, dword [rbp + 0x24c]
cmp eax, dword [rbp + 0x250]
jne 0x14005a3a3
xor edx, edx
mov dword [rbp + 0x250], edx
mov edx, dword [rbp + 0x250]
cmp edx, eax
jae 0x14005a3b9
mov dword [rbp + 0x24c], edx
mov dword [rbp + 0x250], eax
mov rcx, qword [rbx + 0x18]
call sub.msvcrt.dll_strlen
lea rdx, [rsp + 0x48]
lea ecx, [rax + 0x50]
call fcn.14005a7f5
test eax, eax
jne 0x14005a5a9
mov rdi, qword [rsp + 0x48]
lea rdx, [0x1400a6134]
mov rcx, rdi
call sub.msvcrt.dll_strcpy
mov rdx, qword [rbx + 0x18]
mov rcx, rdi
call sub.msvcrt.dll_strcat
lea r8, [rbx + 0x50]
mov rdx, rdi
mov rcx, rbx
call fcn.140051f55
test eax, eax
jne 0x14005a5a9
lea rdx, [0x1400a6146]
mov rcx, rdi
call sub.msvcrt.dll_strcpy
mov rdx, qword [rbx + 0x18]
mov rcx, rdi
call sub.msvcrt.dll_strcat
lea r8, [rbx + 0x48]
mov rdx, rdi
mov rcx, rbx
call fcn.140051db4
test eax, eax
jne 0x14005a5a9
mov rcx, qword [rsp + 0x48]
call sub.msvcrt.dll_free
mov edx, dword [rbx + 0x28]
mov ecx, dword [rbx + 0x34]
xor eax, eax
lea r8, [rbx + 0x38]
mov qword [rsp + 0x48], rax
call fcn.14005a855
test eax, eax
jne 0x14005a5a9
mov eax, dword [rbx + 0x28]
mov ecx, dword [rbx + 0x34]
xor esi, esi
xor r12d, r12d
mov rdi, qword [rbx + 0x38]
imul rcx, rax
xor eax, eax
rep stosb byte [rdi], al
mov rax, qword [rbx + 0x20]
mov edi, dword [rbp + 0x54]
mov r14d, dword [rax + 0x64]
and r14d, 0x410
mov eax, dword [rbx + 0x30]
cmp esi, eax
jae 0x14005a551
test r14d, r14d
je 0x14005a4eb
dec eax
cmp eax, esi
je 0x14005a4b7
mov r8d, 2
mov edx, esi
mov rcx, rbx
call fcn.14005283e
mov r8d, 1
mov edx, esi
mov rcx, rbx
call fcn.14005283e
mov r8d, dword [rbp + 0x28]
test edi, edi
je 0x14005a4e1
cmp edi, r8d
jae 0x14005a4db
sub r8d, edi
xor edi, edi
jmp 0x14005a4e1
sub edi, r8d
xor r8d, r8d
mov edx, esi
mov rcx, rbx
call fcn.1400527b5
mov r8, qword [rbx + 0x50]
mov edx, esi
mov rcx, rbx
call fcn.140062700
mov r8d, eax
mov rax, qword [rbx + 0x20]
cmp byte [rax + 0x174], 0
je 0x14005a511
mov eax, dword [rbx + 0x40]
lea r8d, [r8 + rax + 2]
mov eax, r8d
mov edx, esi
mov rcx, rbx
add r12, rax
call fcn.14005266e
mov rax, qword [rbx + 0x20]
mov edx, esi
mov rcx, rbx
mov r8d, dword [rax + 0x28]
call fcn.1400526db
mov edx, esi
xor r8d, r8d
mov rcx, rbx
call fcn.140052748
mov edx, esi
mov rcx, rbx
inc esi
call fcn.140054cb9
jmp 0x14005a491
mov ecx, dword [rbx + 0xb8]
or rdx, 0xffffffffffffffff
shl rdx, cl
mov rcx, rbp
and rdx, r12
call fcn.140052347
mov rcx, qword [rbx + 8]
or dword [rbp + 0x160], 1
mov edx, dword [rbx + 0x28]
or dword [rbx + 0x10], 0x36
mov rax, qword [rcx + 8]
call qword [rax + 0x20]
mov rax, qword [rsp + 0xe0]
mov qword [rax], rbx
jmp 0x14005a5c4
mov eax, 0x7f2bb743
jmp 0x14005a5a9
mov eax, 0x7f2bb744
jmp 0x14005a5a9
mov eax, 0x7f2bb722
jmp 0x14005a5a9
mov eax, 0x7f2bb75d
mov rcx, qword [rsp + 0x48]
mov dword [rsp + 0x24], eax
call sub.msvcrt.dll_free
mov rcx, rbx
call fcn.140057b99
mov r13d, dword [rsp + 0x24]
movups xmm6, xmmword [rsp + 0x50]
movups xmm7, xmmword [rsp + 0x60]
mov eax, r13d
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret