Function at 0x4035c0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 8
cmp dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov cl, byte [eax]
mov dl, byte [eax + 1]
mov dword [esp + 4], 0
jle 0x40380d
push ebx
push ebp
push esi
push edi
movzx ebp, cl
movzx ebx, dl
lea esp, [esp]
lea eax, [ebp + 1]
cdq
mov ecx, 0x214
idiv ecx
mov esi, dword [0x434780]
mov edi, 0x214
movzx ebp, dl
movzx eax, byte [esi + ebp]
lea ecx, [esi + ebp]
add eax, ebx
mov byte [esp + 0x12], dl
cdq
idiv edi
movzx ebx, dl
lea eax, [ebx + esi]
mov byte [esp + 0x13], dl
call fcn.004024c0
mov ecx, dword [0x434780]
movzx edx, byte [ecx + ebp]
movzx eax, byte [ebx + ecx]
add eax, edx
cdq
mov ecx, edi
idiv ecx
push 0x428579
push 0x437bd8
mov byte [esp + 0x19], dl
call fcn.00403280
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00403490
mov edx, dword [esi]
mov eax, dword [edx + 4]
add eax, esi
xor edi, edi
test byte [eax + 8], 6
jne 0x403683
mov eax, dword [eax + 0x28]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x30]
call eax
cmp eax, 0xffffffff
jne 0x403683
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x4036a4
mov eax, dword [ecx + 8]
or eax, edi
cmp dword [ecx + 0x28], 0
jne 0x40369c
or eax, 4
push 0
push eax
call fcn.00402ee0
push 0x428579
push 0x437bd8
call fcn.00403280
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00403490
mov edx, dword [esi]
mov eax, dword [edx + 4]
add eax, esi
xor edi, edi
test byte [eax + 8], 6
jne 0x4036e6
mov eax, dword [eax + 0x28]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x30]
call eax
cmp eax, 0xffffffff
jne 0x4036e6
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x403707
mov eax, dword [ecx + 8]
or eax, edi
cmp dword [ecx + 0x28], 0
jne 0x4036ff
or eax, 4
push 0
push eax
call fcn.00402ee0
push 0x428579
push 0x437bd8
call fcn.00403280
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00403490
mov edx, dword [esi]
mov eax, dword [edx + 4]
add eax, esi
xor edi, edi
test byte [eax + 8], 6
jne 0x403749
mov eax, dword [eax + 0x28]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x30]
call eax
cmp eax, 0xffffffff
jne 0x403749
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40376a
mov eax, dword [ecx + 8]
or eax, edi
cmp dword [ecx + 0x28], 0
jne 0x403762
or eax, 4
push 0
push eax
call fcn.00402ee0
push 0x428579
push 0x437bd8
call fcn.00403280
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00403490
mov edx, dword [esi]
mov eax, dword [edx + 4]
add eax, esi
xor edi, edi
test byte [eax + 8], 6
jne 0x4037ac
mov eax, dword [eax + 0x28]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x30]
call eax
cmp eax, 0xffffffff
jne 0x4037ac
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x4037cd
mov eax, dword [ecx + 8]
or eax, edi
cmp dword [ecx + 0x28], 0
jne 0x4037c5
or eax, 4
push 0
push eax
call fcn.00402ee0
movzx edx, byte [esp + 0x11]
mov eax, dword [0x434780]
mov cl, byte [edx + eax]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
xor byte [eax + esi], cl
inc eax
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x14], eax
jl 0x4035f0
mov eax, dword [esp + 0x24]
mov dl, byte [esp + 0x12]
mov cl, byte [esp + 0x13]
pop edi
pop esi
pop ebp
mov byte [eax], dl
mov byte [eax + 1], cl
pop ebx
add esp, 8
ret
mov byte [eax], cl
mov byte [eax + 1], dl
add esp, 8
ret