Function at 0x140033160
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push rbx
push rsi
lea rbp, [rsp - 0x440]
sub rsp, 0x540
mov rax, qword [0x140144038]
xor rax, rsp
mov qword [rbp + 0x400], rax
mov qword [rbp - 0x20], rdx
xor esi, esi
lea rdx, [rbp - 0x60]
mov dword [rsp + 0x28], esi
mov qword [rbp - 0x10], r9
mov rbx, rcx
mov qword [rbp - 0x18], r8
mov dword [rbp - 0x44], 0xff
call fcn.140032c40
test rax, rax
je 0x140033b7b
mov eax, dword [rbx + 4]
mov r9d, dword [rbp - 0x48]
mov dword [rbp - 0x78], eax
cdq
mov r8d, eax
mov qword [rsp + 0x538], rdi
mov eax, dword [rbp - 0x54]
xor r8d, edx
mov edi, dword [rbp - 0x60]
sub r8d, edx
mov dword [rsp + 0x38], eax
mov eax, dword [rbp - 0x50]
mov dword [rsp + 0x24], eax
mov eax, dword [rbp - 0x4c]
mov dword [rsp + 0x40], eax
mov eax, dword [rbp - 0x44]
mov qword [rsp + 0x530], r12
mov r12d, dword [rbp - 0x5c]
mov qword [rsp + 0x518], r15
mov r15d, dword [rbp - 0x58]
mov dword [rsp + 0x34], eax
mov eax, dword [rbp - 0x40]
mov dword [rsp + 0x60], eax
mov dword [rbx + 4], r8d
mov dword [rsp + 0x58], r9d
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x20], r15d
mov dword [rsp + 0x2c], edi
cmp r15d, 0xc
jne 0x140033246
cmp edi, 0x18
jge 0x14003325d
mov ecx, r12d
sub ecx, eax
mov eax, 0x55555556
sub ecx, 0x18
imul ecx
mov esi, edx
shr esi, 0x1f
add esi, edx
jmp 0x140033256
cmp edi, 0x10
jge 0x14003325a
mov esi, r12d
sub esi, eax
sub esi, r15d
sar esi, 2
mov dword [rsp + 0x28], esi
cmp edi, 0x18
jne 0x14003326f
cmp r9d, 0xff000000
jne 0x14003326f
mov eax, 3
jmp 0x14003327a
xor eax, eax
test r9d, r9d
setne al
add eax, 3
mov dword [rbx + 8], eax
mov ecx, dword [rbx]
test ecx, ecx
js 0x14003442d
jne 0x140033293
lea r9d, [rcx*4]
jmp 0x1400332b5
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x14003442d
lea r9d, [rcx*4]
test r9d, r9d
js 0x14003442d
test r8d, r8d
js 0x14003442d
je 0x1400332d2
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x14003442d
mov qword [rsp + 0x520], r14
test ecx, ecx
jne 0x1400332ea
lea ecx, [rcx*4]
mov r9d, ecx
jmp 0x14003330d
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x14003440a
lea ecx, [rcx*4]
mov r9d, ecx
test ecx, ecx
js 0x14003440a
test r8d, r8d
je 0x140033324
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x14003440a
imul ecx, r8d
movsxd rcx, ecx
call fcn.1400a95e8
mov qword [rbp - 0x68], rax
mov r14, rax
test rax, rax
je 0x14003440a
mov qword [rsp + 0x528], r13
cmp edi, 0x10
jge 0x140033bb7
xor edi, edi
test esi, esi
je 0x140033b95
cmp esi, 0x100
jg 0x140033b95
movsxd rax, esi
test esi, esi
jle 0x140033617
mov r14d, dword [rsp + 0x20]
lea rsi, [rbx + 0x30]
xor r13d, r13d
mov r12, rax
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400333af
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14003342d
cmp dword [rbx + 0x30], edi
lea rsi, [rbx + 0x30]
je 0x14003342b
mov r8d, dword [rbx + 0x34]
lea rdx, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
call qword [rbx + InitCommonControls]
test eax, eax
jne 0x1400333f2
movq xmm0, rbx
mov dword [rsi], edi
punpcklqdq xmm0, xmm0
paddq xmm0, xmmword [0x140128f40]
movdqu xmmword [rbx + 0xb8], xmm0
mov rax, qword [rbx + 0xb8]
mov byte [rax], dil
jmp 0x140033415
cdqe
movq xmm1, rbx
add rax, rbx
movq xmm0, rax
punpcklqdq xmm1, xmm0
paddq xmm1, xmmword [0x140128f30]
movdqu xmmword [rbx + 0xb8], xmm1
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14003342d
xor cl, cl
mov r15, rsi
mov byte [rbp + r13*4 + 2], cl
cmp rax, qword [rbx + 0xc0]
jae 0x14003344d
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400334c6
cmp dword [rsi], edi
je 0x1400334c4
mov r8d, dword [rbx + 0x34]
lea rdx, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
call qword [rbx + InitCommonControls]
test eax, eax
jne 0x14003348b
movq xmm0, rbx
mov dword [rsi], edi
punpcklqdq xmm0, xmm0
paddq xmm0, xmmword [0x140128f40]
movdqu xmmword [rbx + 0xb8], xmm0
mov rax, qword [rbx + 0xb8]
mov byte [rax], dil
jmp 0x1400334ae
cdqe
movq xmm1, rbx
add rax, rbx
movq xmm0, rax
punpcklqdq xmm1, xmm0
paddq xmm1, xmmword [0x140128f30]
movdqu xmmword [rbx + 0xb8], xmm1
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400334c6
xor cl, cl
mov byte [rbp + r13*4 + 1], cl
mov rcx, qword [rbx + 0xc0]
cmp rax, rcx
jae 0x1400334ed
movzx edx, byte [rax]
lea rsi, [rbx + 0x30]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14003356d
cmp dword [rsi], edi
je 0x14003356b
mov r8d, dword [rbx + 0x34]
lea rdx, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
call qword [rbx + InitCommonControls]
test eax, eax
jne 0x14003352b
movq xmm0, rbx
mov dword [rsi], edi
punpcklqdq xmm0, xmm0
paddq xmm0, xmmword [0x140128f40]
movdqu xmmword [rbx + 0xb8], xmm0
mov rax, qword [rbx + 0xb8]
mov byte [rax], dil
jmp 0x14003354e
cdqe
movq xmm1, rbx
add rax, rbx
movq xmm0, rax
punpcklqdq xmm1, xmm0
paddq xmm1, xmmword [0x140128f30]
movdqu xmmword [rbx + 0xb8], xmm1
mov rax, qword [rbx + 0xb8]
mov rcx, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14003356d
xor dl, dl
mov byte [rbp + r13*4], dl
cmp r14d, 0xc
je 0x1400335f3
cmp rax, rcx
jae 0x140033589
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400335f3
cmp dword [r15], edi
je 0x1400335f3
mov r8d, dword [rbx + 0x34]
lea rdx, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
call qword [rbx + InitCommonControls]
test eax, eax
jne 0x1400335c9
movq xmm0, rbx
mov dword [r15], edi
punpcklqdq xmm0, xmm0
paddq xmm0, xmmword [0x140128f40]
movdqu xmmword [rbx + 0xb8], xmm0
mov rax, qword [rbx + 0xb8]
mov byte [rax], dil
jmp 0x1400335ec
cdqe
movq xmm1, rbx
add rax, rbx
movq xmm0, rax
punpcklqdq xmm1, xmm0
paddq xmm1, xmmword [0x140128f30]
movdqu xmmword [rbx + 0xb8], xmm1
inc qword [rbx + 0xb8]
mov byte [rbp + r13*4 + 3], 0xff
inc r13
cmp r13, r12
jl 0x140033390
mov r14, qword [rbp - 0x68]
mov r12d, dword [rsp + 0x30]
mov esi, dword [rsp + 0x28]
mov r15d, dword [rsp + 0x20]
xor eax, eax
cmp r15d, 0xc
setne al
add eax, 3
imul eax, esi
sub r12d, eax
sub r12d, dword [rsp + 0x60]
sub r12d, r15d
jns 0x140033643
mov rax, qword [rbx + 0xc0]
mov qword [rbx + 0xb8], rax
jmp 0x140033681
cmp qword [rbx + 0x10], rdi
je 0x140033677
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r12d
jge 0x140033677
mov rax, qword [rbx + 0xc0]
sub r12d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r12d
mov qword [rbx + 0xb8], rax
call qword [rbx + 0x18]
jmp 0x140033681
movsxd rax, r12d
add qword [rbx + 0xb8], rax
mov r15d, dword [rsp + 0x2c]
mov eax, InitCommonControls
mov rcx, rbx
lea r12, [rbx + rax]
cmp r15d, 1
jne 0x1400336a5
mov r8d, dword [rbx]
add r8d, 7
shr r8d, 3
jmp 0x1400336c7
cmp r15d, 4
jne 0x1400336ba
mov r8d, dword [rbx]
lea r12, [rbx + 0x10]
inc r8d
shr r8d, 1
jmp 0x1400336c7
cmp r15d, 8
jne 0x140033b2d
mov r8d, dword [rbx]
mov eax, dword [rbx + 4]
neg r8d
and r8d, 3
mov edx, eax
mov dword [rsp + 0x24], r8d
cmp r15d, 1
jne 0x1400338d9
mov dword [rsp + 0x20], edi
test eax, eax
jle 0x140034325
lea r12, [rbx + 0x28]
mov rax, qword [rbx + 0xb8]
mov r15d, 7
cmp rax, qword [rbx + 0xc0]
jae 0x140033717
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140033776
cmp dword [rbx + 0x30], 0
je 0x140033774
mov r8d, dword [rbx + 0x34]
lea rsi, [rbx + 0x38]
mov rcx, qword [r12]
mov rdx, rsi
call qword [rbx + InitCommonControls]
mov qword [rbx + 0xb8], rsi
test eax, eax
jne 0x14003374d
mov dword [rbx + 0x30], eax
lea rax, [rbx + 0x39]
mov qword [rbx + 0xc0], rax
mov byte [rsi], 0
jmp 0x14003375e
movsxd rcx, eax
add rcx, 0x38
add rcx, rbx
mov qword [rbx + 0xc0], rcx
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140033776
xor cl, cl
mov edx, dword [rbx]
xor r13d, r13d
movzx r8d, cl
test edx, edx
jle 0x140033876
nop word [rax + rax]
mov eax, r8d
mov ecx, r15d
sar eax, cl
and eax, 1
lea rcx, [rax*4]
movzx eax, byte [rbp + rcx]
mov byte [rdi + r14], al
movzx eax, byte [rbp + rcx + 1]
mov byte [rdi + r14 + 1], al
movzx eax, byte [rbp + rcx + 2]
mov byte [rdi + r14 + 2], al
lea eax, [r13 + 1]
mov byte [rdi + r14 + 3], 0xff
mov r13d, eax
add rdi, 4
cmp eax, edx
je 0x140033876
sub r15d, 1
jns 0x14003386b
mov rax, qword [rbx + 0xb8]
mov r15d, 7
cmp rax, qword [rbx + 0xc0]
jae 0x140033808
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140033867
cmp dword [rbx + 0x30], 0
je 0x140033865
mov r8d, dword [rbx + 0x34]
lea rsi, [rbx + 0x38]
mov rcx, qword [r12]
mov rdx, rsi
call qword [rbx + InitCommonControls]
mov qword [rbx + 0xb8], rsi
test eax, eax
jne 0x14003383e
mov dword [rbx + 0x30], eax
lea rax, [rbx + 0x39]
mov qword [rbx + 0xc0], rax
mov byte [rsi], 0
jmp 0x14003384f
movsxd rcx, eax
add rcx, 0x38
add rcx, rbx
mov qword [rbx + 0xc0], rcx
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140033867
xor cl, cl
movzx r8d, cl
mov edx, dword [rbx]
cmp r13d, edx
jl 0x140033790
cmp qword [rbx + 0x10], 0
mov r8d, dword [rsp + 0x24]
je 0x1400338af
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r8d
jge 0x1400338af
mov rax, qword [rbx + 0xc0]
mov edx, r8d
sub edx, ecx
mov qword [rbx + 0xb8], rax
mov rcx, qword [r12]
call qword [rbx + 0x18]
jmp 0x1400338bd
mov eax, r8d
lea r12, [rbx + 0x28]
add qword [rbx + 0xb8], rax
mov ecx, dword [rsp + 0x20]
mov eax, dword [rbx + 4]
inc ecx
mov dword [rsp + 0x20], ecx
mov edx, eax
cmp ecx, eax
jl 0x1400336f2
jmp 0x140034325
xor esi, esi
mov dword [rsp + 0x20], esi
test eax, eax
jle 0x140034325
nop word [rax + rax]
xor r13d, r13d
cmp dword [rbx], r13d
jle 0x140033ad2
nop dword [rax]
mov r9, qword [rbx + 0xc0]
lea rsi, [rbx + 0x30]
mov r8, qword [rbx + 0xb8]
cmp r8, r9
jae 0x140033927
movzx ecx, byte [r8]
inc r8
mov qword [rbx + 0xb8], r8
jmp 0x140033993
cmp dword [rsi], 0
je 0x140033991
mov r8d, dword [rbx + 0x34]
lea r15, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
mov rdx, r15
call qword [r12]
mov qword [rbx + 0xb8], r15
test eax, eax
jne 0x140033964
mov dword [rsi], eax
lea rax, [rbx + 0x39]
mov qword [rbx + 0xc0], rax
mov byte [r15], 0
mov r9, qword [rbx + 0xc0]
jmp 0x140033975
movsxd r9, eax
add r9, 0x38
add r9, rbx
mov qword [rbx + 0xc0], r9
mov rax, qword [rbx + 0xb8]
mov r15d, dword [rsp + 0x2c]
movzx ecx, byte [rax]
lea r8, [rax + 1]
mov qword [rbx + 0xb8], r8
jmp 0x140033993
xor cl, cl
xor r11d, r11d
movzx eax, cl
cmp r15d, 4
jne 0x1400339a9
mov r11d, eax
and r11d, 0xf
shr eax, 4
mov r10d, dword [rbx]
lea rdx, [rax*4]
movzx eax, byte [rbp + rdx]
movsxd rcx, edi
inc edi
mov byte [rcx + r14], al
movzx eax, byte [rbp + rdx + 1]
movsxd rcx, edi
inc edi
mov byte [rcx + r14], al
movzx eax, byte [rbp + rdx + 2]
movsxd rcx, edi
inc edi
mov byte [rcx + r14], al
movsxd rax, edi
inc edi
mov byte [rax + r14], 0xff
lea eax, [r13 + 1]
cmp eax, r10d
je 0x140033ac9
cmp r15d, 8
jne 0x140033a80
cmp r8, r9
jae 0x140033a15
movzx ecx, byte [r8]
lea rax, [r8 + 1]
mov qword [rbx + 0xb8], rax
jmp 0x140033a7c
cmp dword [rsi], 0
je 0x140033a7a
mov r8d, dword [rbx + 0x34]
lea r15, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
mov rdx, r15
call qword [r12]
mov qword [rbx + 0xb8], r15
test eax, eax
jne 0x140033a4b
mov dword [rsi], eax
lea rax, [rbx + 0x39]
mov qword [rbx + 0xc0], rax
mov byte [r15], 0
jmp 0x140033a5c
movsxd rcx, eax
add rcx, 0x38
add rcx, rbx
mov qword [rbx + 0xc0], rcx
mov rax, qword [rbx + 0xb8]
mov r15d, dword [rsp + 0x2c]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
mov r10d, dword [rbx]
jmp 0x140033a7c
xor cl, cl
movzx r11d, cl
movsxd rcx, edi
lea rdx, [r11*4]
movzx eax, byte [rbp + rdx]
inc edi
add r13d, 2
mov byte [rcx + r14], al
movzx eax, byte [rbp + rdx + 1]
movsxd rcx, edi
inc edi
mov byte [rcx + r14], al
movzx eax, byte [rbp + rdx + 2]
movsxd rcx, edi
inc edi
mov byte [rcx + r14], al
movsxd rax, edi
inc edi
mov byte [rax + r14], 0xff
cmp r13d, r10d
jl 0x140033900
mov r8d, dword [rsp + 0x24]
mov esi, dword [rsp + 0x20]
cmp qword [r12], 0
je 0x140033b0b
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r8d
jge 0x140033b0b
mov rax, qword [rbx + 0xc0]
mov edx, r8d
sub edx, ecx
mov qword [rbx + 0xb8], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
mov r8d, dword [rsp + 0x24]
jmp 0x140033b15
mov eax, r8d
add qword [rbx + 0xb8], rax
mov eax, dword [rbx + 4]
inc esi
mov dword [rsp + 0x20], esi
mov edx, eax
cmp esi, eax
jl 0x1400338f0
jmp 0x140034325
mov rcx, r14
call fcn.1400a95f0
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 r13, qword [rsp + 0x528]
mov r14, qword [rsp + 0x520]
mov r12, qword [rsp + 0x530]
mov rdi, qword [rsp + 0x538]
mov r15, qword [rsp + 0x518]
mov rcx, qword [rbp + 0x400]
xor rcx, rsp
call fcn.1400a23f0
add rsp, 0x540
pop rsi
pop rbx
pop rbp
ret
mov rcx, r14
call fcn.1400a95f0
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.invalid
jmp 0x140033b4d
sub r12d, dword [rsp + 0x60]
xor r10d, r10d
xor esi, esi
mov dword [rsp + 0x3c], 0
xor edi, edi
mov dword [rsp + 0x50], 0
xor r13d, r13d
mov dword [rsp + 0x54], 0
xor r8d, r8d
mov dword [rsp + 0x20], r10d
sub r12d, r15d
mov dword [rsp + 0x44], esi
jns 0x140033bff
mov rax, qword [rbx + 0xc0]
mov qword [rbx + 0xb8], rax
jmp 0x140033c43
cmp qword [rbx + 0x10], rsi
je 0x140033c39
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r12d
jge 0x140033c39
mov rax, qword [rbx + 0xc0]
sub r12d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r12d
mov qword [rbx + 0xb8], rax
call qword [rbx + 0x18]
mov r8d, esi
mov r10d, esi
jmp 0x140033c43
movsxd rax, r12d
add qword [rbx + 0xb8], rax
mov ecx, dword [rsp + 0x2c]
cmp ecx, 0x18
jne 0x140033c54
mov eax, dword [rbx]
lea r15d, [rax + rax*2]
jmp 0x140033c64
cmp ecx, 0x10
jne 0x140033c61
mov r15d, dword [rbx]
add r15d, r15d
jmp 0x140033c64
xor r15d, r15d
neg r15d
and r15d, 3
mov dword [rsp + 0x30], r15d
cmp ecx, 0x18
jne 0x140033c88
mov r9d, 1
mov r12d, esi
mov qword [rsp + 0x48], r9
jmp 0x140033e7d
mov eax, dword [rsp + 0x40]
xor r9d, r9d
cmp ecx, 0x20
mov qword [rsp + 0x48], r9
mov ecx, dword [rsp + 0x24]
jne 0x140033ceb
mov qword [rsp + 0x48], r9
cmp eax, 0xff
jne 0x140033ceb
mov qword [rsp + 0x48], r9
cmp ecx, 0xff00
jne 0x140033ceb
cmp dword [rsp + 0x38], 0xff0000
mov qword [rsp + 0x48], r9
jne 0x140033ceb
mov r11d, dword [rsp + 0x58]
mov qword [rsp + 0x48], r9
cmp r11d, 0xff000000
jne 0x140033d10
mov r9d, 2
mov r12d, esi
mov qword [rsp + 0x48], r9
jmp 0x140033e7d
mov r10d, dword [rsp + 0x38]
test r10d, r10d
je 0x1400343e5
test ecx, ecx
je 0x1400343e5
test eax, eax
je 0x1400343e5
mov r11d, dword [rsp + 0x58]
jmp 0x140033d15
mov r10d, dword [rsp + 0x38]
mov ecx, r10d
call fcn.140032bd0
mov edx, r10d
mov ecx, r10d
mov r10d, dword [rsp + 0x24]
and ecx, 0x55555555
shr edx, 1
and edx, 0x55555555
lea r12d, [rax - 7]
add edx, ecx
mov dword [rsp + 0x3c], r12d
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, r10d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx edi, al
call fcn.140032bd0
sub eax, 7
mov edx, r10d
shr edx, 1
mov ecx, r10d
mov r10d, dword [rsp + 0x40]
and edx, 0x55555555
and ecx, 0x55555555
mov dword [rsp + 0x50], eax
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, r10d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx esi, al
call fcn.140032bd0
sub eax, 7
mov edx, r10d
shr edx, 1
mov ecx, r10d
and edx, 0x55555555
mov dword [rsp + 0x54], 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 r13d, al
call fcn.140032bd0
mov edx, r11d
mov ecx, r11d
shr edx, 1
and ecx, 0x55555555
and edx, 0x55555555
add edx, ecx
lea r10d, [rax - 7]
mov ecx, edx
mov dword [rsp + 0x20], r10d
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 r8d, al
mov eax, dword [rbx + 4]
xor r11d, r11d
mov dword [rsp + 0x28], r11d
mov edx, eax
test eax, eax
jle 0x140034325
mov eax, r12d
neg eax
mov dword [rbp - 0x70], eax
mov eax, 8
mov ecx, eax
sub ecx, edi
mov dword [rsp + 0x70], ecx
mov ecx, dword [rsp + 0x50]
neg ecx
mov dword [rsp + 0x74], ecx
mov ecx, eax
sub ecx, esi
mov dword [rsp + 0x78], ecx
mov ecx, dword [rsp + 0x54]
neg ecx
mov dword [rsp + 0x7c], ecx
mov ecx, eax
sub ecx, r13d
mov dword [rbp - 0x80], ecx
mov ecx, r10d
neg ecx
sub eax, r8d
mov dword [rbp - 0x7c], ecx
mov dword [rbp - 0x74], eax
mov eax, edi
mov ecx, esi
lea rsi, [rbx + 0xc0]
mov qword [rbp - 0x38], rax
mov eax, r13d
mov r13d, r11d
mov edi, r8d
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x30], rcx
mov qword [rsp + 0x68], rdi
nop
mov eax, dword [rbx]
mov qword [rsp + 0x60], rsi
movsxd rcx, r13d
test r9, r9
je 0x140034133
mov dword [rsp + 0x60], 0
test eax, eax
jle 0x1400342c3
lea r15, [rcx + r14]
lea rdi, [rbx + 0x30]
nop dword [rax + rax]
mov rcx, qword [rsi]
mov rax, qword [rbx + 0xb8]
cmp rax, rcx
jb 0x140033f8d
cmp dword [rbx + 0x30], 0
lea rdi, [rbx + 0x30]
je 0x140033fa8
mov r8d, dword [rbx + 0x34]
lea r12, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
mov rdx, r12
call qword [rbx + InitCommonControls]
mov qword [rbx + 0xb8], r12
test eax, eax
jne 0x140033f79
mov dword [rdi], eax
lea rax, [rbx + 0x39]
mov qword [rsi], rax
mov byte [r12], 0
mov rcx, qword [rsi]
jmp 0x140033f86
movsxd rcx, eax
add rcx, 0x38
add rcx, rbx
mov qword [rsi], rcx
mov rax, qword [rbx + 0xb8]
movzx edx, byte [rax]
mov r13, rdi
inc rax
mov byte [r15 + 2], dl
mov qword [rbx + 0xb8], rax
cmp rax, rcx
jae 0x140033fb0
jmp 0x140033ff9
mov byte [r15 + 2], 0
mov r13, rdi
cmp dword [rdi], 0
je 0x140034022
mov r8d, dword [rbx + 0x34]
lea r12, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
mov rdx, r12
call qword [rbx + InitCommonControls]
mov qword [rbx + 0xb8], r12
test eax, eax
jne 0x140033fe5
mov dword [rdi], eax
lea rax, [rbx + 0x39]
mov qword [rsi], rax
mov byte [r12], 0
mov rcx, qword [rsi]
jmp 0x140033ff2
movsxd rcx, eax
add rcx, 0x38
add rcx, rbx
mov qword [rsi], rcx
mov rax, qword [rbx + 0xb8]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
mov byte [r15 + 1], dl
cmp rax, rcx
jae 0x140034027
movzx edx, byte [rax]
lea rdi, [rbx + 0x30]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140034081
mov byte [r15 + 1], 0
cmp dword [rdi], 0
je 0x14003407f
mov r8d, dword [rbx + 0x34]
lea r12, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
mov rdx, r12
call qword [rbx + InitCommonControls]
mov qword [rbx + 0xb8], r12
test eax, eax
jne 0x14003405c
mov dword [rdi], eax
lea rax, [rbx + 0x39]
mov qword [rsi], rax
mov byte [r12], 0
mov rcx, qword [rsi]
jmp 0x140034069
movsxd rcx, eax
add rcx, 0x38
add rcx, rbx
mov qword [rsi], rcx
mov rax, qword [rbx + 0xb8]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140034081
xor dl, dl
cmp qword [rsp + 0x48], 2
mov byte [r15], dl
jne 0x1400340fd
cmp rax, rcx
jae 0x1400340a0
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400340ff
cmp dword [r13], 0
je 0x1400340f9
mov r8d, dword [rbx + 0x34]
lea r12, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
mov rdx, r12
call qword [rbx + InitCommonControls]
mov qword [rbx + 0xb8], r12
test eax, eax
jne 0x1400340d6
mov dword [r13], eax
lea rax, [rbx + 0x39]
mov qword [rsi], rax
mov byte [r12], 0
jmp 0x1400340e3
movsxd rcx, eax
add rcx, 0x38
add rcx, rbx
mov qword [rsi], rcx
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400340ff
xor cl, cl
jmp 0x1400340ff
mov cl, 0xff
mov r13d, dword [rsp + 0x44]
mov edx, dword [rsp + 0x60]
add r13d, 4
inc edx
movzx eax, cl
or dword [rsp + 0x34], eax
mov byte [r15 + 3], cl
add r15, 4
mov dword [rsp + 0x44], r13d
mov dword [rsp + 0x60], edx
cmp edx, dword [rbx]
jl 0x140033f30
jmp 0x1400342b9
xor r12d, r12d
test eax, eax
jle 0x1400342c3
mov esi, dword [rbp - 0x74]
lea r15, [rcx + r14]
mov r14d, dword [rsp + 0x2c]
nop word [rax + rax]
mov rcx, rbx
call fcn.140028fd0
cmp r14d, 0x10
jne 0x140034163
mov r8d, eax
jmp 0x14003417c
mov rcx, rbx
mov edi, eax
call fcn.140028fd0
mov r8d, eax
shl r8d, 0x10
add r8d, edi
mov rdi, qword [rsp + 0x68]
mov r9d, dword [rsp + 0x3c]
lea r11, [0x140000000]
mov r10, qword [rbp - 0x38]
mov ecx, r9d
mov edx, r8d
and edx, dword [rsp + 0x38]
mov eax, edx
shr eax, cl
mov ecx, dword [rbp - 0x70]
shl edx, cl
mov ecx, dword [rsp + 0x70]
test r9d, r9d
mov r9d, dword [rsp + 0x50]
cmovns edx, eax
shr edx, cl
imul edx, dword [r11 + r10*4 + 0x116890]
mov ecx, dword [r11 + r10*4 + 0x116868]
mov r10, qword [rbp - 0x30]
sar edx, cl
mov ecx, r9d
mov byte [r15], dl
mov edx, r8d
and edx, dword [rsp + 0x24]
mov eax, edx
shr eax, cl
mov ecx, dword [rsp + 0x74]
shl edx, cl
mov ecx, dword [rsp + 0x78]
test r9d, r9d
mov r9d, dword [rsp + 0x54]
cmovns edx, eax
shr edx, cl
imul edx, dword [r11 + r10*4 + 0x116890]
mov ecx, dword [r11 + r10*4 + 0x116868]
mov r10, qword [rbp - 0x28]
sar edx, cl
mov ecx, r9d
mov byte [r15 + 1], dl
mov edx, r8d
and edx, dword [rsp + 0x40]
mov eax, edx
shr eax, cl
mov ecx, dword [rsp + 0x7c]
shl edx, cl
mov ecx, dword [rbp - 0x80]
test r9d, r9d
cmovns edx, eax
shr edx, cl
imul edx, dword [r11 + r10*4 + 0x116890]
mov ecx, dword [r11 + r10*4 + 0x116868]
mov r11d, dword [rsp + 0x58]
sar edx, cl
mov byte [r15 + 2], dl
test r11d, r11d
je 0x140034288
mov r10d, dword [rsp + 0x20]
and r8d, r11d
mov eax, r8d
mov ecx, r10d
shr eax, cl
mov ecx, dword [rbp - 0x7c]
shl r8d, cl
mov ecx, esi
test r10d, r10d
cmovns r8d, eax
lea rax, [0x140000000]
shr r8d, cl
imul r8d, dword [rax + rdi*4 + 0x116890]
mov ecx, dword [rax + rdi*4 + 0x116868]
sar r8d, cl
jmp 0x14003428e
mov r8d, 0xff
or dword [rsp + 0x34], r8d
add r13d, 4
mov byte [r15 + 3], r8b
inc r12d
add r15, 4
cmp r12d, dword [rbx]
jl 0x140034150
mov rsi, qword [rsp + 0x60]
mov r14, qword [rbp - 0x68]
mov dword [rsp + 0x44], r13d
mov r11d, dword [rsp + 0x28]
mov r15d, dword [rsp + 0x30]
cmp qword [rbx + 0x10], 0
je 0x1400342f4
mov ecx, dword [rsi]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r15d
jge 0x1400342fb
mov rax, qword [rsi]
mov edx, r15d
sub edx, ecx
mov qword [rbx + 0xb8], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
mov r11d, dword [rsp + 0x28]
jmp 0x140034305
lea rsi, [rbx + 0xc0]
mov eax, r15d
add qword [rbx + 0xb8], rax
mov eax, dword [rbx + 4]
inc r11d
mov r9, qword [rsp + 0x48]
mov edx, eax
mov rdi, qword [rsp + 0x68]
mov dword [rsp + 0x28], r11d
cmp r11d, eax
jl 0x140033f00
cmp dword [rsp + 0x34], 0
jne 0x14003434e
imul eax, dword [rbx]
lea eax, [rax*4 - 1]
movsxd rcx, eax
test eax, eax
js 0x14003434e
nop dword [rax]
mov byte [rcx + r14], 0xff
sub rcx, 4
jns 0x140034340
mov edx, dword [rbx + 4]
cmp dword [rbp - 0x78], 0
jle 0x1400343be
xor r10d, r10d
test edx, 0xfffffffe
jle 0x1400343be
nop
mov ecx, dword [rbx]
sub edx, r10d
dec edx
mov r9d, ecx
imul edx, ecx
xor r8d, r8d
imul r9d, r10d
lea eax, [rcx*4]
shl edx, 2
mov r11d, edx
add rdx, r14
shl r9d, 2
test eax, eax
jle 0x1400343af
sub r9, r11
nop
movzx eax, byte [rdx]
inc r8d
movzx ecx, byte [r9 + rdx]
mov byte [r9 + rdx], al
mov byte [rdx], cl
lea rdx, [rdx + 1]
mov eax, dword [rbx]
shl eax, 2
cmp r8d, eax
jl 0x140034390
mov edx, dword [rbx + 4]
inc r10d
mov eax, edx
sar eax, 1
cmp r10d, eax
jl 0x140034360
mov eax, dword [rbx]
mov rcx, qword [rbp - 0x20]
mov dword [rcx], eax
mov rcx, qword [rbp - 0x18]
mov eax, dword [rbx + 4]
mov dword [rcx], eax
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x1400343dd
mov eax, dword [rbx + 8]
mov dword [rcx], eax
mov rax, r14
jmp 0x140033b53
mov rcx, r14
call fcn.1400a95f0
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.bad_masks
jmp 0x140033b4d
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.outofmem
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x140033b5b
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 0x140033b63