Function at 0x411816
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
mov eax, dword [0x46ae30]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
inc ebx
cmp dword [0x46df58], 0
push esi
mov esi, dword [0x46def4]
mov dword [ebp - 0x40], ebx
jne 0x411868
xor edx, edx
or al, 0xff
sub al, dl
movzx eax, al
mov ecx, eax
shl ecx, 8
or ecx, eax
shl ecx, 8
or ecx, eax
mov dword [edx*4 + 0x46df88], ecx
inc edx
cmp edx, 0x100
jl 0x41183f
mov dword [0x46df58], ebx
xor ebx, ebx
mov dword [ebp - 0x38], ebx
test esi, esi
je 0x4119f9
and dword [ebp - 0x60], ebx
push edi
xor eax, eax
lea edi, [ebp - 0x5c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x60]
push eax
push esi
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x4119f8
push ebx
call dword [sym.imp.USER32.dll_GetDC]
push 0xa
pop ecx
mov ebx, eax
xor eax, eax
push eax
lea edi, [ebp - 0x2c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x30]
push eax
push 0
push 0
push 0
push dword [ebp - 0x50]
mov dword [ebp - 0x4c], ebx
push ebx
mov dword [ebp - 0x30], 0x28
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
je 0x4119da
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
and dword [ebp - 0x20], 0
mov edi, eax
imul edi, ecx
mov dword [ebp - 0x34], eax
mov eax, edi
shl eax, 2
push eax
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x4119da
push 0
lea eax, [ebp - 0x30]
push eax
push esi
push dword [ebp - 0x34]
push 0
push dword [ebp - 0x50]
push ebx
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
je 0x4119da
and dword [ebp - 0x48], 0
test edi, edi
je 0x41197d
mov ebx, dword [ebp - 0x48]
lea edx, [esi + 3]
mov dword [ebp - 0x3c], edx
movzx eax, byte [edx - 3]
movzx ecx, byte [edx - 1]
add ecx, eax
movzx eax, byte [edx - 2]
add eax, ecx
cdq
push 3
pop ecx
idiv ecx
mov edx, dword [ebp - 0x3c]
mov ecx, 0xff
sub ecx, eax
mov al, byte [edx]
test al, al
jne 0x411959
cmp ecx, 0xff
je 0x41196f
movzx eax, al
test ecx, ecx
cmove ecx, dword [ebp - 0x40]
shl eax, 0x18
or eax, dword [ecx*4 + 0x46df88]
mov dword [esi + ebx*4], eax
add edx, 4
inc ebx
mov dword [ebp - 0x3c], edx
cmp ebx, edi
jb 0x41192b
mov ebx, dword [ebp - 0x4c]
and dword [ebp - 0x74], 0
xor eax, eax
lea edi, [ebp - 0x70]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, dword [ebp - 0x34]
push edi
push dword [ebp - 0x44]
push ebx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov dword [ebp - 0x64], eax
test eax, eax
je 0x4119d3
push 0
lea ecx, [ebp - 0x30]
push ecx
push esi
push edi
push 0
push eax
push ebx
call dword [sym.imp.GDI32.dll_SetDIBits]
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x68], eax
xor eax, eax
inc eax
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.USER32.dll_CreateIconIndirect]
push dword [ebp - 0x64]
mov dword [ebp - 0x38], eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push dword [ebp - 0x50]
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [ebp - 0x54]
call dword [sym.imp.GDI32.dll_DeleteObject]
push ebx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ebx, dword [ebp - 0x38]
pop edi
mov ecx, dword [ebp - 4]
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.00437d2f
leave
ret