Function at 0x437170
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
add ecx, esi
sub ecx, dword [esp + 0x44]
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [esp + 0x1c], ecx
cmp ecx, esi
jbe 0x437412
mov ebp, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
dec ecx
mov dword [esp + 0x18], ecx
xor edx, edx
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
jmp 0x4371e7
xor edx, 0xfffffffe
and ecx, 0xfffffffc
add ecx, edx
add esi, ecx
inc esi
mov eax, dword [esp + 0x34]
mov edx, dword [esp]
inc esi
cmp esi, dword [esp + 0x1c]
jae 0x437412
mov dword [esp], edx
test ebp, ebp
je 0x4371f4
cmp byte [ebp], 0x3f
je 0x4371ff
movzx ecx, byte [esi]
mov edx, dword [esp + 0x40]
cmp cl, byte [edx]
jne 0x4371d9
mov eax, dword [esp + 0x44]
cmp eax, 2
jb 0x437250
mov edx, 1
mov ecx, 2
jmp 0x437235
movzx ebx, byte [esi + edx]
mov edi, dword [esp + 0x40]
cmp bl, byte [edi + edx]
jne 0x4371ca
inc edx
add ecx, 2
cmp eax, edx
je 0x437250
test ebp, ebp
je 0x437220
cmp byte [ebp + edx], 0x3f
jne 0x437220
jmp 0x43722d
mov edx, dword [esp]
mov edi, edx
mov eax, dword [esp + 8]
sub edi, eax
mov ecx, edi
sar ecx, 2
cmp edx, dword [esp + 0xc]
je 0x437271
mov edi, eax
mov eax, dword [esp + 0x34]
jmp 0x437400
mov dword [esp + 4], edi
lea eax, [ecx + 1]
mov edx, ecx
shr edx, 1
mov dword [esp + 0x14], ecx
add edx, ecx
cmp edx, eax
ja 0x437288
mov edx, eax
mov dword [esp + 0xc], edx
lea eax, [edx*4]
push eax
call fcn.00408d40
add esp, 4
mov edi, eax
mov ebx, dword [esp + 8]
test ebx, ebx
je 0x4373e1
cmp edi, ebx
mov eax, dword [esp]
mov dword [esp + 0x10], edi
jbe 0x437323
cmp eax, edi
jbe 0x437323
mov ebx, dword [esp + 4]
test ebx, ebx
je 0x4373d1
lea ecx, [ebx + 0x4cfb6981]
mov edx, dword [esp + 8]
lea eax, [edx + ecx]
add eax, 0xb304967e
mov edi, dword [esp + 0x10]
add ecx, edi
add ecx, 0xb304967e
not edx
add edx, dword [esp]
and ebx, 7
je 0x43736c
mov dword [esp], edx
neg ebx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [eax + edi]
mov byte [ecx + edi], dl
dec edi
cmp ebx, edi
jne 0x437300
add eax, edi
add ecx, edi
mov ebx, dword [esp + 4]
add ebx, edi
mov edx, dword [esp]
cmp edx, 7
jae 0x437375
jmp 0x4373d1
mov ecx, dword [esp + 4]
shr ecx, 2
mov edx, ebx
mov eax, edi
xchg esi, edx
rep movsd dword es:[edi], dword [esi]
xchg esi, edx
mov ecx, dword [esp + 4]
mov edx, ecx
and edx, 0xfffffffc
add eax, edx
add edx, ebx
shr ecx, 1
and ecx, 1
mov ebx, edx
mov dword [esp], eax
mov edi, eax
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
mov ebx, dword [esp + 4]
test bl, 1
je 0x4373d1
and ebx, 2
movzx ecx, byte [edx + ebx]
mov eax, dword [esp]
mov byte [eax + ebx], cl
jmp 0x4373d1
mov ebx, dword [esp + 4]
cmp edx, 7
jb 0x4373d1
neg ebx
xor edx, edx
nop
nop
nop
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 0x437380
push dword [esp + 8]
call fcn.00408d50
add esp, 4
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x34]
mov dword [eax], edi
mov ecx, dword [esp + 0x14]
lea edx, [edi + ecx*4]
mov ebx, dword [esp + 0xc]
lea ebx, [edi + ebx*4]
mov dword [esp + 0xc], ebx
mov dword [eax + 8], ebx
mov dword [esp + 8], edi
mov dword [edi + ecx*4], esi
add edx, 4
mov dword [eax + 4], edx
add esi, dword [esp + 0x18]
jmp 0x4371dc
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret