Function at 0x525fb1
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x20], eax
mov eax, edx
mov dword [esp + 0x28], edx
movzx edx, byte [ebp]
mov dword [esp + 0x2c], ecx
mov ecx, dword [eax]
test dl, dl
jne 0x5260f1
mov eax, 0x1c
xor ebx, ebx
test ecx, ecx
jne 0x5260e4
mov edx, dword [esp + 0x20]
mov esi, dword [edx + 0x174]
cmp byte [edx + 0x1d4], 1
sbb ebx, 0xffffffff
test esi, esi
je 0x526231
cmp dword [esi + 0x18], ebx
jge 0x526026
lea edi, [ebx + 0x18]
mov dword [esp + 4], edi
mov eax, dword [esi + 0x10]
mov dword [esp], eax
call dword [edx + 0x10]
test eax, eax
je 0x52626b
mov dword [esi + 0x10], eax
mov dword [esi + 0x18], edi
mov eax, dword [esi + 4]
mov edi, dword [esp + 0x20]
mov dword [edi + 0x174], eax
mov eax, dword [esi + 0x10]
mov dword [esi + 0x14], ebx
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov dword [esp], eax
call fcn.0086e9f1
mov eax, dword [esp + 0x20]
movzx eax, byte [eax + 0x1d4]
test al, al
je 0x52605f
mov edx, dword [esi + 0x10]
mov byte [edx + ebx - 1], al
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov dword [esi], edi
mov dword [esi + 0xc], eax
mov eax, dword [edi + 4]
mov dword [esi + 8], eax
cmp byte [ebp], 0
mov eax, esi
jne 0x526097
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x160]
mov dword [esp + 0x1c], eax
add eax, 0x98
cmp edi, eax
mov eax, 0
cmovne eax, esi
mov edi, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
mov dword [edi + 4], eax
mov eax, dword [esp + 0x54]
mov eax, dword [eax]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x54]
mov dword [eax], esi
xor eax, eax
test ebx, ebx
je 0x5260e4
mov esi, dword [esp + 0x20]
mov edx, dword [esi + 0x64]
test edx, edx
je 0x5260e4
mov ecx, dword [edi + 4]
mov dword [esp + 0x1c], eax
test ecx, ecx
cmove ebp, eax
mov dword [esp + 8], ebp
mov ecx, dword [edi]
mov dword [esp + 4], ecx
mov ecx, dword [esi + 4]
mov dword [esp], ecx
call edx
mov eax, dword [esp + 0x1c]
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov byte [esp + 0x27], 0
test ecx, ecx
je 0x526103
cmp byte [ecx], 0x78
je 0x5261e1
movzx eax, byte [esp + 0x27]
mov ecx, 1
xor ebx, ebx
mov byte [esp + 0x1c], cl
xor eax, 1
mov byte [esp + 0x26], al
mov eax, 1
jmp 0x526132
mov esi, eax
and esi, 1
add ebx, 1
movzx edx, byte [ebp + ebx]
test dl, dl
je 0x526172
cmp byte [esp + 0x1c], 0
je 0x52613e
cmp ebx, 0x24
jle 0x5261a9
mov byte [esp + 0x1c], 0
movzx ecx, byte [esp + 0x26]
and cl, al
mov edi, ecx
je 0x526121
cmp ebx, 0x1d
jg 0x5261b9
cmp byte [ebx + 0x9859a0], dl
sete al
mov esi, eax
mov eax, 0
cmove eax, edi
add ebx, 1
movzx edx, byte [ebp + ebx]
test dl, dl
jne 0x526132
cmp ebx, 0x24
movzx ecx, byte [esp + 0x1c]
sete al
and ecx, eax
movzx eax, byte [esp + 0x27]
cmp cl, al
jne 0x5261c9
cmp ebx, 0x1d
jne 0x525fe7
mov edx, esi
mov eax, 0x28
test dl, dl
je 0x525fe7
jmp 0x5260e4
cmp byte [ebx + 0x9859c0], dl
sete byte [esp + 0x1c]
jmp 0x526143
xor esi, esi
xor eax, eax
jmp 0x526126
cmp al, 1
sbb eax, eax
add esp, 0x3c
and eax, 2
pop ebx
pop esi
add eax, 0x26
pop edi
pop ebp
ret
cmp byte [ecx + 1], 0x6d
jne 0x526103
cmp byte [ecx + 2], 0x6c
jne 0x526103
movzx eax, byte [ecx + 3]
test al, al
sete byte [esp + 0x27]
cmp al, 0x6e
jne 0x526103
cmp byte [ecx + 4], 0x73
mov byte [esp + 0x27], 0
jne 0x526103
cmp byte [ecx + 5], 0
mov eax, 0x27
jne 0x526103
jmp 0x5260e4
mov eax, dword [esp + 0x20]
mov dword [esp], 0x1c
call dword [eax + 0xc]
mov esi, eax
test eax, eax
je 0x52626b
mov eax, dword [esp + 0x20]
lea edi, [ebx + 0x18]
mov dword [esp], edi
call dword [eax + 0xc]
mov dword [esi + 0x10], eax
test eax, eax
je 0x526261
mov dword [esi + 0x18], edi
jmp 0x526036
mov eax, dword [esp + 0x20]
mov dword [esp], esi
call dword [eax + 0x14]
mov eax, 1
jmp 0x5260e4