Function at 0x140009020
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0xb0
mov rbx, rdx
mov rdi, rcx
mov r8d, 0x88
add rcx, 0x68
xor edx, edx
call sub.msvcrt.dll_memset
xor r13d, r13d
xor edx, edx
mov rcx, rbx
mov esi, r13d
call fcn.140063024
cmp rax, 0xffffffffffffffff
mov r12, rax
je 0x140009489
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [rdi + 0x50]
cmp eax, edx
mov ebp, eax
jl 0x14000908b
add edx, dword [rdi + 0x54]
cmp edx, eax
jle 0x14000907b
lea rcx, [rdi + 0x48]
call fcn.1400603d8
mov rdx, qword [rdi + 0x48]
lea r9, [rsp + 0xe0]
mov r8d, ebp
mov rcx, r12
mov dword [rsp + 0xe0], r13d
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r11, qword [rdi + 0x48]
lea r8, [rdi + 0x60]
lea rcx, [rsp + 0x40]
mov edx, InitCommonControls
mov qword [rsp + 0x48], r11
mov qword [rdi + 0xe0], r11
mov dword [rsp + 0x40], ebp
mov dword [rsp + 0x50], r13d
mov dword [rdi + 0xe8], ebp
call fcn.140060308
mov r11d, dword [rsp + 0x50]
lea eax, [r11 + 4]
lea r8, [rdi + 0x70]
lea rcx, [rsp + 0x40]
cmp eax, dword [rsp + 0x40]
mov edx, 8
cmovbe r11d, eax
mov dword [rsp + 0x50], r11d
call fcn.140060308
mov r11d, dword [rsp + 0x50]
lea eax, [r11 + 4]
mov r12d, 4
lea r8, [rdi + 0x80]
cmp eax, dword [rsp + 0x40]
lea rcx, [rsp + 0x40]
mov edx, r12d
cmovbe r11d, eax
lea eax, [r11 + 4]
cmp eax, dword [rsp + 0x40]
cmovbe r11d, eax
mov dword [rsp + 0x50], r11d
call fcn.140060308
cmp eax, r13d
je 0x140009178
mov edx, dword [rsp + 0x50]
mov rax, rdx
add rax, qword [rsp + 0x48]
mov qword [rdi + 0x78], rax
mov ecx, dword [rdi + 0x80]
add ecx, edx
cmp ecx, dword [rsp + 0x40]
cmovbe edx, ecx
mov dword [rsp + 0x50], edx
lea r8, [rsp + 0xe0]
lea rcx, [rsp + 0x40]
mov edx, r12d
mov dword [rsp + 0xe0], r13d
call fcn.140060308
mov eax, 0xaaaaaaab
mul dword [rsp + 0xe0]
shr edx, 3
mov ebx, r13d
je 0x140009489
mov ebp, edx
lea r8, [rsp + 0xe0]
lea rcx, [rsp + 0x40]
mov edx, r12d
mov dword [rsp + 0xe0], r13d
mov dword [rsp + 0xf0], r13d
mov dword [rsp + 0xf8], r13d
call fcn.140060308
lea r8, [rsp + 0xf0]
lea rcx, [rsp + 0x40]
mov edx, r12d
call fcn.140060308
lea r8, [rsp + 0xf8]
lea rcx, [rsp + 0x40]
mov edx, r12d
call fcn.140060308
cmp dword [rsp + 0xe0], 3
cmove ebx, dword [rsp + 0xf0]
sub rbp, 1
jne 0x1400091af
cmp ebx, r13d
jbe 0x140009489
lea eax, [rbx + 8]
lea r8, [rsp + 0xf0]
lea rcx, [rsp + 0x40]
cmp eax, dword [rsp + 0x40]
mov edx, r12d
mov dword [rsp + 0xf0], r13d
cmovbe ebx, eax
mov dword [rsp + 0x50], ebx
call fcn.140060308
mov r11d, dword [rsp + 0xf0]
cmp r11d, 7
mov dword [rdi + 0x98], r11d
jne 0x140009278
mov eax, dword [rsp + 0x50]
add eax, 0x1e
cmp eax, dword [rsp + 0x40]
ja 0x14000928a
mov dword [rsp + 0x50], eax
jmp 0x14000928a
mov ecx, dword [rsp + 0x50]
lea eax, [rcx + 0xa]
cmp eax, dword [rsp + 0x40]
cmovbe ecx, eax
mov dword [rsp + 0x50], ecx
lea r8, [rsp + 0xe0]
lea rcx, [rsp + 0x40]
mov edx, r12d
mov dword [rsp + 0xe0], r13d
mov dword [rsp + 0xf0], r13d
call fcn.140060308
mov r11d, dword [rsp + 0x50]
lea r8, [rsp + 0xf0]
lea rcx, [rsp + 0x40]
lea eax, [r11 + 1]
mov edx, r12d
cmp eax, dword [rsp + 0x40]
cmovbe r11d, eax
mov dword [rsp + 0x50], r11d
call fcn.140060308
mov r11d, dword [rsp + 0x50]
mov ecx, dword [rsp + 0xe0]
lea eax, [r11 + 0x10]
mov rbx, r11
add rbx, qword [rsp + 0x48]
add ecx, 0xfffffffb
mov dword [rdi + 0x94], eax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0xe0], ecx
cmp eax, r11d
jbe 0x140009310
sub eax, r11d
jmp 0x140009313
mov eax, r13d
cmp eax, ecx
jb 0x140009482
lea rbp, [0x14008e9c0]
lea rdx, [rsp + 0xf8]
xor r9d, r9d
xor r8d, r8d
mov rcx, rbp
mov dword [rsp + 0x28], 0xf0000000
mov qword [rsp + 0xf8], r13
mov dword [rsp + 0x20], 0x18
call fcn.14006d25c
cmp eax, r13d
je 0x140009482
mov r8d, 0x20
lea rcx, [rsp + 0x6c]
lea rdx, [rdi + 8]
mov byte [rsp + 0x60], 8
mov dword [rsp + 0x64], 0x6610
mov byte [rsp + 0x61], 2
mov dword [rsp + 0x68], r8d
call sub.msvcrt.dll_memcpy
mov rdx, qword [rsp + 0xf8]
lea rax, [rsp + 0xf0]
lea r8, [rsp + 0x60]
mov r9d, 0x2c
mov qword [rsp + 0x30], rax
mov rcx, rbp
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
mov qword [rsp + 0xf0], r13
call fcn.14006d00c
cmp eax, r13d
mov esi, eax
je 0x14000946d
mov rdx, qword [rsp + 0xf0]
cmp rdx, r13
je 0x14000946d
lea rax, [rsp + 0xe0]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x30], rax
mov rcx, rbp
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], r13d
call fcn.14006d06c
mov rdx, qword [rsp + 0xf0]
mov rcx, rbp
mov esi, eax
call fcn.14006cfcc
cmp dword [rsp + 0xe0], 0x10
jbe 0x14000946d
cmp rbx, r13
je 0x14000946d
mov eax, dword [rsp + 0xe0]
mov rcx, rdi
mov byte [rax + rbx], r13b
mov eax, dword [rsp + 0xe0]
add eax, 1
mov byte [rax + rbx], r13b
mov eax, dword [rsp + 0xe0]
add eax, 2
mov byte [rax + rbx], r13b
lea rax, [rbx + 0x10]
mov qword [rdi + 0x88], rax
mov eax, dword [rsp + 0xe0]
add eax, 0xfffffff0
mov dword [rdi + 0x90], eax
call fcn.140008e90
mov rdx, qword [rsp + 0xf8]
xor r8d, r8d
mov rcx, rbp
call fcn.14006d0cc
jmp 0x140009489
mov dword [rdi + 0x58], 0xffffffec
mov eax, esi
mov rbx, qword [rsp + 0xe8]
add rsp, 0xb0
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret