Function at 0x140035610
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push r14
lea rbp, [rsp - 0x3f0]
sub rsp, 0x4f0
xor r14d, r14d
mov dword [rbp - 0x64], 0xff
lea rdx, [rbp - 0x80]
mov dword [rbp + 0x438], r14d
mov rbx, rcx
call fcn.140035130
test rax, rax
je 0x14003568e
mov eax, dword [rbx + 4]
mov dword [rsp + 0x70], eax
cdq
mov r9d, eax
xor r9d, edx
sub r9d, edx
mov dword [rbx + 4], r9d
cmp r9d, 0x1000000
jbe 0x14003569c
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.too_large
mov qword [rdx + rcx], rax
xor eax, eax
add rsp, 0x4f0
pop r14
pop rbx
pop rbp
ret
mov r8d, dword [rbx]
cmp r8d, 0x1000000
ja 0x140035672
mov eax, dword [rbp - 0x74]
mov r10d, dword [rbp - 0x68]
mov dword [rsp + 0x34], eax
mov eax, dword [rbp - 0x70]
mov dword [rsp + 0x38], eax
mov eax, dword [rbp - 0x6c]
mov qword [rsp + 0x4e8], rdi
mov edi, dword [rbp - 0x78]
mov dword [rsp + 0x40], eax
mov eax, dword [rbp - 0x64]
mov qword [rsp + 0x4d8], r13
movsxd r13, dword [rbp - 0x7c]
mov dword [rsp + 0x2c], eax
mov eax, dword [rbp - 0x60]
mov qword [rsp + 0x4d0], r15
mov r15d, dword [rbp - 0x80]
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x44], r10d
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x28], edi
mov dword [rbp + 0x430], r15d
cmp edi, 0xc
jne 0x14003572d
cmp r15d, 0x18
jge 0x14003574c
mov ecx, r13d
sub ecx, eax
mov eax, 0x55555556
sub ecx, 0x18
imul ecx
mov r14d, edx
shr r14d, 0x1f
add r14d, edx
jmp 0x140035740
cmp r15d, 0x10
jge 0x14003574c
mov r14d, r13d
sub r14d, eax
sub r14d, edi
sar r14d, 2
mov dword [rbp + 0x438], r14d
test r14d, r14d
jne 0x140035789
movsxd rcx, dword [rbx + 0xb8]
add rcx, qword [rbx + 0xc0]
sub rcx, rbx
sub rcx, 0x38
cmp r13, rcx
je 0x140035789
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.bad_offset
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x140035e31
mov qword [rsp + 0x4e0], r12
cmp r15d, 0x18
jne 0x1400357a6
cmp r10d, 0xff000000
jne 0x1400357a6
lea r12d, [r15 - 0x15]
jmp 0x1400357b7
mov r8d, dword [rbx]
xor r12d, r12d
test r10d, r10d
setne r12b
add r12d, 3
mov dword [rbx + 8], r12d
test r8d, r8d
js 0x140036642
je 0x1400357d8
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r12d, eax
jg 0x140036642
mov ecx, r12d
imul ecx, r8d
test ecx, ecx
js 0x140036642
test r9d, r9d
js 0x140036642
je 0x140035803
mov eax, 0x7fffffff
cdq
idiv r9d
cmp ecx, eax
jg 0x140036642
mov qword [rsp + 0x510], rsi
test r8d, r8d
je 0x140035822
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r12d, eax
jg 0x140036625
test r9d, r9d
je 0x140035838
mov eax, 0x7fffffff
cdq
idiv r9d
cmp ecx, eax
jg 0x140036625
imul r8d, r12d
imul r8d, r9d
movsxd rcx, r8d
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x78], rax
mov rsi, rax
test rax, rax
je 0x140036625
cmp r15d, 0x10
jge 0x140035e78
xor edi, edi
test r14d, r14d
je 0x140035e55
cmp r14d, 0x100
jg 0x140035e55
movsxd rax, r14d
mov qword [rsp + 0x50], rax
test r14d, r14d
jle 0x1400359c3
mov rax, qword [rbx + 0xc0]
xor r15d, r15d
mov esi, dword [rsp + 0x28]
mov r13, qword [rsp + 0x50]
mov rcx, qword [rbx + 0xc8]
cmp rax, rcx
jb 0x1400358c7
cmp dword [rbx + 0x30], edi
je 0x1400358eb
mov rcx, rbx
call fcn.14002bcc0
mov rax, qword [rbx + 0xc0]
mov rcx, qword [rbx + 0xc8]
movzx edx, byte [rax]
lea r14, [r15*4]
inc rax
mov byte [rbp + r14 - 0x2e], dl
mov qword [rbx + 0xc0], rax
mov r8, r14
cmp rax, rcx
jae 0x1400358fb
jmp 0x140035916
lea r14, [r15*4]
mov byte [rbp + r14 - 0x2e], dil
mov r8, r14
cmp dword [rbx + 0x30], edi
je 0x14003593c
mov rcx, rbx
call fcn.14002bcc0
mov rax, qword [rbx + 0xc0]
mov rcx, qword [rbx + 0xc8]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rbp + r14 - 0x2f], dl
cmp rax, rcx
jae 0x140035941
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140035966
mov byte [rbp + r8 - 0x2f], dil
cmp dword [rbx + 0x30], edi
je 0x140035964
mov rcx, rbx
call fcn.14002bcc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140035966
xor cl, cl
mov byte [rbp + r14 - 0x30], cl
cmp esi, 0xc
je 0x1400359a0
cmp rax, qword [rbx + 0xc8]
jae 0x140035985
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1400359a0
cmp dword [rbx + 0x30], edi
je 0x1400359a0
mov rcx, rbx
call fcn.14002bcc0
inc qword [rbx + 0xc0]
mov rax, qword [rbx + 0xc0]
inc r15
mov byte [rbp + r14 - 0x2d], 0xff
cmp r15, r13
jl 0x1400358a0
mov rsi, qword [rsp + 0x78]
mov r13d, dword [rsp + 0x30]
mov r14d, dword [rbp + 0x438]
xor eax, eax
cmp dword [rsp + 0x28], 0xc
setne al
add eax, 3
imul eax, r14d
sub r13d, eax
sub r13d, dword [rsp + 0x20]
sub r13d, dword [rsp + 0x28]
je 0x140035a36
test r13d, r13d
jns 0x1400359f8
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x140035a36
cmp qword [rbx + 0x10], rdi
je 0x140035a2c
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r13d
jge 0x140035a2c
mov rax, qword [rbx + 0xc8]
sub r13d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r13d
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
jmp 0x140035a36
movsxd rax, r13d
add qword [rbx + 0xc0], rax
mov r11d, dword [rbp + 0x430]
cmp r11d, 1
jne 0x140035a50
mov r13d, dword [rbx]
add r13d, 7
shr r13d, 3
jmp 0x140035a6e
cmp r11d, 4
jne 0x140035a61
mov r13d, dword [rbx]
inc r13d
shr r13d, 1
jmp 0x140035a6e
cmp r11d, 8
jne 0x140035dfa
mov r13d, dword [rbx]
mov eax, dword [rbx + 4]
neg r13d
and r13d, 3
mov ecx, eax
cmp r11d, 1
jne 0x140035c10
mov dword [rbp + 0x430], edi
test eax, eax
jle 0x14003652d
mov rax, qword [rbx + 0xc0]
mov r14d, 7
cmp rax, qword [rbx + 0xc8]
jae 0x140035ab7
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140035add
cmp dword [rbx + 0x30], 0
je 0x140035adb
mov rcx, rbx
call fcn.14002bcc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140035add
xor cl, cl
mov edx, dword [rbx]
xor r15d, r15d
movzx r9d, cl
test edx, edx
jle 0x140035bad
mov r8d, edx
mov eax, r9d
mov ecx, r14d
sar eax, cl
and eax, 1
lea rcx, [rax*4]
movzx eax, byte [rbp + rcx - 0x30]
mov byte [rdi + rsi], al
movzx eax, byte [rbp + rcx - 0x2f]
mov byte [rdi + rsi + 1], al
movzx eax, byte [rbp + rcx - 0x2e]
mov byte [rdi + rsi + 2], al
add rdi, 3
cmp r12d, 4
jne 0x140035b2f
mov byte [rdi + rsi], 0xff
inc rdi
inc r15d
cmp r15d, edx
je 0x140035bad
sub r14d, 1
jns 0x140035b9e
mov rax, qword [rbx + 0xc0]
mov r14d, 7
cmp rax, qword [rbx + 0xc8]
jae 0x140035b69
movzx ecx, byte [rax]
mov edx, r8d
inc rax
movzx r9d, cl
mov qword [rbx + 0xc0], rax
jmp 0x140035ba1
cmp dword [rbx + 0x30], 0
je 0x140035b93
mov rcx, rbx
call fcn.14002bcc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov edx, dword [rbx]
movzx r9d, cl
jmp 0x140035ba1
xor cl, cl
mov edx, r8d
movzx r9d, cl
jmp 0x140035ba1
mov edx, r8d
mov r8d, edx
cmp r15d, edx
jl 0x140035af1
test r13d, r13d
je 0x140035bf0
cmp qword [rbx + 0x10], 0
je 0x140035be6
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r13d
jge 0x140035be6
mov rax, qword [rbx + 0xc8]
mov edx, r13d
sub edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x140035bf0
mov eax, r13d
add qword [rbx + 0xc0], rax
mov edx, dword [rbp + 0x430]
mov eax, dword [rbx + 4]
inc edx
mov dword [rbp + 0x430], edx
mov ecx, eax
cmp edx, eax
jl 0x140035a92
jmp 0x14003652d
xor r15d, r15d
test eax, eax
jle 0x14003652d
nop dword [rax + rax]
mov r8d, dword [rbx]
xor r14d, r14d
test r8d, r8d
jle 0x140035d9a
nop
mov r9, qword [rbx + 0xc0]
cmp r9, qword [rbx + 0xc8]
jae 0x140035c50
movzx ecx, byte [r9]
inc r9
mov qword [rbx + 0xc0], r9
jmp 0x140035c81
cmp dword [rbx + 0x30], 0
je 0x140035c7f
mov rcx, rbx
call fcn.14002bcc0
mov rax, qword [rbx + 0xc0]
mov r8d, dword [rbx]
mov r11d, dword [rbp + 0x430]
movzx ecx, byte [rax]
lea r9, [rax + 1]
mov qword [rbx + 0xc0], r9
jmp 0x140035c81
xor cl, cl
xor r10d, r10d
movzx eax, cl
cmp r11d, 4
jne 0x140035c97
mov r10d, eax
and r10d, 0xf
shr eax, 4
movsxd rcx, edi
lea rdx, [rax*4]
movzx eax, byte [rbp + rdx - 0x30]
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rbp + rdx - 0x2f]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rbp + rdx - 0x2e]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
cmp r12d, 4
jne 0x140035cd5
movsxd rax, edi
inc edi
mov byte [rax + rsi], 0xff
lea eax, [r14 + 1]
cmp eax, r8d
je 0x140035d9a
cmp r11d, 8
jne 0x140035d4c
cmp r9, qword [rbx + 0xc8]
jae 0x140035d09
movzx ecx, byte [r9]
lea rax, [r9 + 1]
mov qword [rbx + 0xc0], rax
mov r9d, r8d
movzx r10d, cl
jmp 0x140035d4f
cmp dword [rbx + 0x30], 0
je 0x140035d3e
mov rcx, rbx
call fcn.14002bcc0
mov rax, qword [rbx + 0xc0]
mov r11d, dword [rbp + 0x430]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov r8d, dword [rbx]
mov r9d, r8d
movzx r10d, cl
jmp 0x140035d4f
xor cl, cl
mov r9d, r8d
mov r8d, dword [rbx]
movzx r10d, cl
jmp 0x140035d4f
mov r9d, r8d
movsxd rcx, edi
lea rdx, [r10*4]
movzx eax, byte [rbp + rdx - 0x30]
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rbp + rdx - 0x2f]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rbp + rdx - 0x2e]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
cmp r12d, 4
jne 0x140035d8d
movsxd rax, edi
inc edi
mov byte [rax + rsi], 0xff
add r14d, 2
cmp r14d, r9d
jl 0x140035c30
test r13d, r13d
je 0x140035ddd
cmp qword [rbx + 0x10], 0
je 0x140035dd3
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r13d
jge 0x140035dd3
mov rax, qword [rbx + 0xc8]
mov edx, r13d
sub edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x140035ddd
mov eax, r13d
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc r15d
mov r11d, dword [rbp + 0x430]
mov ecx, eax
cmp r15d, eax
jl 0x140035c20
jmp 0x14003652d
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.bad_bpp
mov qword [rdx + rcx], rax
xor eax, eax
mov rsi, qword [rsp + 0x510]
mov r12, qword [rsp + 0x4e0]
mov rdi, qword [rsp + 0x4e8]
mov r13, qword [rsp + 0x4d8]
mov r15, qword [rsp + 0x4d0]
add rsp, 0x4f0
pop r14
pop rbx
pop rbp
ret
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.invalid
jmp 0x140035e1b
sub r13d, dword [rsp + 0x20]
xor edx, edx
xor r10d, r10d
mov dword [rsp + 0x3c], 0
xor r9d, r9d
mov dword [rsp + 0x30], 0
xor r14d, r14d
mov dword [rsp + 0x28], 0
xor r15d, r15d
mov dword [rbp + 0x438], 0
mov dword [rsp + 0x24], edx
sub r13d, edi
je 0x140035f12
test r13d, r13d
jns 0x140035ecb
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x140035f12
cmp qword [rbx + 0x10], rdx
je 0x140035f08
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r13d
jge 0x140035f08
mov rax, qword [rbx + 0xc8]
sub r13d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r13d
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
mov edx, r14d
mov r9d, edx
mov r10d, edx
jmp 0x140035f12
movsxd rax, r13d
add qword [rbx + 0xc0], rax
mov ecx, dword [rbp + 0x430]
cmp ecx, 0x18
jne 0x140035f25
mov eax, dword [rbx]
lea r8d, [rax + rax*2]
jmp 0x140035f35
cmp ecx, 0x10
jne 0x140035f32
mov r8d, dword [rbx]
add r8d, r8d
jmp 0x140035f35
xor r8d, r8d
neg r8d
and r8d, 3
mov dword [rsp + 0x24], r8d
cmp ecx, 0x18
jne 0x140035f59
mov r13d, 1
mov edi, r14d
mov qword [rsp + 0x50], r13
jmp 0x14003615c
mov r13d, dword [rsp + 0x40]
mov edi, dword [rsp + 0x38]
cmp ecx, 0x20
jne 0x140035fa3
cmp r13d, 0xff
jne 0x140035fa3
cmp edi, 0xff00
jne 0x140035fa3
cmp dword [rsp + 0x34], 0xff0000
jne 0x140035fa3
mov r11d, dword [rsp + 0x44]
cmp r11d, 0xff000000
jne 0x140035fc9
mov r13d, 2
mov edi, r14d
mov qword [rsp + 0x50], r13
jmp 0x14003615c
mov r9d, dword [rsp + 0x34]
test r9d, r9d
je 0x1400365ff
test edi, edi
je 0x1400365ff
test r13d, r13d
je 0x1400365ff
mov r11d, dword [rsp + 0x44]
jmp 0x140035fce
mov r9d, dword [rsp + 0x34]
mov ecx, r9d
call fcn.1400350c0
sub eax, 7
mov edx, r9d
shr edx, 1
mov ecx, r9d
and edx, 0x55555555
mov dword [rsp + 0x3c], eax
and ecx, 0x55555555
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, edi
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r10d, al
call fcn.1400350c0
sub eax, 7
mov edx, edi
shr edx, 1
mov ecx, edi
and edx, 0x55555555
mov dword [rsp + 0x30], eax
and ecx, 0x55555555
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, r13d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r9d, al
call fcn.1400350c0
sub eax, 7
mov edx, r13d
shr edx, 1
mov ecx, r13d
and edx, 0x55555555
mov dword [rsp + 0x28], eax
and ecx, 0x55555555
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, r11d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r14d, al
call fcn.1400350c0
lea edi, [rax - 7]
mov edx, r11d
mov dword [rbp + 0x438], edi
shr edx, 1
mov ecx, r11d
and edx, 0x55555555
and ecx, 0x55555555
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx edx, al
cmp r10d, 8
ja 0x1400365ff
cmp r9d, 8
ja 0x1400365ff
cmp r14d, 8
ja 0x1400365ff
xor r13d, r13d
mov qword [rsp + 0x50], r13
cmp edx, 8
ja 0x1400365ff
mov r8d, dword [rsp + 0x24]
mov eax, dword [rbx + 4]
xor r11d, r11d
mov dword [rsp + 0x20], r11d
mov ecx, eax
test eax, eax
jle 0x14003652d
mov eax, dword [rsp + 0x3c]
neg eax
mov dword [rsp + 0x4c], eax
mov eax, 8
mov ecx, eax
sub ecx, r10d
mov dword [rsp + 0x48], ecx
mov ecx, dword [rsp + 0x30]
neg ecx
mov dword [rsp + 0x58], ecx
mov ecx, eax
sub ecx, r9d
mov dword [rsp + 0x5c], ecx
mov ecx, dword [rsp + 0x28]
neg ecx
mov dword [rsp + 0x60], ecx
mov ecx, eax
sub ecx, r14d
mov dword [rsp + 0x64], ecx
mov ecx, edi
neg ecx
sub eax, edx
mov dword [rsp + 0x68], ecx
mov dword [rsp + 0x6c], eax
mov eax, r10d
mov qword [rbp - 0x58], rax
mov eax, r14d
mov qword [rbp - 0x48], rax
mov eax, edx
mov ecx, r9d
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x50], rcx
nop dword [rax + rax]
mov eax, dword [rbx]
movsxd rcx, r15d
test r13, r13
je 0x140036336
xor r14d, r14d
test eax, eax
jle 0x1400364c4
lea rdi, [rcx + rsi]
nop dword [rax]
mov rcx, qword [rbx + 0xc8]
mov rax, qword [rbx + 0xc0]
cmp rax, rcx
jb 0x14003622f
cmp dword [rbx + 0x30], 0
je 0x140036246
mov rcx, rbx
call fcn.14002bcc0
mov rax, qword [rbx + 0xc0]
mov rcx, qword [rbx + 0xc8]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rdi + 2], dl
cmp rax, rcx
jae 0x14003624a
jmp 0x140036266
mov byte [rdi + 2], 0
cmp dword [rbx + 0x30], 0
je 0x14003628a
mov rcx, rbx
call fcn.14002bcc0
mov rax, qword [rbx + 0xc0]
mov rcx, qword [rbx + 0xc8]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rdi + 1], dl
cmp rax, rcx
jae 0x14003628e
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1400362b4
mov byte [rdi + 1], 0
cmp dword [rbx + 0x30], 0
je 0x1400362b2
mov rcx, rbx
call fcn.14002bcc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1400362b4
xor cl, cl
mov byte [rdi], cl
add r15d, 3
add rdi, 3
cmp r13, 2
jne 0x140036304
cmp rax, qword [rbx + 0xc8]
jae 0x1400362dc
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140036306
cmp dword [rbx + 0x30], 0
je 0x140036300
mov rcx, rbx
call fcn.14002bcc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140036306
xor cl, cl
jmp 0x140036306
mov cl, 0xff
movzx eax, cl
or dword [rsp + 0x2c], eax
cmp r12d, 4
jne 0x14003631b
inc r15d
mov byte [rdi], cl
inc rdi
inc r14d
cmp r14d, dword [rbx]
jl 0x140036200
mov r8d, dword [rsp + 0x24]
mov r11d, dword [rsp + 0x20]
jmp 0x1400364c4
test eax, eax
jle 0x1400364bf
lea r14, [rcx + rsi]
mov esi, dword [rbp + 0x430]
mov rcx, rbx
call fcn.14002bed0
cmp esi, 0x10
jne 0x14003635a
mov r8d, eax
jmp 0x140036374
mov rcx, rbx
mov edi, eax
call fcn.14002bed0
mov r8d, eax
shl r8d, 0x10
add r8d, edi
mov edi, dword [rbp + 0x438]
mov r9d, dword [rsp + 0x3c]
lea r11, [0x140000000]
mov r10, qword [rbp - 0x58]
mov ecx, r9d
mov edx, r8d
and edx, dword [rsp + 0x34]
mov eax, edx
shr eax, cl
mov ecx, dword [rsp + 0x4c]
shl edx, cl
mov ecx, dword [rsp + 0x48]
test r9d, r9d
mov r9d, dword [rsp + 0x30]
cmovns edx, eax
shr edx, cl
imul edx, dword [r11 + r10*4 + 0xd7940]
mov ecx, dword [r11 + r10*4 + 0xd7998]
mov r10, qword [rbp - 0x50]
sar edx, cl
mov ecx, r9d
mov byte [r14], dl
mov edx, r8d
and edx, dword [rsp + 0x38]
mov eax, edx
shr eax, cl
mov ecx, dword [rsp + 0x58]
shl edx, cl
mov ecx, dword [rsp + 0x5c]
test r9d, r9d
mov r9d, dword [rsp + 0x28]
cmovns edx, eax
shr edx, cl
imul edx, dword [r11 + r10*4 + 0xd7940]
mov ecx, dword [r11 + r10*4 + 0xd7998]
sar edx, cl
mov ecx, r9d
mov byte [r14 + 1], dl
mov edx, r8d
and edx, dword [rsp + 0x40]
mov eax, edx
shr eax, cl
mov ecx, dword [rsp + 0x60]
shl edx, cl
mov ecx, dword [rsp + 0x64]
test r9d, r9d
mov r9, qword [rbp - 0x48]
cmovns edx, eax
add r15d, 3
shr edx, cl
imul edx, dword [r11 + r9*4 + 0xd7940]
mov ecx, dword [r11 + r9*4 + 0xd7998]
mov r11d, dword [rsp + 0x44]
sar edx, cl
mov byte [r14 + 2], dl
add r14, 3
test r11d, r11d
je 0x14003648a
mov rdx, qword [rbp - 0x40]
and r8d, r11d
mov eax, r8d
mov ecx, edi
shr eax, cl
mov ecx, dword [rsp + 0x68]
shl r8d, cl
mov ecx, dword [rsp + 0x6c]
test edi, edi
cmovns r8d, eax
shr r8d, cl
lea rcx, [0x140000000]
imul r8d, dword [rcx + rdx*4 + 0xd7940]
mov ecx, dword [rcx + rdx*4 + 0xd7998]
sar r8d, cl
jmp 0x140036490
mov r8d, 0xff
or dword [rsp + 0x2c], r8d
cmp r12d, 4
jne 0x1400364a4
inc r15d
mov byte [r14], r8b
inc r14
inc r13d
cmp r13d, dword [rbx]
jl 0x140036348
mov rsi, qword [rsp + 0x78]
mov r8d, dword [rsp + 0x24]
mov r11d, dword [rsp + 0x20]
mov r13, qword [rsp + 0x50]
test r8d, r8d
je 0x140036511
cmp qword [rbx + 0x10], 0
je 0x140036507
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r8d
jge 0x140036507
mov rax, qword [rbx + 0xc8]
mov edx, r8d
sub edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
mov r8d, dword [rsp + 0x24]
mov r11d, dword [rsp + 0x20]
jmp 0x140036511
mov eax, r8d
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc r11d
mov edi, dword [rbp + 0x438]
mov ecx, eax
mov dword [rsp + 0x20], r11d
cmp r11d, eax
jl 0x1400361e0
mov edx, ecx
cmp r12d, 4
jne 0x14003655e
cmp dword [rsp + 0x2c], 0
jne 0x14003655e
imul eax, dword [rbx]
lea eax, [rax*4 - 1]
movsxd r8, eax
test eax, eax
js 0x14003655e
nop dword [rax]
mov byte [r8 + rsi], 0xff
sub r8, 4
jns 0x140036550
mov edx, dword [rbx + 4]
cmp dword [rsp + 0x70], 0
jle 0x1400365cf
xor r10d, r10d
test edx, 0xfffffffe
jle 0x1400365cf
mov ecx, dword [rbx]
sub edx, r10d
dec edx
mov r9d, r12d
imul edx, r12d
mov eax, r12d
imul r9d, ecx
xor r8d, r8d
imul eax, ecx
imul edx, ecx
imul r9d, r10d
mov r11d, edx
add rdx, rsi
test eax, eax
jle 0x1400365c0
sub r9, r11
nop
movzx eax, byte [rdx]
inc r8d
movzx ecx, byte [r9 + rdx]
mov byte [r9 + rdx], al
mov eax, r12d
mov byte [rdx], cl
lea rdx, [rdx + 1]
imul eax, dword [rbx]
cmp r8d, eax
jl 0x1400365a0
mov edx, dword [rbx + 4]
inc r10d
mov eax, edx
sar eax, 1
cmp r10d, eax
jl 0x140036570
mov eax, dword [rbx]
mov rcx, qword [rbp + 0x418]
mov dword [rcx], eax
mov rcx, qword [rbp + 0x420]
mov eax, dword [rbx + 4]
mov dword [rcx], eax
mov rcx, qword [rbp + 0x428]
test rcx, rcx
je 0x1400365f7
mov eax, dword [rbx + 8]
mov dword [rcx], eax
mov rax, rsi
jmp 0x140035e21
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.bad_masks
jmp 0x140035e1b
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.outofmem
jmp 0x140035e1b
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.too_large
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x140035e29