Function at 0x140180e40
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push r13
sub rsp, 0x4c8
lea rdx, [rsp + 0x70]
mov dword [rsp + 0x8c], 0xff
mov rbx, rcx
xor r13d, r13d
call fcn.140180950
test rax, rax
je 0x140180ead
mov ecx, dword [rbx + 4]
mov eax, ecx
neg eax
mov dword [rsp + 0x64], ecx
cmovs eax, ecx
mov dword [rbx + 4], eax
cmp eax, 0x1000000
jbe 0x140180eba
mov rax, qword gs:[0x58]
mov edx, 0x28
mov rcx, qword [rax]
lea rax, str.too_large
mov qword [rdx + rcx], rax
xor eax, eax
add rsp, 0x4c8
pop r13
pop rbx
ret
cmp dword [rbx], 0x1000000
ja 0x140180e91
mov eax, dword [rsp + 0x7c]
mov r8d, dword [rsp + 0x88]
mov dword [rsp + 0x508], eax
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x84]
mov qword [rsp + 0x4e0], rbp
mov ebp, dword [rsp + 0x78]
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x8c]
mov qword [rsp + 0x4b8], rdi
mov edi, dword [rsp + 0x70]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x90]
mov qword [rsp + 0x4a8], r14
mov r14d, dword [rsp + 0x74]
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x500], r8d
mov dword [rsp + 0x38], r14d
mov dword [rsp + 0x24], ebp
mov dword [rsp + 0x34], edi
cmp ebp, 0xc
jne 0x140180f60
cmp edi, 0x18
jge 0x140180f7b
mov ecx, r14d
sub ecx, eax
mov eax, 0x55555556
sub ecx, 0x18
imul ecx
mov r13d, edx
shr r13d, 0x1f
add r13d, edx
jmp 0x140180f72
cmp edi, 0x10
jge 0x140180f7b
mov r13d, r14d
sub r13d, eax
sub r13d, ebp
sar r13d, 2
test r13d, r13d
jne 0x140181010
mov edx, dword [rbx + 0xb8]
sub edx, dword [rbx + 0xd0]
mov r8d, dword [rbx + 0xc0]
add edx, r8d
lea eax, [rdx - 1]
cmp eax, 0x3ff
ja 0x140181e41
cmp r14d, edx
jl 0x140181e1e
mov ecx, r14d
sub ecx, edx
cmp ecx, 0x400
jg 0x140181e1e
test ecx, ecx
je 0x140181008
jns 0x140180fcf
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x140181008
cmp qword [rbx + 0x10], 0
je 0x140180ffe
mov edx, dword [rbx + 0xc8]
sub edx, r8d
cmp edx, ecx
jge 0x140180ffe
mov rax, qword [rbx + 0xc8]
sub ecx, edx
mov edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x140181008
movsxd rax, ecx
add qword [rbx + 0xc0], rax
mov r8d, dword [rsp + 0x500]
mov qword [rsp + 0x4b0], r12
cmp edi, 0x18
jne 0x14018102c
cmp r8d, 0xff000000
jne 0x14018102c
lea r12d, [rdi - 0x15]
jmp 0x14018103a
xor r12d, r12d
test r8d, r8d
setne r12b
add r12d, 3
mov dword [rbx + 8], r12d
mov ecx, dword [rbx]
mov r9d, dword [rbx + 4]
test ecx, ecx
js 0x140181dfb
je 0x14018105f
mov eax, 0x7fffffff
cdq
idiv ecx
cmp r12d, eax
jg 0x140181dfb
mov r8d, r12d
imul r8d, ecx
test r8d, r8d
js 0x140181dfb
test r9d, r9d
js 0x140181dfb
je 0x14018108c
mov eax, 0x7fffffff
cdq
idiv r9d
cmp r8d, eax
jg 0x140181dfb
mov qword [rsp + 0x4c0], rsi
test ecx, ecx
je 0x1401810a9
mov eax, 0x7fffffff
cdq
idiv ecx
cmp r12d, eax
jg 0x140181dd8
mov r8d, ecx
imul r8d, r12d
test r9d, r9d
je 0x1401810c7
mov eax, 0x7fffffff
cdq
idiv r9d
cmp r8d, eax
jg 0x140181dd8
imul ecx, r9d
mov eax, r12d
imul eax, ecx
movsxd rcx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x68], rax
mov rsi, rax
test rax, rax
je 0x140181dd8
mov qword [rsp + 0x4a0], r15
cmp edi, 0x10
jge 0x1401816ec
xor edi, edi
test r13d, r13d
je 0x1401816c9
cmp r13d, 0x100
jg 0x1401816c9
test r13d, r13d
jle 0x14018126f
mov r14d, dword [rsp + 0x24]
lea rbp, [rbx + 0x30]
xor r15d, r15d
movsxd rsi, r13d
nop dword [rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14018114f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140181178
cmp dword [rbx + 0x30], edi
lea rbp, [rbx + 0x30]
je 0x140181176
mov rcx, rbx
call fcn.140176ed0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140181178
xor cl, cl
mov qword [rsp + 0x508], rbp
mov byte [rsp + r15*4 + 0xa2], cl
cmp rax, qword [rbx + 0xc8]
jae 0x1401811a0
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401811c5
cmp dword [rbp], edi
je 0x1401811c3
mov rcx, rbx
call fcn.140176ed0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401811c5
xor cl, cl
mov byte [rsp + r15*4 + 0xa1], cl
cmp rax, qword [rbx + 0xc8]
jae 0x1401811e9
movzx ecx, byte [rax]
lea rbp, [rbx + 0x30]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14018120e
cmp dword [rbp], edi
je 0x14018120c
mov rcx, rbx
call fcn.140176ed0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14018120e
xor cl, cl
mov byte [rsp + r15*4 + 0xa0], cl
cmp r14d, 0xc
je 0x14018124c
cmp rax, qword [rbx + 0xc8]
jae 0x140181231
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14018124c
mov rax, qword [rsp + 0x508]
cmp dword [rax], edi
je 0x14018124c
mov rcx, rbx
call fcn.140176ed0
inc qword [rbx + 0xc0]
mov byte [rsp + r15*4 + 0xa3], 0xff
inc r15
cmp r15, rsi
jl 0x140181130
mov rsi, qword [rsp + 0x68]
mov r14d, dword [rsp + 0x38]
mov ebp, dword [rsp + 0x24]
xor eax, eax
cmp ebp, 0xc
setne al
add eax, 3
imul eax, r13d
sub r14d, eax
sub r14d, dword [rsp + 0x20]
sub r14d, ebp
je 0x1401812de
test r14d, r14d
jns 0x1401812a0
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x1401812de
cmp qword [rbx + 0x10], rdi
je 0x1401812d4
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r14d
jge 0x1401812d4
mov rax, qword [rbx + 0xc8]
sub r14d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r14d
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
jmp 0x1401812de
movsxd rax, r14d
add qword [rbx + 0xc0], rax
mov r14d, dword [rsp + 0x34]
cmp r14d, 1
jne 0x1401812f6
mov r15d, dword [rbx]
add r15d, 7
shr r15d, 3
jmp 0x140181314
cmp r14d, 4
jne 0x140181307
mov r15d, dword [rbx]
inc r15d
shr r15d, 1
jmp 0x140181314
cmp r14d, 8
jne 0x140181667
mov r15d, dword [rbx]
mov eax, dword [rbx + 4]
neg r15d
and r15d, 3
xor r13d, r13d
mov edx, eax
cmp r14d, 1
jne 0x1401814a8
test eax, eax
jle 0x140181cde
nop word [rax + rax]
mov rax, qword [rbx + 0xc0]
mov ebp, 7
cmp rax, qword [rbx + 0xc8]
jae 0x140181364
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14018138a
cmp dword [rbx + 0x30], 0
je 0x140181388
mov rcx, rbx
call fcn.140176ed0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14018138a
xor cl, cl
xor r14d, r14d
movzx edx, cl
cmp dword [rbx], r14d
jle 0x14018144f
nop dword [rax]
mov eax, edx
mov ecx, ebp
sar eax, cl
and eax, 1
lea rcx, [rax*4]
movzx eax, byte [rsp + rcx + 0xa0]
mov byte [rdi + rsi], al
movzx eax, byte [rsp + rcx + 0xa1]
mov byte [rdi + rsi + 1], al
movzx eax, byte [rsp + rcx + 0xa2]
mov byte [rdi + rsi + 2], al
add rdi, 3
cmp r12d, 4
jne 0x1401813e5
mov byte [rdi + rsi], 0xff
inc rdi
mov ecx, dword [rbx]
lea eax, [r14 + 1]
mov r14d, eax
cmp eax, ecx
je 0x14018144f
sub ebp, 1
jns 0x140181446
mov rax, qword [rbx + 0xc0]
mov ebp, 7
cmp rax, qword [rbx + 0xc8]
jae 0x14018141b
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140181443
cmp dword [rbx + 0x30], 0
je 0x140181441
mov rcx, rbx
call fcn.140176ed0
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov ecx, dword [rbx]
jmp 0x140181443
xor dl, dl
movzx edx, dl
cmp r14d, ecx
jl 0x1401813a0
test r15d, r15d
je 0x140181492
cmp qword [rbx + 0x10], 0
je 0x140181488
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r15d
jge 0x140181488
mov rax, qword [rbx + 0xc8]
mov edx, r15d
sub edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x140181492
mov eax, r15d
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc r13d
mov edx, eax
cmp r13d, eax
jl 0x140181340
jmp 0x140181cde
test eax, eax
jle 0x140181cde
xor ebp, ebp
cmp dword [rbx], ebp
jle 0x14018160e
nop word [rax + rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1401814df
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140181505
cmp dword [rbx + 0x30], 0
je 0x140181503
mov rcx, rbx
call fcn.140176ed0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140181505
xor cl, cl
xor r8d, r8d
movzx eax, cl
cmp r14d, 4
jne 0x14018151b
mov r8d, eax
and r8d, 0xf
shr eax, 4
movsxd rcx, edi
lea rdx, [rax*4]
movzx eax, byte [rsp + rdx + 0xa0]
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rsp + rdx + 0xa1]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rsp + rdx + 0xa2]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
cmp r12d, 4
jne 0x140181562
movsxd rax, edi
inc edi
mov byte [rax + rsi], 0xff
lea eax, [rbp + 1]
cmp eax, dword [rbx]
je 0x14018160e
cmp r14d, 8
jne 0x1401815bc
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x140181592
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401815b8
cmp dword [rbx + 0x30], 0
je 0x1401815b6
mov rcx, rbx
call fcn.140176ed0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401815b8
xor cl, cl
movzx r8d, cl
movsxd rcx, edi
lea rdx, [r8*4]
movzx eax, byte [rsp + rdx + 0xa0]
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rsp + rdx + 0xa1]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rsp + rdx + 0xa2]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
cmp r12d, 4
jne 0x140181603
movsxd rax, edi
inc edi
mov byte [rax + rsi], 0xff
add ebp, 2
cmp ebp, dword [rbx]
jl 0x1401814c0
test r15d, r15d
je 0x140181651
cmp qword [rbx + 0x10], 0
je 0x140181647
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r15d
jge 0x140181647
mov rax, qword [rbx + 0xc8]
mov edx, r15d
sub edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x140181651
mov eax, r15d
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc r13d
mov edx, eax
cmp r13d, eax
jl 0x1401814b0
jmp 0x140181cde
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword gs:[0x58]
mov edx, 0x28
mov rcx, qword [rax]
lea rax, str.bad_bpp
mov qword [rdx + rcx], rax
xor eax, eax
mov r15, qword [rsp + 0x4a0]
mov rsi, qword [rsp + 0x4c0]
mov r12, qword [rsp + 0x4b0]
mov rdi, qword [rsp + 0x4b8]
mov rbp, qword [rsp + 0x4e0]
mov r14, qword [rsp + 0x4a8]
add rsp, 0x4c8
pop r13
pop rbx
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, 0x28
mov rcx, qword [rax]
lea rax, str.invalid
jmp 0x140181688
sub r14d, dword [rsp + 0x20]
xor edx, edx
mov dword [rsp + 0x4c], edx
mov r15d, edx
mov dword [rsp + 0x54], edx
mov dword [rsp + 0x5c], edx
mov dword [rsp + 0x38], edx
mov dword [rsp + 0x24], edx
mov dword [rsp + 0x50], edx
mov dword [rsp + 0x58], edx
mov dword [rsp + 0x60], edx
sub r14d, ebp
je 0x140181770
test r14d, r14d
jns 0x140181730
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x140181770
cmp qword [rbx + 0x10], rdx
je 0x140181766
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r14d
jge 0x140181766
mov rax, qword [rbx + 0xc8]
sub r14d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r14d
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
xor edx, edx
jmp 0x140181770
movsxd rax, r14d
add qword [rbx + 0xc0], rax
cmp edi, 0x18
jne 0x14018177d
mov eax, dword [rbx]
lea r8d, [rax + rax*2]
jmp 0x14018178d
cmp edi, 0x10
jne 0x14018178a
mov r8d, dword [rbx]
add r8d, r8d
jmp 0x14018178d
mov r8d, edx
neg r8d
and r8d, 3
mov dword [rsp + 0x30], r8d
cmp edi, 0x18
jne 0x1401817ae
mov r13d, 1
mov qword [rsp + 0x40], r13
jmp 0x1401819e2
mov r10d, dword [rsp + 0x48]
mov r13, rdx
mov r11d, dword [rsp + 0x2c]
mov qword [rsp + 0x40], rdx
cmp edi, 0x20
jne 0x14018181b
mov qword [rsp + 0x40], rdx
cmp r10d, 0xff
jne 0x14018181b
mov ecx, dword [rsp + 0x508]
mov qword [rsp + 0x40], rdx
cmp r11d, 0xff00
jne 0x140181822
mov qword [rsp + 0x40], rdx
cmp ecx, 0xff0000
jne 0x140181822
mov r9d, dword [rsp + 0x500]
mov qword [rsp + 0x40], rdx
cmp r9d, 0xff000000
jne 0x140181844
mov r13d, 2
mov qword [rsp + 0x40], r13
jmp 0x1401819e2
mov ecx, dword [rsp + 0x508]
test ecx, ecx
je 0x140181db2
test r11d, r11d
je 0x140181db2
test r10d, r10d
je 0x140181db2
mov r9d, dword [rsp + 0x500]
call fcn.1401807e0
mov edx, dword [rsp + 0x508]
sub eax, 7
mov ecx, dword [rsp + 0x508]
shr edx, 1
and ecx, 0x55555555
and edx, 0x55555555
mov dword [rsp + 0x4c], 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, r11d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx eax, al
mov dword [rsp + 0x24], eax
call fcn.1401807e0
sub eax, 7
mov edx, r11d
shr edx, 1
mov ecx, r11d
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, r10d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r14d, al
mov dword [rsp + 0x50], r14d
call fcn.1401807e0
sub eax, 7
mov edx, r10d
shr edx, 1
mov ecx, r10d
and edx, 0x55555555
mov dword [rsp + 0x5c], 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, r9d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx ebp, al
mov dword [rsp + 0x58], ebp
call fcn.1401807e0
sub eax, 7
mov edx, r9d
shr edx, 1
mov ecx, r9d
and edx, 0x55555555
mov dword [rsp + 0x38], 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
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
cmp dword [rsp + 0x24], 8
movzx r10d, al
mov dword [rsp + 0x60], r10d
ja 0x140181db2
cmp r14d, 8
ja 0x140181db2
cmp ebp, 8
ja 0x140181db2
cmp r10d, 8
ja 0x140181db2
mov r8d, dword [rsp + 0x30]
mov eax, dword [rbx + 4]
xor ebp, ebp
mov dword [rsp + 0x20], ebp
mov edx, eax
test eax, eax
jle 0x140181cde
nop word [rax + rax]
mov eax, dword [rbx]
movsxd rcx, r15d
test r13, r13
je 0x140181bd9
xor ebp, ebp
test eax, eax
jle 0x140181b88
lea r14, [rcx + rsi]
lea rdi, [rbx + 0x30]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x140181a3f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140181a69
cmp dword [rbx + 0x30], 0
lea rdi, [rbx + 0x30]
je 0x140181a67
mov rcx, rbx
call fcn.140176ed0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140181a69
xor cl, cl
mov byte [r14 + 2], cl
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x140181a8c
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140181ab1
cmp dword [rdi], 0
je 0x140181aaf
mov rcx, rbx
call fcn.140176ed0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140181ab1
xor cl, cl
mov byte [r14 + 1], cl
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x140181ad4
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140181af9
cmp dword [rdi], 0
je 0x140181af7
mov rcx, rbx
call fcn.140176ed0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140181af9
xor cl, cl
mov byte [r14], cl
add r15d, 3
add r14, 3
cmp r13, 2
jne 0x140181b5d
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x140181b29
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140181b4f
cmp dword [rbx + 0x30], 0
je 0x140181b4d
mov rcx, rbx
call fcn.140176ed0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140181b4f
xor cl, cl
mov edx, 0x30
mov rax, rbx
lea rdi, [rbx + rdx]
jmp 0x140181b63
mov cl, 0xff
lea rdi, [rbx + 0x30]
movzx eax, cl
or dword [rsp + 0x28], eax
cmp r12d, 4
jne 0x140181b79
inc r15d
mov byte [r14], cl
inc r14
inc ebp
cmp ebp, dword [rbx]
jl 0x140181a20
mov r8d, dword [rsp + 0x30]
mov ebp, dword [rsp + 0x20]
test r8d, r8d
je 0x140181cc7
cmp qword [rbx + 0x10], 0
je 0x140181cbd
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r8d
jge 0x140181cbd
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 + 0x30]
jmp 0x140181cc7
test eax, eax
jle 0x140181cb3
lea r14, [rcx + rsi]
mov esi, dword [rsp + 0x500]
nop dword [rax]
mov rcx, rbx
call fcn.1401770e0
cmp edi, 0x10
jne 0x140181c01
mov ebp, eax
jmp 0x140181c16
mov rcx, rbx
mov edi, eax
call fcn.1401770e0
mov ebp, eax
shl ebp, 0x10
add ebp, edi
mov edi, dword [rsp + 0x34]
mov r8d, dword [rsp + 0x24]
mov ecx, ebp
and ecx, dword [rsp + 0x508]
mov edx, dword [rsp + 0x4c]
call fcn.140180850
mov r8d, dword [rsp + 0x50]
mov ecx, ebp
and ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x54]
mov byte [r14], al
call fcn.140180850
mov r8d, dword [rsp + 0x58]
mov ecx, ebp
and ecx, dword [rsp + 0x48]
mov edx, dword [rsp + 0x5c]
mov byte [r14 + 1], al
call fcn.140180850
mov byte [r14 + 2], al
add r15d, 3
add r14, 3
test esi, esi
je 0x140181c80
mov r8d, dword [rsp + 0x60]
and ebp, esi
mov edx, dword [rsp + 0x38]
mov ecx, ebp
call fcn.140180850
jmp 0x140181c85
mov eax, 0xff
or dword [rsp + 0x28], eax
cmp r12d, 4
jne 0x140181c98
inc r15d
mov byte [r14], al
inc r14
inc r13d
cmp r13d, dword [rbx]
jl 0x140181bf0
mov rsi, qword [rsp + 0x68]
mov r13, qword [rsp + 0x40]
jmp 0x140181b83
mov r13, qword [rsp + 0x40]
jmp 0x140181b8c
mov eax, r8d
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc ebp
mov edi, dword [rsp + 0x34]
mov edx, eax
mov dword [rsp + 0x20], ebp
cmp ebp, eax
jl 0x140181a00
mov ecx, edx
cmp r12d, 4
jne 0x140181d0e
cmp dword [rsp + 0x28], 0
jne 0x140181d0e
imul eax, dword [rbx]
lea eax, [rax*4 - 1]
movsxd r8, eax
test eax, eax
js 0x140181d0e
nop
mov byte [r8 + rsi], 0xff
sub r8, 4
jns 0x140181d00
mov ecx, dword [rbx + 4]
cmp dword [rsp + 0x64], 0
jle 0x140181d82
xor r10d, r10d
mov edx, ecx
test ecx, 0xfffffffe
jle 0x140181d82
mov ecx, dword [rbx]
sub edx, r10d
dec edx
mov r9d, r12d
imul edx, r12d
mov eax, r12d
imul r9d, r10d
xor r8d, r8d
imul eax, ecx
imul edx, ecx
imul r9d, ecx
add rdx, rsi
add r9, rsi
test eax, eax
jle 0x140181d71
sub r9, rdx
movzx eax, byte [rdx]
inc r8d
movzx ecx, byte [rdx + r9]
mov byte [rdx + r9], al
mov eax, r12d
mov byte [rdx], cl
lea rdx, [rdx + 1]
imul eax, dword [rbx]
cmp r8d, eax
jl 0x140181d51
mov ecx, dword [rbx + 4]
inc r10d
mov eax, ecx
mov edx, ecx
sar eax, 1
cmp r10d, eax
jl 0x140181d22
mov eax, dword [rbx]
mov rdx, qword [rsp + 0x4e8]
mov dword [rdx], eax
mov rax, qword [rsp + 0x4f0]
mov dword [rax], ecx
mov rcx, qword [rsp + 0x4f8]
test rcx, rcx
je 0x140181daa
mov eax, dword [rbx + 8]
mov dword [rcx], eax
mov rax, rsi
jmp 0x14018168e
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword gs:[0x58]
mov edx, 0x28
mov rcx, qword [rax]
lea rax, str.bad_masks
jmp 0x140181688
mov rax, qword gs:[0x58]
mov edx, 0x28
mov rcx, qword [rax]
lea rax, str.outofmem
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x140181696
mov rax, qword gs:[0x58]
mov edx, 0x28
mov rcx, qword [rax]
lea rax, str.too_large
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x14018169e
mov rax, qword gs:[0x58]
mov edx, 0x28
mov rcx, qword [rax]
lea rax, str.bad_offset
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x1401816a6
mov rax, qword gs:[0x58]
mov edx, 0x28
mov rcx, qword [rax]
lea rax, str.bad_header
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x1401816a6