Function at 0x412740
Capabilities:
Get file size

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x238
vpbroadcastb ymm0, byte [0x00450500]
mov r12, qword [r8]
lea r14, [rsp + 0x30]
lea r15, [rsp + 0xb0]
mov rbx, r8
mov rdi, rdx
mov rsi, rcx
xor r13d, r13d
mov qword [rsp + 0xb0], r12
vmovdqu ymmword [rsp + 0x68], ymm0
vmovdqu ymmword [rsp + 0x50], ymm0
nop dword [rax]
mov r9d, 0x38
lea r8, [rsp + r13 + 0x50]
mov rcx, r14
mov rdx, r15
sub r9, r13
vzeroupper
call fcn.00401c10
movzx eax, word [rsp + 0x38]
test eax, eax
jne 0x4128db
mov rax, qword [rsp + 0x30]
test rax, rax
je 0x412906
add r13, rax
jb 0x412f17
cmp r13, 0x38
jb 0x412790
vmovdqa xmm0, xmmword [rsp + 0x50]
vmovdqa xmm1, xmmword [rsp + 0x60]
vpcmpeqd xmm2, xmm2, xmm2
vpcmpeqb xmm0, xmm0, xmmword [str.Microsoft_C_C_MSF_7.00_r_n]
vpcmpeqb xmm1, xmm1, xmmword [0x004504f0]
vpxor xmm0, xmm0, xmm2
vpxor xmm1, xmm1, xmm2
vpor xmm0, xmm1, xmm0
vpmovmskb eax, xmm0
test eax, eax
jne 0x412910
mov eax, dword [rsp + 0x74]
add eax, 0xfffffffd
cmp eax, 0xfffffffd
jbe 0x412910
mov rcx, qword [rbx]
mov r14d, dword [rsp + 0x70]
mov ebp, dword [rsp + 0x78]
mov r13d, dword [rsp + 0x7c]
mov r15d, dword [rsp + 0x84]
movabs rax, 0xaaaaaaaaaaaaaaaa
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x50], rax
call sub.KERNEL32.dll_GetFileSizeEx
test eax, eax
je 0x412940
mov eax, ebp
mul r14d
jo 0x412f17
mov rbp, qword [rsp + 0x50]
mov eax, eax
cmp rbp, rax
jne 0x412910
lea eax, [r14 - 0x200]
rorx eax, eax, 9
cmp eax, 7
ja 0x412910
mov ecx, 0x8b
bt ecx, eax
jae 0x412910
mov eax, r13d
add eax, r14d
jb 0x412f17
sub eax, 1
jb 0x412f17
test r14d, r14d
je 0x412fea
xor edx, edx
div r14d
mov ecx, r14d
shr ecx, 2
cmp eax, ecx
jbe 0x41294d
vmovups ymm0, ymmword [0x00451ad8]
vmovups ymmword [rsi + 0x20], ymm0
vmovdqu ymm0, ymmword [0x00451ab8]
jmp 0x412925
cmp eax, 0x34
ja 0x4128f2
movabs rdx, 0x10007f42810800
mov ecx, eax
bt rdx, rcx
jb 0x41290a
lea rcx, str.invalid_error_code
mov edx, 0x12
xor r9d, r9d
call fcn.00401000
mov ax, 0x34
mov word [rsi + 0x38], ax
jmp 0x412929
vmovups ymm0, ymmword [0x00451a98]
vmovups ymmword [rsi + 0x20], ymm0
vmovdqu ymm0, ymmword [0x00451a78]
vmovdqu ymmword [rsi], ymm0
add rsp, 0x238
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
vzeroupper
ret
call sub.KERNEL32.dll_GetLastError
mov word [rsi + 0x38], 0x10
jmp 0x412929
mov qword [rsp + 0xa8], r13
mov r13d, eax
mov eax, r14d
mul r15d
jo 0x412f17
mov rcx, qword [rbx]
mov edx, eax
call fcn.0040a850
test ax, ax
jne 0x412b20
vmovdqu xmm0, xmmword [rdi]
lea rcx, [rsp + 0x100]
lea rdx, [rsp + 0x160]
mov r8d, r13d
vmovdqa xmmword [rsp + 0x160], xmm0
call fcn.00413070
movzx eax, word [rsp + 0x110]
test ax, ax
jne 0x412b20
mov rax, qword [rsp + 0x100]
mov r15, qword [rsp + 0x108]
mov qword [rsp + 0x20], rax
test r15, r15
je 0x412a26
xor r13d, r13d
lea rax, [rsp + 0xb8]
mov r8d, 4
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x30]
mov qword [rsp + 0xb8], r12
mov dword [rsp + 0x30], 0xaaaaaaaa
mov qword [rsp + 0x50], rax
lea rax, [fcn.00401c10]
mov qword [rsp + 0x58], rax
call fcn.0040e290
test ax, ax
jne 0x412ac7
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
mov dword [rcx + r13*4], eax
inc r13
cmp r15, r13
jne 0x4129ca
mov rax, qword [rbx]
mov rdx, qword [rsp + 0x20]
lea rcx, [rsp + 0xe8]
mov r8d, 4
mov dword [rsp + 0x30], 0xaaaaaaaa
mov qword [rsp + 0x50], rcx
lea rcx, [rsp + 0x50]
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0xc8], 0
mov qword [rsp + 0xd0], rdx
mov qword [rsp + 0xd8], r15
lea r15, [rsp + 0xc0]
lea rax, [fcn.00413130]
lea rdx, [rsp + 0x30]
mov dword [rsp + 0xe0], r14d
mov qword [rsp + 0xe8], r15
mov qword [rsp + 0x58], rax
call fcn.0040e290
test ax, ax
je 0x412ae9
cmp ax, 0x34
ja 0x4128f2
movzx ecx, ax
movabs rdx, 0x10107f42810800
bt rdx, rcx
jb 0x412b20
jmp 0x4128f2
cmp ax, 0x34
ja 0x4128f2
movzx ecx, ax
movabs rdx, 0x10007f42810800
bt rdx, rcx
jb 0x412b20
jmp 0x4128f2
vmovdqu xmm0, xmmword [rdi]
mov r12d, dword [rsp + 0x30]
lea rcx, [rsp + 0x118]
lea rdx, [rsp + 0x170]
mov r8, r12
vmovdqa xmmword [rsp + 0x170], xmm0
call fcn.00413070
movzx eax, word [rsp + 0x128]
test ax, ax
je 0x412b29
mov word [rsi + 0x38], ax
jmp 0x412929
mov rax, qword [rsp + 0x118]
mov rcx, qword [rsp + 0x120]
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rcx
test rcx, rcx
je 0x412bc3
xor r12d, r12d
jmp 0x412b6a
xor eax, eax
mov rcx, qword [rsp + 0x20]
mov r15, r13
mov dword [rcx + r12*4], eax
inc r12
cmp qword [rsp + 0x28], r12
je 0x412bc3
lea rax, [rsp + 0xf0]
mov r8d, 4
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x30]
mov r13, r15
mov qword [rsp + 0xf0], r15
mov dword [rsp + 0x30], 0xaaaaaaaa
mov qword [rsp + 0x50], rax
lea rax, [fcn.00413130]
mov qword [rsp + 0x58], rax
call fcn.0040e290
test ax, ax
jne 0x412c10
mov ecx, dword [rsp + 0x30]
cmp ecx, 0xffffffff
je 0x412b52
mov edx, r14d
call fcn.00413020
jmp 0x412b54
vmovdqu xmm0, xmmword [rdi]
mov r8, qword [rsp + 0x48]
lea rcx, [rsp + 0x130]
lea rdx, [rsp + 0x190]
vmovdqa xmmword [rsp + 0x190], xmm0
call fcn.00413460
movzx r15d, word [rsp + 0x140]
test r15w, r15w
je 0x412c63
vmovdqu xmm0, xmmword [rdi]
lea rcx, [rsp + 0x1a0]
vmovdqa xmmword [rsp + 0x1a0], xmm0
jmp 0x412c4a
mov r15d, eax
cmp ax, 0x34
ja 0x4128f2
movzx eax, r15w
movabs rcx, 0x10107f42810800
bt rcx, rax
jae 0x4128f2
vmovups xmm0, xmmword [rdi]
lea rcx, [rsp + 0x180]
vmovaps xmmword [rsp + 0x180], xmm0
mov rdx, qword [rsp + 0x20]
mov r8, qword [rsp + 0x28]
call fcn.004133e0
mov word [rsi + 0x38], r15w
jmp 0x412929
mov rax, qword [rsp + 0x130]
mov rcx, qword [rsp + 0x138]
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x88], rcx
test rcx, rcx
je 0x412e3e
xor eax, eax
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
cmp rax, qword [rsp + 0x28]
je 0x412ffe
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x98]
lea rax, [rdx + rdx*4]
lea rax, [rcx + rax*8]
mov rcx, qword [rsp + 0x20]
mov qword [rsp + 0x90], rax
mov r15d, dword [rcx + rdx*4]
test r15, r15
je 0x412e04
vmovdqu xmm0, xmmword [rdi]
lea rcx, [rsp + 0x148]
lea rdx, [rsp + 0x1b0]
mov r8, r15
vmovdqa xmmword [rsp + 0x1b0], xmm0
vzeroupper
call fcn.00413070
movzx r12d, word [rsp + 0x158]
test r12w, r12w
jne 0x412fbc
mov rax, qword [rsp + 0x148]
mov rcx, qword [rsp + 0x150]
lea r13, [fcn.00413130]
xor r12d, r12d
mov qword [rsp + 0xa0], rax
mov qword [rsp + 0x48], rcx
lea rax, [rsp + 0xc0]
mov r8d, 4
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x30], 0xaaaaaaaa
mov qword [rsp + 0xf8], rax
lea rax, [rsp + 0xf8]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], r13
call fcn.0040e290
test ax, ax
jne 0x412f2b
mov ecx, dword [rsp + 0x30]
xor edx, edx
mov eax, ecx
div r14d
test ecx, ecx
je 0x412ed9
dec edx
cmp edx, 2
jb 0x412ed9
mov eax, ecx
mul r14d
jo 0x412f17
mov eax, eax
cmp rbp, rax
jb 0x412ed9
cmp qword [rsp + 0x48], r12
je 0x412ffe
mov rax, qword [rsp + 0xa0]
mov dword [rax + r12*4], ecx
inc r12
cmp r15, r12
jne 0x412d34
mov rax, qword [rbx]
mov rcx, qword [rsp + 0x90]
mov r8, qword [rsp + 0xa0]
mov rdx, qword [rsp + 0x48]
mov qword [rcx], rax
mov qword [rcx + 8], 0
mov qword [rcx + 0x10], r8
mov qword [rcx + 0x18], rdx
mov dword [rcx + 0x20], r14d
jmp 0x412e20
vmovdqu ymm0, ymmword [0x00451af8]
mov rax, qword [rsp + 0x90]
mov qword [rax + 0x20], 0
vmovdqu ymmword [rax], ymm0
mov rcx, qword [rsp + 0x40]
inc rcx
mov rax, rcx
mov qword [rsp + 0x40], rcx
cmp rcx, qword [rsp + 0x88]
jne 0x412c93
mov rax, qword [rsp + 0xa8]
cmp qword [rsp + 0xc8], rax
jne 0x412f7b
vmovups ymm0, ymmword [rsp + 0xc0]
mov rax, qword [rsp + 0xe0]
mov rdx, qword [rsp + 0x20]
mov r8, qword [rsp + 0x28]
lea rcx, [rsp + 0x200]
mov qword [rsp + 0x230], rax
vmovups ymmword [rsp + 0x210], ymm0
vmovups xmm0, xmmword [rdi]
vmovaps xmmword [rsp + 0x200], xmm0
vzeroupper
call fcn.004133e0
vmovdqu ymm0, ymmword [rsp + 0x210]
mov rax, qword [rsp + 0x230]
mov rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x88]
mov qword [rsi + 0x20], rax
vmovdqu ymmword [rsi], ymm0
mov qword [rsi + 0x28], rdx
mov qword [rsi + 0x30], rcx
mov word [rsi + 0x38], 0
jmp 0x412929
vmovups xmm0, xmmword [rdi]
mov rdx, qword [rsp + 0x20]
mov r8, qword [rsp + 0x28]
lea rcx, [rsp + 0x1e0]
vmovaps xmmword [rsp + 0x1e0], xmm0
call fcn.004133e0
vmovups ymm0, ymmword [0x00451b40]
vmovups ymmword [rsi + 0x20], ymm0
vmovups ymm0, ymmword [0x00451b20]
jmp 0x412925
lea rcx, str.integer_overflow
mov edx, 0x10
xor r9d, r9d
call fcn.00401000
cmp ax, 0x34
ja 0x4128f2
mov ebx, eax
movzx eax, ax
movabs rcx, 0x10107f42810800
bt rcx, rax
jae 0x4128f2
vmovups xmm0, xmmword [rdi]
mov rdx, qword [rsp + 0x20]
mov r8, qword [rsp + 0x28]
lea rcx, [rsp + 0x1d0]
vmovaps xmmword [rsp + 0x1d0], xmm0
call fcn.004133e0
mov word [rsi + 0x38], bx
jmp 0x412929
vmovups xmm0, xmmword [rdi]
mov rdx, qword [rsp + 0x20]
mov r8, qword [rsp + 0x28]
lea rcx, [rsp + 0x1f0]
vmovaps xmmword [rsp + 0x1f0], xmm0
vzeroupper
call fcn.004133e0
vmovups ymm0, ymmword [0x00451b80]
vmovups ymmword [rsi + 0x20], ymm0
vmovdqu ymm0, ymmword [0x00451b60]
jmp 0x412925
vmovups xmm0, xmmword [rdi]
mov rdx, qword [rsp + 0x20]
mov r8, qword [rsp + 0x28]
lea rcx, [rsp + 0x1c0]
vmovaps xmmword [rsp + 0x1c0], xmm0
call fcn.004133e0
mov word [rsi + 0x38], r12w
jmp 0x412929
lea rcx, str.division_by_zero
mov edx, 0x10
xor r9d, r9d
call fcn.00401000
lea rcx, str.index_out_of_bounds
mov edx, 0x13
xor r9d, r9d
vzeroupper
call fcn.00401000
int3