Function at 0x41e50d
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x180
push ebx
push esi
push edi
lea edi, [ebp - 0x10c]
lea esi, [0x157e414]
mov ecx, 0x104
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x110], 0xd
push 0x400
push 0
push 0x87842c
call sub.CRTDLL.DLL_memset
add esp, 0xc
push 0xf
call sub.GDI32.DLL_GetStockObject
mov dword [ebp - 0x118], eax
push 0
push 0x100
push 0
push dword [ebp - 0x118]
call sub.GDI32.DLL_GetPaletteEntries
mov dword [ebp - 0x11c], eax
push dword [ebp - 0x11c]
push 0x1580b14
lea edi, [ebp - 0x180]
push edi
call sub.CRTDLL.DLL_sprintf
add esp, 0xc
movsx edi, byte [0x158100a]
push edi
lea edi, [ebp - 0x180]
push edi
call fcn.00420212
add esp, 8
push 0x87842c
push dword [ebp - 0x11c]
push 0
push dword [ebp - 0x118]
call sub.GDI32.DLL_GetPaletteEntries
mov eax, 0xec
mov ecx, dword [ebp - 0x110]
cdq
idiv ecx
mov dword [ebp - 0x114], eax
mov dword [ebp - 8], 0
jmp 0x41e60b
mov edi, dword [ebp - 8]
imul esi, edi, 0x14
imul edi, dword [ebp - 0x114]
add edi, 0x14
mov dword [ebp + esi - 0x100], edi
mov edi, dword [ebp - 8]
imul esi, edi, 0x14
add edi, 1
imul edi, dword [ebp - 0x114]
add edi, 0x14
mov dword [ebp + esi - 0xfc], edi
inc dword [ebp - 8]
mov edi, dword [ebp - 0x110]
cmp dword [ebp - 8], edi
jl 0x41e5d7
mov dword [ebp - 0x100], 0x14
imul edi, dword [ebp - 0x110], 0x14
mov dword [ebp + edi - 0x110], 0xff
mov dword [ebp - 8], 0
jmp 0x41e803
imul edi, dword [ebp - 8], 0x14
lea edi, [ebp + edi - 0x10c]
mov dword [ebp - 0x118], edi
mov edi, dword [ebp - 0x118]
mov edi, dword [edi + 0xc]
mov dword [ebp - 4], edi
jmp 0x41e7ee
mov edi, dword [ebp - 0x118]
mov esi, dword [edi + 0x10]
sub esi, dword [edi + 0xc]
mov dword [ebp - 0x120], esi
mov edi, dword [ebp - 4]
mov esi, dword [ebp - 0x118]
sub edi, dword [esi + 0xc]
mov dword [ebp - 0x11c], edi
imul eax, dword [ebp - 0x11c], 0xff
mov ecx, dword [ebp - 0x120]
cdq
idiv ecx
mov dword [ebp - 0x11c], eax
push dword [ebp - 0x11c]
fild dword [esp]
add esp, 4
mov edi, dword [ebp - 0x118]
fmul dword [edi]
fstp qword [ebp - 0x128]
fld qword [0x1580b0c]
fstp qword [ebp - 0x130]
fld qword [ebp - 0x130]
fcomp qword [ebp - 0x128]
fnstsw ax
sahf
ja 0x41e6f7
fld qword [ebp - 0x128]
fsub qword [ebp - 0x130]
mov edi, eax
call fcn.0043143c
xchg edi, eax
mov ebx, edi
add ebx, 0x80000000
jmp 0x41e705
fld qword [ebp - 0x128]
mov ebx, eax
call fcn.0043143c
xchg ebx, eax
mov edi, dword [ebp - 4]
mov byte [edi*4 + 0x87842c], bl
push dword [ebp - 0x11c]
fild dword [esp]
add esp, 4
mov edi, dword [ebp - 0x118]
fmul dword [edi + 4]
fstp qword [ebp - 0x138]
fld qword [0x1580b0c]
fstp qword [ebp - 0x140]
fld qword [ebp - 0x140]
fcomp qword [ebp - 0x138]
fnstsw ax
sahf
ja 0x41e765
fld qword [ebp - 0x138]
fsub qword [ebp - 0x140]
mov edi, eax
call fcn.0043143c
xchg edi, eax
mov ebx, edi
add ebx, 0x80000000
jmp 0x41e773
fld qword [ebp - 0x138]
mov ebx, eax
call fcn.0043143c
xchg ebx, eax
mov edi, dword [ebp - 4]
mov byte [edi*4 + 0x87842d], bl
push dword [ebp - 0x11c]
fild dword [esp]
add esp, 4
mov edi, dword [ebp - 0x118]
fmul dword [edi + 8]
fstp qword [ebp - 0x148]
fld qword [0x1580b0c]
fstp qword [ebp - 0x150]
fld qword [ebp - 0x150]
fcomp qword [ebp - 0x148]
fnstsw ax
sahf
ja 0x41e7d3
fld qword [ebp - 0x148]
fsub qword [ebp - 0x150]
mov edi, eax
call fcn.0043143c
xchg edi, eax
mov ebx, edi
add ebx, 0x80000000
jmp 0x41e7e1
fld qword [ebp - 0x148]
mov ebx, eax
call fcn.0043143c
xchg ebx, eax
mov edi, dword [ebp - 4]
mov byte [edi*4 + 0x87842e], bl
inc dword [ebp - 4]
mov edi, dword [ebp - 0x118]
mov edi, dword [edi + 0x10]
cmp dword [ebp - 4], edi
jl 0x41e660
inc dword [ebp - 8]
mov edi, dword [ebp - 0x110]
cmp dword [ebp - 8], edi
jl 0x41e63e
mov ebx, dword [0x157e3f4]
mov byte [ebx*4 + 0x87842c], 0
mov ebx, dword [0x157e3f4]
mov byte [ebx*4 + 0x87842d], 0
mov ebx, dword [0x157e3f4]
mov byte [ebx*4 + 0x87842e], 0
mov dword [ebp - 8], 0
mov ebx, dword [ebp - 8]
mov byte [ebx*4 + 0x87842f], 0x40
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x100
jl 0x41e843
push str.JASC_PAL
push 0
call fcn.004201cd
add esp, 8
push str.0100
push 0
call fcn.004201cd
add esp, 8
push 0x1580afa
push 0
call fcn.004201cd
add esp, 8
mov dword [ebp - 8], 0
mov ebx, dword [ebp - 8]
movzx edi, byte [ebx*4 + 0x87842e]
push edi
mov ebx, dword [ebp - 8]
movzx edi, byte [ebx*4 + 0x87842d]
push edi
mov ebx, dword [ebp - 8]
movzx edi, byte [ebx*4 + 0x87842c]
push edi
push str._d__d__d
push 0
call fcn.004201cd
add esp, 0x14
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x100
jl 0x41e88e
pop edi
pop esi
pop ebx
leave
ret