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

Disassembly:
mov r11, rsp
sub rsp, 0x218
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rbp
mov qword [r11 + 0x20], rsi
mov qword [r11 - 8], rdi
mov qword [r11 - 0x10], r12
mov qword [r11 - 0x18], r13
mov rax, qword [0x00454a00]
xor rax, rsp
mov qword [rsp + 0x1f0], rax
mov rdi, rcx
mov byte [rsp + 0x120], 0
xor edx, edx
mov r8d, 0xc7
lea rcx, [r11 - 0xf7]
call fcn.00420630
xor r12d, r12d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r12 + 1]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x40be14
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Create_Inf_file_failed__d___
lea rcx, [rsp + 0x120]
call fcn.004209a0
lea rcx, [rsp + 0x120]
call fcn.004042c0
xor eax, eax
jmp 0x40c3e4
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x40be5e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.GetFileSize_failed__d___
lea rcx, [rsp + 0x120]
call fcn.004209a0
lea rcx, [rsp + 0x120]
call fcn.004042c0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40c3e4
lea ebx, [rax + 1]
mov ecx, ebx
call fcn.004135f4
mov rbp, rax
mov r8d, ebx
xor edx, edx
mov rcx, rax
call fcn.00420630
mov dword [rsp + 0x40], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x40]
mov r8d, ebx
mov rdx, rbp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40bed4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.ReadFile_failed__d___
lea rcx, [rsp + 0x120]
call fcn.004209a0
lea rcx, [rsp + 0x120]
call fcn.004042c0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40c3e4
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 0xf
mov qword [rsp + 0xc8], rdx
mov r8, r12
mov qword [rsp + 0xc0], r12
mov byte [rsp + 0xb0], r8b
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, rbp
repne scasb al, byte [rdi]
not rcx
sub rcx, 1
mov rdi, rcx
cmp rcx, 0xfffffffffffffffe
jbe 0x40bf30
call fcn.00436ca0
mov rdx, qword [rsp + 0xc8]
mov r8, qword [rsp + 0xc0]
cmp rdx, rdi
jae 0x40bf4f
mov rdx, rdi
lea rcx, [rsp + 0xa8]
call fcn.00402120
mov rdx, qword [rsp + 0xc8]
jmp 0x40bf76
test rdi, rdi
jne 0x40bf76
mov qword [rsp + 0xc0], r12
lea rax, [rsp + 0xb0]
cmp rdx, 0x10
cmovae rax, qword [rsp + 0xb0]
mov byte [rax], r12b
jmp 0x40bfc1
test rdi, rdi
je 0x40bfc1
lea rcx, [rsp + 0xb0]
cmp rdx, 0x10
cmovae rcx, qword [rsp + 0xb0]
mov r9, rdi
mov r8, rbp
call fcn.00421090
mov qword [rsp + 0xc0], rdi
lea rax, [rsp + 0xb0]
cmp qword [rsp + 0xc8], 0x10
cmovae rax, qword [rsp + 0xb0]
mov byte [rax + rdi], r12b
mov rcx, rbp
call fcn.004135ec
mov qword [rsp + 0xf0], 0xf
mov qword [rsp + 0xe8], r12
mov byte [rsp + 0xd8], 0
lea rcx, [rsp + 0xb0]
cmp qword [rsp + 0xc8], 0x10
cmovae rcx, qword [rsp + 0xb0]
call fcn.004204b0
lea rbp, [0x00477cd0]
movabs r13, 0x6666666666666667
mov rsi, qword [rsp + 0xc0]
test rsi, rsi
je 0x40c380
cmp rsi, 0xd
jb 0x40c380
add rsi, 0xfffffffffffffff4
lea rbx, [rsp + 0xb0]
cmp qword [rsp + 0xc8], 0x10
cmovae rbx, qword [rsp + 0xb0]
mov r8, rsi
mov edx, 0x76
mov rcx, rbx
call fcn.00421170
mov rdi, rax
test rax, rax
je 0x40c380
nop
nop
lea rcx, str.vid_12d1pid_
mov rdx, qword [rdi]
cmp rdx, qword [rcx]
jne 0x40c094
mov edx, dword [rdi + 8]
cmp edx, dword [rcx + 8]
jne 0x40c094
mov dl, byte [rdi + 0xc]
cmp dl, byte [rcx + 0xc]
jne 0x40c094
mov eax, r12d
jmp 0x40c099
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40c0c7
sub rbx, rdi
lea rsi, [rsi + rbx - 1]
lea rbx, [rdi + 1]
mov r8, rsi
mov edx, 0x76
mov rcx, rbx
call fcn.00421170
mov rdi, rax
test rax, rax
je 0x40c380
jmp 0x40c070
lea rax, [rsp + 0xb0]
mov rcx, qword [rsp + 0xb0]
mov rdx, qword [rsp + 0xc8]
cmp rdx, 0x10
cmovae rax, rcx
sub rdi, rax
cmp rdi, 0xffffffffffffffff
je 0x40c390
mov rsi, qword [rsp + 0xc0]
test rsi, rsi
je 0x40c1b2
cmp rsi, 0xd
jb 0x40c1b2
add rsi, 0xfffffffffffffff4
lea rbx, [rsp + 0xb0]
cmp rdx, 0x10
cmovae rbx, rcx
mov r8, rsi
mov edx, 0x76
mov rcx, rbx
call fcn.00421170
mov rdi, rax
test rax, rax
je 0x40c1b2
nop
lea rcx, str.vid_12d1pid_
mov rdx, qword [rdi]
cmp rdx, qword [rcx]
jne 0x40c164
mov edx, dword [rdi + 8]
cmp edx, dword [rcx + 8]
jne 0x40c164
mov dl, byte [rdi + 0xc]
cmp dl, byte [rcx + 0xc]
jne 0x40c164
mov eax, r12d
jmp 0x40c169
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40c193
sub rbx, rdi
lea rsi, [rsi + rbx - 1]
lea rbx, [rdi + 1]
mov r8, rsi
mov edx, 0x76
mov rcx, rbx
call fcn.00421170
mov rdi, rax
test rax, rax
jne 0x40c140
jmp 0x40c1b2
lea rax, [rsp + 0xb0]
cmp qword [rsp + 0xc8], 0x10
cmovae rax, qword [rsp + 0xb0]
sub rdi, rax
jmp 0x40c1b9
mov rdi, 0xffffffffffffffff
mov esi, edi
lea r8, [rsi + 0xd]
mov r9d, 4
lea rdx, [rsp + 0xf8]
lea rcx, [rsp + 0xa8]
call fcn.00403a10
nop
lea rcx, [rsp + 0x100]
cmp qword [rsp + 0x118], 0x10
cmovae rcx, qword [rsp + 0x100]
call fcn.00402b70
test eax, eax
jne 0x40c2e5
mov rdi, qword [0x00477cd8]
mov rbx, rdi
mov r8, qword [0x00477ce0]
cmp rdi, r8
jbe 0x40c22b
call fcn.00421ac0
mov r8, qword [0x00477ce0]
mov rdi, qword [0x00477cd8]
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x58], rbx
test rdi, rdi
je 0x40c27c
mov rcx, r8
sub rcx, rdi
mov rax, r13
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
je 0x40c27c
cmp rdi, r8
jbe 0x40c260
call fcn.00421ac0
sub rbx, rdi
mov rax, r13
imul rbx
mov rdi, rdx
sar rdi, 4
mov rax, rdi
shr rax, 0x3f
add rdi, rax
jmp 0x40c27f
mov rdi, r12
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x60], xmm0
lea r9, [rsp + 0xf8]
mov r8d, 1
lea rdx, [rsp + 0x60]
mov rcx, rbp
call fcn.0040b750
mov r11, qword [0x00477cd8]
mov rbx, r11
mov rcx, qword [0x00477ce0]
cmp r11, rcx
jbe 0x40c2ce
call fcn.00421ac0
mov rcx, qword [0x00477ce0]
mov r11, qword [0x00477cd8]
lea rax, [rdi + rdi*4]
lea rdx, [rbx + rax*8]
cmp rdx, rcx
ja 0x40c2e0
cmp rdx, r11
jae 0x40c2e5
call fcn.00421ac0
lea rdi, [rsp + 0xb0]
cmp qword [rsp + 0xc8], 0x10
cmovae rdi, qword [rsp + 0xb0]
xor eax, eax
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
not rcx
lea r8, [rsi + 0x11]
lea r9, [rcx - 0x12]
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0xa8]
call fcn.00403a10
nop
mov r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
lea rcx, [rsp + 0xa8]
call fcn.00402c70
nop
cmp qword [rsp + 0xa0], 0x10
jb 0x40c35f
mov rcx, qword [rsp + 0x88]
call fcn.004135ec
nop
cmp qword [rsp + 0x118], 0x10
jb 0x40c015
mov rcx, qword [rsp + 0x100]
call fcn.004135ec
jmp 0x40c015
mov rdx, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0xb0]
cmp qword [rsp + 0xf0], 0x10
jb 0x40c3b8
mov rcx, qword [rsp + 0xd8]
call fcn.004135ec
mov rdx, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0xb0]
mov qword [rsp + 0xf0], 0xf
mov qword [rsp + 0xe8], r12
mov byte [rsp + 0xd8], 0
cmp rdx, 0x10
jb 0x40c3df
call fcn.004135ec
mov eax, 1
mov rcx, qword [rsp + 0x1f0]
xor rcx, rsp
call fcn.00420600
mov rbx, qword [rsp + 0x228]
mov rbp, qword [rsp + 0x230]
mov rsi, qword [rsp + 0x238]
mov rdi, qword [rsp + 0x210]
mov r12, qword [rsp + 0x208]
mov r13, qword [rsp + 0x200]
add rsp, 0x218
ret