Function at 0x180045720
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r12
push r13
push r14
push r15
sub rsp, 0x3d0
mov rax, qword [0x1801bc5d0]
xor rax, rsp
mov qword [rsp + 0x3c0], rax
lea rcx, str.appdata
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
xorps xmm0, xmm0
movups xmmword [rsp + 0x1c0], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x1d0], xmm1
mov r8, 0xffffffffffffffff
nop
inc r8
cmp byte [rax + r8], 0
jne 0x180045780
mov rdx, rax
lea rcx, [rsp + 0x1c0]
call fcn.180006f30
nop
mov r8d, 0x14
lea rdx, str.Witch_settings.json
lea rcx, [rsp + 0x1c0]
call fcn.18000a720
lea rdx, [rsp + 0x1c0]
lea rcx, [rsp + 0xb0]
call fcn.180030b70
nop
cmp qword [rsp + 0x140], 0
jne 0x18004583e
lea rdx, [rsp + 0x1c0]
cmp qword [rsp + 0x1d8], 0x10
cmovae rdx, qword [rsp + 0x1c0]
mov r9d, 0x40
lea r8d, [r9 - 0x3f]
lea rcx, [rsp + 0xc0]
call fcn.180028990
xor r8d, r8d
test rax, rax
mov rax, qword [rsp + 0xb0]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0xb0]
je 0x180045830
add rcx, rax
xor edx, edx
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
jmp 0x18004583e
add rcx, rax
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
xor ebx, ebx
mov qword [rsp + 0x98], rbx
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xb0]
movsxd rcx, dword [rax + 4]
mov rax, qword [rsp + rcx + 0xf8]
mov qword [rsp + 0x38], rax
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x1e0]
call fcn.180036f30
nop
lea r8, [0x1801cf6f0]
mov rcx, rax
call fcn.1800354a0
nop
lea rcx, [rsp + 0x228]
call fcn.180037130
mov rcx, qword [rsp + 0x218]
test rcx, rcx
je 0x1800458c4
mov rax, qword [rcx]
lea rdx, [rsp + 0x1e0]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
cmp qword [rsp + 0x140], 0
je 0x180045d1f
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.18001b6a0
nop
mov qword [rsp + 0x98], rbx
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0xb0]
movsxd rcx, dword [rax + 4]
mov rax, qword [rsp + rcx + 0xf8]
mov qword [rsp + 0x48], rax
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x2d0]
call fcn.180036f30
nop
lea r8, [rsp + 0x30]
mov rcx, rax
call fcn.1800354a0
nop
lea rcx, [rsp + 0x318]
call fcn.180037130
mov rcx, qword [rsp + 0x308]
test rcx, rcx
je 0x180045962
mov rax, qword [rcx]
lea rdx, [rsp + 0x2d0]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
lea rcx, [rsp + 0xc0]
call fcn.180029b00
test rax, rax
jne 0x180045998
mov rax, qword [rsp + 0xb0]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0xb0]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x40], rdx
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x50], xmm1
movabs r13, 0x8000000000000000
mov qword [rsp + 0x58], r13
movzx ecx, byte [rdx]
cmp ecx, 9
ja case.default.0x1800459df
movsxd rax, ecx
lea rsi, [0x180000000]
mov eax, dword [rsi + rax*4 + 0x45da8]
add rax, rsi
jmp rax
lea rsi, [0x180000000]
cmp ecx, 9
ja case.0x1800459f7.0
mov ecx, dword [rsi + rcx*4 + 0x45dd0]
add rcx, rsi
jmp rcx
mov rax, qword [rdx + 8]
mov rcx, qword [rax]
mov qword [rsp + 0x48], rcx
jmp 0x180045a1f
mov rax, qword [rdx + 8]
mov rcx, qword [rax + 8]
mov qword [rsp + 0x50], rcx
jmp 0x180045a1f
mov qword [rsp + 0x58], 1
cmp byte [rsp + 0x30], 1
jne 0x180045a9e
mov rax, qword [rsp + 0x38]
mov r15, qword [rax]
mov rbx, qword [r15 + 8]
mov r14, r15
cmp byte [rbx + 0x19], 0
jne 0x180045a7b
mov r12d, 0xc
lea rcx, [rbx + 0x20]
mov rdi, qword [rcx + 0x10]
cmp qword [rcx + 0x18], 0x10
jb 0x180045a53
mov rcx, qword [rcx]
mov r8, rdi
cmp rdi, r12
cmova r8, r12
lea rdx, str.PrimaryColor
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x180045ad7
js 0x180045adc
mov r14, rbx
mov rbx, qword [rbx]
cmp byte [rbx + 0x19], 0
je 0x180045a41
cmp byte [r14 + 0x19], 0
jne 0x180045a96
lea rdx, [r14 + 0x20]
lea rcx, str.PrimaryColor
call fcn.180038020
test al, al
je 0x180045a99
mov r14, r15
mov qword [rsp + 0x48], r14
lea r8, [rsp + 0x30]
mov qword [rsp + 0x60], r8
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x68], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x70], xmm1
mov qword [rsp + 0x78], r13
movzx edx, byte [r8]
cmp edx, 9
ja case.0x180045af1.0
movsxd rax, edx
mov ecx, dword [rsi + rax*4 + 0x45df8]
add rcx, rsi
jmp rcx
cmp rdi, r12
jae 0x180045a6f
mov rbx, qword [rbx + 0x10]
jmp 0x180045a75
cmp edx, 9
ja case.0x180045af1.0
mov ecx, dword [rsi + rdx*4 + 0x45e20]
add rcx, rsi
jmp rcx
mov rax, qword [r8 + 8]
mov rcx, qword [rax]
mov qword [rsp + 0x68], rcx
jmp 0x180045b19
mov rax, qword [r8 + 8]
mov rcx, qword [rax + 8]
mov qword [rsp + 0x70], rcx
jmp 0x180045b19
mov qword [rsp + 0x78], 1
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x40]
call fcn.1800241b0
test al, al
je 0x180045d0f
lea r8, [rsp + 0x30]
mov qword [rsp + 0x40], r8
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x50], xmm1
mov qword [rsp + 0x58], r13
movzx edx, byte [r8]
cmp edx, 9
ja case.0x180045b78.0
movsxd rax, edx
mov ecx, dword [rsi + rax*4 + 0x45e48]
add rcx, rsi
jmp rcx
cmp edx, 9
ja case.0x180045b78.0
mov ecx, dword [rsi + rdx*4 + 0x45e70]
add rcx, rsi
jmp rcx
mov rax, qword [r8 + 8]
mov rcx, qword [rax]
mov qword [rsp + 0x48], rcx
jmp 0x180045ba0
mov rax, qword [r8 + 8]
mov rcx, qword [rax + 8]
mov qword [rsp + 0x50], rcx
jmp 0x180045ba0
mov qword [rsp + 0x58], 1
cmp byte [rsp + 0x30], 1
jne 0x180045c2d
mov rax, qword [rsp + 0x38]
mov r15, qword [rax]
mov rbx, qword [r15 + 8]
mov r14, r15
cmp byte [rbx + 0x19], 0
jne 0x180045c0a
mov r12d, 0xe
nop word [rax + rax]
lea rcx, [rbx + 0x20]
mov rdi, qword [rcx + 0x10]
cmp qword [rcx + 0x18], 0x10
jb 0x180045be2
mov rcx, qword [rcx]
mov r8, rdi
cmp rdi, r12
cmova r8, r12
lea rdx, str.SecondaryColor
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x180045c66
js 0x180045c6b
mov r14, rbx
mov rbx, qword [rbx]
cmp byte [rbx + 0x19], 0
je 0x180045bd0
cmp byte [r14 + 0x19], 0
jne 0x180045c25
lea rdx, [r14 + 0x20]
lea rcx, str.SecondaryColor
call fcn.180038020
test al, al
je 0x180045c28
mov r14, r15
mov qword [rsp + 0x48], r14
lea r8, [rsp + 0x30]
mov qword [rsp + 0x60], r8
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x68], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x70], xmm1
mov qword [rsp + 0x78], r13
movzx edx, byte [r8]
cmp edx, 9
ja case.0x180045c80.0
movsxd rax, edx
mov ecx, dword [rsi + rax*4 + 0x45e98]
add rcx, rsi
jmp rcx
cmp rdi, r12
jae 0x180045bfe
mov rbx, qword [rbx + 0x10]
jmp 0x180045c04
cmp edx, 9
ja case.0x180045c80.0
mov ecx, dword [rsi + rdx*4 + 0x45ec0]
add rcx, rsi
jmp rcx
mov rax, qword [r8 + 8]
mov rcx, qword [rax]
mov qword [rsp + 0x68], rcx
jmp 0x180045ca8
mov rax, qword [r8 + 8]
mov rcx, qword [rax + 8]
mov qword [rsp + 0x70], rcx
jmp 0x180045ca8
mov qword [rsp + 0x78], 1
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x40]
call fcn.1800241b0
test al, al
je 0x180045d0f
lea rdx, str.PrimaryColor
lea rcx, [rsp + 0x30]
call fcn.18002cbc0
mov rcx, rax
call fcn.180038310
mov edi, eax
lea rdx, str.SecondaryColor
lea rcx, [rsp + 0x30]
call fcn.18002cbc0
mov rcx, rax
call fcn.180038310
mov ebx, eax
call fcn.180007bb0
mov edx, 1
mov ecx, eax
call fcn.180007a40
mov r8d, ebx
mov edx, edi
mov ecx, eax
call fcn.180043770
nop
movzx edx, byte [rsp + 0x30]
lea rcx, [rsp + 0x38]
call fcn.18001b170
nop
lea rcx, [rsp + 0xb0]
call fcn.180030a60
nop
mov rdx, qword [rsp + 0x1d8]
cmp rdx, 0x10
jb 0x180045d74
inc rdx
mov rcx, qword [rsp + 0x1c0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180045d6e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180045d6e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180138eb0
nop
mov rcx, qword [rsp + 0x3c0]
xor rcx, rsp
call fcn.180138e90
lea r11, [rsp + 0x3d0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
ret
jmp 0x180045720