Function at 0x4158e0
Capabilities:
Read file on windows

Disassembly:
push r15
mov eax, 0x2038
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.0067cdd0
sub rsp, rax
mov rax, qword [rcx + 0x10]
mov rdx, qword [rax]
lea rbp, [rsp + 0x30]
mov rsi, rcx
mov r8, rbp
call fcn.004113e0
lea rdx, [0x007f8332]
mov rcx, rbp
call qword [sym.imp.msvcrt.dll__wfopen]
test rax, rax
mov rbx, rax
je 0x4159a7
xor edx, edx
mov r8d, 2
mov rcx, rax
call fcn.0067f720
lea rdi, [rsp + 0x20]
mov rcx, rbx
call fcn.0067f4d0
xor r8d, r8d
xor edx, edx
mov rcx, rbx
mov r15, rax
call fcn.0067f720
mov r9, rbx
mov edx, 3
mov rcx, rdi
mov r8d, 1
call sub.msvcrt.dll_fread
lea rcx, [rsp + 0x24]
mov r9, rbx
mov r8d, 1
mov edx, 4
call sub.msvcrt.dll_fread
mov r8d, 3
mov rcx, rdi
lea rdx, [0x007f8338]
call sub.msvcrt.dll_memcmp
test eax, eax
mov eax, dword [rsp + 0x24]
je 0x4159c0
cmp eax, 0x204
je 0x4159c7
xor eax, eax
add rsp, 0x2038
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp eax, 0x205
jne 0x4159a0
mov r14, qword [0x00826960]
cmp word [r14 + 0xa000], 0
jne 0x4159a7
sub r15, 7
xor r13d, r13d
mov rcx, r15
call fcn.007da080
mov r9, rbx
mov r8d, 1
mov rdx, r15
mov rcx, rax
mov r12, rax
call sub.msvcrt.dll_fread
test byte [r14 + 0x1c000], 2
mov rdi, r12
jne 0x415bf0
movsxd rdx, dword [rdi + 4]
add rdi, 8
movabs r8, 0xf83e0f83e0f83e1
movsxd r14, dword [rdi - 8]
mov rcx, qword [rsi + 0x78]
mov rax, qword [rsi + 0x80]
test rdx, rdx
cmove rdx, r14
sub rax, rcx
sar rax, 2
imul rax, r8
cmp rdx, rax
ja 0x415c90
jae 0x415a63
mov rax, rdx
shl rax, 5
add rdx, rax
lea rax, [rcx + rdx*4]
mov qword [rsi + 0x80], rax
mov rdx, rdi
mov r8, r14
add rdi, r14
call sub.msvcrt.dll_memcpy
movsxd rdx, dword [rdi + 4]
add rdi, 8
movsxd r14, dword [rdi - 8]
mov rcx, qword [rsi + 0x90]
mov rax, qword [rsi + 0x98]
test rdx, rdx
cmove rdx, r14
sub rax, rcx
sar rax, 4
cmp rdx, rax
ja 0x415c70
jae 0x415ab2
shl rdx, 4
add rdx, rcx
mov qword [rsi + 0x98], rdx
mov r8, r14
mov rdx, rdi
add rdi, r14
call sub.msvcrt.dll_memcpy
movsxd rdx, dword [rdi + 4]
add rdi, 8
movabs r8, 0xaaaaaaaaaaaaaaab
movsxd r14, dword [rdi - 8]
mov rcx, qword [rsi + 0xa8]
mov rax, qword [rsi + 0xb0]
test rdx, rdx
cmove rdx, r14
sub rax, rcx
sar rax, 3
imul rax, r8
cmp rdx, rax
ja 0x415c50
jae 0x415b10
lea rax, [rdx + rdx*2]
lea rax, [rcx + rax*8]
mov qword [rsi + 0xb0], rax
mov r8, r14
mov rdx, rdi
add rdi, r14
call sub.msvcrt.dll_memcpy
movsxd rdx, dword [rdi + 4]
add rdi, 8
movabs r8, 0xaaaaaaaaaaaaaaab
movsxd r14, dword [rdi - 8]
mov rcx, qword [rsi + 0xc0]
mov rax, qword [rsi + 0xc8]
test rdx, rdx
cmove rdx, r14
sub rax, rcx
sar rax, 2
imul rax, r8
cmp rdx, rax
ja 0x415c30
jae 0x415b6e
lea rax, [rdx + rdx*2]
lea rax, [rcx + rax*4]
mov qword [rsi + 0xc8], rax
mov r8, r14
mov rdx, rdi
call sub.msvcrt.dll_memcpy
lea rdx, [rdi + r14]
lea rcx, [rsi + 0x110]
call fcn.00697b60
lea rcx, [rsi + 0x18]
mov rdx, rax
call fcn.00404120
mov rcx, r12
call fcn.007da030
test r13, r13
je 0x415baa
mov rcx, r13
call fcn.007da030
mov rcx, rbx
call sub.msvcrt.dll_fclose
lea rcx, [rsi + 0xd8]
call fcn.00403510
lea rdx, [0x007f87d4]
mov rcx, rbp
call sub.SHELL32.dll_StrStrIW
test rax, rax
setne al
movzx eax, al
add eax, 1
mov dword [rsi + 8], eax
mov eax, 1
jmp 0x4159a9
lea r8, [rsp + 0x28]
mov rdx, r15
mov rcx, r12
call fcn.0045f850
mov r13, qword [rsp + 0x28]
mov rcx, r13
call fcn.007da080
mov rdx, r13
mov r9, r15
mov r8, r12
mov rdi, rax
mov rcx, rax
call fcn.00403f60
mov r13, rdi
jmp 0x415a10
lea rcx, [rsi + 0xc0]
sub rdx, rax
call fcn.00785d30
mov rcx, qword [rsi + 0xc0]
jmp 0x415b6e
lea rcx, [rsi + 0xa8]
sub rdx, rax
call fcn.00786170
mov rcx, qword [rsi + 0xa8]
jmp 0x415b10
lea rcx, [rsi + 0x90]
sub rdx, rax
call fcn.00786a20
mov rcx, qword [rsi + 0x90]
jmp 0x415ab2
lea rcx, [rsi + 0x78]
sub rdx, rax
call fcn.00786650
mov rcx, qword [rsi + 0x78]
jmp 0x415a63