Function at 0x41a670
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, 0x45facc
call fcn.0045d320
sub esp, 0x98
push esi
mov esi, ecx
push 0x800
call fcn.00418776
mov al, byte [esi + 0x3a67]
mov ecx, dword [ebp + 0x14]
mov byte [ebp - 0x11], al
mov ax, word [esi + 0x3a61]
mov word [ebp - 0x38], ax
mov al, byte [esi + 0x3a68]
mov byte [ebp - 0xf], al
mov ax, word [esi + 0x3a63]
mov word [ebp - 0x30], ax
mov al, byte [esi + 0x3a69]
mov byte [ebp - 0x10], al
mov ax, word [esi + 0x3a65]
mov word [ebp - 0x34], ax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
lea edx, [eax + ecx]
cmp eax, edx
mov dword [ebp - 0x64], edx
jge 0x41abb7
mov edx, dword [ebp + 0x10]
lea eax, [esi + 0xdc]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 8]
push ebx
add eax, edx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp - 0x50]
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 - 0x68], eax
mov dword [ebp - 0x5c], eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x60], eax
mov eax, dword [esi + 0x38ec]
mov ebx, dword [esi + 0x38e8]
push 0
push eax
push ebx
mov dword [ebp - 0x70], ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
mov dword [ebp - 0x74], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 2
cmp eax, dword [ebp - 0x54]
mov dword [ebp + 0xc], eax
jge 0x41ab7a
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x48], ecx
jmp 0x41a766
mov ecx, dword [ebp - 0x48]
push 0x10
pop eax
cmp ecx, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp + 0x14], eax
jge 0x41a776
mov dword [ebp + 0x14], ecx
mov ecx, dword [ebp - 0x40]
cmp ecx, eax
jge 0x41a780
mov dword [ebp - 0x1c], ecx
lea eax, [ebp - 0xe]
push 1
push eax
mov ecx, esi
call fcn.004186a8
test byte [ebp - 0xe], 1
je 0x41a898
mov eax, dword [ebp - 0x1c]
lea ebx, [esi + 0xbc]
imul eax, dword [ebp + 0x14]
push eax
mov ecx, esi
push dword [ebx]
call fcn.004186a8
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebx]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x2c], ecx
jge 0x41ab66
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
add ecx, eax
mov dword [ebp - 0x4c], ecx
jmp 0x41a7d9
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x4c]
mov dword [ebp + 0x14], eax
jge 0x41a884
movzx eax, byte [ebp - 0x10]
mov dword [ebp - 0x1c], eax
movzx eax, byte [ebp - 0xf]
mov dword [ebp - 0x44], eax
movzx eax, byte [ebp - 0x11]
mov dword [ebp - 0x3c], eax
movzx ebx, byte [ebx]
mov ecx, dword [ebp - 0x1c]
mov eax, ebx
shr eax, cl
movzx ecx, word [ebp - 0x34]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ecx, dword [ebp - 0x44]
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 - 0x3c]
movzx eax, al
or ebx, eax
mov eax, dword [ebp - 0x24]
shl ebx, 8
movzx eax, byte [eax]
shr eax, cl
movzx ecx, word [ebp - 0x38]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
movzx eax, al
or ebx, eax
push ebx
push dword [ebp - 0x18]
push dword [ebp + 0x14]
push dword [esi + 0x38e8]
call dword [sym.imp.GDI32.dll_SetPixelV]
mov ebx, dword [ebp - 0x24]
inc ebx
inc dword [ebp + 0x14]
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x24], ebx
cmp eax, dword [ebp - 0x4c]
jl 0x41a7fa
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x2c]
jl 0x41a7d6
jmp 0x41ab66
test byte [ebp - 0xe], 2
je 0x41a90e
lea eax, [ebp - 0x12]
push 1
push eax
mov ecx, esi
call fcn.004186a8
movzx eax, byte [ebp - 0x12]
mov cl, byte [ebp - 0x10]
movzx ebx, word [ebp - 0x34]
shr eax, cl
mov cl, byte [ebp - 0xf]
and eax, ebx
imul eax, eax, 0xff
cdq
idiv ebx
movzx ebx, al
movzx eax, byte [ebp - 0x12]
shr eax, cl
movzx ecx, word [ebp - 0x30]
and eax, ecx
or bh, 2
imul eax, eax, 0xff
cdq
idiv ecx
mov cl, byte [ebp - 0x11]
shl ebx, 8
movzx eax, al
or ebx, eax
movzx eax, byte [ebp - 0x12]
shr eax, cl
movzx ecx, word [ebp - 0x38]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
shl ebx, 8
movzx eax, al
or ebx, eax
mov dword [ebp - 0x58], ebx
jmp 0x41a911
mov ebx, dword [ebp - 0x58]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
add ecx, eax
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x8c], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x90], eax
add ecx, eax
lea eax, [ebp - 0x94]
mov dword [ebp - 0x88], ecx
push ebx
push eax
mov ecx, esi
call fcn.00416091
test byte [ebp - 0xe], 4
je 0x41a9ba
lea eax, [ebp - 0x25]
push 1
push eax
mov ecx, esi
call fcn.004186a8
movzx ebx, byte [ebp - 0x25]
mov cl, byte [ebp - 0x10]
mov eax, ebx
movzx edi, word [ebp - 0x34]
shr eax, cl
mov cl, byte [ebp - 0xf]
and eax, edi
imul eax, eax, 0xff
cdq
idiv edi
movzx edi, al
mov eax, ebx
or edi, 0x200
shr eax, cl
movzx ecx, word [ebp - 0x30]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov cl, byte [ebp - 0x11]
shl edi, 8
movzx eax, al
or edi, eax
mov eax, ebx
shr eax, cl
movzx ecx, word [ebp - 0x38]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
shl edi, 8
movzx eax, al
or edi, eax
test byte [ebp - 0xe], 8
je 0x41ab66
lea eax, [ebp - 0xd]
push 1
push eax
mov ecx, esi
call fcn.004186a8
test byte [ebp - 0xe], 0x10
mov ebx, dword [esi + 0xbc]
movzx eax, byte [ebp - 0xd]
je 0x41aae2
lea eax, [eax + eax*2]
mov ecx, esi
push eax
push ebx
call fcn.004186a8
and dword [ebp + 0x14], 0
cmp byte [ebp - 0xd], 0
jbe 0x41ab66
movzx eax, byte [ebp - 0x10]
mov dword [ebp - 0x1c], eax
movzx eax, byte [ebp - 0xf]
mov dword [ebp - 0x44], eax
movzx eax, byte [ebp - 0x11]
mov dword [ebp - 0x3c], eax
movzx eax, byte [ebx]
mov ecx, dword [ebp - 0x1c]
shr eax, cl
movzx ecx, word [ebp - 0x34]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ecx, dword [ebp - 0x44]
movzx edi, al
movzx eax, byte [ebx]
shr eax, cl
movzx ecx, word [ebp - 0x30]
and eax, ecx
or edi, 0x200
imul eax, eax, 0xff
cdq
idiv ecx
mov ecx, dword [ebp - 0x3c]
shl edi, 8
movzx eax, al
or edi, eax
movzx eax, byte [ebx]
shr eax, cl
movzx ecx, word [ebp - 0x38]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
shl edi, 8
movzx eax, al
or edi, eax
inc ebx
push edi
movzx eax, byte [ebx]
mov ecx, eax
and eax, 0xf
shr ecx, 4
inc ebx
mov edx, eax
mov dword [ebp - 0x24], ecx
movzx eax, byte [ebx]
mov ecx, eax
and eax, 0xf
shr ecx, 4
inc ecx
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x20]
add edx, eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2c], edx
mov edx, dword [ebp - 0x24]
add eax, edx
inc ebx
mov dword [ebp - 0x84], eax
add eax, ecx
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x80], eax
add eax, ecx
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x84]
push eax
mov ecx, esi
call fcn.00416091
movzx eax, byte [ebp - 0xd]
inc dword [ebp + 0x14]
cmp dword [ebp + 0x14], eax
jl 0x41aa14
jmp 0x41ab66
shl eax, 1
push eax
push ebx
mov ecx, esi
call fcn.004186a8
and dword [ebp + 0x14], 0
cmp byte [ebp - 0xd], 0
jbe 0x41ab66
movzx eax, byte [ebx]
mov ecx, eax
and eax, 0xf
shr ecx, 4
inc ebx
mov edx, eax
mov dword [ebp - 0x24], ecx
push edi
movzx eax, byte [ebx]
mov ecx, eax
and eax, 0xf
shr ecx, 4
inc ecx
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x20]
add edx, eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2c], edx
mov edx, dword [ebp - 0x24]
add eax, edx
inc ebx
mov dword [ebp - 0xa4], eax
add eax, ecx
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0xa0], eax
add eax, ecx
mov dword [ebp - 0x98], eax
lea eax, [ebp - 0xa4]
push eax
mov ecx, esi
call fcn.00416091
movzx eax, byte [ebp - 0xd]
inc dword [ebp + 0x14]
cmp dword [ebp + 0x14], eax
jl 0x41aaf7
add dword [ebp + 0xc], 0x10
sub dword [ebp - 0x48], 0x10
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x54]
jl 0x41a763
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 1
call fcn.004160d3
push dword [ebp - 0x60]
push dword [ebp - 0x68]
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [ebp - 0x50]
or dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x60], eax
call fcn.004378a4
add dword [ebp - 0x20], 0x10
sub dword [ebp - 0x40], 0x10
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x64]
jl 0x41a6fc
pop edi
pop ebx
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret 0x10