Function at 0x180007959
Capabilities:
Read file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x48
lea rbp, [rsp + 0x40]
mov rsi, rdx
mov r13, rcx
mov eax, dword [0x180014b98]
lea rax, [rax + rax*8]
add rax, 0xf
and rax, 0xfffffffffffffff0
sub rsp, rax
mov r9, rsp
sub rsp, 0x20
lea rcx, [0x180014ad4]
lea rdx, [0x180014add]
push 9
pop r8
call fcn.180010cab
add rsp, 0x20
mov qword [rbp], rax
mov r8d, dword [0x180014b9c]
sub rsp, 0x20
lea rcx, [0x180014ade]
lea rdx, str.__c
lea r9, [rbp - 0x31]
call fcn.180010cab
add rsp, 0x20
mov qword [rbp - 0x18], rax
mov eax, dword [0x180014ba0]
lea rax, [rax + rax*8]
add rax, 0xf
and rax, 0xfffffffffffffff0
sub rsp, rax
mov r15, rsp
mov eax, 0x9008a81
xor edx, edx
div dword [0x180014ba4]
imul eax, dword [0x180014ba8]
and eax, dword [0x180014bac]
cmp eax, dword [0x180014bb0]
jbe 0x180007a25
sub rsp, 0x20
mov ecx, 0x2000
call fcn.180007003
add rsp, 0x20
sub rsp, 0x20
lea rcx, [0x180014ae8]
lea rdx, [0x180014af1]
push 9
pop r12
mov r8d, r12d
mov r9, r15
call fcn.180010cab
add rsp, 0x20
mov qword [rbp - 0x28], rax
push 0x10
pop rdi
sub rsp, rdi
mov r9, rsp
sub rsp, 0x20
lea rcx, [0x180014af2]
lea rdx, [0x180014afb]
mov r8d, r12d
call fcn.180010cab
add rsp, 0x20
mov qword [rbp - 0x10], rax
sub rsp, rdi
mov qword [rbp - 0x20], rsp
sub rsp, rdi
mov r15, rsp
sub rsp, rdi
mov rdi, rsp
mov rax, qword [r13]
mov rax, qword [rax + rsi*8]
movsxd r14, dword [rax]
mov rcx, qword [0x180014bb8]
sub rsp, 0x20
call fcn.180007003
add rsp, 0x20
mov rbx, rax
mov rax, qword [r13]
mov rcx, qword [rax + rsi*8]
mov r12, r13
mov r13, qword [rcx + 0x40]
test r13, r13
je 0x180007bc4
sub r13d, dword [rcx + 0x50]
sub rsp, 0x20
mov rcx, qword [rbp]
call fcn.180009b15
mov ecx, eax
call fcn.180009ba0
mov rcx, r14
mov rdx, rbx
mov r8d, r13d
xor r9d, r9d
call rax
add rsp, 0x20
mov rcx, qword [r12]
mov rdx, qword [rcx + rsi*8]
cmp dword [rdx + 0x10], 1
je 0x180007fe6
mov r15, rsi
test eax, eax
js 0x180007c96
je 0x180007d22
mov rcx, qword [rdx + 0x48]
add rcx, qword [rdx + 0x50]
mov edi, eax
sub rsp, 0x20
mov rdx, rbx
mov r8, rdi
call sub.msvcrt.dll_memcpy
add rsp, 0x20
mov rax, qword [r12]
mov r10, qword [rax + r15*8]
add rdi, qword [r10 + 0x50]
mov qword [r10 + 0x50], rdi
cmp rdi, qword [r10 + 0x40]
ja 0x180007ff3
jne 0x180007f76
mov rcx, r12
mov r8, qword [r10 + 0x48]
mov rax, qword [r10 + 0x60]
sub rsp, 0x40
or word [rsp + 0x28], 0xffff
mov qword [rsp + 0x30], rax
and qword [rsp + 0x20], 0
mov rsi, r12
mov edx, r14d
mov r9, rdi
call qword [r10 + 0x20]
add rsp, 0x20
mov rcx, r12
mov edx, r14d
mov r8d, eax
call fcn.180008003
add rsp, 0x20
mov rax, qword [r12]
mov rax, qword [rax + r15*8]
mov rcx, qword [rax + 0x48]
mov r8, qword [rax + 0x50]
sub rsp, 0x20
xor edx, edx
call sub.msvcrt.dll_memset
add rsp, 0x20
mov rax, qword [r12]
mov rax, qword [rax + r15*8]
and qword [rax + 0x50], 0
jmp 0x180007f76
mov rdx, qword [rbp - 0x20]
mov r13, qword [rbp - 0x28]
mov qword [rbp - 8], rsi
mov rsi, r12
mov qword [rbp], r14
mov r14, rbx
mov eax, dword [rcx + 0x10]
test eax, eax
je 0x180007cd2
cmp eax, dword [0x180014bc8]
je 0x180007cd2
mov dword [rdi], 0x10
sub rsp, 0x20
push 0x10
pop r8
mov rcx, r15
xor edx, edx
call sub.msvcrt.dll_memset
mov rcx, qword [rbp - 0x18]
call fcn.180009b15
mov ecx, eax
call fcn.180009ba0
sub rsp, 0x10
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r15
mov r12, qword [rbp]
mov rcx, r12
mov rbx, r14
mov rdx, r14
mov r8d, 0x2000
xor r9d, r9d
call rax
add rsp, 0x30
test eax, eax
js 0x180007d9b
movsxd rdi, eax
cmp qword [0x180014bd0], rdi
je 0x180007d9b
mov rax, qword [rsi]
mov rcx, qword [rbp - 8]
mov rax, qword [rax + rcx*8]
cmp qword [0x180017340], rdi
jne 0x180007ebb
mov r9, qword [rax + 0x38]
test r9, r9
je 0x180007eac
mov r8, qword [rax + 0x60]
sub rsp, 0x20
mov rcx, rsi
mov edx, r12d
call r9
jmp 0x180007ddc
mov rdi, qword [rdx + 0x30]
test rdi, rdi
je 0x180007d8c
mov ecx, dword [rdx]
sub rsp, 0x20
call fcn.180008034
add rsp, 0x20
mov rcx, qword [r12]
mov rcx, qword [rcx + r15*8]
mov r9, qword [rcx + 0x60]
sub rsp, 0x20
mov rcx, r12
mov edx, r14d
mov r8d, eax
call rdi
jmp 0x180007d81
mov rdi, rdx
and dword [rdx], 0
test eax, eax
mov rbx, r14
je 0x180007de7
cmp eax, dword [0x180014bcc]
jne 0x180007e86
mov rcx, qword [rcx + 8]
sub rsp, 0x30
and qword [rsp + 0x20], 0
mov rdx, rbx
mov r8d, 0x2000
mov r9, rdi
call qword [sym.imp.KERNEL32.DLL_ReadFile]
add rsp, 0x30
test eax, eax
je 0x180007f93
mov eax, dword [rdi]
jmp 0x180007e39
mov r9, qword [rdx + 0x38]
test r9, r9
je 0x180007d8c
imul eax, dword [0x180014bc0], 0xed77b188
add eax, 0x5e2fc77e
cmp eax, 0x73858bc4
jbe 0x180007d70
mov r8, qword [rdx + 0x60]
sub rsp, 0x20
mov rcx, r12
mov edx, r14d
call r9
mov rcx, r12
mov edx, r14d
mov r8d, eax
call fcn.180008003
add rsp, 0x20
mov rax, qword [r12]
mov rdx, qword [rax + r15*8]
mov r9, qword [rdx + 0x38]
mov r8, qword [rdx + 0x60]
sub rsp, 0x20
mov rcx, r12
mov edx, r14d
call r9
mov rcx, r12
mov edx, r14d
jmp 0x180007f59
sub rsp, 0x20
mov rcx, r12
mov edx, r14d
jmp 0x180007f6d
mov rax, qword [rsi]
mov r13, qword [rbp - 8]
mov rax, qword [rax + r13*8]
mov rdi, qword [rax + 0x30]
test rdi, rdi
je 0x180007eac
mov ecx, dword [rax]
sub rsp, 0x20
call fcn.180008034
add rsp, 0x20
mov rcx, qword [rsi]
mov rcx, qword [rcx + r13*8]
mov r9, qword [rcx + 0x60]
sub rsp, 0x20
mov rcx, rsi
mov edx, r12d
mov r8d, eax
call rdi
mov rcx, rsi
mov edx, r12d
jmp 0x180007f59
sub rsp, 0x20
lea rcx, [0x180014c36]
lea rdx, [0x180014c3f]
push 9
pop r8
lea r9, [rbp - 0x3a]
call fcn.180010cab
mov rcx, rax
call fcn.180009b15
mov ecx, eax
call fcn.180009ba0
add rsp, 0x20
mov r9d, dword [0x18001734c]
sub rsp, 0x20
mov rcx, qword [rbp]
mov rdx, rbx
mov r8d, 0x2000
call rax
add rsp, 0x20
mov dword [rdi], eax
mov rcx, qword [rsi]
mov rdx, qword [rbp - 8]
mov rcx, qword [rcx + rdx*8]
test eax, eax
je 0x180007e86
mov r10, qword [rcx + 0x20]
test r10, r10
mov r13, qword [rbp]
je 0x180007f76
mov r9d, eax
mov rax, qword [rcx + 0x60]
sub rsp, 0x40
or word [rsp + 0x28], 0xffff
mov qword [rsp + 0x30], rax
and qword [rsp + 0x20], 0
mov rcx, rsi
mov edx, r13d
mov r8, rbx
call r10
jmp 0x180007f4f
mov r13, qword [rbp]
mov rax, qword [rcx + 0x38]
test rax, rax
je 0x180007f63
mov r8, qword [rcx + 0x60]
sub rsp, 0x20
mov rcx, rsi
mov edx, r13d
call rax
jmp 0x180007f53
sub rsp, 0x20
mov rcx, rsi
mov edx, r12d
jmp 0x180007f6d
mov r12, qword [rax + 0x20]
test r12, r12
je 0x180007f76
sub rsp, 0x20
mov rcx, r13
call fcn.180009b15
mov ecx, eax
call fcn.180009ba0
add rsp, 0x20
mov ecx, dword [r15 + 4]
sub rsp, 0x20
call rax
add rsp, 0x20
mov rbx, rax
sub rsp, 0x20
mov rcx, qword [rbp - 0x10]
call fcn.180009b15
mov ecx, eax
call fcn.180009ba0
add rsp, 0x20
movzx ecx, word [r15 + 2]
sub rsp, 0x20
call rax
add rsp, 0x20
mov rcx, qword [rsi]
mov rdx, qword [rbp - 8]
mov rcx, qword [rcx + rdx*8]
mov rcx, qword [rcx + 0x60]
sub rsp, 0x40
mov qword [rsp + 0x30], rcx
mov word [rsp + 0x28], ax
mov qword [rsp + 0x20], rbx
mov rbx, r14
mov rcx, rsi
mov r13, qword [rbp]
mov edx, r13d
mov r8, r14
mov r9, rdi
call r12
add rsp, 0x20
mov rcx, rsi
mov edx, r13d
mov r8d, eax
call fcn.180008003
jmp 0x180007f72
sub rsp, 0x20
mov rcx, rsi
mov edx, r13d
call fcn.180007248
add rsp, 0x20
sub rsp, 0x20
mov rcx, rbx
call sub.msvcrt.dll_free
lea rsp, [rbp + 8]
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rax, qword [rsi]
mov r13, qword [rbp - 8]
mov rax, qword [rax + r13*8]
mov rdi, qword [rax + 0x30]
test rdi, rdi
je 0x180007fd9
mov ecx, dword [rax]
sub rsp, 0x20
call fcn.180008034
add rsp, 0x20
mov rcx, qword [rsi]
mov rcx, qword [rcx + r13*8]
mov r9, qword [rcx + 0x60]
sub rsp, 0x20
mov rcx, rsi
mov r13, qword [rbp]
mov edx, r13d
mov r8d, eax
call rdi
jmp 0x180007f53
sub rsp, 0x20
mov rcx, rsi
mov rdx, qword [rbp]
jmp 0x180007f6d
sub rsp, 0x20
push 1
pop rcx
call qword [sym.imp.KERNEL32.DLL_ExitThread]
mov ecx, dword [0x180014bc4]
sub rsp, 0x20
call qword [sym.imp.KERNEL32.DLL_ExitThread]