Function at 0x180029dd0
Capabilities:
Read file on windows

Disassembly:
push rsi
push rdi
push r14
sub rsp, 0x30
mov rsi, rdx
mov r14, rcx
mov rcx, rsi
lea rdx, [0x180055714]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rdi, rax
test rax, rax
jne 0x180029e1b
call fcn.180029d40
mov rcx, rax
lea r8, str.Failed_to_open_config_file__s.
mov r9, rsi
xor edx, edx
call fcn.18003dfe0
xor al, al
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret
xor edx, edx
mov qword [rsp + 0x58], rbp
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 rbp, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_rewind]
cmp rbp, 0x10000
jb 0x180029e7f
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call fcn.180029d40
mov rcx, rax
lea r8, str.Oversized_config_file____s.
mov r9, rsi
xor edx, edx
call fcn.18003dfe0
mov rbp, qword [rsp + 0x58]
xor al, al
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret
cmp rbp, 0x10
ja 0x180029eb7
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call fcn.180029d40
mov rcx, rax
lea r8, str.File_is_empty_or_too_short____s.
mov r9, rsi
xor edx, edx
call fcn.18003dfe0
mov rbp, qword [rsp + 0x58]
xor al, al
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret
mov qword [rsp + 0x50], rbx
lea rcx, [rbp + 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, rbp
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 0x180029f10
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.180029d40
mov r9, rsi
lea r8, str.Read_error_while_reading__s.
jmp 0x18002a074
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
cmp byte [rbx + 1], 0xef
jne 0x180029f35
cmp byte [rbx + 2], 0xbb
jne 0x180029f35
cmp byte [rbx + 3], 0xbf
jne 0x180029f35
mov word [rbx + 1], 0x2020
mov byte [rbx + 3], 0x20
mov byte [rbx], 0x7b
lea r8, [rbp + 2]
mov word [rbx + rbp], 0x7d
mov rdx, rbx
mov rcx, qword [r14]
call fcn.180027630
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 0x180029f8f
mov rdi, qword [rax + 0x58]
call fcn.180029610
mov rbx, rax
call fcn.180029d40
mov rcx, rax
mov qword [rsp + 0x20], rbx
mov r9, rdi
lea r8, str.JSON_config_parse_error_offset__llu_:__s
xor edx, edx
call fcn.18003dfe0
jmp 0x18002a07e
cmp word [rax + 0xe], 3
je 0x180029fb1
call fcn.180029d40
mov rcx, rax
lea r8, str.Invalid_config_file._No_root__n
xor edx, edx
call fcn.18003dfe0
jmp 0x18002a07e
xor esi, esi
lea rbx, str.gpu_threads_conf
lea edi, [rsi + 0x60]
nop dword [rax]
movsxd rax, dword [rbx - 8]
cmp rax, rsi
jne 0x18002a058
mov rdx, qword [rbx]
mov rcx, qword [r14]
call fcn.1800295c0
mov rcx, qword [r14]
mov qword [rdi + rcx], rax
mov rax, qword [r14]
mov rdx, qword [rdi + rax]
test rdx, rdx
je 0x18002a03f
movzx eax, word [rdx + 0xe]
mov ecx, dword [rbx + 8]
and eax, 7
cmp ecx, eax
je 0x18002a011
test ecx, ecx
je 0x18002a011
cmp ecx, 2
jne 0x18002a007
cmp eax, 1
jmp 0x18002a00f
cmp ecx, 1
jne 0x18002a026
cmp eax, 2
jne 0x18002a026
inc rsi
add rdi, 8
add rbx, 0x18
cmp rdi, 0x68
jb 0x180029fc0
mov al, 1
jmp 0x18002a080
lea rbx, [rsi + rsi*2]
lea rdi, [section..data]
call fcn.180029d40
lea r8, str.Invalid_config_file._Value___s__has_unexpected_type.
jmp 0x18002a06f
lea rbx, [rsi + rsi*2]
lea rdi, [section..data]
call fcn.180029d40
lea r8, str.Invalid_config_file._Missing_value___s_.
jmp 0x18002a06f
lea rbx, [rsi + rsi*2]
lea rdi, [section..data]
call fcn.180029d40
lea r8, str.Code_error._oConfigValues_are_not_in_order.__s
mov r9, qword [rdi + rbx*8 + 8]
xor edx, edx
mov rcx, rax
call fcn.18003dfe0
xor al, al
mov rbx, qword [rsp + 0x50]
mov r15, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x58]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret