Function at 0x140020690
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xfd0]
mov eax, 0x10d0
call fcn.1401547f0
sub rsp, rax
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rsp + 0x1108], rbx
mov qword [rsp + 0x1110], rsi
mov qword [rsp + 0x1118], rdi
mov rax, qword [0x1401b5030]
xor rax, rsp
mov qword [rbp + 0xfc0], rax
mov rdi, rcx
mov qword [rsp + 0x48], rcx
lea rbx, [rcx + 0x15c0]
mov qword [rbp - 0x78], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov r13, qword [rdi + 0x12b8]
mov qword [rsp + 0x58], r13
mov rcx, r13
call qword [sym.imp.USER32.dll_GetDC]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], r13
xorps xmm0, xmm0
movups xmmword [rbp - 0x58], xmm0
xor edx, edx
mov r8d, 0x3f4
lea rcx, [rbp - 0x3c]
call fcn.14011fff0
xor r15d, r15d
mov r12d, r15d
cmp byte [rdi + 0x5213], r12b
sete r12b
mov dword [rbp - 0x70], 0x28
movzx edx, byte [rdi + 0x5210]
mov word [rbp - 0x62], dx
movzx ecx, word [rdi + 0x2ce]
movzx eax, word [rdi + 0x2cc]
mov r8d, edx
shr r8d, 3
imul r8d, ecx
imul r8d, eax
mov dword [rbp - 0x5c], r8d
mov r14d, 1
mov word [rbp - 0x64], r14w
mov dword [rbp - 0x6c], eax
neg ecx
mov dword [rbp - 0x68], ecx
mov eax, r15d
mov ecx, 3
cmp dl, 8
cmova eax, ecx
mov dword [rbp - 0x60], eax
movzx eax, word [rdi + 0x5214]
movzx ecx, byte [rdi + 0x521a]
shl eax, cl
mov dword [rbp - 0x48], eax
movzx eax, word [rdi + 0x5216]
movzx ecx, byte [rdi + 0x521b]
shl eax, cl
mov dword [rbp - 0x44], eax
movzx eax, word [rdi + 0x5218]
movzx ecx, byte [rdi + 0x521c]
shl eax, cl
mov dword [rbp - 0x40], eax
cmp r8d, 0x2540be40
jbe 0x1400207e5
xor ecx, ecx
call fcn.140110950
cmp byte [rdi + 0xd6b8], r15b
je 0x14002085d
mov rsi, qword [rdi + 0xd6b0]
cmp byte [rsi + 0x84], r14b
jne 0x14002081d
cmp byte [rsi + 0xac], r14b
je 0x14002081d
mov rcx, qword [rsi + 0x38]
test rcx, rcx
je 0x14002081d
mov rax, qword [rcx]
call qword [rax + 0x70]
mov byte [rsi + 0x84], r15b
mov rcx, qword [rsi + 0x38]
test rcx, rcx
je 0x140020830
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
mov qword [rsi + 0x38], r15
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x140020843
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
mov qword [rsi + 0x30], r15
mov rcx, qword [rsi + 0x28]
test rcx, rcx
je 0x140020856
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
mov qword [rsi + 0x28], r15
mov byte [rdi + 0xd6b8], r15b
mov rcx, qword [rdi + 0xd660]
test rcx, rcx
je 0x14002087d
call qword [sym.imp.GDI32.dll_DeleteDC]
mov qword [rdi + 0xd660], r15
mov qword [rdi + 0xd670], r15
mov rcx, qword [rdi + 0xd668]
test rcx, rcx
je 0x140020896
call qword [sym.imp.GDI32.dll_DeleteObject]
mov qword [rdi + 0xd668], r15
mov rcx, qword [rdi + 0x4d18]
call qword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov qword [rdi + 0xd660], rax
lea r15, [rdi + 0xd670]
mov qword [rsp + 0x50], r15
xor ecx, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rcx
mov r9, r15
mov r8d, r12d
lea rdx, [rbp - 0x70]
mov rcx, rax
call qword [sym.imp.GDI32.dll_CreateDIBSection]
mov qword [rdi + 0xd668], rax
mov r8d, dword [rbp - 0x5c]
mov edx, 0x80
mov rcx, qword [r15]
call fcn.14011fff0
mov rsi, qword [rdi + 0xd660]
mov qword [rsp + 0x68], rsi
mov rdx, qword [rdi + 0xd668]
mov rcx, rsi
call qword [sym.imp.GDI32.dll_SelectObject]
mov r12, rax
mov qword [rsp + 0x60], rax
cmp byte [rdi + 0x5210], 8
jne 0x140020a7d
cmp byte [rdi + 0x5213], 0
je 0x140020a7d
xor r8d, r8d
movzx ecx, byte [rdi + 0x5211]
shl r14d, cl
test r14d, r14d
jle 0x140020a1d
movzx ebx, byte [rdi + 0x521c]
movzx eax, byte [rdi + 0x521b]
mov dword [rsp + 0x40], eax
movzx eax, byte [rdi + 0x521a]
mov dword [rsp + 0x44], eax
movzx r15d, word [rdi + 0x5218]
mov r10d, r15d
shr r10d, 1
movzx r12d, word [rdi + 0x5216]
mov r11d, r12d
shr r11d, 1
movzx r13d, word [rdi + 0x5214]
mov esi, r13d
shr esi, 1
lea r9, [rbp + 0x3c4]
mov edi, dword [rsp + 0x40]
nop dword [rax]
nop word [rax + rax]
mov eax, r8d
mov ecx, ebx
sar eax, cl
and eax, r15d
imul eax, eax, 0xffff
add eax, r10d
cdq
idiv r15d
mov dword [r9 + 4], eax
mov eax, r8d
mov ecx, edi
sar eax, cl
and eax, r12d
imul eax, eax, 0xffff
add eax, r11d
cdq
idiv r12d
mov dword [r9], eax
mov eax, r8d
mov ecx, dword [rsp + 0x44]
sar eax, cl
and eax, r13d
imul eax, eax, 0xffff
add eax, esi
cdq
idiv r13d
mov dword [r9 - 4], eax
inc r8d
lea r9, [r9 + 0xc]
cmp r8d, r14d
jl 0x1400209a0
mov rdi, qword [rsp + 0x48]
lea rbx, [rdi + 0x15c0]
mov rsi, qword [rsp + 0x68]
mov r15, qword [rsp + 0x50]
mov r12, qword [rsp + 0x60]
mov r13, qword [rsp + 0x58]
xor r14d, r14d
mov edx, r14d
lea rcx, [rbp + 0x3c4]
nop word [rax + rax]
mov eax, dword [rcx - 4]
sar eax, 8
mov byte [rbp + rdx*4 - 0x46], al
mov eax, dword [rcx]
sar eax, 8
mov byte [rbp + rdx*4 - 0x47], al
mov eax, dword [rcx + 4]
sar eax, 8
mov byte [rbp + rdx*4 - 0x48], al
mov byte [rbp + rdx*4 - 0x45], r14b
inc rdx
lea rcx, [rcx + 0xc]
cmp rdx, 0x100
jl 0x140020a30
lea r9, [rbp - 0x48]
xor edx, edx
mov r8d, 0x100
mov rcx, qword [rdi + 0xd660]
call qword [sym.imp.GDI32.dll_SetDIBColorTable]
jmp 0x140020a80
xor r14d, r14d
mov rax, qword [rdi + 0xd748]
cmp byte [rax + 0x398], 0
je 0x140020af4
mov rcx, qword [rdi + 0xd678]
test rcx, rcx
je 0x140020aa1
call fcn.14011b120
movzx ecx, byte [rdi + 0x5210]
movzx eax, word [rdi + 0x2cc]
imul ecx, eax
shr ecx, 3
mov edx, ecx
and edx, 3
je 0x140020ac5
mov eax, 4
sub eax, edx
add ecx, eax
movzx eax, word [rdi + 0x2ce]
imul eax, ecx
movsxd rcx, eax
call fcn.14011b4c0
mov qword [rdi + 0xd678], rax
lea r8, str.Cache:_Cache_buffer_bitmap_creation_n
xor edx, edx
lea rcx, vtable.Log.0
call fcn.1400153f0
nop
mov rdx, r12
mov rcx, rsi
call qword [sym.imp.GDI32.dll_SelectObject]
mov rax, qword [rdi + 0xd748]
cmp byte [rax + 0x324], 0
je 0x140020c4e
cmp byte [rax + 0x6d4], 0
jne 0x140020c4e
movzx ecx, byte [rdi + 0x5210]
lea eax, [rcx - 0x10]
test al, 0xef
jne 0x140020c4e
movzx eax, byte [rdi + 0x521a]
movzx edx, word [rdi + 0x2ce]
movzx r9d, word [rdi + 0x2cc]
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], ecx
mov dword [rsp + 0x20], edx
mov r8, qword [rdi + 0xd760]
mov rdx, qword [rdi + 0x12b8]
mov rcx, qword [rdi + 0xd6b0]
call fcn.14003c380
test eax, eax
js 0x140020c4e
mov rsi, qword [rdi + 0xd6b0]
movzx eax, byte [rdi + 0x5210]
cmp byte [rsi + 8], al
jne 0x140020be6
mov byte [rdi + 0xd6b8], 1
movzx eax, byte [rsi + 0x18]
mov byte [rdi + 0x521a], al
movzx eax, byte [rsi + 0x1c]
mov byte [rdi + 0x521b], al
movzx eax, byte [rsi + 0x20]
mov byte [rdi + 0x521c], al
mov rcx, qword [rdi + 0xd668]
test rcx, rcx
je 0x140020bc8
call qword [sym.imp.GDI32.dll_DeleteObject]
mov qword [rdi + 0xd668], r14
mov rcx, qword [rdi + 0xd660]
test rcx, rcx
je 0x140020c4e
call qword [sym.imp.GDI32.dll_DeleteDC]
mov qword [rdi + 0xd660], r14
mov qword [r15], r14
jmp 0x140020c4e
cmp byte [rsi + 0x84], 1
jne 0x140020c0e
cmp byte [rsi + 0xac], 1
je 0x140020c0e
mov rcx, qword [rsi + 0x38]
test rcx, rcx
je 0x140020c0e
mov rax, qword [rcx]
call qword [rax + 0x70]
mov byte [rsi + 0x84], 0
mov rcx, qword [rsi + 0x38]
test rcx, rcx
je 0x140020c21
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
mov qword [rsi + 0x38], r14
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x140020c34
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
mov qword [rsi + 0x30], r14
mov rcx, qword [rsi + 0x28]
test rcx, rcx
je 0x140020c47
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
mov qword [rsi + 0x28], r14
mov byte [rdi + 0xd6b8], 0
mov rdx, qword [rsp + 0x70]
mov rcx, r13
call qword [sym.imp.USER32.dll_ReleaseDC]
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbp + 0xfc0]
xor rcx, rsp
call fcn.14011b0c0
lea r11, [rsp + 0x10d0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret