Function at 0x40d8b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
push edi
push esi
sub esp, 0x5c
mov esi, ecx
mov edi, dword [esp + 0x6c]
add edi, dword [ecx + 0x60]
mov word [esp + 4], 0xc5c3
mov byte [esp + 6], 0xce
mov dword [esp + 7], 0
mov byte [esp + 0xb], 0
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x18]
cmp eax, 7
ja 0x40d91b
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0x18]
movzx eax, byte [esp + eax + 4]
push dword [esp + 0x18]
push eax
call fcn.0040e650
add esp, 8
mov ecx, dword [esp + 0x18]
mov byte [esp + ecx + 4], al
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
cmp eax, 8
jb 0x40d8f0
mov dword [esp + 0xc], 0x161c1006
mov word [esp + 0x10], 0x231a
mov dword [esp + 0x12], 0
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x18]
cmp eax, 9
ja 0x40d97b
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0x18]
movzx eax, byte [esp + eax + 0xc]
push dword [esp + 0x18]
push eax
call fcn.0040e5e0
add esp, 8
mov ecx, dword [esp + 0x18]
mov byte [esp + ecx + 0xc], al
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
cmp eax, 0xa
jb 0x40d950
mov dword [esp + 0x18], 0xd6eca0a3
mov dword [esp + 0x1c], 0xd2d6e4e8
mov dword [esp + 0x20], 0xdd26dce3
mov dword [esp + 0x24], 0xdad1de29
mov dword [esp + 0x28], 0xf2d92d2e
mov dword [esp + 0x2c], 0x34e7a9af
mov dword [esp + 0x30], 0xc7c133ca
mov dword [esp + 0x34], 0xc6ee843c
mov dword [esp + 0x38], 0x443f3f39
mov dword [esp + 0x3c], 0x44b947bb
mov dword [esp + 0x40], 0xbff68dba
mov dword [esp + 0x44], 0xf2b54949
mov dword [esp + 0x48], 0xa24abcb8
mov dword [esp + 0x4c], 0xa6ace39d
mov dword [esp + 0x50], 0xeb99a0ab
mov byte [esp + 0x54], 0xc8
mov dword [esp + 0x55], 0
mov word [esp + 0x59], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0x42
ja 0x40da46
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
movzx eax, byte [esp + eax + 0x18]
push dword [esp]
push eax
call fcn.0040e570
add esp, 8
mov ecx, dword [esp]
mov byte [esp + ecx + 0x18], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0x43
jb 0x40da20
mov ecx, dword [esp + 0x70]
movzx edx, byte [esp + 0x18]
mov eax, edi
test dl, dl
je 0x40da6b
lea ebx, [esp + 0x19]
mov eax, edi
nop
nop
nop
nop
nop
mov byte [eax], dl
inc eax
movzx edx, byte [ebx]
inc ebx
test dl, dl
jne 0x40da60
mov byte [eax], 0
movzx edx, byte [ecx]
test dl, dl
je 0x40da8b
inc ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [eax], dl
inc eax
movzx edx, byte [ecx]
inc ecx
test dl, dl
jne 0x40da80
mov ecx, dword [esp + 0x74]
mov byte [eax], 0
movzx edx, byte [esp + 0xc]
test dl, dl
je 0x40daab
lea ebx, [esp + 0xd]
nop
mov byte [eax], dl
inc eax
movzx edx, byte [ebx]
inc ebx
test dl, dl
jne 0x40daa0
mov byte [eax], 0
movzx edx, byte [ecx]
test dl, dl
je 0x40dacb
inc ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [eax], dl
inc eax
movzx edx, byte [ecx]
inc ecx
test dl, dl
jne 0x40dac0
mov byte [eax], 0
movzx ecx, byte [esp + 4]
test cl, cl
je 0x40daeb
lea edx, [esp + 5]
nop
nop
nop
nop
nop
mov byte [eax], cl
inc eax
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x40dae0
mov byte [eax], 0
mov ecx, eax
xor ecx, edi
not edi
and edi, eax
add edi, edi
sub edi, ecx
add dword [esi + 0x60], edi
add esp, 0x5c
pop esi
pop edi
pop ebx
ret 0xc