Function at 0x585110
Capabilities:
Hash data using sha256

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
vmovdqu xmm0, xmmword [0x0077c1e0]
vmovdqu xmm1, xmmword [0x0077c1f0]
lea rsi, [rsp + 0x5f]
and rsi, 0xffffffffffffffc0
mov qword [rsi + 0x60], 0
mov r12, rcx
mov rbx, rdx
mov rbp, r8
vmovdqu xmmword [rsi + 0x40], xmm0
vmovdqu xmmword [rsi + 0x50], xmm1
cmp r8, 0x7f
jbe 0x5853a0
lea rax, [r8 - 0x40]
and rax, 0xffffffffffffffc0
lea rax, [rdx + rax + 0x40]
lea r13, [rsi + 0x40]
nop word [rax + rax]
mov rcx, rbx
mov rdx, r13
add rbx, 0x40
call fcn.005842d0
cmp rbx, rax
jne 0x585178
mov r8, rbp
and r8d, 0x3f
jne 0x5852f0
mov rdi, qword [rsi + 0x60]
add rdi, rbp
mov qword [rsi + 0x60], rdi
and edi, 0x3f
lea eax, [rdi + 1]
mov byte [rsi + rdi], pe_nt_image_headers64
mov rdx, rax
cmp eax, 0x38
jbe 0x585298
mov ecx, 0x40
add rax, rsi
sub ecx, edx
je 0x5851d6
xor edx, edx
mov r8d, edx
inc edx
mov byte [rax + r8], 0
cmp edx, ecx
jb 0x5851c8
mov rdx, r13
mov rcx, rsi
call fcn.005842d0
mov qword [rsi], 0
mov qword [rsi + 8], 0
mov qword [rsi + 0x10], 0
mov qword [rsi + 0x18], 0
mov qword [rsi + 0x20], 0
mov qword [rsi + 0x28], 0
mov qword [rsi + 0x30], 0
mov rax, qword [rsi + 0x60]
shl rax, 3
bswap rax
mov rdx, r13
mov rcx, rsi
mov qword [rsi + 0x38], rax
call fcn.005842d0
mov eax, dword [rsi + 0x40]
bswap eax
mov dword [r12], eax
mov eax, dword [rsi + 0x44]
bswap eax
mov dword [r12 + 4], eax
mov eax, dword [rsi + 0x48]
bswap eax
mov dword [r12 + 8], eax
mov eax, dword [rsi + 0x4c]
bswap eax
mov dword [r12 + 0xc], eax
mov eax, dword [rsi + 0x50]
bswap eax
mov dword [r12 + 0x10], eax
mov eax, dword [rsi + 0x54]
bswap eax
mov dword [r12 + 0x14], eax
mov eax, dword [rsi + 0x58]
bswap eax
mov dword [r12 + 0x18], eax
mov eax, dword [rsi + 0x5c]
bswap eax
mov dword [r12 + 0x1c], eax
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8d, 0x38
sub r8d, eax
add rax, rsi
mov ecx, r8d
xor r9d, r9d
cmp r8d, 0x20
jae 0x585328
and r8d, 0x10
jne 0x585496
test cl, 8
jne 0x5854bf
test cl, 4
jne 0x585483
test ecx, ecx
je 0x585218
mov byte [rax], 0
test cl, 2
je 0x585218
xor edx, edx
mov word [rax + rcx - 2], dx
jmp 0x585218
mov r10, rsi
mov rdx, rax
cmp r8d, 0x20
jae 0x585400
and r8d, 0x1f
je 0x585199
xor eax, eax
mov ecx, eax
movzx r9d, byte [rdx + rcx]
inc eax
mov byte [r10 + rcx], r9b
cmp eax, r8d
jb 0x58530c
jmp 0x585199
lea rdx, [r8 + rax + 8]
mov qword [rax], 0
mov qword [rdx - 0x28], 0
mov qword [rdx - 0x20], 0
mov qword [rdx - 0x18], 0
mov qword [rdx - 0x10], 0
lea rdx, [rax + 8]
and rdx, 0xfffffffffffffff8
sub rax, rdx
lea ecx, [r8 + rax]
and ecx, 0xffffffe0
cmp ecx, 0x20
jb 0x585218
mov eax, ecx
and eax, 0xffffffe0
xor r8d, r8d
mov ecx, r8d
add r8d, 0x20
mov qword [rdx + rcx], r9
mov qword [rdx + rcx + 8], r9
mov qword [rdx + rcx + 0x10], r9
mov qword [rdx + rcx + 0x18], r9
cmp r8d, eax
jb 0x585377
jmp 0x585218
test r8, r8
je 0x58546c
xor r15d, r15d
lea r13, [rsi + 0x40]
mov r14d, 0x40
nop word cs:[rax + rax]
mov rdi, r14
sub rdi, r15
cmp rdi, rbp
cmova rdi, rbp
lea rcx, [rsi + r15]
mov rdx, rbx
mov r8, rdi
add r15, rdi
call sub.msvcrt.dll_memcpy
add rbx, rdi
sub rbp, rdi
cmp r15, 0x40
je 0x585448
add rdi, qword [rsi + 0x60]
mov qword [rsi + 0x60], rdi
test rbp, rbp
jne 0x5853c0
jmp 0x5851a4
mov edi, r8d
and edi, 0xffffffe0
xor ecx, ecx
mov edx, ecx
mov rbx, qword [rax + rdx]
mov r11, qword [rax + rdx + 8]
mov r10, qword [rax + rdx + 0x10]
mov r9, qword [rax + rdx + 0x18]
add ecx, 0x20
mov qword [rsi + rdx], rbx
mov qword [rsi + rdx + 8], r11
mov qword [rsi + rdx + 0x10], r10
mov qword [rsi + rdx + 0x18], r9
cmp ecx, edi
jb 0x585408
mov edx, ecx
lea r10, [rsi + rdx]
add rdx, rax
jmp 0x585300
mov rdx, r13
mov rcx, rsi
call fcn.005842d0
add rdi, qword [rsi + 0x60]
mov qword [rsi + 0x60], rdi
test rbp, rbp
je 0x5851a4
xor r15d, r15d
jmp 0x5853c0
mov byte [rsi], pe_nt_image_headers64
mov eax, 1
mov r8d, 0x37
lea r13, [rsi + 0x40]
jmp 0x5852a1
mov dword [rax], 0
mov dword [rax + rcx - 4], 0
jmp 0x585218
mov qword [rax], 0
mov qword [rax + 8], 0
lea rax, [rax + rcx + 0x10]
mov qword [rax - 0x20], 0
mov qword [rax - 0x18], 0
jmp 0x585218
mov qword [rax], 0
mov qword [rax + rcx - 8], 0
jmp 0x585218