Function at 0x41d620
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x450
push ebx
push ebp
xor eax, eax
push esi
mov esi, ecx
movzx edx, word [esi + 0x24]
xor ebp, ebp
cmp byte [esi + 0x22], al
mov dword [esp + 0x3c], edx
movzx edx, byte [esi + 0x2a]
sete al
xor ecx, ecx
cmp byte [esi + 0x12], cl
push edi
sete cl
push 0x400
mov dword [esp + 0x34], edx
lea edx, [esp + 0x64]
push ebp
push edx
mov dword [esp + 0x48], esi
cmp ecx, eax
movzx eax, word [esi + 0x26]
movzx ecx, word [esi + 0x28]
mov dword [esp + 0x50], eax
movzx eax, byte [esi + 0x2b]
mov dword [esp + 0x54], ecx
movzx ecx, byte [esi + 0x2c]
mov dword [esp + 0x34], ebp
setne byte [esp + 0x1f]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
call fcn.004326b0
mov edi, dword [esp + 0x474]
xor ebx, ebx
add esp, 0xc
test edi, edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebp
jle 0x41d880
jmp 0x41d6b4
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x464]
cmp ebp, edx
jge 0x41d880
mov eax, edi
sub eax, ebx
xor ecx, ecx
test eax, eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x4c], eax
jle 0x41d856
mov eax, edx
sub eax, ebp
add eax, 0xfffffff9
mov dword [esp + 0x5c], eax
mov eax, ebx
imul eax, edx
mov dword [esp + 0x20], eax
jmp 0x41d6f8
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
cmp ecx, dword [esp + 0x5c]
jge 0x41d856
add eax, ecx
add eax, dword [esp + 0x14]
cmp byte [esp + 0x13], 0
mov ecx, dword [esi + 0x1974]
lea esi, [ecx + eax*4]
mov eax, dword [esi]
je 0x41d73f
mov edx, eax
mov ecx, eax
shr ecx, 0x10
and edx, 0xff0000
or edx, ecx
mov ecx, eax
shl ecx, 0x10
and eax, 0xff00
or ecx, eax
shr edx, 8
shl ecx, 8
or edx, ecx
mov eax, edx
mov ecx, dword [esp + 0x30]
mov ebx, eax
shr ebx, cl
mov ecx, dword [esp + 0x34]
mov edx, eax
shr edx, cl
mov ecx, dword [esp + 0x38]
and ebx, dword [esp + 0x40]
shr eax, cl
and edx, dword [esp + 0x44]
add esi, 4
mov dword [esp + 0x54], edx
and eax, dword [esp + 0x48]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x58], eax
mov eax, 7
add dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
lea ecx, [ecx]
cmp byte [esp + 0x13], 0
mov edx, dword [esp + 0x1c]
mov edi, dword [edx]
je 0x41d7b2
mov eax, edi
mov ecx, edi
mov edx, edi
and eax, 0xff0000
shl edx, 0x10
and edi, 0xff00
shr ecx, 0x10
or edx, edi
or eax, ecx
shr eax, 8
shl edx, 8
or eax, edx
mov edi, eax
mov ecx, dword [esp + 0x30]
mov ebp, edi
shr ebp, cl
mov ecx, dword [esp + 0x34]
and ebp, dword [esp + 0x40]
mov eax, ebp
sub eax, ebx
cdq
mov ebx, ebp
mov ebp, edi
mov esi, eax
shr ebp, cl
mov ecx, dword [esp + 0x38]
xor esi, edx
sub esi, edx
and ebp, dword [esp + 0x44]
shr edi, cl
mov eax, ebp
sub eax, dword [esp + 0x54]
mov dword [esp + 0x54], ebp
and edi, dword [esp + 0x48]
cdq
xor eax, edx
sub eax, edx
add esi, eax
mov eax, edi
sub eax, dword [esp + 0x58]
mov dword [esp + 0x58], edi
cdq
xor eax, edx
sub eax, edx
add esi, eax
cmp esi, 0xff
jle 0x41d810
mov esi, 0xff
add dword [esp + esi*4 + 0x60], 1
add dword [esp + 0x1c], 4
sub dword [esp + 0x2c], 1
lea esi, [esp + esi*4 + 0x60]
jne 0x41d780
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x464]
add dword [esp + 0x20], ecx
mov edi, dword [esp + 0x468]
mov esi, dword [esp + 0x3c]
add eax, 1
cmp eax, dword [esp + 0x4c]
mov dword [esp + 0x24], eax
mov edx, ecx
jl 0x41d6f0
cmp edx, edi
jle 0x41d868
add dword [esp + 0x14], edi
mov dword [esp + 0x18], 0
jmp 0x41d874
add dword [esp + 0x18], edx
mov dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
cmp ebx, edi
jl 0x41d6b0
mov edx, dword [esp + 0x64]
mov esi, dword [esp + 0x60]
mov edi, dword [esp + 0x28]
lea eax, [edx + esi]
imul eax, eax, 0x64
cdq
idiv edi
cmp eax, 0x5a
jl 0x41d8a9
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x450
ret 8
xor eax, eax
mov ecx, 1
mov edx, dword [esp + ecx*4 + 0x60]
mov ebx, edx
imul ebx, ecx
imul ebx, ecx
add eax, ebx
test edx, edx
je 0x41d89a
mov ebx, dword [esp + ecx*4 + 0x5c]
add ebx, ebx
cmp edx, ebx
jg 0x41d89a
add ecx, 1
cmp ecx, 8
jl 0x41d8b0
cmp ecx, 0x100
jge 0x41d8f7
lea esp, [esp]
mov edx, dword [esp + ecx*4 + 0x60]
imul edx, ecx
imul edx, ecx
add ecx, 1
add eax, edx
cmp ecx, 0x100
jl 0x41d8e0
sub edi, esi
xor edx, edx
div edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret 8