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

Disassembly:
mov rax, rsp
sub rsp, 0x148
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov qword [rax - 8], rdi
mov qword [rax - 0x10], r12
mov qword [rax - 0x18], r13
mov rax, qword [0x0045c120]
xor rax, rsp
mov qword [rsp + 0x120], rax
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]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x4100bc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Create_Inf_file_failed__d___
call fcn.00405500
xor eax, eax
jmp 0x410664
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x4100f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetFileSize_failed__d___
call fcn.00405500
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x410664
lea ebx, [rax + 1]
mov ecx, ebx
call fcn.0041859c
mov rbp, rax
mov r8d, ebx
xor edx, edx
mov rcx, rax
call fcn.00425320
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 0x410150
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ReadFile_failed__d___
call fcn.00405500
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x410664
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 0x4101ac
call fcn.0043db70
mov rdx, qword [rsp + 0xc8]
mov r8, qword [rsp + 0xc0]
cmp rdx, rdi
jae 0x4101cb
mov rdx, rdi
lea rcx, [rsp + 0xa8]
call fcn.00402010
mov rdx, qword [rsp + 0xc8]
jmp 0x4101f2
test rdi, rdi
jne 0x4101f2
mov qword [rsp + 0xc0], r12
lea rax, [rsp + 0xb0]
cmp rdx, 0x10
cmovae rax, qword [rsp + 0xb0]
mov byte [rax], r12b
jmp 0x41023d
test rdi, rdi
je 0x41023d
lea rcx, [rsp + 0xb0]
cmp rdx, 0x10
cmovae rcx, qword [rsp + 0xb0]
mov r9, rdi
mov r8, rbp
call fcn.00425d30
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.004185a4
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.004251a0
lea rbp, [0x004aadf8]
movabs r13, 0x6666666666666667
mov rsi, qword [rsp + 0xc0]
test rsi, rsi
je 0x410600
cmp rsi, 0xd
jb 0x410600
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.00425e10
mov rdi, rax
test rax, rax
je 0x410600
nop
nop
nop
lea rcx, str.vid_339bpid_
mov rdx, qword [rdi]
cmp rdx, qword [rcx]
jne 0x410314
mov edx, dword [rdi + 8]
cmp edx, dword [rcx + 8]
jne 0x410314
mov dl, byte [rdi + 0xc]
cmp dl, byte [rcx + 0xc]
jne 0x410314
mov eax, r12d
jmp 0x410319
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x410347
sub rbx, rdi
lea rsi, [rsi + rbx - 1]
lea rbx, [rdi + 1]
mov r8, rsi
mov edx, 0x76
mov rcx, rbx
call fcn.00425e10
mov rdi, rax
test rax, rax
je 0x410600
jmp 0x4102f0
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 0x410610
mov rsi, qword [rsp + 0xc0]
test rsi, rsi
je 0x410432
cmp rsi, 0xd
jb 0x410432
add rsi, 0xfffffffffffffff4
lea rbx, [rsp + 0xb0]
cmp rdx, 0x10
cmovae rbx, rcx
mov r8, rsi
mov edx, 0x76
mov rcx, rbx
call fcn.00425e10
mov rdi, rax
test rax, rax
je 0x410432
nop
nop
lea rcx, str.vid_339bpid_
mov rdx, qword [rdi]
cmp rdx, qword [rcx]
jne 0x4103e4
mov edx, dword [rdi + 8]
cmp edx, dword [rcx + 8]
jne 0x4103e4
mov dl, byte [rdi + 0xc]
cmp dl, byte [rcx + 0xc]
jne 0x4103e4
mov eax, r12d
jmp 0x4103e9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x410413
sub rbx, rdi
lea rsi, [rsi + rbx - 1]
lea rbx, [rdi + 1]
mov r8, rsi
mov edx, 0x76
mov rcx, rbx
call fcn.00425e10
mov rdi, rax
test rax, rax
jne 0x4103c0
jmp 0x410432
lea rax, [rsp + 0xb0]
cmp qword [rsp + 0xc8], 0x10
cmovae rax, qword [rsp + 0xb0]
sub rdi, rax
jmp 0x410439
mov rdi, 0xffffffffffffffff
mov esi, edi
lea r8, [rsi + 0xd]
mov r9d, 4
lea rdx, [rsp + 0xf8]
lea rcx, [rsp + 0xa8]
call fcn.00404890
nop
lea rcx, [rsp + 0x100]
cmp qword [rsp + 0x118], 0x10
cmovae rcx, qword [rsp + 0x100]
call fcn.004026e0
test eax, eax
jne 0x410565
mov rdi, qword [0x004aae00]
mov rbx, rdi
mov r8, qword [0x004aae08]
cmp rdi, r8
jbe 0x4104ab
call fcn.00426090
mov r8, qword [0x004aae08]
mov rdi, qword [0x004aae00]
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x58], rbx
test rdi, rdi
je 0x4104fc
mov rcx, r8
sub rcx, rdi
mov rax, r13
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
je 0x4104fc
cmp rdi, r8
jbe 0x4104e0
call fcn.00426090
sub rbx, rdi
mov rax, r13
imul rbx
mov rdi, rdx
sar rdi, 4
mov rax, rdi
shr rax, 0x3f
add rdi, rax
jmp 0x4104ff
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.0040f2d0
mov r11, qword [0x004aae00]
mov rbx, r11
mov rcx, qword [0x004aae08]
cmp r11, rcx
jbe 0x41054e
call fcn.00426090
mov rcx, qword [0x004aae08]
mov r11, qword [0x004aae00]
lea rax, [rdi + rdi*4]
lea rdx, [rbx + rax*8]
cmp rdx, rcx
ja 0x410560
cmp rdx, r11
jae 0x410565
call fcn.00426090
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.00404890
nop
mov r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
lea rcx, [rsp + 0xa8]
call fcn.00403520
nop
cmp qword [rsp + 0xa0], 0x10
jb 0x4105df
mov rcx, qword [rsp + 0x88]
call fcn.004185a4
nop
cmp qword [rsp + 0x118], 0x10
jb 0x410291
mov rcx, qword [rsp + 0x100]
call fcn.004185a4
jmp 0x410291
mov rdx, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0xb0]
cmp qword [rsp + 0xf0], 0x10
jb 0x410638
mov rcx, qword [rsp + 0xd8]
call fcn.004185a4
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 0x41065f
call fcn.004185a4
mov eax, 1
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.004252f0
mov rbx, qword [rsp + 0x158]
mov rbp, qword [rsp + 0x160]
mov rsi, qword [rsp + 0x168]
mov rdi, qword [rsp + 0x140]
mov r12, qword [rsp + 0x138]
mov r13, qword [rsp + 0x130]
add rsp, 0x148
ret