Function at 0x41b6aa
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, 0x45fb38
call fcn.0045d320
sub esp, 0x44
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
movzx eax, word [edi + 6]
movzx ecx, word [edi + 4]
imul eax, ecx
mov ebx, dword [esi + 0x3aa8]
mov ecx, esi
imul ebx, eax
push ebx
call fcn.00418776
push ebx
mov ecx, esi
push dword [esi + 0xbc]
call fcn.004186a8
mov al, byte [esi + 0x3a67]
lea ecx, [esi + 0xdc]
mov byte [ebp - 0xe], al
mov ax, word [esi + 0x3a61]
mov word [ebp - 0x34], ax
mov al, byte [esi + 0x3a68]
mov byte [ebp - 0xd], al
mov ax, word [esi + 0x3a63]
mov word [ebp - 0x30], ax
mov al, byte [esi + 0x3a69]
mov byte [ebp + 0xb], al
mov ax, word [esi + 0x3a65]
mov word [ebp - 0x2c], ax
mov dword [ebp - 0x3c], ecx
call fcn.0043789c
mov ecx, dword [esi + 0x38e4]
mov eax, dword [esi + 0x38e8]
and dword [ebp - 4], 0
push ecx
push eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x4c], eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x50], eax
mov eax, dword [esi + 0x38ec]
mov ebx, dword [esi + 0x38e8]
push 0
push eax
push ebx
mov dword [ebp - 0x44], ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
mov dword [ebp - 0x48], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov al, byte [esi + 0x3a5e]
mov byte [ebp - 4], 2
cmp al, 8
je 0x41b9a0
cmp al, 0x10
je 0x41b8ae
cmp al, 0x18
je 0x41b7bb
cmp al, 0x20
je 0x41b7bb
movzx eax, al
push eax
push str.ERROR:_Invalid_number_of_bits_per_pixel:__d
push str.C:projectsAmmyy_sources_viewer_vrClientRaw.cpp
push 0
push 0x47a230
call fcn.0040e807
add esp, 0x14
jmp 0x41ba8c
mov eax, dword [esi + 0xbc]
movzx ecx, word [edi + 6]
mov dword [ebp - 0x20], eax
movzx eax, word [edi + 2]
add ecx, eax
mov dword [ebp - 0x28], eax
cmp eax, ecx
jge 0x41ba8c
movzx eax, word [edi]
movzx ecx, word [edi + 4]
add ecx, eax
mov dword [ebp - 0x24], eax
cmp eax, ecx
jge 0x41b893
movzx eax, byte [ebp + 0xb]
mov dword [ebp - 0x14], eax
movzx eax, byte [ebp - 0xd]
mov dword [ebp - 0x18], eax
movzx eax, byte [ebp - 0xe]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov ebx, dword [eax]
mov eax, ebx
shr eax, cl
movzx ecx, word [ebp - 0x2c]
and eax, ecx
imul eax, eax, 0xff
div ecx
mov ecx, dword [ebp - 0x18]
movzx edx, al
mov eax, ebx
or dh, 2
shr eax, cl
movzx ecx, word [ebp - 0x30]
and eax, ecx
imul eax, eax, 0xff
shl edx, 8
mov ebx, edx
xor edx, edx
div ecx
mov ecx, dword [ebp - 0x1c]
xor edx, edx
movzx eax, al
or ebx, eax
mov eax, dword [ebp - 0x20]
shl ebx, 8
mov eax, dword [eax]
shr eax, cl
movzx ecx, word [ebp - 0x34]
and eax, ecx
imul eax, eax, 0xff
div ecx
movzx eax, al
or ebx, eax
push ebx
push dword [ebp - 0x28]
push dword [ebp - 0x24]
push dword [esi + 0x38e8]
call dword [sym.imp.GDI32.dll_SetPixelV]
movzx eax, word [edi]
movzx ecx, word [edi + 4]
add dword [ebp - 0x20], 4
inc dword [ebp - 0x24]
add eax, ecx
cmp dword [ebp - 0x24], eax
jl 0x41b802
movzx eax, word [edi + 2]
movzx ecx, word [edi + 6]
inc dword [ebp - 0x28]
add eax, ecx
cmp dword [ebp - 0x28], eax
jl 0x41b7d9
jmp 0x41ba8c
mov eax, dword [esi + 0xbc]
movzx ecx, word [edi + 6]
mov dword [ebp - 0x28], eax
movzx eax, word [edi + 2]
add ecx, eax
mov dword [ebp - 0x20], eax
cmp eax, ecx
jge 0x41ba8c
movzx eax, word [edi]
movzx ecx, word [edi + 4]
add ecx, eax
mov dword [ebp - 0x24], eax
cmp eax, ecx
jge 0x41b985
movzx eax, byte [ebp + 0xb]
mov dword [ebp - 0x14], eax
movzx eax, byte [ebp - 0xd]
mov dword [ebp - 0x18], eax
movzx eax, byte [ebp - 0xe]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
movzx ebx, word [eax]
mov eax, ebx
shr eax, cl
movzx ecx, word [ebp - 0x2c]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ecx, dword [ebp - 0x18]
movzx edx, al
mov eax, ebx
or dh, 2
shr eax, cl
movzx ecx, word [ebp - 0x30]
and eax, ecx
imul eax, eax, 0xff
shl edx, 8
mov ebx, edx
cdq
idiv ecx
mov ecx, dword [ebp - 0x1c]
movzx eax, al
or ebx, eax
mov eax, dword [ebp - 0x28]
shl ebx, 8
movzx eax, word [eax]
shr eax, cl
movzx ecx, word [ebp - 0x34]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
movzx eax, al
or ebx, eax
push ebx
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push dword [esi + 0x38e8]
call dword [sym.imp.GDI32.dll_SetPixelV]
movzx eax, word [edi]
movzx ecx, word [edi + 4]
add dword [ebp - 0x28], 2
inc dword [ebp - 0x24]
add eax, ecx
cmp dword [ebp - 0x24], eax
jl 0x41b8f5
movzx eax, word [edi + 2]
movzx ecx, word [edi + 6]
inc dword [ebp - 0x20]
add eax, ecx
cmp dword [ebp - 0x20], eax
jl 0x41b8cc
jmp 0x41ba8c
mov eax, dword [esi + 0xbc]
movzx ecx, word [edi + 6]
mov dword [ebp - 0x28], eax
movzx eax, word [edi + 2]
add ecx, eax
mov dword [ebp - 0x20], eax
cmp eax, ecx
jge 0x41ba8c
movzx eax, word [edi]
movzx ecx, word [edi + 4]
add ecx, eax
mov dword [ebp - 0x24], eax
cmp eax, ecx
jge 0x41ba76
movzx eax, byte [ebp + 0xb]
mov dword [ebp - 0x14], eax
movzx eax, byte [ebp - 0xd]
mov dword [ebp - 0x18], eax
movzx eax, byte [ebp - 0xe]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
movzx ebx, byte [eax]
mov eax, ebx
shr eax, cl
movzx ecx, word [ebp - 0x2c]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ecx, dword [ebp - 0x18]
movzx edx, al
mov eax, ebx
or dh, 2
shr eax, cl
movzx ecx, word [ebp - 0x30]
and eax, ecx
imul eax, eax, 0xff
shl edx, 8
mov ebx, edx
cdq
idiv ecx
mov ecx, dword [ebp - 0x1c]
movzx eax, al
or ebx, eax
mov eax, dword [ebp - 0x28]
shl ebx, 8
movzx eax, byte [eax]
shr eax, cl
movzx ecx, word [ebp - 0x34]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
movzx eax, al
or ebx, eax
push ebx
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push dword [esi + 0x38e8]
call dword [sym.imp.GDI32.dll_SetPixelV]
movzx eax, word [edi]
movzx ecx, word [edi + 4]
inc dword [ebp - 0x28]
inc dword [ebp - 0x24]
add eax, ecx
cmp dword [ebp - 0x24], eax
jl 0x41b9e7
movzx eax, word [edi + 2]
movzx ecx, word [edi + 6]
inc dword [ebp - 0x20]
add eax, ecx
cmp dword [ebp - 0x20], eax
jl 0x41b9be
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call fcn.004160d3
push dword [ebp - 0x50]
push dword [ebp - 0x38]
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [ebp - 0x3c]
or dword [ebp - 4], 0xffffffff
call fcn.004378a4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4