Function at 0x41f8b1
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, 0x45fc6c
call fcn.0045d320
sub esp, 0x60
push esi
push edi
mov edi, 0x41c
mov esi, ecx
push edi
call fcn.00418776
push edi
mov ecx, esi
call fcn.00418834
mov al, byte [esi + 0x3a67]
mov ecx, dword [ebp + 0x14]
mov byte [ebp - 0xf], al
mov ax, word [esi + 0x3a61]
mov word [ebp - 0x48], ax
mov al, byte [esi + 0x3a68]
mov byte [ebp - 0xe], al
mov ax, word [esi + 0x3a63]
mov word [ebp - 0x40], ax
mov al, byte [esi + 0x3a69]
mov byte [ebp - 0xd], al
mov ax, word [esi + 0x3a65]
mov word [ebp - 0x44], ax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
lea edx, [eax + ecx]
cmp eax, edx
mov dword [ebp - 0x5c], edx
jge 0x41fb2b
mov edx, dword [ebp + 0x10]
lea eax, [esi + 0xdc]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 8]
add eax, edx
push ebx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x50]
call fcn.0043789c
mov eax, dword [esi + 0x38e4]
mov ebx, dword [esi + 0x38e8]
and dword [ebp - 4], 0
push eax
push ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x60], ebx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x64], eax
mov eax, dword [esi + 0x38ec]
mov edi, dword [esi + 0x38e8]
push 0
push eax
push edi
mov dword [ebp - 0x68], edi
call dword [sym.imp.GDI32.dll_SelectPalette]
push edi
mov dword [ebp - 0x6c], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 2
cmp eax, dword [ebp - 0x4c]
mov edi, eax
mov dword [ebp + 0x14], edi
jge 0x41faf5
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x3c], eax
jmp 0x41f9ac
mov eax, dword [ebp - 0x3c]
push 0x10
pop ebx
cmp eax, ebx
mov dword [ebp + 0xc], ebx
jge 0x41f9b9
mov dword [ebp + 0xc], eax
cmp dword [ebp - 0x24], ebx
jge 0x41f9c1
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x10]
push 1
push eax
mov ecx, esi
call fcn.004186a8
mov al, byte [ebp - 0x10]
test al, 1
je 0x41fb3b
mov eax, ebx
lea edi, [esi + 0xbc]
imul eax, dword [ebp + 0xc]
shl eax, 2
push eax
mov ecx, esi
push dword [edi]
call fcn.004186a8
mov eax, dword [ebp - 0x18]
mov edi, dword [edi]
add ebx, eax
mov dword [ebp - 0x34], edi
cmp eax, ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x38], ebx
jge 0x41fadc
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
add ecx, eax
mov dword [ebp + 0xc], ecx
cmp eax, dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
jge 0x41facd
movzx eax, byte [ebp - 0xd]
mov dword [ebp - 0x28], eax
movzx eax, byte [ebp - 0xe]
movzx ebx, word [ebp - 0x40]
mov dword [ebp - 0x2c], eax
movzx eax, byte [ebp - 0xf]
mov dword [ebp - 0x30], eax
mov edi, dword [edi]
mov ecx, dword [ebp - 0x28]
mov eax, edi
xor edx, edx
shr eax, cl
movzx ecx, word [ebp - 0x44]
and eax, ecx
imul eax, eax, 0xff
div ecx
mov ecx, dword [ebp - 0x2c]
movzx edx, al
mov eax, edi
or dh, 2
shr eax, cl
shl edx, 8
mov dword [ebp - 0x54], edx
xor edx, edx
mov ecx, dword [ebp - 0x30]
and eax, ebx
imul eax, eax, 0xff
div ebx
mov edx, dword [ebp - 0x54]
movzx eax, al
or edx, eax
mov eax, edi
shr eax, cl
movzx ecx, word [ebp - 0x48]
and eax, ecx
imul eax, eax, 0xff
shl edx, 8
mov dword [ebp - 0x54], edx
xor edx, edx
div ecx
mov ecx, dword [ebp - 0x54]
movzx eax, al
or ecx, eax
push ecx
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push dword [esi + 0x38e8]
call dword [sym.imp.GDI32.dll_SetPixelV]
mov edi, dword [ebp - 0x34]
add edi, 4
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x34], edi
cmp eax, dword [ebp + 0xc]
jl 0x41fa3a
mov eax, dword [ebp + 0x14]
inc dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp - 0x38]
jl 0x41fa15
mov edi, dword [ebp + 0x14]
sub dword [ebp - 0x3c], 0x10
add edi, 0x10
cmp edi, dword [ebp - 0x4c]
mov dword [ebp + 0x14], edi
jl 0x41f9a9
mov ebx, dword [ebp - 0x58]
lea ecx, [ebp - 0x6c]
call fcn.004160d3
push dword [ebp - 0x64]
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [ebp - 0x50]
or dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x64], eax
call fcn.004378a4
add dword [ebp - 0x18], 0x10
sub dword [ebp - 0x24], 0x10
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x5c]
jl 0x41f940
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 0x10
test al, 0x20
je 0x41fc85
lea eax, [ebp - 0x12]
push 2
push eax
mov ecx, esi
call fcn.004186a8
movzx eax, word [ebp - 0x12]
push eax
mov ecx, esi
push dword [esi + 0xbc]
call fcn.004186a8
lea eax, [esi + 0x180]
mov ecx, esi
push eax
mov eax, ebx
imul eax, dword [ebp + 0xc]
lea eax, [eax*4 + 8]
push eax
movzx eax, word [ebp - 0x12]
push eax
push dword [esi + 0x13c]
push dword [esi + 0xbc]
call fcn.0041e314
test al, al
je 0x41fadf
mov eax, dword [esi + 0x13c]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x18]
add ebx, eax
mov dword [ebp - 0x1c], eax
cmp eax, ebx
mov dword [ebp - 0x38], ebx
jge 0x41fadf
mov eax, dword [ebp + 0xc]
add eax, edi
mov dword [ebp + 0xc], eax
cmp edi, dword [ebp + 0xc]
mov dword [ebp - 0x20], edi
jge 0x41fc71
movzx eax, byte [ebp - 0xd]
mov dword [ebp - 0x28], eax
movzx eax, byte [ebp - 0xe]
movzx ebx, word [ebp - 0x40]
mov dword [ebp - 0x2c], eax
movzx eax, byte [ebp - 0xf]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x28]
xor edx, edx
mov edi, dword [eax]
mov eax, edi
shr eax, cl
movzx ecx, word [ebp - 0x44]
and eax, ecx
imul eax, eax, 0xff
div ecx
mov ecx, dword [ebp - 0x2c]
movzx edx, al
mov eax, edi
or dh, 2
shr eax, cl
shl edx, 8
mov dword [ebp - 0x54], edx
xor edx, edx
mov ecx, dword [ebp - 0x30]
and eax, ebx
imul eax, eax, 0xff
div ebx
mov edx, dword [ebp - 0x54]
movzx eax, al
or edx, eax
mov eax, edi
shr eax, cl
movzx ecx, word [ebp - 0x48]
and eax, ecx
imul eax, eax, 0xff
shl edx, 8
mov dword [ebp - 0x54], edx
xor edx, edx
div ecx
mov ecx, dword [ebp - 0x54]
movzx eax, al
or ecx, eax
push ecx
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [esi + 0x38e8]
call dword [sym.imp.GDI32.dll_SetPixelV]
add dword [ebp - 0x34], 4
inc dword [ebp - 0x20]
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp + 0xc]
jl 0x41fbe0
mov edi, dword [ebp + 0x14]
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x38]
jl 0x41fbbb
jmp 0x41fadf
test al, 0x40
je 0x41fcfc
lea eax, [ebp - 0x12]
push 2
push eax
mov ecx, esi
call fcn.004186a8
movzx eax, word [ebp - 0x12]
push eax
mov ecx, esi
push dword [esi + 0xbc]
call fcn.004186a8
lea eax, [esi + 0x1b8]
mov ecx, esi
push eax
mov eax, ebx
imul eax, dword [ebp + 0xc]
lea eax, [eax*4 + 0x1c]
push eax
movzx eax, word [ebp - 0x12]
push eax
push dword [esi + 0x13c]
push dword [esi + 0xbc]
call fcn.0041e314
test al, al
je 0x41fadf
movzx eax, byte [ebp - 0x10]
push dword [esi + 0x13c]
mov ecx, esi
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp - 0x18]
push edi
call fcn.00420026
jmp 0x41fadf
movzx eax, al
push eax
push ebx
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp - 0x18]
push edi
call fcn.0041fd14
jmp 0x41fadf