Function at 0x606180
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
vmovups xmmword [rsp + 0xa0], xmm6
mov r12, qword [rcx + 0x10]
mov rbx, rdx
mov rbp, rcx
mov ecx, 0x28
mov qword [rsp + 0x98], r12
call sub.msvcrt.dll_malloc
vpbroadcastq ymm0, rbx
mov ecx, 0x14
mov qword [rsp + 0x88], rax
mov qword [rax + 0x20], rbx
vmovdqu ymmword [rax], ymm0
vzeroupper
mov edi, 1
call sub.msvcrt.dll_malloc
vmovdqu xmm6, xmmword [0x007886a0]
shlx edi, edi, ebx
movsxd rdi, edi
mov qword [rsp + 0x70], rax
mov dword [rax + 0x10], 0
vmovdqu xmmword [rax], xmm6
test rdi, rdi
jle 0x60632b
xor esi, esi
nop dword [rax + rax]
mov edx, 1
mov ecx, 0x20
call sub.msvcrt.dll_calloc
mov r13, rax
lea rax, [r12 + r12]
mov rdx, rax
not rdx
test r12, r12
cmovs rax, rdx
cmp rax, 0x7f
jbe 0x606cf8
xor edx, edx
nop
mov r8d, eax
mov ecx, edx
or r8d, 0xffffff80
shr rax, 7
mov byte [r13 + rcx], r8b
inc edx
cmp rax, 0x7f
ja 0x606240
add rdx, r13
mov byte [rdx], al
mov ecx, 0x40
inc rsi
call sub.msvcrt.dll_malloc
mov r14, rax
mov rax, qword [rbp + 0x18]
vmovdqu xmm3, xmmword [r13]
vmovdqu xmm1, xmmword [rax]
vmovdqu xmm4, xmmword [r13 + 0x10]
vmovdqu xmmword [r14], xmm1
vmovdqu xmm2, xmmword [rax + 0x10]
mov ecx, 0x20
vmovdqu xmmword [r14 + 0x10], xmm2
vmovdqu xmmword [r14 + 0x20], xmm3
vmovdqu xmmword [r14 + 0x30], xmm4
call sub.msvcrt.dll_malloc
mov r8, rax
mov r9d, 0x20
mov edx, 0x40
mov rcx, r14
mov r15, rax
call fcn.00608650
mov rdx, qword [rbp + 0x10]
mov rcx, qword [rbp]
xor r8d, r8d
andn rdx, rdx, qword [rsp + 0x98]
shl edx, 5
call sub.msvcrt.dll_fseek
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, r15
call sub.msvcrt.dll_fwrite
mov rax, qword [rsp + 0x98]
mov rcx, r15
lea r12, [rax + 1]
mov qword [rsp + 0x98], r12
call sub.msvcrt.dll_free
mov rcx, r14
call sub.msvcrt.dll_free
mov rcx, r13
call sub.msvcrt.dll_free
cmp rdi, rsi
jne 0x606210
mov byte [rsp + 0x5f], 5
cmp rbx, 1
je 0x6071c8
mov rbx, r12
nop dword [rax]
movsx rax, byte [rsp + 0x5f]
mov r15, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x70]
mov rsi, rax
dec esi
mov byte [rsp + 0x40], al
mov byte [rsp + 0x5f], sil
mov rdi, qword [r15 + rax*8 - 8]
movsxd r12, dword [rcx + rax*4 - 4]
test sil, sil
jg 0x606800
mov ecx, 0x28
call sub.msvcrt.dll_malloc
vpbroadcastq ymm0, rdi
vpaddq ymm0, ymm0, ymmword [0x007886c0]
lea rsi, [rdi - 1]
mov ecx, 0x14
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x20], rsi
mov qword [rax + 0x20], rsi
vmovdqu ymmword [rax], ymm0
vzeroupper
call sub.msvcrt.dll_malloc
mov qword [rsp + 0x80], rax
mov dword [rax + 0x10], 0
vmovdqu xmmword [rax], xmm6
lea ecx, [rdi - 1]
mov eax, 1
shlx edx, eax, edi
shlx eax, eax, ecx
cdqe
mov qword [rsp + 0x38], rax
movsxd rdx, edx
test r12, r12
je 0x6068b0
mov rsi, rbx
cmp r12, 1
je 0x606d33
cmp r12, 2
je 0x606fac
cmp r12, 3
je 0x606abc
lea rax, [rdi + 1]
lea rcx, [rdx + rbx]
imul rdx, rax
mov rax, qword [rsp + 0x38]
imul rdi, rdx
sub rcx, rdi
test rax, rax
jle 0x6067d0
add rax, rbx
sub rcx, rbx
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x60], rcx
nop
mov rdx, qword [rbp + 0x10]
mov rax, rsi
sub rax, qword [rsp + 0x38]
mov rcx, qword [rbp]
xor r8d, r8d
andn rdx, rdx, rax
shl edx, 5
call sub.msvcrt.dll_fseek
mov ecx, 0x20
call sub.msvcrt.dll_malloc
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, rax
mov r14, rax
call sub.msvcrt.dll_fread
mov r15, qword [rsp + 0x60]
mov rdx, qword [rbp + 0x10]
cmp rax, 0x20
mov edi, 0
lea rax, [r15 + rsi]
mov rcx, qword [rbp]
cmovne r14, rdi
xor r8d, r8d
andn rdx, rdx, rax
shl edx, 5
call sub.msvcrt.dll_fseek
mov ecx, 0x20
call sub.msvcrt.dll_malloc
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, rax
mov rbx, rax
call sub.msvcrt.dll_fread
cmp rax, 0x20
mov rax, qword [rsp + 0x20]
mov rdx, qword [rbp + 0x10]
cmovne rbx, rdi
mov rcx, qword [rbp]
add rax, r15
xor r8d, r8d
andn rdx, rdx, rax
shl edx, 5
call sub.msvcrt.dll_fseek
mov ecx, 0x20
call sub.msvcrt.dll_malloc
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, rax
mov r15, rax
call sub.msvcrt.dll_fread
cmp rax, 0x20
mov edx, 1
mov ecx, 0x20
cmovne r15, rdi
call sub.msvcrt.dll_calloc
mov r12, rax
lea rax, [rsi + rsi]
test rsi, rsi
jns 0x606550
mov rax, rsi
neg rax
lea rax, [rax + rax - 1]
cmp rax, 0x7f
jbe 0x6068a0
xor edx, edx
nop dword [rax]
mov r8d, eax
mov ecx, edx
or r8d, 0xffffff80
shr rax, 7
mov byte [r12 + rcx], r8b
inc edx
cmp rax, 0x7f
ja 0x606560
add rdx, r12
mov byte [rdx], al
mov ecx, pe_nt_image_headers64
call sub.msvcrt.dll_malloc
mov r13, rax
mov rax, qword [rbp + 0x18]
vmovdqu xmm3, xmmword [r12]
vmovdqu xmm1, xmmword [rax]
vmovdqu xmm4, xmmword [r12 + 0x10]
vmovdqu xmmword [r13], xmm1
vmovdqu xmm2, xmmword [rax + 0x10]
vmovdqu xmm5, xmmword [r14]
vmovdqu xmm0, xmmword [r14 + 0x10]
vmovdqu xmm1, xmmword [rbx]
vmovdqu xmmword [r13 + 0x10], xmm2
vmovdqu xmm2, xmmword [rbx + 0x10]
lea rdi, [r13 + 0x60]
lea r11, [r13 + 0x20]
lea r10, [r13 + 0x40]
vmovdqu xmmword [r13 + 0x20], xmm3
vmovdqu xmmword [r13 + 0x30], xmm4
vmovdqu xmmword [r13 + 0x40], xmm5
vmovdqu xmmword [r13 + 0x50], xmm0
vmovdqu xmmword [r13 + 0x60], xmm1
mov ecx, 0x20
vmovdqu xmmword [rdi + 0x10], xmm2
mov qword [rsp + 0x50], r11
mov qword [rsp + 0x48], r10
call sub.msvcrt.dll_malloc
mov r8, rax
mov rcx, r13
mov r9d, 0x20
mov edx, pe_nt_image_headers64
mov qword [rsp + 0x40], rax
call fcn.00608650
mov rcx, qword [rsp + 0x20]
mov qword [r12], 0
test rcx, rcx
mov qword [r12 + 8], 0
mov qword [r12 + 0x10], 0
mov qword [r12 + 0x18], 0
mov r10, qword [rsp + 0x48]
mov r11, qword [rsp + 0x50]
lea rax, [rcx + rcx]
jns 0x606669
mov rax, rcx
neg rax
lea rax, [rax + rax - 1]
cmp rax, 0x7f
jbe 0x606898
xor edx, edx
nop dword [rax]
mov r8d, eax
mov ecx, edx
or r8d, 0xffffff80
shr rax, 7
mov byte [r12 + rcx], r8b
inc edx
cmp rax, 0x7f
ja 0x606678
add rdx, r12
mov byte [rdx], al
mov rax, qword [rbp + 0x18]
vmovdqu xmm1, xmmword [r14]
vmovdqu xmm3, xmmword [rax]
vmovdqu xmm5, xmmword [r12]
vmovdqu xmmword [r13], xmm3
vmovdqu xmm4, xmmword [rax + 0x10]
vmovdqu xmm0, xmmword [r12 + 0x10]
vmovdqu xmm2, xmmword [r14 + 0x10]
vmovdqu xmm3, xmmword [r15]
vmovdqu xmmword [r13 + 0x10], xmm4
vmovdqu xmm4, xmmword [r15 + 0x10]
vmovdqu xmmword [r13 + 0x20], xmm5
mov ecx, 0x20
vmovdqu xmmword [r11 + 0x10], xmm0
vmovdqu xmmword [r13 + 0x40], xmm1
vmovdqu xmmword [r10 + 0x10], xmm2
vmovdqu xmmword [r13 + 0x60], xmm3
vmovdqu xmmword [rdi + 0x10], xmm4
call sub.msvcrt.dll_malloc
mov r8, rax
mov r9d, 0x20
mov edx, pe_nt_image_headers64
mov rcx, r13
mov rdi, rax
call fcn.00608650
mov rdx, qword [rbp + 0x10]
mov rcx, qword [rbp]
xor r8d, r8d
andn rdx, rdx, rsi
shl edx, 5
call sub.msvcrt.dll_fseek
mov r9, qword [rbp]
mov rcx, qword [rsp + 0x40]
mov r8d, 0x20
mov edx, 1
call sub.msvcrt.dll_fwrite
mov rdx, qword [rbp + 0x10]
mov rcx, qword [rbp]
xor r8d, r8d
andn rdx, rdx, qword [rsp + 0x20]
shl edx, 5
call sub.msvcrt.dll_fseek
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, rdi
call sub.msvcrt.dll_fwrite
mov rcx, r14
add qword [rsp + 0x98], 2
call sub.msvcrt.dll_free
mov rcx, rbx
call sub.msvcrt.dll_free
mov rcx, r15
call sub.msvcrt.dll_free
mov rcx, r12
call sub.msvcrt.dll_free
mov rcx, r13
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x40]
inc rsi
call sub.msvcrt.dll_free
mov rcx, rdi
call sub.msvcrt.dll_free
inc qword [rsp + 0x20]
cmp qword [rsp + 0x68], rsi
jne 0x606440
mov rcx, qword [rsp + 0x78]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x80]
call sub.msvcrt.dll_free
cmp byte [rsp + 0x5f], 0
je 0x606d00
mov rbx, qword [rsp + 0x98]
jmp 0x606340
movsx r14, sil
lea r13, [r14*8]
mov rcx, r13
call sub.msvcrt.dll_malloc
mov rcx, rax
mov r8, r13
mov rdx, r15
mov rsi, rax
shl r14, 2
call sub.msvcrt.dll_memcpy
mov rcx, r15
call sub.msvcrt.dll_free
mov rcx, r14
call sub.msvcrt.dll_malloc
mov r13, rax
cmp r14d, 0x20
jae 0x606c79
test r14b, 0x10
jne 0x607153
test r14b, 8
jne 0x60718d
test r14b, 4
jne 0x6071ab
test r14d, r14d
je 0x606875
mov rax, qword [rsp + 0x70]
movzx eax, byte [rax]
mov byte [r13], al
mov rcx, qword [rsp + 0x70]
call sub.msvcrt.dll_free
mov qword [rsp + 0x88], rsi
mov qword [rsp + 0x70], r13
jmp 0x606374
mov rdx, r12
jmp 0x606694
mov rdx, r12
jmp 0x60657c
sub rbx, rdx
test rax, rax
jle 0x606c57
lea rdi, [rbx + rax]
mov rsi, rdi
nop dword [rax + rax]
mov rdx, qword [rbp + 0x10]
mov rcx, qword [rbp]
xor r8d, r8d
andn rdx, rdx, rbx
shl edx, 5
call sub.msvcrt.dll_fseek
mov ecx, 0x20
call sub.msvcrt.dll_malloc
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, rax
mov r15, rax
call sub.msvcrt.dll_fread
mov rdx, qword [rbp + 0x10]
cmp rax, 0x20
mov rcx, qword [rbp]
mov r13d, 0
cmovne r15, r13
xor r8d, r8d
andn rdx, rdx, rdi
shl edx, 5
call sub.msvcrt.dll_fseek
mov ecx, 0x20
call sub.msvcrt.dll_malloc
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, rax
mov r14, rax
call sub.msvcrt.dll_fread
cmp rax, 0x20
mov edx, 1
mov ecx, 0x20
cmovne r14, r13
call sub.msvcrt.dll_calloc
mov rdx, qword [rsp + 0x98]
mov r12, rax
lea rax, [rdx + rdx]
mov rcx, rax
not rcx
test rdx, rdx
cmovs rax, rcx
cmp rax, 0x7f
jbe 0x606c71
xor edx, edx
nop dword [rax]
mov r8d, eax
mov ecx, edx
or r8d, 0xffffff80
shr rax, 7
mov byte [r12 + rcx], r8b
inc edx
cmp rax, 0x7f
ja 0x606990
add rdx, r12
mov byte [rdx], al
mov ecx, pe_nt_image_headers64
inc rbx
call sub.msvcrt.dll_malloc
mov r13, rax
mov rax, qword [rbp + 0x18]
vmovdqu xmm1, xmmword [r12 + 0x10]
vmovdqu xmm5, xmmword [rax]
vmovdqu xmm2, xmmword [r15]
vmovdqu xmmword [r13], xmm5
vmovdqu xmm0, xmmword [rax + 0x10]
vmovdqu xmm5, xmmword [r12]
vmovdqu xmm3, xmmword [r15 + 0x10]
vmovdqu xmm4, xmmword [r14]
vmovdqu xmmword [r13 + 0x10], xmm0
vmovdqu xmm0, xmmword [r14 + 0x10]
vmovdqu xmmword [r13 + 0x20], xmm5
vmovdqu xmmword [r13 + 0x30], xmm1
vmovdqu xmmword [r13 + 0x40], xmm2
vmovdqu xmmword [r13 + 0x50], xmm3
vmovdqu xmmword [r13 + 0x60], xmm4
vmovdqu xmmword [r13 + 0x70], xmm0
mov ecx, 0x20
call sub.msvcrt.dll_malloc
mov r8, rax
mov r9d, 0x20
mov edx, pe_nt_image_headers64
mov rcx, r13
mov rdi, rax
call fcn.00608650
mov rdx, qword [rbp + 0x10]
mov rcx, qword [rbp]
xor r8d, r8d
andn rdx, rdx, qword [rsp + 0x98]
shl edx, 5
call sub.msvcrt.dll_fseek
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, rdi
call sub.msvcrt.dll_fwrite
mov rcx, rdi
inc qword [rsp + 0x98]
call sub.msvcrt.dll_free
mov rcx, r13
call sub.msvcrt.dll_free
mov rcx, r15
call sub.msvcrt.dll_free
mov rcx, r14
call sub.msvcrt.dll_free
mov rcx, r12
call sub.msvcrt.dll_free
cmp rbx, rsi
je 0x606c57
mov rax, qword [rsp + 0x38]
lea rdi, [rbx + rax]
jmp 0x6068c8
mov rdi, rax
test rax, rax
jle 0x606c57
add rbx, rax
nop dword [rax + rax]
mov rdx, qword [rbp + 0x10]
mov rax, rsi
sub rax, rdi
mov rcx, qword [rbp]
xor r8d, r8d
andn rdx, rdx, rax
shl edx, 5
call sub.msvcrt.dll_fseek
mov ecx, 0x20
call sub.msvcrt.dll_malloc
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, rax
mov r13, rax
call sub.msvcrt.dll_fread
cmp rax, 0x20
mov edx, 1
mov eax, 0
mov ecx, 0x20
cmovne r13, rax
call sub.msvcrt.dll_calloc
mov r12, rax
lea rax, [rsi + rsi]
test rsi, rsi
jns 0x606b45
mov rax, rsi
neg rax
lea rax, [rax + rax - 1]
cmp rax, 0x7f
jbe 0x606cf0
xor edx, edx
nop dword [rax]
mov r8d, eax
mov ecx, edx
or r8d, 0xffffff80
shr rax, 7
mov byte [r12 + rcx], r8b
inc edx
cmp rax, 0x7f
ja 0x606b58
add rdx, r12
mov byte [rdx], al
mov ecx, 0x60
inc rsi
call sub.msvcrt.dll_malloc
mov r14, rax
mov rax, qword [rbp + 0x18]
vmovdqu xmm2, xmmword [r12]
vmovdqu xmm5, xmmword [rax]
vmovdqu xmm3, xmmword [r12 + 0x10]
vmovdqu xmmword [r14], xmm5
vmovdqu xmm1, xmmword [rax + 0x10]
vmovdqu xmm4, xmmword [r13]
vmovdqu xmm5, xmmword [r13 + 0x10]
vmovdqu xmmword [r14 + 0x10], xmm1
vmovdqu xmmword [r14 + 0x20], xmm2
vmovdqu xmmword [r14 + 0x30], xmm3
vmovdqu xmmword [r14 + 0x40], xmm4
vmovdqu xmmword [r14 + 0x50], xmm5
mov ecx, 0x20
call sub.msvcrt.dll_malloc
mov r8, rax
mov r9d, 0x20
mov edx, 0x60
mov rcx, r14
mov r15, rax
call fcn.00608650
mov rdx, qword [rbp + 0x10]
mov rcx, qword [rbp]
xor r8d, r8d
andn rdx, rdx, qword [rsp + 0x98]
shl edx, 5
call sub.msvcrt.dll_fseek
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, r15
call sub.msvcrt.dll_fwrite
mov rcx, r15
inc qword [rsp + 0x98]
call sub.msvcrt.dll_free
mov rcx, r14
call sub.msvcrt.dll_free
mov rcx, r13
call sub.msvcrt.dll_free
mov rcx, r12
call sub.msvcrt.dll_free
cmp rbx, rsi
jne 0x606ad0
mov rdx, qword [rsp + 0x20]
lea r8, [rsp + 0x98]
mov rcx, rbp
call fcn.00605e40
jmp 0x6067d0
mov rdx, r12
jmp 0x6069ac
mov r8, qword [rsp + 0x70]
mov eax, r14d
lea rdx, [r13 + rax]
add rax, r8
mov rcx, qword [rax - 0x20]
mov qword [rdx - 0x20], rcx
mov rcx, qword [rax - 0x18]
mov qword [rdx - 0x18], rcx
mov rcx, qword [rax - 0x10]
mov qword [rdx - 0x10], rcx
mov rax, qword [rax - 8]
mov qword [rdx - 8], rax
lea eax, [r14 - 1]
cmp eax, 0x20
jb 0x606875
and eax, 0xffffffe0
xor ecx, ecx
mov edx, ecx
mov r14, qword [r8 + rdx]
mov r11, qword [r8 + rdx + 8]
mov r10, qword [r8 + rdx + 0x10]
mov r9, qword [r8 + rdx + 0x18]
add ecx, 0x20
mov qword [r13 + rdx], r14
mov qword [r13 + rdx + 8], r11
mov qword [r13 + rdx + 0x10], r10
mov qword [r13 + rdx + 0x18], r9
cmp ecx, eax
jb 0x606cbb
jmp 0x606875
mov rdx, r12
jmp 0x606b74
mov rdx, r13
jmp 0x60625d
mov rcx, qword [rsp + 0x88]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x70]
vmovups xmm6, xmmword [rsp + 0xa0]
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sub.msvcrt.dll_free
test rax, rax
jle 0x606ec6
add rbx, rax
nop
mov rdx, qword [rbp + 0x10]
mov rax, rsi
sub rax, qword [rsp + 0x38]
mov rcx, qword [rbp]
xor r8d, r8d
andn rdx, rdx, rax
shl edx, 5
call sub.msvcrt.dll_fseek
mov ecx, 0x20
call sub.msvcrt.dll_malloc
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, rax
mov r14, rax
call sub.msvcrt.dll_fread
cmp rax, 0x20
mov edx, 1
mov eax, 0
mov ecx, 0x20
cmovne r14, rax
call sub.msvcrt.dll_calloc
mov r12, rax
lea rax, [rsi + rsi]
test rsi, rsi
jns 0x606db7
mov rax, rsi
neg rax
lea rax, [rax + rax - 1]
cmp rax, 0x7f
jbe 0x606fa4
xor edx, edx
nop dword [rax + rax]
mov r8d, eax
mov ecx, edx
or r8d, 0xffffff80
shr rax, 7
mov byte [r12 + rcx], r8b
inc edx
cmp rax, 0x7f
ja 0x606dc8
add rdx, r12
mov byte [rdx], al
mov ecx, 0x60
inc rsi
call sub.msvcrt.dll_malloc
mov r15, rax
mov rax, qword [rbp + 0x18]
vmovdqu xmm1, xmmword [r12 + 0x10]
vmovdqu xmm0, xmmword [rax]
vmovdqu xmm2, xmmword [r14]
vmovdqu xmmword [r15], xmm0
vmovdqu xmm5, xmmword [rax + 0x10]
vmovdqu xmm0, xmmword [r12]
vmovdqu xmm3, xmmword [r14 + 0x10]
vmovdqu xmmword [r15 + 0x10], xmm5
vmovdqu xmmword [r15 + 0x20], xmm0
vmovdqu xmmword [r15 + 0x30], xmm1
vmovdqu xmmword [r15 + 0x40], xmm2
vmovdqu xmmword [r15 + 0x50], xmm3
mov ecx, 0x20
call sub.msvcrt.dll_malloc
mov r8, rax
mov r9d, 0x20
mov edx, 0x60
mov rcx, r15
mov r13, rax
call fcn.00608650
mov rdx, qword [rbp + 0x10]
mov rcx, qword [rbp]
xor r8d, r8d
andn rdx, rdx, qword [rsp + 0x98]
shl edx, 5
call sub.msvcrt.dll_fseek
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, r13
call sub.msvcrt.dll_fwrite
mov rcx, r13
inc qword [rsp + 0x98]
call sub.msvcrt.dll_free
mov rcx, r15
call sub.msvcrt.dll_free
mov rcx, r14
call sub.msvcrt.dll_free
mov rcx, r12
call sub.msvcrt.dll_free
cmp rsi, rbx
jne 0x606d40
cmp rdi, 2
je 0x606c57
movsx esi, byte [rsp + 0x5f]
add esi, 5
movsxd rsi, esi
lea rdi, [rsi*8]
mov rcx, rdi
call sub.msvcrt.dll_malloc
mov r15, qword [rsp + 0x88]
sub rdi, 0x28
mov r8, rdi
mov rbx, rax
mov rdx, r15
mov rcx, rax
call sub.msvcrt.dll_memcpy
lea rax, [rbx + rdi]
mov rdi, qword [rsp + 0x78]
mov rcx, r15
vmovdqu xmm3, xmmword [rdi]
mov rdx, qword [rdi + 0x20]
vmovdqu xmmword [rax], xmm3
vmovdqu xmm3, xmmword [rdi + 0x10]
mov qword [rax + 0x20], rdx
vmovdqu xmmword [rax + 0x10], xmm3
movzx eax, byte [rsp + 0x40]
shl rsi, 2
add eax, 4
vmovdqu xmmword [rsp + 0x20], xmm3
mov byte [rsp + 0x5f], al
call sub.msvcrt.dll_free
mov rcx, rsi
call sub.msvcrt.dll_malloc
mov r15, qword [rsp + 0x70]
sub rsi, 0x14
mov r8, rsi
mov rdx, r15
mov rcx, rax
mov rdi, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x80]
add rsi, rdi
vmovdqu xmm5, xmmword [rax]
mov eax, dword [rax + 0x10]
vmovdqu xmmword [rsi], xmm5
mov dword [rsi + 0x10], eax
mov rcx, r15
vmovdqu xmmword [rsp + 0x20], xmm5
call sub.msvcrt.dll_free
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x88], rbx
jmp 0x6067d0
mov rdx, r12
jmp 0x606de4
test rax, rax
jle 0x606ec6
add rbx, rax
nop dword [rax + rax]
mov rdx, qword [rbp + 0x10]
mov rax, rsi
sub rax, qword [rsp + 0x38]
mov rcx, qword [rbp]
xor r8d, r8d
andn rdx, rdx, rax
shl edx, 5
call sub.msvcrt.dll_fseek
mov ecx, 0x20
call sub.msvcrt.dll_malloc
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, rax
mov r14, rax
call sub.msvcrt.dll_fread
cmp rax, 0x20
mov edx, 1
mov eax, 0
mov ecx, 0x20
cmovne r14, rax
call sub.msvcrt.dll_calloc
mov r12, rax
lea rax, [rsi + rsi]
test rsi, rsi
jns 0x607037
mov rax, rsi
neg rax
lea rax, [rax + rax - 1]
cmp rax, 0x7f
jbe 0x60714b
xor edx, edx
nop dword [rax + rax]
mov r8d, eax
mov ecx, edx
or r8d, 0xffffff80
shr rax, 7
mov byte [r12 + rcx], r8b
inc edx
cmp rax, 0x7f
ja 0x607048
add rdx, r12
mov byte [rdx], al
mov ecx, 0x60
inc rsi
call sub.msvcrt.dll_malloc
mov r15, rax
mov rax, qword [rbp + 0x18]
vmovdqu xmm0, xmmword [r12 + 0x10]
vmovdqu xmm4, xmmword [rax]
vmovdqu xmm1, xmmword [r14]
vmovdqu xmmword [r15], xmm4
vmovdqu xmm5, xmmword [rax + 0x10]
vmovdqu xmm4, xmmword [r12]
vmovdqu xmm2, xmmword [r14 + 0x10]
vmovdqu xmmword [r15 + 0x10], xmm5
vmovdqu xmmword [r15 + 0x20], xmm4
vmovdqu xmmword [r15 + 0x30], xmm0
vmovdqu xmmword [r15 + 0x40], xmm1
vmovdqu xmmword [r15 + 0x50], xmm2
mov ecx, 0x20
call sub.msvcrt.dll_malloc
mov r8, rax
mov r9d, 0x20
mov edx, 0x60
mov rcx, r15
mov r13, rax
call fcn.00608650
mov rdx, qword [rbp + 0x10]
mov rcx, qword [rbp]
xor r8d, r8d
andn rdx, rdx, qword [rsp + 0x98]
shl edx, 5
call sub.msvcrt.dll_fseek
mov r9, qword [rbp]
mov r8d, 0x20
mov edx, 1
mov rcx, r13
call sub.msvcrt.dll_fwrite
mov rcx, r13
inc qword [rsp + 0x98]
call sub.msvcrt.dll_free
mov rcx, r15
call sub.msvcrt.dll_free
mov rcx, r14
call sub.msvcrt.dll_free
mov rcx, r12
call sub.msvcrt.dll_free
cmp rbx, rsi
jne 0x606fc0
jmp 0x606ec6
mov rdx, r12
jmp 0x607064
mov rax, qword [rsp + 0x70]
mov r14d, r14d
vmovdqu8 xmm5, xmmword [rax]
vmovdqu8 xmmword [rsp + 0x20], xmm5
vmovdqu8 xmmword [r13], xmm5
vmovdqu8 xmm4, xmmword [rax + r14 - 0x10]
vmovdqu8 xmmword [rsp + 0x20], xmm4
vmovdqu8 xmmword [r13 + r14 - 0x10], xmm4
jmp 0x606875
mov rcx, qword [rsp + 0x70]
mov r14d, r14d
mov rax, qword [rcx]
mov qword [r13], rax
mov rax, qword [rcx + r14 - 8]
mov qword [r13 + r14 - 8], rax
jmp 0x606875
mov rcx, qword [rsp + 0x70]
mov r14d, r14d
mov eax, dword [rcx]
mov dword [r13], eax
mov eax, dword [rcx + r14 - 4]
mov dword [r13 + r14 - 4], eax
jmp 0x606875
lea r8, [rsp + 0x98]
mov edx, 1
mov rcx, rbp
call fcn.00605e40
nop
vmovups xmm6, xmmword [rsp + 0xa0]
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret