Function at 0x57ec80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x3c
mov dword [esp + 0xc], edx
mov dword [esp], ecx
mov ebp, dword [esp + 0x5c]
mov ebx, dword [esp + 0x58]
mov eax, dword [esp + 0x68]
xor edi, edi
test eax, eax
cmovle eax, edi
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x6c]
mov al, 1
mov dword [esp + 4], eax
test dl, 0x40
jne 0x57ecd2
test ebp, ebp
js 0x57ecdc
test dl, 2
jne 0x57ecf9
mov ecx, edx
and ecx, 4
sete al
mov dword [esp + 4], eax
shl ecx, 3
mov dword [esp + 8], ecx
jmp 0x57ed09
mov dword [esp + 8], 0
jmp 0x57ed09
mov dword [esp + 4], 0
neg ebx
mov eax, 0
sbb eax, ebp
mov dword [esp + 8], 0x2d
mov ebp, eax
jmp 0x57ed09
mov dword [esp + 8], 0x2b
mov dword [esp + 4], 0
mov esi, dword [esp + 0x60]
cmp esi, 8
mov eax, 0xa78730
mov ecx, 0xa7872f
cmove ecx, eax
cmp esi, 0x10
mov eax, 0xa78732
cmovne eax, ecx
mov dword [esp + 0x10], eax
test dl, 0x20
mov eax, str.0123456789abcdef
mov ecx, 0xa78735
cmove ecx, eax
mov dword [esp + 0x18], ecx
mov edx, ebp
nop word cs:[eax + eax]
mov dword [esp + 0x1c], edi
push 0
mov ebp, dword [esp + 0x64]
push ebp
push edx
push ebx
mov edi, edx
call fcn.00788230
add esp, 0x10
mov ecx, eax
imul ecx, ebp
mov esi, ebx
sub esi, ecx
cmp ebx, ebp
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
movzx ecx, byte [ecx + esi]
mov byte [esp + ebp + 0x22], cl
sbb edi, 0
lea ecx, [ebp + 1]
jb 0x57ed93
mov ebx, eax
cmp ebp, 0x19
mov edi, ecx
jb 0x57ed50
mov eax, dword [esp + 0x6c]
test al, 8
mov eax, 0xa7872f
mov edx, dword [esp + 0x10]
cmove edx, eax
lea ebp, [ecx - 1]
cmp ecx, 0x1a
cmovne ebp, ecx
mov byte [esp + ebp + 0x22], 0
mov edi, dword [esp + 0x14]
mov esi, edi
sub esi, ebp
cmovle edi, ebp
mov eax, dword [esp + 4]
mov ebx, eax
xor bl, 1
mov dword [esp + 0x10], edx
push edx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
movzx ecx, bl
mov edx, dword [esp + 0x64]
sub edx, ecx
add eax, edi
sub edx, eax
xor eax, eax
test esi, esi
cmovle esi, eax
test edx, edx
cmovle edx, eax
cmp esi, edx
mov edi, edx
cmova edi, esi
mov ecx, dword [esp + 0x6c]
test cl, 0x10
cmovne edx, eax
cmove edi, esi
mov esi, edx
neg esi
test cl, 1
cmove esi, edx
test esi, esi
jle 0x57ee50
inc esi
mov ebx, dword [esp + 0xc]
nop word cs:[eax + eax]
mov ecx, dword [esp]
mov edx, ebx
push 0x20
push dword [esp + 0x58]
push dword [esp + 0x58]
call fcn.0057eb80
add esp, 0xc
test eax, eax
je 0x57ef4e
dec esi
cmp esi, 1
jg 0x57ee20
xor esi, esi
cmp byte [esp + 4], 0
je 0x57ee5b
jmp 0x57ee7c
mov ebx, dword [esp + 0xc]
cmp byte [esp + 4], 0
jne 0x57ee7c
mov ecx, dword [esp]
mov edx, ebx
push dword [esp + 8]
push dword [esp + 0x58]
push dword [esp + 0x58]
call fcn.0057eb80
add esp, 0xc
test eax, eax
je 0x57ef4e
mov ebx, dword [esp + 0x10]
movzx eax, byte [ebx]
test al, al
je 0x57eebb
inc ebx
nop dword [eax + eax]
movsx eax, al
mov ecx, dword [esp]
mov edx, dword [esp + 0xc]
push eax
push dword [esp + 0x58]
push dword [esp + 0x58]
call fcn.0057eb80
add esp, 0xc
test eax, eax
je 0x57ef4e
movzx eax, byte [ebx]
inc ebx
test al, al
jne 0x57ee90
test edi, edi
mov ebx, dword [esp + 0xc]
je 0x57ef20
inc edi
nop word cs:[eax + eax]
mov ecx, dword [esp]
mov edx, ebx
push 0x30
push dword [esp + 0x58]
push dword [esp + 0x58]
call fcn.0057eb80
add esp, 0xc
test eax, eax
je 0x57ef4e
dec edi
cmp edi, 1
jg 0x57eed0
jmp 0x57ef20
movsx eax, byte [esp + ebp + 0x21]
dec ebp
mov ecx, dword [esp]
mov edx, ebx
push eax
push dword [esp + 0x58]
push dword [esp + 0x58]
call fcn.0057eb80
add esp, 0xc
test eax, eax
je 0x57ef4e
test ebp, ebp
jg 0x57ef00
mov eax, 1
test esi, esi
jns 0x57ef50
jmp 0x57ef33
inc esi
je 0x57ef58
mov ecx, dword [esp]
mov edx, ebx
push 0x20
push dword [esp + 0x58]
push dword [esp + 0x58]
call fcn.0057eb80
add esp, 0xc
test eax, eax
jne 0x57ef30
xor eax, eax
add esp, 0x3c
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, 1
jmp 0x57ef50