Function at 0x408270
Capabilities:
Get file size

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x248
mov rbx, r8
mov rdi, rdx
mov rsi, rcx
mov r12, qword [r8]
mov qword [rsp + 0xd8], r12
movabs r13, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x80], r13
movdqa xmm0, xmmword [0x00444160]
movdqa xmmword [rsp + 0x70], xmm0
movdqa xmmword [rsp + 0x60], xmm0
movdqa xmmword [rsp + 0x50], xmm0
xor ebp, ebp
lea r14, [rsp + 0x30]
lea r15, [rsp + 0xd8]
nop word cs:[rax + rax]
nop dword [rax]
lea r8, [rsp + rbp]
add r8, 0x50
mov r9d, 0x38
sub r9, rbp
mov rcx, r14
mov rdx, r15
call fcn.00408bb0
movzx eax, word [rsp + 0x38]
test eax, eax
jne 0x408442
mov rax, qword [rsp + 0x30]
test rax, rax
je 0x40846d
add rbp, rax
jb 0x408abe
cmp rbp, 0x38
jb 0x4082e0
movdqa xmm0, xmmword [rsp + 0x50]
movdqa xmm1, xmmword [rsp + 0x60]
pcmpeqb xmm0, xmmword [str.Microsoft_C_C_MSF_7.00_r_n]
pcmpeqd xmm2, xmm2
pxor xmm0, xmm2
pcmpeqb xmm1, xmmword [0x00444180]
pxor xmm1, xmm2
por xmm1, xmm0
pmovmskb eax, xmm1
test eax, eax
jne 0x408477
mov eax, dword [rsp + 0x74]
add eax, 0xfffffffd
cmp eax, 0xfffffffd
jbe 0x408477
mov r14d, dword [rsp + 0x70]
mov ebp, dword [rsp + 0x78]
mov eax, dword [rsp + 0x7c]
mov qword [rsp + 0xa8], rax
mov r15d, dword [rsp + 0x84]
mov rcx, qword [rbx]
mov qword [rsp + 0x50], r13
lea rdx, [rsp + 0x50]
call sub.KERNEL32.dll_GetFileSizeEx
test eax, eax
je 0x4084b8
mov eax, ebp
mul r14d
jo 0x408abe
mov rbp, qword [rsp + 0x50]
mov eax, eax
cmp rbp, rax
jne 0x408477
lea eax, [r14 - 0x200]
rol eax, 0x17
cmp eax, 7
ja 0x408477
mov ecx, 0x8b
bt ecx, eax
jae 0x408477
mov rax, qword [rsp + 0xa8]
add eax, r14d
jb 0x408abe
sub eax, 1
jb 0x408abe
test r14d, r14d
je 0x408b79
xor edx, edx
div r14d
mov ecx, r14d
shr ecx, 2
cmp eax, ecx
jbe 0x4084c5
movups xmm0, xmmword [0x00445368]
movups xmmword [rsi + 0x30], xmm0
movups xmm0, xmmword [0x00445358]
movups xmmword [rsi + 0x20], xmm0
movups xmm0, xmmword [0x00445348]
movups xmmword [rsi + 0x10], xmm0
movdqu xmm0, xmmword [0x00445338]
jmp 0x4084a0
cmp eax, 0x34
ja 0x408459
mov ecx, eax
movabs rdx, 0x1c00200040e788
bt rdx, rcx
jb 0x408471
lea rcx, str.invalid_error_code
mov edx, 0x12
xor r9d, r9d
call fcn.00402230
mov ax, 0x16
mov word [rsi + 0x38], ax
jmp 0x4084a4
movups xmm0, xmmword [0x00445328]
movups xmmword [rsi + 0x30], xmm0
movups xmm0, xmmword [0x00445318]
movups xmmword [rsi + 0x20], xmm0
movups xmm0, xmmword [0x00445308]
movups xmmword [rsi + 0x10], xmm0
movdqu xmm0, xmmword [0x004452f8]
movdqu xmmword [rsi], xmm0
add rsp, 0x248
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call sub.KERNEL32.dll_GetLastError
mov word [rsi + 0x38], 0xf
jmp 0x4084a4
mov r13d, eax
mov eax, r14d
mul r15d
jo 0x408abe
mov rcx, qword [rbx]
mov edx, eax
call fcn.00422450
test ax, ax
jne 0x408691
movdqu xmm0, xmmword [rdi]
movdqa xmmword [rsp + 0x190], xmm0
mov r8d, r13d
lea rcx, [rsp + 0x100]
lea rdx, [rsp + 0x190]
call fcn.00408d10
movzx eax, word [rsp + 0x110]
test ax, ax
jne 0x408691
mov rax, qword [rsp + 0x100]
mov qword [rsp + 0x20], rax
mov r13, qword [rsp + 0x108]
test r13, r13
je 0x408597
xor r15d, r15d
mov qword [rsp + 0xe0], r12
mov dword [rsp + 0x30], 0xaaaaaaaa
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x50], rax
lea rax, [fcn.00408bb0]
mov qword [rsp + 0x58], rax
mov r8d, 4
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x30]
call fcn.004039a0
test ax, ax
jne 0x408638
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
mov dword [rcx + r15*4], eax
add r15, 1
cmp r13, r15
jne 0x40853a
mov rax, qword [rbx]
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], 0
mov rax, qword [rsp + 0x20]
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0xc8], r13
mov dword [rsp + 0xd0], r14d
lea rax, [rsp + 0xb0]
mov qword [rsp + 0xe8], rax
mov dword [rsp + 0x30], 0xaaaaaaaa
lea rax, [rsp + 0xe8]
mov qword [rsp + 0x50], rax
lea rax, [fcn.00408dd0]
mov qword [rsp + 0x58], rax
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x30]
mov r8d, 4
call fcn.004039a0
test ax, ax
je 0x40865a
cmp ax, 0x35
ja 0x408459
movzx ecx, ax
movabs rdx, 0x3c00200040e788
bt rdx, rcx
jb 0x408691
jmp 0x408459
cmp ax, 0x34
ja 0x408459
movzx ecx, ax
movabs rdx, 0x1c00200040e788
bt rdx, rcx
jb 0x408691
jmp 0x408459
mov r15d, dword [rsp + 0x30]
movdqu xmm0, xmmword [rdi]
movdqa xmmword [rsp + 0x1a0], xmm0
lea rcx, [rsp + 0x118]
lea rdx, [rsp + 0x1a0]
mov r8, r15
call fcn.00408d10
movzx eax, word [rsp + 0x128]
test ax, ax
je 0x40869a
mov word [rsi + 0x38], ax
jmp 0x4084a4
mov qword [rsp + 0x48], r15
mov rax, qword [rsp + 0x118]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x120]
mov qword [rsp + 0x20], rax
test rax, rax
je 0x40873a
xor r15d, r15d
lea r13, [rsp + 0xf0]
lea r12, [rsp + 0x30]
jmp 0x4086ec
mov edx, r14d
call fcn.00408cc0
mov rcx, qword [rsp + 0x28]
mov dword [rcx + r15*4], eax
add r15, 1
cmp qword [rsp + 0x20], r15
je 0x40873a
lea rax, [rsp + 0xb0]
mov qword [rsp + 0xf0], rax
mov dword [rsp + 0x30], 0xaaaaaaaa
mov qword [rsp + 0x50], r13
lea rax, [fcn.00408dd0]
mov qword [rsp + 0x58], rax
mov r8d, 4
lea rcx, [rsp + 0x50]
mov rdx, r12
call fcn.004039a0
test ax, ax
jne 0x40879e
mov ecx, dword [rsp + 0x30]
cmp ecx, 0xffffffff
jne 0x4086d0
xor eax, eax
jmp 0x4086d8
movdqu xmm0, xmmword [rdi]
movdqa xmmword [rsp + 0x1c0], xmm0
lea rcx, [rsp + 0x130]
lea rdx, [rsp + 0x1c0]
mov r8, qword [rsp + 0x48]
call fcn.00409130
movzx r15d, word [rsp + 0x140]
test r15w, r15w
je 0x4087ec
movdqu xmm0, xmmword [rdi]
movdqa xmmword [rsp + 0x1d0], xmm0
lea rcx, [rsp + 0x1d0]
mov rdx, qword [rsp + 0x28]
mov r8, qword [rsp + 0x20]
call fcn.004090b0
mov word [rsi + 0x38], r15w
jmp 0x4084a4
cmp ax, 0x35
ja 0x408459
mov ebx, eax
movzx eax, ax
movabs rcx, 0x3c00200040e788
bt rcx, rax
jae 0x408459
movups xmm0, xmmword [rdi]
movaps xmmword [rsp + 0x1b0], xmm0
lea rcx, [rsp + 0x1b0]
mov rdx, qword [rsp + 0x28]
mov r8, qword [rsp + 0x20]
call fcn.004090b0
mov word [rsi + 0x38], bx
jmp 0x4084a4
mov rax, qword [rsp + 0x130]
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0x138]
mov qword [rsp + 0x90], rax
test rax, rax
je 0x4089bd
xor eax, eax
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
cmp rax, qword [rsp + 0x20]
je 0x408b8d
mov rdx, qword [rsp + 0x40]
lea rax, [rdx + rdx*4]
mov rcx, qword [rsp + 0xa0]
lea rax, [rcx + rax*8]
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x28]
mov r13d, dword [rax + rdx*4]
test r13, r13
je 0x408977
movdqu xmm0, xmmword [rdi]
movdqa xmmword [rsp + 0x1e0], xmm0
lea rcx, [rsp + 0x148]
lea rdx, [rsp + 0x1e0]
mov r8, r13
call fcn.00408d10
movzx r15d, word [rsp + 0x158]
test r15w, r15w
jne 0x408b5f
mov rax, qword [rsp + 0x148]
mov qword [rsp + 0x48], rax
mov r12, qword [rsp + 0x150]
xor r15d, r15d
lea rax, [rsp + 0xb0]
mov qword [rsp + 0xf8], rax
mov dword [rsp + 0x30], 0xaaaaaaaa
lea rax, [rsp + 0xf8]
mov qword [rsp + 0x50], rax
lea rax, [fcn.00408dd0]
mov qword [rsp + 0x58], rax
mov r8d, 4
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x30]
call fcn.004039a0
test ax, ax
jne 0x408ad2
mov ecx, dword [rsp + 0x30]
mov eax, ecx
xor edx, edx
div r14d
test ecx, ecx
je 0x408a6f
add edx, 0xffffffff
cmp edx, 2
jb 0x408a6f
mov eax, ecx
mul r14d
jo 0x408abe
mov eax, eax
cmp rbp, rax
jb 0x408a6f
cmp r12, r15
je 0x408b8d
mov rax, qword [rsp + 0x48]
mov dword [rax + r15*4], ecx
add r15, 1
cmp r13, r15
jne 0x4088ab
mov rax, qword [rbx]
mov rcx, qword [rsp + 0x98]
mov qword [rcx], rax
mov qword [rcx + 8], 0
mov rax, qword [rsp + 0x48]
mov qword [rcx + 0x10], rax
mov qword [rcx + 0x18], r12
mov dword [rcx + 0x20], r14d
jmp 0x40899e
movups xmm0, xmmword [0x00445388]
mov rax, qword [rsp + 0x98]
movups xmmword [rax + 0x10], xmm0
movdqu xmm0, xmmword [0x00445378]
movdqu xmmword [rax], xmm0
mov qword [rax + 0x20], 0
mov rcx, qword [rsp + 0x40]
add rcx, 1
mov rax, rcx
mov qword [rsp + 0x40], rcx
cmp rcx, qword [rsp + 0x90]
jne 0x40881c
mov rax, qword [rsp + 0xa8]
cmp qword [rsp + 0xb8], rax
jne 0x408b0f
mov rax, qword [rsp + 0xd0]
mov qword [rsp + 0x180], rax
movups xmm0, xmmword [rsp + 0xb0]
movups xmm1, xmmword [rsp + 0xc0]
movaps xmmword [rsp + 0x170], xmm1
movaps xmmword [rsp + 0x160], xmm0
movups xmm0, xmmword [rdi]
movaps xmmword [rsp + 0x230], xmm0
lea rcx, [rsp + 0x230]
mov rdx, qword [rsp + 0x28]
mov r8, qword [rsp + 0x20]
call fcn.004090b0
mov rax, qword [rsp + 0x180]
mov qword [rsi + 0x20], rax
movdqa xmm0, xmmword [rsp + 0x160]
movdqa xmm1, xmmword [rsp + 0x170]
movdqu xmmword [rsi + 0x10], xmm1
movdqu xmmword [rsi], xmm0
mov rax, qword [rsp + 0xa0]
mov qword [rsi + 0x28], rax
mov rax, qword [rsp + 0x90]
mov qword [rsi + 0x30], rax
mov word [rsi + 0x38], 0
jmp 0x4084a4
movups xmm0, xmmword [rdi]
movaps xmmword [rsp + 0x210], xmm0
lea rcx, [rsp + 0x210]
mov rdx, qword [rsp + 0x28]
mov r8, qword [rsp + 0x20]
call fcn.004090b0
movups xmm0, xmmword [0x004453d0]
movups xmmword [rsi + 0x30], xmm0
movups xmm0, xmmword [0x004453c0]
movups xmmword [rsi + 0x20], xmm0
movups xmm0, xmmword [0x004453b0]
movups xmmword [rsi + 0x10], xmm0
movups xmm0, xmmword [0x004453a0]
jmp 0x4084a0
lea rcx, str.integer_overflow
mov edx, 0x10
xor r9d, r9d
call fcn.00402230
cmp ax, 0x35
ja 0x408459
mov ebx, eax
movzx eax, ax
movabs rcx, 0x3c00200040e788
bt rcx, rax
jae 0x408459
movdqu xmm0, xmmword [rdi]
movdqa xmmword [rsp + 0x200], xmm0
lea rcx, [rsp + 0x200]
jmp 0x4087d4
movups xmm0, xmmword [rdi]
movaps xmmword [rsp + 0x220], xmm0
lea rcx, [rsp + 0x220]
mov rdx, qword [rsp + 0x28]
mov r8, qword [rsp + 0x20]
call fcn.004090b0
movups xmm0, xmmword [0x00445410]
movups xmmword [rsi + 0x30], xmm0
movups xmm0, xmmword [0x00445400]
movups xmmword [rsi + 0x20], xmm0
movups xmm0, xmmword [0x004453f0]
movups xmmword [rsi + 0x10], xmm0
movdqu xmm0, xmmword [0x004453e0]
jmp 0x4084a0
movdqu xmm0, xmmword [rdi]
movdqa xmmword [rsp + 0x1f0], xmm0
lea rcx, [rsp + 0x1f0]
jmp 0x408785
lea rcx, str.division_by_zero
mov edx, 0x10
xor r9d, r9d
call fcn.00402230
lea rcx, str.index_out_of_bounds
mov edx, 0x13
xor r9d, r9d
call fcn.00402230
int3