Function at 0x1400936a0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x4e8
mov rax, qword [0x140139700]
xor rax, rsp
mov qword [rsp + 0x4d0], rax
mov ebp, dword [rsp + 0x550]
xor r13d, r13d
mov qword [rsp + 0xb0], rdx
mov r14d, r13d
lea rdx, [rsp + 0x60]
mov qword [rsp + 0xc0], r9
mov qword [rsp + 0xb8], r8
mov rbx, rcx
mov dword [rsp + 0xa0], ebp
mov dword [rsp + 0x7c], 0xff
call fcn.140094350
test rax, rax
je 0x140094315
mov eax, dword [rbx + 4]
mov r15d, dword [rsp + 0x68]
mov esi, dword [rsp + 0x64]
mov edi, dword [rsp + 0x60]
mov dword [rsp + 0x9c], eax
cdq
mov r8d, eax
mov eax, dword [rsp + 0x7c]
xor r8d, edx
mov dword [rsp + 0x30], eax
sub r8d, edx
mov dword [rbx + 4], r8d
cmp r15d, 0xc
jne 0x14009375e
cmp edi, 0x18
jge 0x140093771
lea ecx, [rsi - 0x26]
mov eax, 0x55555556
imul ecx
mov r14d, edx
shr r14d, 0x1f
add r14d, edx
jmp 0x140093771
cmp edi, 0x10
jge 0x140093771
mov r14d, esi
sub r14d, r15d
sub r14d, 0xe
sar r14d, 2
cmp dword [rsp + 0x78], r13d
mov r12d, r13d
mov ecx, dword [rbx]
setne r12b
add r12d, 3
cmp ebp, 3
mov dword [rbx + 8], r12d
cmovge r12d, ebp
test r12d, r12d
js 0x140094307
test ecx, ecx
js 0x140094307
je 0x1400937b2
mov eax, 0x7fffffff
cdq
idiv ecx
cmp r12d, eax
jg 0x140094307
mov r9d, ecx
imul r9d, r12d
test r9d, r9d
js 0x140094307
test r8d, r8d
js 0x140094307
je 0x1400937df
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x140094307
test ecx, ecx
js 0x14009433b
je 0x1400937fa
mov eax, 0x7fffffff
cdq
idiv ecx
cmp r12d, eax
jg 0x14009433b
test r9d, r9d
js 0x14009433b
test r8d, r8d
js 0x14009433b
je 0x140093820
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x14009433b
imul ecx, r8d
imul ecx, r12d
movsxd rcx, ecx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0xa8], rax
mov rbp, rax
test rax, rax
je 0x14009433b
cmp edi, 0x10
jge 0x140093bb0
mov edi, r13d
test r14d, r14d
je 0x1400942fe
cmp r14d, 0x100
jg 0x1400942fe
movsxd r13, r14d
test r14d, r14d
jle 0x1400939a3
mov rax, qword [rbx + 0xb8]
xor esi, esi
nop dword [rax]
mov rcx, qword [rbx + 0xc0]
cmp rax, rcx
jae 0x14009389b
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400938c7
cmp dword [rbx + 0x30], edi
je 0x1400938c5
mov rcx, rbx
call fcn.1400a0a20
mov rax, qword [rbx + 0xb8]
mov rcx, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400938c7
xor dl, dl
mov byte [rsp + rsi*4 + 0xd2], dl
cmp rax, rcx
jae 0x1400938e2
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14009390e
cmp dword [rbx + 0x30], edi
je 0x14009390c
mov rcx, rbx
call fcn.1400a0a20
mov rax, qword [rbx + 0xb8]
mov rcx, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14009390e
xor dl, dl
mov byte [rsp + rsi*4 + 0xd1], dl
cmp rax, rcx
jae 0x140093929
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14009394e
cmp dword [rbx + 0x30], edi
je 0x14009394c
mov rcx, rbx
call fcn.1400a0a20
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14009394e
xor cl, cl
mov byte [rsp + rsi*4 + 0xd0], cl
cmp r15d, 0xc
je 0x14009398b
cmp rax, qword [rbx + 0xc0]
jae 0x140093970
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14009398b
cmp dword [rbx + 0x30], edi
je 0x14009398b
mov rcx, rbx
call fcn.1400a0a20
inc qword [rbx + 0xb8]
mov rax, qword [rbx + 0xb8]
mov byte [rsp + rsi*4 + 0xd3], 0xff
inc rsi
cmp rsi, r13
jl 0x140093880
mov esi, dword [rsp + 0x64]
xor eax, eax
mov rcx, rbx
cmp r15d, 0xc
setne al
add eax, 3
imul eax, r14d
sub esi, eax
sub esi, r15d
lea edx, [rsi - 0xe]
call fcn.1400a1120
mov r13d, dword [rsp + 0x60]
cmp r13d, 4
jne 0x1400939d9
mov r14d, dword [rbx]
inc r14d
shr r14d, 1
jmp 0x1400939e6
cmp r13d, 8
jne 0x1400942fe
mov r14d, dword [rbx]
mov eax, dword [rbx + 4]
neg r14d
and r14d, 3
xor r15d, r15d
test eax, eax
jle 0x1400941f8
nop dword [rax + rax]
xor esi, esi
cmp dword [rbx], esi
jle 0x140093b5e
nop word [rax + rax]
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x140093a2f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140093a55
cmp dword [rbx + 0x30], 0
je 0x140093a53
mov rcx, rbx
call fcn.1400a0a20
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140093a55
xor cl, cl
xor r8d, r8d
movzx eax, cl
cmp r13d, 4
jne 0x140093a6b
mov r8d, eax
and r8d, 0xf
shr eax, 4
movsxd rcx, edi
lea rdx, [rax*4]
movzx eax, byte [rsp + rdx + 0xd0]
inc edi
mov byte [rcx + rbp], al
movzx eax, byte [rsp + rdx + 0xd1]
movsxd rcx, edi
inc edi
mov byte [rcx + rbp], al
movzx eax, byte [rsp + rdx + 0xd2]
movsxd rcx, edi
inc edi
mov byte [rcx + rbp], al
cmp r12d, 4
jne 0x140093ab2
movsxd rax, edi
inc edi
mov byte [rax + rbp], 0xff
lea eax, [rsi + 1]
cmp eax, dword [rbx]
je 0x140093b5e
cmp r13d, 8
jne 0x140093b0c
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x140093ae2
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140093b08
cmp dword [rbx + 0x30], 0
je 0x140093b06
mov rcx, rbx
call fcn.1400a0a20
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140093b08
xor cl, cl
movzx r8d, cl
movsxd rcx, edi
lea rdx, [r8*4]
movzx eax, byte [rsp + rdx + 0xd0]
inc edi
mov byte [rcx + rbp], al
movzx eax, byte [rsp + rdx + 0xd1]
movsxd rcx, edi
inc edi
mov byte [rcx + rbp], al
movzx eax, byte [rsp + rdx + 0xd2]
movsxd rcx, edi
inc edi
mov byte [rcx + rbp], al
cmp r12d, 4
jne 0x140093b53
movsxd rax, edi
inc edi
mov byte [rax + rbp], 0xff
add esi, 2
cmp esi, dword [rbx]
jl 0x140093a10
cmp qword [rbx + 0x10], 0
je 0x140093b92
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r14d
jge 0x140093b92
mov rax, qword [rbx + 0xc0]
mov edx, r14d
sub edx, ecx
mov qword [rbx + 0xb8], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x140093b9c
mov eax, r14d
add qword [rbx + 0xb8], rax
mov eax, dword [rbx + 4]
inc r15d
cmp r15d, eax
jl 0x140093a00
jmp 0x1400941f8
sub esi, dword [rsp + 0x68]
xor ecx, ecx
xor eax, eax
mov dword [rsp + 0x4c], ecx
xor r15d, r15d
mov dword [rsp + 0x34], r13d
mov rcx, rbx
mov dword [rsp + 0x38], r13d
lea edx, [rsi - 0xe]
mov dword [rsp + 0x3c], r13d
mov dword [rsp + 0x40], r13d
xor r14d, r14d
mov dword [rsp + 0x58], r13d
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x54], r15d
call fcn.1400a1120
cmp edi, 0x18
jne 0x140093bfb
mov eax, dword [rbx]
lea esi, [rax + rax*2]
jmp 0x140093c08
cmp edi, 0x10
jne 0x140093c06
mov esi, dword [rbx]
add esi, esi
jmp 0x140093c08
xor esi, esi
mov eax, dword [rsp + 0x74]
neg esi
mov r11d, dword [rsp + 0x6c]
and esi, 3
mov dword [rsp + 0x50], esi
cmp edi, 0x18
jne 0x140093c33
lea edx, [rdi - 0x17]
mov r10d, r13d
mov edi, r13d
mov r8d, r13d
mov r11d, r13d
jmp 0x140093e0c
cmp edi, 0x20
mov edi, dword [rsp + 0x70]
jne 0x140093c78
cmp eax, 0xff
jne 0x140093c78
cmp edi, 0xff00
jne 0x140093c78
cmp r11d, 0xff0000
jne 0x140093c78
mov r9d, dword [rsp + 0x78]
cmp r9d, 0xff000000
jne 0x140093c96
mov edx, 2
mov r10d, r13d
mov r8d, r13d
mov r11d, r13d
mov edi, r13d
jmp 0x140093e0c
test r11d, r11d
je 0x1400942fe
test edi, edi
je 0x1400942fe
test eax, eax
je 0x1400942fe
mov r9d, dword [rsp + 0x78]
mov ecx, r11d
call fcn.140099050
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 + 0x34], r10d
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 r13d, al
mov dword [rsp + 0x58], r13d
call fcn.140099050
mov r15d, dword [rsp + 0x74]
mov edx, edi
shr edx, 1
mov ecx, edi
and edx, 0x55555555
and ecx, 0x55555555
add edx, ecx
lea r11d, [rax - 7]
mov ecx, edx
mov dword [rsp + 0x38], r11d
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, r15d
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 + 0x48], eax
call fcn.140099050
mov edx, r15d
mov ecx, r15d
shr edx, 1
and ecx, 0x55555555
and edx, 0x55555555
add edx, ecx
lea edi, [rax - 7]
mov ecx, edx
mov dword [rsp + 0x3c], edi
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 ecx, al
mov dword [rsp + 0x4c], ecx
mov ecx, r9d
call fcn.140099050
mov edx, r9d
mov ecx, r9d
shr edx, 1
and ecx, 0x55555555
and edx, 0x55555555
add edx, ecx
lea r8d, [rax - 7]
mov ecx, edx
mov dword [rsp + 0x40], r8d
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 r15d, al
xor edx, edx
mov dword [rsp + 0x54], r15d
mov eax, dword [rbx + 4]
xor r9d, r9d
mov qword [rsp + 0x80], rdx
mov dword [rsp + 0x44], r9d
test eax, eax
jle 0x1400941f8
mov eax, r10d
neg eax
mov dword [rsp + 0x8c], eax
mov eax, r11d
neg eax
mov dword [rsp + 0x90], eax
mov eax, edi
neg eax
mov dword [rsp + 0x94], eax
mov eax, r8d
neg eax
mov dword [rsp + 0x98], eax
nop word [rax + rax]
mov eax, dword [rbx]
movsxd rcx, r14d
test rdx, rdx
je 0x140093ff6
xor r13d, r13d
test eax, eax
jle 0x140094192
lea rdi, [rcx + rbp]
lea rsi, [rdi + 1]
lea r15, [rdi + 2]
nop word [rax + rax]
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x140093eaf
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140093ed5
cmp dword [rbx + 0x30], 0
je 0x140093ed3
mov rcx, rbx
call fcn.1400a0a20
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140093ed5
xor cl, cl
mov byte [r15], cl
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x140093ef7
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140093f1d
cmp dword [rbx + 0x30], 0
je 0x140093f1b
mov rcx, rbx
call fcn.1400a0a20
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140093f1d
xor cl, cl
mov byte [rsi], cl
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x140093f3e
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140093f64
cmp dword [rbx + 0x30], 0
je 0x140093f62
mov rcx, rbx
call fcn.1400a0a20
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140093f64
xor cl, cl
mov byte [rdi], cl
add r14d, 3
add rdi, 3
add r15, 3
add rsi, 3
cmp qword [rsp + 0x80], 2
jne 0x140093fc8
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x140093fa0
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140093fca
cmp dword [rbx + 0x30], 0
je 0x140093fc4
mov rcx, rbx
call fcn.1400a0a20
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140093fca
xor cl, cl
jmp 0x140093fca
mov cl, 0xff
movzx eax, cl
or dword [rsp + 0x30], eax
cmp r12d, 4
jne 0x140093fe5
inc r14d
mov byte [rdi], cl
inc r15
inc rsi
inc rdi
inc r13d
cmp r13d, dword [rbx]
jl 0x140093e90
jmp 0x140094189
mov dword [rsp + 0x88], 0
test eax, eax
jle 0x140094192
lea rsi, [rcx + rbp]
mov ebp, dword [rsp + 0x88]
mov rcx, rbx
call fcn.1400971e0
cmp dword [rsp + 0x60], 0x10
mov edi, eax
je 0x140094032
mov rcx, rbx
call fcn.1400971e0
shl eax, 0x10
add edi, eax
mov r10d, dword [rsp + 0x34]
mov edx, edi
and edx, dword [rsp + 0x6c]
mov ecx, r10d
mov eax, edx
sar eax, cl
mov ecx, dword [rsp + 0x8c]
shl edx, cl
mov ecx, r13d
test r10d, r10d
cmovns edx, eax
mov r8d, edx
cmp r13d, 8
jae 0x14009406f
nop
mov eax, edx
sar eax, cl
add ecx, r13d
add r8d, eax
cmp ecx, 8
jl 0x140094060
mov r11d, dword [rsp + 0x38]
mov edx, edi
and edx, dword [rsp + 0x70]
mov ecx, r11d
mov r9d, dword [rsp + 0x48]
mov eax, edx
sar eax, cl
mov ecx, dword [rsp + 0x90]
shl edx, cl
mov ecx, r9d
test r11d, r11d
mov byte [rsi], r8b
cmovns edx, eax
mov r8d, edx
cmp r9d, 8
jae 0x1400940bf
nop dword [rax]
nop dword [rax + rax]
mov eax, edx
sar eax, cl
add ecx, r9d
add r8d, eax
cmp ecx, 8
jl 0x1400940b0
mov r9d, dword [rsp + 0x4c]
mov edx, edi
and edx, dword [rsp + 0x74]
mov eax, edx
mov byte [rsi + 1], r8b
mov r8d, dword [rsp + 0x3c]
mov ecx, r8d
sar eax, cl
mov ecx, dword [rsp + 0x94]
shl edx, cl
mov ecx, r9d
test r8d, r8d
cmovns edx, eax
mov r8d, edx
cmp r9d, 8
jae 0x14009410f
nop word [rax + rax]
mov eax, edx
sar eax, cl
add ecx, r9d
add r8d, eax
cmp ecx, 8
jl 0x140094100
mov eax, dword [rsp + 0x78]
add r14d, 3
mov byte [rsi + 2], r8b
add rsi, 3
test eax, eax
je 0x140094160
mov r8d, dword [rsp + 0x40]
and edi, eax
mov eax, edi
mov ecx, r8d
sar eax, cl
mov ecx, dword [rsp + 0x98]
shl edi, cl
mov ecx, r15d
test r8d, r8d
cmovns edi, eax
mov edx, edi
cmp r15d, 8
jae 0x140094165
nop dword [rax + rax]
mov eax, edi
sar eax, cl
add ecx, r15d
add edx, eax
cmp ecx, 8
jl 0x140094150
jmp 0x140094165
mov edx, 0xff
or dword [rsp + 0x30], edx
cmp r12d, 4
jne 0x140094177
inc r14d
mov byte [rsi], dl
inc rsi
inc ebp
cmp ebp, dword [rbx]
jl 0x140094014
mov rbp, qword [rsp + 0xa8]
mov r9d, dword [rsp + 0x44]
mov esi, dword [rsp + 0x50]
cmp qword [rbx + 0x10], 0
je 0x1400941c9
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, esi
jge 0x1400941c9
mov rax, qword [rbx + 0xc0]
mov edx, esi
sub edx, ecx
mov qword [rbx + 0xb8], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
mov r9d, dword [rsp + 0x44]
jmp 0x1400941d2
mov eax, esi
add qword [rbx + 0xb8], rax
mov eax, dword [rbx + 4]
inc r9d
mov r15d, dword [rsp + 0x54]
mov r13d, dword [rsp + 0x58]
mov rdx, qword [rsp + 0x80]
mov dword [rsp + 0x44], r9d
cmp r9d, eax
jl 0x140093e60
cmp r12d, 4
jne 0x140094220
cmp dword [rsp + 0x30], 0
jne 0x140094220
imul eax, dword [rbx]
lea eax, [rax*4 - 1]
movsxd rcx, eax
test eax, eax
js 0x140094220
mov byte [rcx + rbp], 0xff
sub rcx, 4
jns 0x140094216
cmp dword [rsp + 0x9c], 0
jle 0x14009429f
mov edx, dword [rbx + 4]
xor r10d, r10d
test edx, 0xfffffffe
jle 0x14009429f
nop dword [rax + rax]
mov ecx, dword [rbx]
sub edx, r10d
dec edx
mov r9d, ecx
imul edx, ecx
xor r8d, r8d
imul r9d, r10d
imul ecx, r12d
imul edx, r12d
imul r9d, r12d
mov eax, edx
add rdx, rbp
test ecx, ecx
jle 0x140094290
sub r9, rax
nop dword [rax]
movzx eax, byte [rdx]
inc r8d
movzx ecx, byte [rdx + r9]
mov byte [rdx + r9], al
mov byte [rdx], cl
lea rdx, [rdx + 1]
mov eax, dword [rbx]
imul eax, r12d
cmp r8d, eax
jl 0x140094270
mov edx, dword [rbx + 4]
inc r10d
mov eax, edx
sar eax, 1
cmp r10d, eax
jl 0x140094240
mov r8d, dword [rsp + 0xa0]
test r8d, r8d
je 0x1400942ce
cmp r8d, r12d
je 0x1400942ce
mov eax, dword [rbx + 4]
mov edx, r12d
mov r9d, dword [rbx]
mov rcx, rbp
mov dword [rsp + 0x20], eax
call fcn.140095280
mov rbp, rax
test rax, rax
je 0x140094315
mov eax, dword [rbx]
mov rcx, qword [rsp + 0xb0]
mov dword [rcx], eax
mov rcx, qword [rsp + 0xb8]
mov eax, dword [rbx + 4]
mov dword [rcx], eax
mov rcx, qword [rsp + 0xc0]
test rcx, rcx
je 0x1400942f9
mov eax, dword [rbx + 8]
mov dword [rcx], eax
mov rax, rbp
jmp 0x140094317
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rax, str.Corrupt_BMP
mov qword [0x1402c1f10], rax
xor eax, eax
mov rcx, qword [rsp + 0x4d0]
xor rcx, rsp
call fcn.1400b2050
add rsp, 0x4e8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
lea rax, str.Out_of_memory
jmp 0x14009430e