Function at 0x18002a340
Capabilities:
Read file on windows

Disassembly:
push rbp
push rdi
push r14
sub rsp, 0x30
mov rbp, rdx
mov r14, rcx
mov rcx, rbp
lea rdx, [0x180065714]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rdi, rax
test rax, rax
jne 0x18002a38b
call fcn.18002a2b0
mov rcx, rax
lea r8, str.Failed_to_open_config_file__s.
mov r9, rbp
xor edx, edx
call fcn.180041990
xor al, al
add rsp, 0x30
pop r14
pop rdi
pop rbp
ret
xor edx, edx
mov qword [rsp + 0x58], rsi
mov rcx, rdi
lea r8d, [rdx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov rcx, rdi
movsxd rsi, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_rewind]
cmp rsi, 0x10000
jb 0x18002a3ef
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call fcn.18002a2b0
mov rcx, rax
lea r8, str.Oversized_config_file____s.
mov r9, rbp
xor edx, edx
call fcn.180041990
mov rsi, qword [rsp + 0x58]
xor al, al
add rsp, 0x30
pop r14
pop rdi
pop rbp
ret
cmp rsi, 0x10
ja 0x18002a427
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call fcn.18002a2b0
mov rcx, rax
lea r8, str.File_is_empty_or_too_short____s.
mov r9, rbp
xor edx, edx
call fcn.180041990
mov rsi, qword [rsp + 0x58]
xor al, al
add rsp, 0x30
pop r14
pop rdi
pop rbp
ret
mov qword [rsp + 0x50], rbx
lea rcx, [rsi + 3]
mov qword [rsp + 0x60], r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r9, rdi
mov r8d, 1
mov rdx, rsi
mov rbx, rax
lea rcx, [rax + 1]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp rax, 1
je 0x18002a480
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call fcn.18002a2b0
mov r9, rbp
lea r8, str.Read_error_while_reading__s.
jmp 0x18002a615
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
cmp byte [rbx + 1], 0xef
jne 0x18002a4a5
cmp byte [rbx + 2], 0xbb
jne 0x18002a4a5
cmp byte [rbx + 3], 0xbf
jne 0x18002a4a5
mov word [rbx + 1], 0x2020
mov byte [rbx + 3], 0x20
mov byte [rbx], 0x7b
lea r8, [rsi + 2]
mov word [rbx + rsi], 0x7d
mov rdx, rbx
mov rcx, qword [r14]
call fcn.180027ba0
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [r14]
mov ecx, dword [rax + 0x50]
test ecx, ecx
je 0x18002a504
mov rdi, qword [rax + 0x58]
call fcn.180029b80
mov rbx, rax
call fcn.18002a2b0
mov rcx, rax
mov qword [rsp + 0x28], rbx
mov r9, rbp
mov qword [rsp + 0x20], rdi
lea r8, str.JSON_config_parse_error_in__s__offset__llu_:__s
xor edx, edx
call fcn.180041990
jmp 0x18002a61f
cmp word [rax + 0xe], 3
je 0x18002a51f
call fcn.18002a2b0
mov r9, rbp
lea r8, str.Invalid_config_file__s._No_root_
jmp 0x18002a615
xor esi, esi
lea rbx, str.gpu_threads_conf
lea edi, [rsi + 0x60]
nop dword [rax + rax]
movsxd rax, dword [rbx - 8]
cmp rax, rsi
jne 0x18002a5f9
mov rdx, qword [rbx]
mov rcx, qword [r14]
call fcn.180029b30
mov rcx, qword [r14]
mov qword [rdi + rcx], rax
mov rax, qword [r14]
mov rdx, qword [rdi + rax]
test rdx, rdx
je 0x18002a5c9
movzx eax, word [rdx + 0xe]
mov ecx, dword [rbx + 8]
and eax, 7
cmp ecx, eax
je 0x18002a581
test ecx, ecx
je 0x18002a581
cmp ecx, 2
jne 0x18002a577
cmp eax, 1
jmp 0x18002a57f
cmp ecx, 1
jne 0x18002a599
cmp eax, 2
jne 0x18002a599
inc rsi
add rdi, 8
add rbx, 0x18
cmp rdi, 0x68
jb 0x18002a530
mov al, 1
jmp 0x18002a621
lea rbx, [rsi + rsi*2]
lea rdi, [section..data]
call fcn.18002a2b0
mov rcx, rax
lea r8, str.Invalid_config_file__s._Value___s__has_unexpected_type.
mov rax, qword [rdi + rbx*8 + 8]
mov r9, rbp
xor edx, edx
mov qword [rsp + 0x20], rax
call fcn.180041990
jmp 0x18002a61f
lea rbx, [rsi + rsi*2]
lea rdi, [section..data]
call fcn.18002a2b0
mov rcx, rax
lea r8, str.Invalid_config_file__s._Missing_value___s_.
mov rax, qword [rdi + rbx*8 + 8]
mov r9, rbp
xor edx, edx
mov qword [rsp + 0x20], rax
call fcn.180041990
jmp 0x18002a61f
lea rbx, [rsi + rsi*2]
lea rdi, [section..data]
call fcn.18002a2b0
mov r9, qword [rdi + rbx*8 + 8]
lea r8, str.Code_error._oConfigValues_are_not_in_order.__s
xor edx, edx
mov rcx, rax
call fcn.180041990
xor al, al
mov rbx, qword [rsp + 0x50]
mov r15, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop r14
pop rdi
pop rbp
ret