Function at 0x140093fd0
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 [0x14013a700]
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.140094c80
test rax, rax
je 0x140094c45
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 0x14009408e
cmp edi, 0x18
jge 0x1400940a1
lea ecx, [rsi - 0x26]
mov eax, 0x55555556
imul ecx
mov r14d, edx
shr r14d, 0x1f
add r14d, edx
jmp 0x1400940a1
cmp edi, 0x10
jge 0x1400940a1
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 0x140094c37
test ecx, ecx
js 0x140094c37
je 0x1400940e2
mov eax, 0x7fffffff
cdq
idiv ecx
cmp r12d, eax
jg 0x140094c37
mov r9d, ecx
imul r9d, r12d
test r9d, r9d
js 0x140094c37
test r8d, r8d
js 0x140094c37
je 0x14009410f
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x140094c37
test ecx, ecx
js 0x140094c6b
je 0x14009412a
mov eax, 0x7fffffff
cdq
idiv ecx
cmp r12d, eax
jg 0x140094c6b
test r9d, r9d
js 0x140094c6b
test r8d, r8d
js 0x140094c6b
je 0x140094150
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x140094c6b
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 0x140094c6b
cmp edi, 0x10
jge 0x1400944e0
mov edi, r13d
test r14d, r14d
je 0x140094c2e
cmp r14d, 0x100
jg 0x140094c2e
movsxd r13, r14d
test r14d, r14d
jle 0x1400942d3
mov rax, qword [rbx + 0xb8]
xor esi, esi
nop dword [rax]
mov rcx, qword [rbx + 0xc0]
cmp rax, rcx
jae 0x1400941cb
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400941f7
cmp dword [rbx + 0x30], edi
je 0x1400941f5
mov rcx, rbx
call fcn.1400a1350
mov rax, qword [rbx + 0xb8]
mov rcx, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400941f7
xor dl, dl
mov byte [rsp + rsi*4 + 0xd2], dl
cmp rax, rcx
jae 0x140094212
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14009423e
cmp dword [rbx + 0x30], edi
je 0x14009423c
mov rcx, rbx
call fcn.1400a1350
mov rax, qword [rbx + 0xb8]
mov rcx, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14009423e
xor dl, dl
mov byte [rsp + rsi*4 + 0xd1], dl
cmp rax, rcx
jae 0x140094259
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14009427e
cmp dword [rbx + 0x30], edi
je 0x14009427c
mov rcx, rbx
call fcn.1400a1350
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14009427e
xor cl, cl
mov byte [rsp + rsi*4 + 0xd0], cl
cmp r15d, 0xc
je 0x1400942bb
cmp rax, qword [rbx + 0xc0]
jae 0x1400942a0
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400942bb
cmp dword [rbx + 0x30], edi
je 0x1400942bb
mov rcx, rbx
call fcn.1400a1350
inc qword [rbx + 0xb8]
mov rax, qword [rbx + 0xb8]
mov byte [rsp + rsi*4 + 0xd3], 0xff
inc rsi
cmp rsi, r13
jl 0x1400941b0
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.1400a1a50
mov r13d, dword [rsp + 0x60]
cmp r13d, 4
jne 0x140094309
mov r14d, dword [rbx]
inc r14d
shr r14d, 1
jmp 0x140094316
cmp r13d, 8
jne 0x140094c2e
mov r14d, dword [rbx]
mov eax, dword [rbx + 4]
neg r14d
and r14d, 3
xor r15d, r15d
test eax, eax
jle 0x140094b28
nop dword [rax + rax]
xor esi, esi
cmp dword [rbx], esi
jle 0x14009448e
nop word [rax + rax]
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x14009435f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140094385
cmp dword [rbx + 0x30], 0
je 0x140094383
mov rcx, rbx
call fcn.1400a1350
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140094385
xor cl, cl
xor r8d, r8d
movzx eax, cl
cmp r13d, 4
jne 0x14009439b
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 0x1400943e2
movsxd rax, edi
inc edi
mov byte [rax + rbp], 0xff
lea eax, [rsi + 1]
cmp eax, dword [rbx]
je 0x14009448e
cmp r13d, 8
jne 0x14009443c
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x140094412
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140094438
cmp dword [rbx + 0x30], 0
je 0x140094436
mov rcx, rbx
call fcn.1400a1350
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140094438
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 0x140094483
movsxd rax, edi
inc edi
mov byte [rax + rbp], 0xff
add esi, 2
cmp esi, dword [rbx]
jl 0x140094340
cmp qword [rbx + 0x10], 0
je 0x1400944c2
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r14d
jge 0x1400944c2
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 0x1400944cc
mov eax, r14d
add qword [rbx + 0xb8], rax
mov eax, dword [rbx + 4]
inc r15d
cmp r15d, eax
jl 0x140094330
jmp 0x140094b28
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.1400a1a50
cmp edi, 0x18
jne 0x14009452b
mov eax, dword [rbx]
lea esi, [rax + rax*2]
jmp 0x140094538
cmp edi, 0x10
jne 0x140094536
mov esi, dword [rbx]
add esi, esi
jmp 0x140094538
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 0x140094563
lea edx, [rdi - 0x17]
mov r10d, r13d
mov edi, r13d
mov r8d, r13d
mov r11d, r13d
jmp 0x14009473c
cmp edi, 0x20
mov edi, dword [rsp + 0x70]
jne 0x1400945a8
cmp eax, 0xff
jne 0x1400945a8
cmp edi, 0xff00
jne 0x1400945a8
cmp r11d, 0xff0000
jne 0x1400945a8
mov r9d, dword [rsp + 0x78]
cmp r9d, 0xff000000
jne 0x1400945c6
mov edx, 2
mov r10d, r13d
mov r8d, r13d
mov r11d, r13d
mov edi, r13d
jmp 0x14009473c
test r11d, r11d
je 0x140094c2e
test edi, edi
je 0x140094c2e
test eax, eax
je 0x140094c2e
mov r9d, dword [rsp + 0x78]
mov ecx, r11d
call fcn.140099980
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.140099980
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.140099980
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.140099980
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 0x140094b28
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 0x140094926
xor r13d, r13d
test eax, eax
jle 0x140094ac2
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 0x1400947df
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140094805
cmp dword [rbx + 0x30], 0
je 0x140094803
mov rcx, rbx
call fcn.1400a1350
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140094805
xor cl, cl
mov byte [r15], cl
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x140094827
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14009484d
cmp dword [rbx + 0x30], 0
je 0x14009484b
mov rcx, rbx
call fcn.1400a1350
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14009484d
xor cl, cl
mov byte [rsi], cl
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x14009486e
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140094894
cmp dword [rbx + 0x30], 0
je 0x140094892
mov rcx, rbx
call fcn.1400a1350
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140094894
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 0x1400948f8
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400948d0
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400948fa
cmp dword [rbx + 0x30], 0
je 0x1400948f4
mov rcx, rbx
call fcn.1400a1350
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400948fa
xor cl, cl
jmp 0x1400948fa
mov cl, 0xff
movzx eax, cl
or dword [rsp + 0x30], eax
cmp r12d, 4
jne 0x140094915
inc r14d
mov byte [rdi], cl
inc r15
inc rsi
inc rdi
inc r13d
cmp r13d, dword [rbx]
jl 0x1400947c0
jmp 0x140094ab9
mov dword [rsp + 0x88], 0
test eax, eax
jle 0x140094ac2
lea rsi, [rcx + rbp]
mov ebp, dword [rsp + 0x88]
mov rcx, rbx
call fcn.140097b10
cmp dword [rsp + 0x60], 0x10
mov edi, eax
je 0x140094962
mov rcx, rbx
call fcn.140097b10
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 0x14009499f
nop
mov eax, edx
sar eax, cl
add ecx, r13d
add r8d, eax
cmp ecx, 8
jl 0x140094990
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 0x1400949ef
nop dword [rax]
nop dword [rax + rax]
mov eax, edx
sar eax, cl
add ecx, r9d
add r8d, eax
cmp ecx, 8
jl 0x1400949e0
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 0x140094a3f
nop word [rax + rax]
mov eax, edx
sar eax, cl
add ecx, r9d
add r8d, eax
cmp ecx, 8
jl 0x140094a30
mov eax, dword [rsp + 0x78]
add r14d, 3
mov byte [rsi + 2], r8b
add rsi, 3
test eax, eax
je 0x140094a90
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 0x140094a95
nop dword [rax + rax]
mov eax, edi
sar eax, cl
add ecx, r15d
add edx, eax
cmp ecx, 8
jl 0x140094a80
jmp 0x140094a95
mov edx, 0xff
or dword [rsp + 0x30], edx
cmp r12d, 4
jne 0x140094aa7
inc r14d
mov byte [rsi], dl
inc rsi
inc ebp
cmp ebp, dword [rbx]
jl 0x140094944
mov rbp, qword [rsp + 0xa8]
mov r9d, dword [rsp + 0x44]
mov esi, dword [rsp + 0x50]
cmp qword [rbx + 0x10], 0
je 0x140094af9
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, esi
jge 0x140094af9
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 0x140094b02
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 0x140094790
cmp r12d, 4
jne 0x140094b50
cmp dword [rsp + 0x30], 0
jne 0x140094b50
imul eax, dword [rbx]
lea eax, [rax*4 - 1]
movsxd rcx, eax
test eax, eax
js 0x140094b50
mov byte [rcx + rbp], 0xff
sub rcx, 4
jns 0x140094b46
cmp dword [rsp + 0x9c], 0
jle 0x140094bcf
mov edx, dword [rbx + 4]
xor r10d, r10d
test edx, 0xfffffffe
jle 0x140094bcf
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 0x140094bc0
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 0x140094ba0
mov edx, dword [rbx + 4]
inc r10d
mov eax, edx
sar eax, 1
cmp r10d, eax
jl 0x140094b70
mov r8d, dword [rsp + 0xa0]
test r8d, r8d
je 0x140094bfe
cmp r8d, r12d
je 0x140094bfe
mov eax, dword [rbx + 4]
mov edx, r12d
mov r9d, dword [rbx]
mov rcx, rbp
mov dword [rsp + 0x20], eax
call fcn.140095bb0
mov rbp, rax
test rax, rax
je 0x140094c45
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 0x140094c29
mov eax, dword [rbx + 8]
mov dword [rcx], eax
mov rax, rbp
jmp 0x140094c47
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rax, str.Corrupt_BMP
mov qword [0x1402c30e0], rax
xor eax, eax
mov rcx, qword [rsp + 0x4d0]
xor rcx, rsp
call fcn.1400b2990
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 0x140094c3e