Function at 0x41dd20
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x69c
xor eax, eax
push ebx
mov dword [esp + 0x5c], eax
push ebp
push esi
mov dword [esp + 0x68], eax
push edi
mov dword [esp + 0x70], eax
mov ecx, 0x20
lea edi, [esp + 0x22c]
rep stosd dword es:[edi], eax
mov ecx, 0x20
lea edi, [esp + 0x1ac]
rep stosd dword es:[edi], eax
xor ecx, ecx
lea edi, [esp + 0x12c]
mov dword [esp + 0x58], ecx
mov dword [esp + 0x74], eax
mov dword [esp + 0x5c], ecx
lea edx, [esp + 0x58]
mov dword [esp + 0x60], ecx
push edx
mov dword [esp + 0x68], ecx
mov ecx, 0x20
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x6b4]
lea eax, [esp + 0x1b0]
lea ecx, [esp + 0x230]
push eax
lea edx, [esp + 0x70]
push ecx
xor esi, esi
push edx
push edi
mov dword [esp + 0x60], esi
mov dword [esp + 0x68], esi
call fcn.0042b080
push 1
lea eax, [esp + 0x70]
push str..LST
push eax
call fcn.0042b280
add esp, 0x20
test eax, eax
je 0x41dec0
lea edi, [esp + 0x1ac]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jl 0x41de90
mov dl, byte [esp + ecx + 0x1ab]
lea edi, [esp + ecx + 0x1ac]
mov byte [esp + 0x12e], al
lea eax, [esp + 0x12c]
mov cl, byte [edi - 2]
push eax
mov byte [esp + 0x130], cl
mov byte [esp + 0x131], dl
call fcn.0050913b
lea ecx, [esp + 0x5c]
mov ebp, eax
lea edx, [esp + 0x1b0]
push ecx
lea eax, [esp + 0x234]
push edx
lea ecx, [esp + 0x74]
push eax
lea edx, [esp + 0x13c]
push ecx
push edx
mov byte [edi - 2], 0
call fcn.0042b190
lea eax, [esp + 0x144]
push 0x5c4580
push eax
call fcn.00509f6f
mov ebx, eax
push esi
push 4
push ebx
mov dword [esp + 0x6c], ebx
call fcn.0050a2b3
push ebx
push 1
lea ecx, [esp + 0x88]
push 4
push ecx
call fcn.0050a0f8
mov eax, dword [esp + 0x90]
lea edx, [ebp + 1]
add esp, 0x3c
cmp eax, edx
jae 0x41de9d
cmp ebx, esi
je 0x41de90
push ebx
call fcn.00509e37
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x69c
ret
lea eax, [ebp*4 + 8]
push esi
push eax
push ebx
call fcn.0050a2b3
push ebx
push 1
lea ecx, [esp + 0x60]
push 4
push ecx
call fcn.0050a0f8
add esp, 0x1c
jmp 0x41ded8
push 0x5c4580
push edi
mov dword [esp + 0x54], esi
call fcn.00509f6f
mov ebx, eax
add esp, 8
mov dword [esp + 0x40], ebx
push 1
lea edx, [esp + 0x5c]
push str..LST
push edx
call fcn.0042b280
add esp, 0xc
test eax, eax
je 0x41df98
mov ecx, dword [esp + 0x4c]
xor eax, eax
mov dword [esp + 0xc0], eax
push esi
mov dword [esp + 0xc8], eax
push ecx
push ebx
mov word [esp + 0xd4], ax
call fcn.0050a2b3
push ebx
push 4
lea edx, [esp + 0xd4]
push 1
push edx
call fcn.0050a0f8
mov al, byte [esp + 0xdc]
add esp, 0x1c
cmp al, 0x42
jne 0x41df4f
cmp byte [esp + 0xc1], 0x4d
jne 0x41df4f
mov eax, dword [str..BMP]
mov cl, byte [0x5c4910]
jmp 0x41df79
lea edx, [esp + 0xc0]
push 1
push edx
push 0x5c4908
call fcn.0042b280
add esp, 0xc
test eax, eax
je 0x41de90
mov eax, dword [str..LBT]
mov cl, byte [0x5c4904]
mov edx, dword [esp + 0x4c]
push esi
push edx
push ebx
mov dword [esp + 0xcc], eax
mov byte [esp + 0xd0], cl
call fcn.0050a2b3
add esp, 0xc
jmp 0x41dfaa
xor eax, eax
mov cl, byte [esp + eax + 0x58]
mov byte [esp + eax + 0xc0], cl
inc eax
test cl, cl
jne 0x41df9a
push 1
lea eax, [esp + 0xc4]
push str..bmp
push eax
call fcn.0042b280
add esp, 0xc
test eax, eax
je 0x41e150
push ebx
push 1
lea ecx, [esp + 0xa8]
push 2
push ecx
call fcn.0050a0f8
push ebx
push 1
lea edx, [esp + 0xbc]
push 4
push edx
call fcn.0050a0f8
push ebx
push 1
lea eax, [esp + 0xd0]
push 2
push eax
call fcn.0050a0f8
push ebx
push 1
lea ecx, [esp + 0xe2]
push 2
push ecx
call fcn.0050a0f8
add esp, 0x40
lea edx, [esp + 0xac]
push ebx
push 1
push 4
push edx
call fcn.0050a0f8
push ebx
push 1
lea eax, [esp + 0x90]
push 4
push eax
call fcn.0050a0f8
push ebx
push 1
lea ecx, [esp + 0xa4]
push 4
push ecx
call fcn.0050a0f8
push ebx
push 1
lea edx, [esp + 0xb8]
push 4
push edx
call fcn.0050a0f8
add esp, 0x40
lea eax, [esp + 0x84]
push ebx
push 1
push 2
push eax
call fcn.0050a0f8
push ebx
push 1
lea ecx, [esp + 0x9e]
push 2
push ecx
call fcn.0050a0f8
push ebx
push 1
lea edx, [esp + 0xb0]
push 4
push edx
call fcn.0050a0f8
push ebx
push 1
lea eax, [esp + 0xc4]
push 4
push eax
call fcn.0050a0f8
add esp, 0x40
lea ecx, [esp + 0x90]
push ebx
push 1
push 4
push ecx
call fcn.0050a0f8
push ebx
push 1
lea edx, [esp + 0xac]
push 4
push edx
call fcn.0050a0f8
push ebx
push 1
lea eax, [esp + 0xc0]
push 4
push eax
call fcn.0050a0f8
push ebx
push 1
lea ecx, [esp + 0xd4]
push 4
push ecx
call fcn.0050a0f8
add esp, 0x40
push 0x68
call fcn.005095d5
mov edx, dword [esp + 0x80]
mov ebp, eax
add esp, 4
mov dword [esp + 0x1c], ebp
mov dword [ebp + 0x20], edx
mov eax, dword [esp + 0x80]
mov dword [ebp + 0x24], eax
mov ecx, dword [esp + 0x86]
cmp cx, 8
jbe 0x41e12e
mov dword [ebp + 0x28], esi
jmp 0x41e2a2
mov eax, dword [esp + 0x98]
cmp eax, esi
je 0x41e141
mov dword [ebp + 0x28], eax
jmp 0x41e2a2
mov edx, 1
shl edx, cl
mov dword [ebp + 0x28], edx
jmp 0x41e2a2
push 1
lea eax, [esp + 0xc4]
push str..lbt
push eax
call fcn.0042b280
add esp, 0xc
test eax, eax
je 0x41e1c1
push ebx
push 1
lea ecx, [esp + 0xb8]
push 0x10
push ecx
call fcn.0050a0f8
push 0x68
call fcn.005095d5
mov edx, dword [esp + 0xc8]
mov ebp, eax
add esp, 0x14
mov dword [esp + 0x1c], ebp
mov dword [ebp + 0x20], edx
mov eax, dword [esp + 0xb8]
mov dword [ebp + 0x24], eax
mov eax, dword [esp + 0xbc]
cmp eax, 0x18
jne 0x41e1b5
mov dword [ebp + 0x28], esi
jmp 0x41e2a2
mov dword [ebp + 0x28], 0x100
jmp 0x41e2a2
push 1
lea ecx, [esp + 0xc4]
push str..LBM
push ecx
call fcn.0042b280
add esp, 0xc
test eax, eax
je 0x41de90
push ebx
push 1
lea edx, [esp + 0x108]
push 0x1c
push edx
call fcn.0050a0f8
mov eax, dword [esp + 0x124]
lea ecx, [eax*8]
push ecx
call fcn.005095d5
mov edx, dword [esp + 0x128]
mov esi, eax
push ebx
lea eax, [edx + edx]
push eax
push 4
push esi
call fcn.0050a0f8
push ebx
push 1
lea ecx, [esp + 0x148]
push 0xe
push ecx
call fcn.0050a0f8
mov edx, dword [esp + 0x15a]
mov eax, dword [esp + 0x14c]
add esp, 0x34
test eax, eax
lea ebp, [edx - 0xe]
je 0x41e24c
sub ebp, 0x400
push ebp
call fcn.005095d5
push ebx
mov edi, eax
push ebp
push 1
push edi
call fcn.0050a0f8
push 0x68
call fcn.005095d5
mov ebp, eax
mov eax, dword [edi + 4]
add esp, 0x18
mov dword [esp + 0x1c], ebp
mov dword [ebp + 0x20], eax
mov ecx, dword [edi + 8]
mov dword [ebp + 0x24], ecx
cmp word [edi + 0xe], 8
jne 0x41e28a
mov dword [ebp + 0x28], 0x100
jmp 0x41e291
mov dword [ebp + 0x28], 0
push esi
call fcn.005089dd
push edi
call fcn.005089dd
add esp, 8
xor esi, esi
cmp dword [ebp + 0x28], esi
jne 0x41e2c3
push ebp
call fcn.005089dd
push ebx
call fcn.00509e37
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x69c
ret
cmp dword [esp + 0x6b4], esi
je 0x41e302
mov edx, dword [esp + 0x6c0]
mov ecx, dword [esp + 0x6bc]
mov eax, dword [esp + 0x6b8]
push edx
push ecx
push eax
mov dword [ebp + 0x2c], 1
mov byte [ebp + 0x30], al
mov byte [ebp + 0x31], cl
mov byte [ebp + 0x32], dl
call fcn.0040e550
add esp, 0xc
mov dword [esp + 0x50], eax
jmp 0x41e309
mov dword [ebp + 0x2c], 0xffffffff
mov ecx, dword [ebp + 0x20]
mov dword [ebp + 0x64], esi
cmp ecx, 0x100
mov dword [esp + 0x24], ecx
jge 0x41e34e
mov eax, 0x100
cdq
fldln2
idiv ecx
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fyl2x
fldln2
fld qword [0x5a8468]
fyl2x
fdivp st(1)
fadd qword [0x5a8460]
call fcn.00509960
add eax, 8
mov dword [ebp + 0x48], eax
jmp 0x41e355
mov dword [ebp + 0x48], 8
mov ecx, dword [ebp + 0x24]
cmp ecx, 0x100
jge 0x41e393
mov eax, 0x100
cdq
fldln2
idiv ecx
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fyl2x
fldln2
fld qword [0x5a8468]
fyl2x
fdivp st(1)
fadd qword [0x5a8460]
call fcn.00509960
add eax, 0x18
mov dword [ebp + 0x4c], eax
jmp 0x41e39a
mov dword [ebp + 0x4c], 0x18
fldln2
fild dword [esp + 0x24]
fyl2x
fldln2
fld qword [0x5a8468]
fyl2x
fdivp st(1)
fadd qword [0x5a8460]
call fcn.00509960
mov dword [ebp + 0x50], eax
mov dword [ebp + 0x5c], esi
mov dword [ebp + 0x60], esi
mov eax, dword [0x7f18e4]
cmp eax, 1
mov ecx, 3
jne 0x41e3f4
mov edi, 0xb
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], 2
mov dword [esp + 0x2c], 5
mov dword [esp + 0x28], ecx
mov dword [esp + 0x38], ecx
jmp 0x41e456
cmp eax, 2
jne 0x41e405
mov dword [esp + 0x24], 0xb
xor edi, edi
jmp 0x41e3da
cmp eax, ecx
jne 0x41e418
mov edi, 0xa
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], ecx
jmp 0x41e3e2
cmp eax, 4
jne 0x41e42d
mov dword [esp + 0x24], 0xa
xor edi, edi
mov dword [esp + 0x20], ecx
jmp 0x41e3e2
cmp eax, 5
jne 0x41e452
mov eax, 4
mov edi, 8
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x38], eax
jmp 0x41e456
mov edi, dword [esp + 0x50]
mov edx, dword [ebp + 0x28]
shl edx, 5
push edx
call fcn.005095d5
mov dword [ebp + 0x54], eax
mov esi, eax
mov eax, dword [0x7f18e4]
add esp, 4
cmp eax, 5
mov eax, dword [ebp + 0x28]
mov dword [esp + 0x18], 0
jne 0x41e5e7
test eax, eax
jle 0x41e745
push ebx
push 1
lea eax, [esp + 0x44]
push 1
push eax
call fcn.0050a0f8
push ebx
push 1
lea ecx, [esp + 0x5c]
push 1
push ecx
call fcn.0050a0f8
push ebx
push 1
lea edx, [esp + 0x70]
push 1
push edx
call fcn.0050a0f8
push ebx
push 1
lea eax, [esp + 0x6f]
push 1
push eax
call fcn.0050a0f8
add esp, 0x40
mov dword [esp + 0x30], 0
fild dword [esp + 0x30]
mov ecx, dword [esp + 0x48]
and ecx, 0xff
fmul dword [0x5a845c]
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fmul st(1)
call fcn.00509960
mov edx, dword [esp + 0x44]
mov cl, byte [esp + 0x28]
and edx, 0xff
shr al, cl
mov dword [esp + 0x14], edx
mov ecx, edi
fild dword [esp + 0x14]
movzx bp, al
fmul st(1)
shl ebp, cl
call fcn.00509960
mov cl, byte [esp + 0x20]
shr al, cl
mov ecx, dword [esp + 0x2c]
movzx ax, al
shl eax, cl
mov ecx, dword [esp + 0x3c]
and ecx, 0xff
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
add ebp, eax
fmul st(1)
call fcn.00509960
mov bl, byte [esp + 0x38]
mov edx, dword [esp + 0x24]
mov cl, bl
add esi, 2
shr al, cl
mov ecx, edx
fstp st(0)
movzx ax, al
shl eax, cl
add ebp, eax
mov eax, dword [esp + 0x30]
mov word [esi - 2], bp
inc eax
cmp eax, 0xf
mov dword [esp + 0x30], eax
jl 0x41e4d2
mov al, byte [esp + 0x48]
mov cl, byte [esp + 0x28]
shr al, cl
mov ecx, edi
mov dword [esp + 0x14], edx
add esi, 2
movzx ax, al
shl eax, cl
mov cl, byte [esp + 0x44]
mov dl, cl
mov cl, byte [esp + 0x20]
shr dl, cl
mov ecx, dword [esp + 0x2c]
movzx bp, dl
shl ebp, cl
mov cl, byte [esp + 0x3c]
mov dl, cl
mov cl, bl
xor bx, bx
shr dl, cl
add eax, ebp
mov ebp, dword [esp + 0x1c]
mov bl, dl
mov edx, dword [esp + 0x14]
mov ecx, edx
shl ebx, cl
add eax, ebx
mov ebx, dword [esp + 0x40]
mov word [esi - 2], ax
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x28]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x41e48b
jmp 0x41e745
test eax, eax
jle 0x41e745
push ebx
push 1
lea ecx, [esp + 0x44]
push 1
push ecx
call fcn.0050a0f8
push ebx
push 1
lea edx, [esp + 0x5c]
push 1
push edx
call fcn.0050a0f8
push ebx
push 1
lea eax, [esp + 0x70]
push 1
push eax
call fcn.0050a0f8
push ebx
push 1
lea ecx, [esp + 0x6f]
push 1
push ecx
call fcn.0050a0f8
add esp, 0x40
mov dword [esp + 0x30], 0
fild dword [esp + 0x30]
mov edx, dword [esp + 0x48]
and edx, 0xff
fmul dword [0x5a845c]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fmul st(1)
call fcn.00509960
mov cl, byte [esp + 0x28]
shr al, cl
mov ecx, edi
movzx bp, al
mov eax, dword [esp + 0x44]
and eax, 0xff
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
shl ebp, cl
fmul st(1)
call fcn.00509960
mov cl, byte [esp + 0x20]
xor dx, dx
shr al, cl
mov ecx, dword [esp + 0x2c]
mov dl, al
mov eax, dword [esp + 0x3c]
and eax, 0xff
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
shl edx, cl
fmul st(1)
add ebp, edx
call fcn.00509960
mov bl, byte [esp + 0x38]
mov edx, dword [esp + 0x24]
mov cl, bl
add esi, 2
shr al, cl
mov ecx, edx
fstp st(0)
movzx ax, al
shl eax, cl
add ebp, eax
mov eax, dword [esp + 0x30]
mov word [esi - 2], bp
inc eax
cmp eax, 0xf
mov dword [esp + 0x30], eax
jl 0x41e636
mov al, byte [esp + 0x48]
mov cl, byte [esp + 0x28]
shr al, cl
mov ecx, edi
mov dword [esp + 0x14], edx
add esi, 2
movzx ax, al
shl eax, cl
mov cl, byte [esp + 0x44]
mov dl, cl
mov cl, byte [esp + 0x20]
shr dl, cl
mov ecx, dword [esp + 0x2c]
movzx bp, dl
shl ebp, cl
mov cl, byte [esp + 0x3c]
mov dl, cl
mov cl, bl
xor bx, bx
shr dl, cl
add eax, ebp
mov ebp, dword [esp + 0x1c]
mov bl, dl
mov edx, dword [esp + 0x14]
mov ecx, edx
shl ebx, cl
add eax, ebx
mov ebx, dword [esp + 0x40]
mov word [esi - 2], ax
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x28]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x41e5ef
mov ecx, dword [ebp + 0x54]
mov esi, dword [ebp + 0x28]
mov eax, 1
mov dword [esp + 0x2ac], 0
lea edx, [ecx + 0x3e]
cmp esi, eax
mov dword [esp + 0x1c], edx
jle 0x41e7af
add ecx, 0x1e
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x14]
xor ecx, ecx
test eax, eax
jle 0x41e78b
mov edi, dword [esp + 0x1c]
mov di, word [edi]
cmp word [edx], di
je 0x41e78b
add edx, 0x20
inc ecx
cmp ecx, eax
jl 0x41e77e
cmp ecx, eax
jne 0x41e798
mov dword [esp + eax*4 + 0x2ac], eax
jmp 0x41e79f
mov dword [esp + eax*4 + 0x2ac], ecx
mov edi, dword [esp + 0x1c]
add edi, 0x20
inc eax
cmp eax, esi
mov dword [esp + 0x1c], edi
jl 0x41e76d
mov eax, dword [esp + 0x6b4]
test eax, eax
je 0x41e7e0
mov ecx, dword [ebp + 0x54]
xor eax, eax
add ecx, 0x1e
test esi, esi
jle 0x41e7e0
mov edx, dword [esp + 0x50]
xor edi, edi
mov di, word [ecx]
cmp edi, edx
je 0x41e7dd
add ecx, 0x20
inc eax
cmp eax, esi
jl 0x41e7ca
jmp 0x41e7e0
mov dword [ebp + 0x2c], eax
mov eax, dword [ebp + 0x24]
imul eax, dword [ebp + 0x20]
push eax
call fcn.005095d5
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x20]
push ebx
push ecx
push edx
push eax
mov dword [ebp + 0x58], eax
call fcn.0050a0f8
mov eax, dword [ebp + 0x24]
add esp, 0x14
imul eax, dword [ebp + 0x20]
xor esi, esi
test eax, eax
jle 0x41e828
mov ecx, dword [ebp + 0x58]
xor edx, edx
mov dl, byte [ecx + esi]
lea edi, [ecx + esi]
inc esi
mov cl, byte [esp + edx*4 + 0x2ac]
cmp esi, eax
mov byte [edi], cl
jl 0x41e80f
push ebx
call fcn.00509e37
add esp, 4
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x69c
ret