Function at 0x10057ee0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x10
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
mov eax, dword [ebp + 0x20]
mov ebx, eax
push esi
shr eax, 0xb
push edi
mov edi, dword [ebp + 0x28]
and eax, 0x1f
push eax
movzx eax, byte [ebp + 0x22]
shr ebx, 8
push eax
and ebx, 7
lea esi, [esp + 0x24]
mov eax, ebp
mov dword [esp + 0x20], 0
call fcn.10057210
test eax, eax
jne 0x10057f26
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x14
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov ebx, dword [ebp + 0x20]
movzx ecx, byte [ebp + 0x22]
mov esi, dword [ebp + 0x28]
or edx, 0x40100
add edx, edx
add edx, edx
add edx, edx
and eax, 7
or edx, eax
mov edi, ebx
shl edx, 8
or edx, dword [esp + 0x30]
push ecx
shr edi, 8
shr ebx, 0xb
and edi, 7
and ebx, 0x1f
push ebp
call fcn.100571b0
test eax, eax
je 0x1005816d
mov dword [esp + 0x24], 0x186a0
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x1c]
movzx edx, byte [ebp + 0x22]
mov edi, dword [ebp + 0x24]
mov esi, eax
shr eax, 0xb
and eax, 0x1f
shr esi, 8
mov ebx, eax
mov eax, dword [ecx + 4]
and esi, 7
mov dword [esp + 0x28], edx
cmp eax, 3
jne 0x10057fd5
mov dword [esp + 0x10], 0xffffffff
call fcn.1013c470
cmp dword [eax + 0x20], 0
je 0x10057fd1
call fcn.1013c470
mov eax, dword [eax + 0x20]
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x10]
push ecx
push 4
push edi
push esi
push ebx
push edx
mov ecx, eax
call fcn.1001a6d9
jmp 0x10057ff2
xor eax, eax
jmp 0x10057ff2
cmp eax, 2
jne 0x1005816d
mov eax, dword [ecx]
mov eax, dword [eax + 0x18]
lea edx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x2c]
push edi
push esi
push ebx
push edx
call eax
test eax, eax
je 0x1005816d
mov eax, dword [esp + 0x10]
test al, 1
jne 0x10058006
test al, 6
jne 0x10058016
sub dword [esp + 0x24], 1
jns 0x10057f75
jmp 0x1005816d
cmp dword [esp + 0x24], 0
jl 0x1005816d
mov ecx, eax
and cl, 6
cmp cl, 4
je 0x1005812c
mov dword [esp + 0x24], 0x3e8
jmp 0x10058040
mov eax, dword [ebp + 0x20]
movzx edx, byte [ebp + 0x22]
mov edi, dword [ebp + 0x28]
mov ebx, eax
shr eax, 0xb
and eax, 0x1f
push eax
shr ebx, 8
and ebx, 7
push edx
lea esi, [esp + 0x1c]
mov eax, ebp
call fcn.10057210
test eax, eax
je 0x1005816d
mov ebx, dword [ebp + 0x20]
movzx eax, byte [ebp + 0x22]
mov edx, dword [esp + 0x14]
mov esi, dword [ebp + 0x28]
mov edi, ebx
push eax
shr edi, 8
shr ebx, 0xb
xor edx, 0x20000000
and edi, 7
and ebx, 0x1f
push ebp
call fcn.100571b0
test eax, eax
je 0x1005816d
mov eax, dword [ebp + 0x20]
movzx ecx, byte [ebp + 0x22]
mov edi, dword [ebp + 0x24]
mov ebx, eax
shr eax, 0xb
and eax, 0x1f
push eax
shr ebx, 8
and ebx, 7
push ecx
lea esi, [esp + 0x18]
mov eax, ebp
call fcn.10057210
test eax, eax
je 0x1005816d
mov edx, dword [esp + 0x10]
and dl, 7
cmp dl, 1
je 0x100580e2
sub dword [esp + 0x24], 1
jns 0x10058040
mov dword [esp + 0x24], 0x3e8
lea ebx, [ebx]
mov eax, dword [ebp + 0x20]
mov edi, dword [ebp + 0x24]
mov ebx, eax
shr eax, 0xb
and eax, 0x1f
push eax
movzx eax, byte [ebp + 0x22]
shr ebx, 8
push eax
and ebx, 7
lea esi, [esp + 0x18]
mov eax, ebp
call fcn.10057210
test eax, eax
je 0x1005816d
mov eax, dword [esp + 0x10]
test al, 1
jne 0x10058125
test al, 6
jne 0x1005812c
sub dword [esp + 0x24], 1
jns 0x100580f0
and al, 6
cmp al, 4
jne 0x1005816d
mov eax, dword [ebp + 0x20]
movzx ecx, byte [ebp + 0x22]
mov edi, dword [ebp + 0x2c]
mov ebx, eax
shr eax, 0xb
and eax, 0x1f
push eax
shr ebx, 8
and ebx, 7
push ecx
lea esi, [esp + 0x1c]
mov eax, ebp
call fcn.10057210
test eax, eax
je 0x1005816d
mov dl, byte [esp + 0x14]
mov eax, dword [esp + 0x34]
mov byte [eax], dl
mov dword [esp + 0x18], 1
mov ebx, dword [ebp + 0x20]
movzx ecx, byte [ebp + 0x22]
mov edx, dword [esp + 0x1c]
mov esi, dword [ebp + 0x28]
mov edi, ebx
shr edi, 8
shr ebx, 0xb
push ecx
and edi, 7
and ebx, 0x1f
push ebp
call fcn.100571b0
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x14