Function at 0x18006a5d0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x58
lea eax, [rdx - 0xc]
mov dword [rsp + 0xa8], eax
cmp edx, eax
jbe 0x18006aa47
mov r13, qword [rsp + 0xc0]
lea ebx, [rdx - 0x68]
mov ebp, dword [rsp + 0xa8]
lea rdx, [0x180000000]
mov r14d, dword [rsp + 0xa8]
mov r10d, 0x8000
mov edi, dword [rsp + 0xa8]
mov ecx, eax
mov r15, qword [rsp + 0x38]
mov r12d, dword [rsp + 0xa8]
mov dword [rsp + 0x20], ebx
lea r11d, [r10 - 1]
mov rbx, qword [rsp + 0x48]
mov esi, dword [rsp + 0x20]
mov qword [rsp + 0x30], rbx
cmp esi, 0x3c
ja case.default.0x18006a671
mov eax, esi
movzx eax, byte [rdx + rax + 0x6aa94]
mov ecx, dword [rdx + rax*4 + 0x6aa60]
add rcx, rdx
jmp rcx
mov rax, qword [r13]
xor esi, esi
xor r10d, r10d
mov rcx, qword [rax + 0x130]
cmp dword [rax + 0x38], esi
jle 0x18006aa17
lea r11, [rcx + 0xc]
mov r9d, 0xc
cmp r9d, 0xc
je 0x18006a702
cmp r9d, 0x7bc
jne 0x18006a724
test edi, edi
mov eax, ebp
cmovne eax, edi
movsxd rdi, eax
test r10, r10
jne 0x18006a6c4
lea eax, [rdi - 1]
cdq
idiv r14d
inc eax
mov dword [r15 + 0x80], eax
movsxd rax, dword [r15 + 0x78]
mov rcx, qword [r15 + rax*8 + 0x68]
lea eax, [r14 + r14]
movsxd rdx, eax
mov r8, qword [rcx + r10*8]
test eax, eax
jle 0x18006a724
lea rax, [r8 + rdi*8]
lea r8, [rax - 8]
nop dword [rax]
nop dword [rax + rax]
mov rcx, qword [r8]
mov qword [rax], rcx
lea rax, [rax + 8]
sub rdx, 1
jne 0x18006a6f0
jmp 0x18006a724
mov ebp, dword [r11 + 0x18]
imul ebp, dword [r11]
mov rcx, qword [r13]
mov eax, ebp
cdq
idiv dword [rcx + 0x1d8]
xor edx, edx
mov r14d, eax
mov eax, dword [r11 + 0x20]
div ebp
mov edi, edx
add r9d, 0x7b0
cmp r9d, 0xf60
jbe 0x18006a696
mov rcx, qword [r13]
inc esi
inc r10
add r11, 0x60
cmp esi, dword [rcx + 0x38]
jl 0x18006a690
mov esi, dword [rsp + 0x20]
mov r9, qword [rsp + 0xb8]
lea rdx, [0x180000000]
mov r8, qword [rsp + 0xb0]
mov r10d, 0x8000
jmp 0x18006aa27
mov rax, qword [r13]
lea rdx, [rsp + 0x28]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov r8d, 0xa8
mov dword [rsp + 0x24], 0xffffffff
xor ecx, ecx
call fcn.18003f870
jmp 0x18006a752
mov rax, qword [r13]
mov rax, qword [rax + 0x2a8]
mov qword [rsp + 0x40], rax
jmp case.0x18006a671.12
mov dword [r13 + 8], r12d
test r12d, r12d
jne 0x18006a7d5
cmp dword [rsp + 0x24], r12d
jne 0x18006a7d5
mov rbx, qword [rsp + 0x28]
or word [r13 + 0xc], r10w
mov qword [rsp + 0x30], rbx
jmp case.0x18006a671.12
mov rbx, qword [rsp + 0x28]
and word [r13 + 0xc], r11w
mov qword [rsp + 0x30], rbx
jmp case.0x18006a671.12
mov r9, qword [r9]
mov rax, qword [r9 + 0x20]
mov rcx, qword [r9 + 0x30]
mov rdx, qword [rax]
mov rax, qword [r13]
mov r8d, dword [rax + 0x88]
test r8d, r8d
je 0x18006a836
nop word [rax + rax]
movzx eax, byte [rdx + 2]
lea rdx, [rdx + 3]
mov byte [rcx], al
lea rcx, [rcx + 3]
movzx eax, byte [rdx - 2]
mov byte [rcx - 2], al
movzx eax, byte [rdx - 3]
mov byte [rcx - 1], al
add r8d, 0xffffffff
jne 0x18006a810
mov rcx, qword [r9 + 0x30]
mov r8d, dword [r9 + 0x38]
mov edx, 1
mov r9, qword [r9 + 0x18]
call fcn.180083240
jmp 0x18006a752
mov rax, qword [r13]
mov r15, qword [rax + 0x260]
mov qword [rsp + 0x38], r15
jmp case.0x18006a671.12
mov rcx, qword [r9]
xor r8d, r8d
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rcx + 0x18]
mov edx, dword [rax]
call fcn.180082ff8
test eax, eax
je 0x18006a896
mov rax, qword [r13]
mov rcx, qword [rax]
mov dword [rcx + 0x28], 0x41
mov rcx, qword [r13]
mov rax, qword [rcx]
call qword [rax]
mov rax, qword [rsp + 0xa0]
mov edx, 1
mov r9, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0xb0]
movsxd r8, dword [rax]
mov r9, qword [r9]
mov r9, qword [r9 + 0x18]
call fcn.180082cbc
mov rcx, qword [rsp + 0xa0]
movsxd rcx, dword [rcx]
cmp rax, rcx
je 0x18006a752
mov rax, qword [r13]
mov rcx, qword [rax]
mov dword [rcx + 0x28], 0x40
mov rcx, qword [r13]
mov rax, qword [rcx]
call qword [rax]
jmp 0x18006a752
mov r8d, dword [r8]
mov rdx, qword [r13]
mov rcx, qword [r9]
shl r8, 7
call fcn.180078b00
jmp 0x18006a752
mov rax, qword [r13]
xor r11d, r11d
mov esi, dword [rax + 0x88]
mov rax, qword [rsp + 0xc8]
cmp dword [rax], r11d
jle 0x18006aa23
mov r13, qword [rsp + 0x48]
xor r10d, r10d
mov r15, qword [rsp + 0xb8]
mov rbx, rax
nop dword [rax + rax]
mov rax, qword [r15]
mov r9d, esi
mov r8, qword [r10 + rax]
test esi, esi
je 0x18006a992
nop
movsx rcx, byte [r8 + 1]
movsx rax, byte [r8 + 2]
lea r8, [r8 + 3]
sar rax, 3
sar rcx, 2
shl rcx, 5
add rcx, rax
movsx rax, byte [r8 - 3]
sar rax, 3
mov rax, qword [r13 + rax*8]
lea rdx, [rax + rcx*4]
mov ecx, dword [rax + rcx*4]
lea eax, [rcx + 1]
test eax, eax
cmove eax, ecx
mov dword [rdx], eax
add r9d, 0xffffffff
jne 0x18006a950
inc r11d
add r10, 8
cmp r11d, dword [rbx]
jl 0x18006a940
mov rbx, qword [rsp + 0x30]
mov r15, qword [rsp + 0x38]
mov r13, qword [rsp + 0xc0]
jmp 0x18006a74e
mov rax, qword [rsp + 0x28]
movzx r12d, byte [rax]
inc qword [rsp + 0x28]
mov eax, r12d
and al, 0x80
je case.0x18006a671.12
and r12d, 0x7f
mov esi, r12d
mov dword [rsp + 0x24], r12d
je 0x18006aa01
xor r12d, r12d
nop dword [rax + rax]
mov rax, qword [rsp + 0x28]
shl r12d, 8
movzx eax, byte [rax]
inc qword [rsp + 0x28]
add r12d, eax
sub esi, 1
jne 0x18006a9e0
mov dword [rsp + 0x24], 0xffffffff
mov esi, dword [rsp + 0x20]
jmp case.0x18006a671.12
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 0x30]
mov qword [rsp + 0x48], rax
jmp case.0x18006a671.12
mov esi, dword [rsp + 0x20]
mov r10d, 0x8000
jmp case.0x18006a671.12
mov esi, dword [rsp + 0x20]
mov r11d, 0x7fff
mov ecx, dword [rsp + 0xa8]
dec esi
mov dword [rsp + 0x20], esi
lea eax, [rsi + 0x68]
cmp eax, ecx
ja 0x18006a654
jmp case.0x18006a671.5
mov rbx, qword [rsp + 0x48]
mov rax, rbx
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret