Function at 0x3037a20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
add eax, ebp
sub eax, dword [esp + 0x44]
mov dword [ebx + 8], 0
mov dword [ebx + 4], 0
mov dword [ebx], 0
mov dword [esp + 0x1c], eax
cmp eax, ebp
jbe 0x3037cae
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
lea esi, [eax - 1]
xor edi, edi
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], esi
jmp 0x3037ab9
mov esi, ebx
mov ebx, edi
mov eax, dword [esp + 8]
sub edi, eax
mov ecx, edi
sar ecx, 2
mov dword [esp + 4], ebx
cmp ebx, dword [esp + 0xc]
je 0x3037b09
mov edi, dword [esp + 4]
mov ebx, esi
mov esi, dword [esp + 0x14]
mov dword [eax + ecx*4], ebp
add edi, 4
mov dword [ebx + 4], edi
add ebp, esi
inc ebp
cmp ebp, dword [esp + 0x1c]
jae 0x3037cae
test edx, edx
je 0x3037ac2
cmp byte [edx], 0x3f
je 0x3037ace
movzx ecx, byte [ebp]
mov eax, dword [esp + 0x40]
cmp cl, byte [eax]
jne 0x3037aae
cmp dword [esp + 0x44], 2
jb 0x3037a80
xor ecx, ecx
jmp 0x3037afc
movzx edx, byte [ebp + ecx + 1]
mov eax, dword [esp + 0x40]
cmp dl, byte [eax + ecx + 1]
mov edx, dword [esp + 0x48]
jne 0x3037bc4
inc ecx
cmp esi, ecx
je 0x3037a80
test edx, edx
je 0x3037ae0
cmp byte [edx + ecx + 1], 0x3f
jne 0x3037ae0
jmp 0x3037af7
mov dword [esp + 0x10], edi
lea edx, [ecx + 1]
mov eax, ecx
shr eax, 1
mov dword [esp + 0x18], ecx
add eax, ecx
cmp eax, edx
ja 0x3037b20
mov eax, edx
mov ebx, eax
and ebx, 0xfffffffb
mov ecx, eax
and ecx, 4
mov dword [esp + 0xc], eax
or eax, 4
imul eax, ecx
xor ecx, 4
imul ecx, ebx
add eax, ecx
push eax
call fcn.03008c00
add esp, 4
mov edx, dword [esp + 8]
test edx, edx
mov ebx, dword [esp + 0x34]
mov edi, dword [esp + 4]
mov dword [esp], eax
mov esi, dword [esp + 0x14]
je 0x3037c84
cmp eax, edx
mov ebx, dword [esp + 0x10]
jbe 0x3037bcb
mov ecx, eax
lea eax, [edx + ebx]
cmp eax, ecx
jbe 0x3037bcb
test ebx, ebx
je 0x3037c71
mov edx, dword [esp + 8]
lea eax, [edx + ebx]
dec eax
mov ecx, dword [esp]
add ecx, ebx
dec ecx
not edx
add edx, edi
and ebx, 7
je 0x3037c0f
mov dword [esp + 4], edx
neg ebx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [eax + edi]
mov byte [ecx + edi], dl
dec edi
cmp ebx, edi
jne 0x3037ba0
add eax, edi
mov ebx, dword [esp + 0x10]
add ebx, edi
add ecx, edi
mov edx, dword [esp + 4]
cmp edx, 7
jae 0x3037c18
jmp 0x3037c71
add ebp, ecx
jmp 0x3037aae
mov ecx, ebx
shr ecx, 2
mov eax, edx
mov edi, dword [esp]
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, edx
mov edx, ebx
and edx, 0xfffffffc
mov ecx, dword [esp]
lea edi, [ecx + edx]
add edx, eax
mov ecx, ebx
shr ecx, 1
and ecx, 1
mov eax, edx
mov dword [esp + 4], edi
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
test bl, 1
je 0x3037c71
and ebx, 2
movzx eax, byte [edx + ebx]
mov ecx, dword [esp + 4]
mov byte [ecx + ebx], al
jmp 0x3037c71
mov ebx, dword [esp + 0x10]
cmp edx, 7
jb 0x3037c71
neg ebx
xor edx, edx
nop
nop
nop
nop
mov edi, ebx
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
movzx ebx, byte [eax + edx - 1]
mov byte [ecx + edx - 1], bl
movzx ebx, byte [eax + edx - 2]
mov byte [ecx + edx - 2], bl
movzx ebx, byte [eax + edx - 3]
mov byte [ecx + edx - 3], bl
movzx ebx, byte [eax + edx - 4]
mov byte [ecx + edx - 4], bl
movzx ebx, byte [eax + edx - 5]
mov byte [ecx + edx - 5], bl
movzx ebx, byte [eax + edx - 6]
mov byte [ecx + edx - 6], bl
movzx ebx, byte [eax + edx - 7]
mov byte [ecx + edx - 7], bl
mov ebx, edi
add edx, 0xfffffff8
cmp edi, edx
jne 0x3037c20
push dword [esp + 8]
call fcn.03008c10
add esp, 4
mov ebx, dword [esp + 0x34]
mov eax, dword [esp]
mov dword [ebx], eax
mov ecx, dword [esp + 0x18]
lea edi, [eax + ecx*4]
mov eax, dword [esp + 0xc]
mov edx, dword [esp]
lea edx, [edx + eax*4]
mov eax, dword [esp]
mov dword [esp + 0xc], edx
mov dword [ebx + 8], edx
mov dword [esp + 8], eax
mov edx, dword [esp + 0x48]
jmp 0x3037aa3
mov eax, ebx
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret