Function at 0x442230
Capabilities:
Read file on windows

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov r13, qword [sym.imp.msvcrt.dll__wfopen]
mov r12, rdx
mov rbp, rcx
lea rdx, [0x0080482a]
mov rcx, r12
call r13
test rax, rax
mov rbx, rax
je 0x442520
xor edx, edx
mov r8d, 2
mov rcx, rax
call fcn.0067f720
mov rcx, rbx
call fcn.0067f4d0
xor r8d, r8d
xor edx, edx
mov rcx, rbx
mov rdi, rax
call fcn.0067f720
cmp rdi, 9
jbe 0x442550
lea rcx, [rdi + 1]
movabs rax, 0x3ffffffffffffffc
cmp rcx, rax
ja 0x442582
add rcx, rcx
call fcn.007da080
mov rcx, qword [rbp + 0x28]
mov rsi, rax
mov qword [rbp + 0x28], rax
test rcx, rcx
je 0x4422ce
call fcn.007da030
mov rsi, qword [rbp + 0x28]
mov r9, rbx
mov r8d, 1
mov edx, 2
mov rcx, rsi
call sub.msvcrt.dll_fread
mov r8d, 2
mov rcx, rsi
lea rdx, [0x0080488d]
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x4423a0
mov r8d, 2
mov rcx, rsi
lea rdx, [0x00804890]
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x442500
mov r8d, 2
mov rcx, rsi
lea rdx, [0x00804893]
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x442480
mov rdx, rdi
mov r9, rbx
mov r8d, 1
mov rcx, rsi
call sub.msvcrt.dll_fread
lea rax, [rdi - 1]
mov rdx, rsi
nop word cs:[rax + rax]
movzx ecx, byte [rdx + 1]
sub rax, 1
add rdx, 2
mov byte [rdx - 2], cl
cmp rax, 0xffffffffffffffff
jne 0x442360
mov rcx, rbx
shr rdi, 1
call sub.msvcrt.dll_fclose
xor edx, edx
mov eax, 1
mov word [rsi + rdi*2 - 2], dx
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov r9, rbx
mov r8d, 1
mov edx, 1
mov rcx, rsi
call sub.msvcrt.dll_fread
lea r8, [rdi - 3]
mov r9, rbx
mov rcx, rsi
mov edx, 1
call sub.msvcrt.dll_fread
xor edx, edx
mov ecx, 0xfde9
mov r8, rsi
mov r12, rax
mov dword [rsp + 0x28], 0
mov r9d, eax
mov rdi, qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov qword [rsp + 0x20], 0
call rdi
movsxd rcx, eax
movabs rax, 0x3ffffffffffffffc
mov r14, rcx
add rcx, 1
cmp rcx, rax
ja 0x442582
add rcx, rcx
call fcn.007da080
mov r8, rsi
xor edx, edx
mov r9d, r12d
mov r13, rax
mov ecx, 0xfde9
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], rax
call rdi
mov rcx, rbx
movsxd rsi, eax
call sub.msvcrt.dll_fclose
xor ecx, ecx
mov eax, 1
mov word [r13 + rsi*2], cx
mov rcx, qword [rbp + 0x28]
mov qword [rbp + 0x28], r13
test rcx, rcx
je 0x44238c
mov byte [rsp + 0x3f], al
call fcn.007da030
movzx eax, byte [rsp + 0x3f]
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rcx, rbx
call sub.msvcrt.dll_fclose
lea rdx, [0x00804896]
mov rcx, r12
call r13
test rax, rax
mov rbp, rax
je 0x442520
sub rdi, 1
mov rbx, rsi
jmp 0x4424c9
mov rcx, rbx
mov r8, rbp
mov edx, edi
call sub.msvcrt.dll_fgetws
mov rcx, rbx
call sub.msvcrt.dll_wcslen
lea rbx, [rbx + rax*2]
mov rcx, rbp
call sub.msvcrt.dll_feof
test eax, eax
je 0x4424b0
mov rcx, rbp
call sub.msvcrt.dll_fclose
xor eax, eax
mov word [rsi + rdi*2], ax
mov eax, 1
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov r9, rbx
mov r8d, 1
mov rdx, rdi
mov rcx, rsi
call sub.msvcrt.dll_fread
jmp 0x442375
mov rcx, qword [0x00826910]
mov r8, r12
lea rdx, str.ERROR_in_loadfile__:_failed__wfopen__S__n
call fcn.0041db00
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rcx, qword [0x00826910]
mov r9, rdi
mov r8, r12
lea rdx, str.ERROR_in_loadfile__:__S_has_only__d_bytes_n
call fcn.0041db00
mov rcx, rbx
call sub.msvcrt.dll_fclose
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
call fcn.007da9a0
nop
nop dword [rax + rax]