Function at 0x140004840
Capabilities:
Read file on windows

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x230
xor edi, edi
mov dword [0x14035fba4], 0xffffffff
mov rbx, rcx
mov dword [0x1403533a0], edi
mov rcx, qword [0x14028ece0]
test rcx, rcx
je 0x140004878
lea rdx, str._nOpen_saved_main_index_file_n
call fcn.140002f70
lea rdx, [rsp + 0x30]
mov rcx, rbx
sub rdx, rbx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140004890
lea rcx, [rsp + 0x30]
dec rcx
cmp byte [rcx + 1], dil
lea rcx, [rcx + 1]
jne 0x1400048a6
lea r8, str.MODELSDB.MXM
xor edx, edx
nop dword [rax]
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x1400048c0
lea rdx, [0x1401f5c30]
mov qword [rsp + 0x258], rbp
lea rcx, [rsp + 0x30]
call fcn.1401c4c08
mov rsi, rax
test rax, rax
jne 0x140004915
mov rcx, qword [0x14028ece0]
test rcx, rcx
je 0x14000490e
lea r8, [rsp + 0x30]
lea rdx, str._nCannot_open_main_index_file:__s_n
call fcn.140002f70
xor eax, eax
jmp 0x140004b85
lea rcx, [0x14035fba8]
sub rcx, rbx
nop
movzx eax, byte [rbx]
mov byte [rcx + rbx], al
lea rbx, [rbx + 1]
test al, al
jne 0x140004920
mov edx, 1
lea rcx, [rsp + 0x30]
mov r9, rsi
lea r8d, [rdx + 0x3f]
call fcn.1401c4e74
mov edx, 4
cmp rax, 0x40
mov ecx, 0x1f5
mov ebx, edi
cmovb ebx, ecx
mov r9, rsi
lea rcx, [rsp + 0x250]
lea r8d, [rdx - 3]
call fcn.1401c4e74
mov edx, dword [rsp + 0x250]
cmp rax, 1
mov ecx, 0x1f6
mov dword [0x14035fdb8], edx
cmovb ebx, ecx
mov rcx, qword [0x14028ece0]
test rcx, rcx
je 0x1400049b1
mov r9d, edx
lea r8, [rsp + 0x30]
lea rdx, str.Main_Index:__s__Format_Version:__d_n
call fcn.140002f70
mov edx, dword [0x14035fdb8]
mov rcx, qword [0x14028ece0]
cmp edx, 0x8c
je 0x1400049f1
test rcx, rcx
je 0x1400049d3
mov r8d, edx
lea rdx, str._nERROR:_main_index_file_not_supported_format_version_d_n
call fcn.140002f70
mov edx, dword [0x14035fdb8]
lea rcx, str.Main_index_file_not_supported_format_version_d_n_nContact_Penzar_Development_support
mov ebx, 0x385
call fcn.1400051f0
mov rcx, rsi
call fcn.1401c4978
jmp 0x140004b55
mov edx, 4
lea rbp, [0x1403533a0]
mov r9, rsi
mov rcx, rbp
lea r8d, [rdx - 3]
call fcn.1401c4e74
cmp rax, 1
jae 0x140004a24
mov rcx, rsi
mov ebx, 2
call fcn.1401c4978
jmp 0x140004b55
test ebx, ebx
jne 0x140004b49
cmp dword [0x1403533a0], edi
mov dword [rsp + 0x250], edi
jle 0x140004ae9
mov qword [rsp + 0x260], r14
mov eax, edi
lea r14, [0x1403533a4]
cdqe
mov r9, rsi
imul rcx, rax, 0xc8
mov edx, 0xc8
mov r8d, 1
add rcx, r14
call fcn.1401c4e74
cmp rax, 1
jb 0x140004adc
mov rcx, qword [0x14028ece0]
test rcx, rcx
je 0x140004abe
movsxd r8, dword [rsp + 0x250]
lea rdx, [rbp + 0x84]
imul r10, r8, 0xc8
lea r9, [rbp + 4]
add rdx, r10
add r9, r10
mov eax, dword [r10 + rbp + 0xc4]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdx
lea rdx, str.Item__d:_Descr_s_File_s_Level_d_n
call fcn.140002f70
mov eax, dword [rsp + 0x250]
inc eax
cmp eax, dword [0x1403533a0]
mov dword [rsp + 0x250], eax
jl 0x140004a50
jmp 0x140004ae1
mov ebx, 2
mov r14, qword [rsp + 0x260]
mov edx, 1
lea rcx, [rsp + 0x30]
mov r9, rsi
lea r8d, [rdx + 0xf]
call fcn.1401c4e74
cmp rax, 0x10
jb 0x140004b49
nop word [rax + rax]
movzx eax, byte [rsp + rdi + 0x30]
mov byte [rdi + rbp + 0xca08], al
lea rdi, [rdi + 1]
test al, al
jne 0x140004b10
mov rcx, qword [0x14028ece0]
mov byte [0x14035fdb7], al
test rcx, rcx
je 0x140004b49
lea r8, [0x14035fda8]
lea rdx, str._nLibrary_version_s_n
call fcn.140002f70
mov rcx, rsi
call fcn.1401c4978
test ebx, ebx
je 0x140004b80
mov rcx, qword [0x14028ece0]
test rcx, rcx
je 0x140004b6d
lea rdx, str._nERROR:_reading_main_index_file_n
call fcn.140002f70
cmp ebx, 0x385
jne 0x14000490e
mov eax, 0xffffffff
jmp 0x140004b85
mov eax, 1
mov rbp, qword [rsp + 0x258]
add rsp, 0x230
pop rdi
pop rsi
pop rbx
ret