Function at 0x431e70
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov edi, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
add eax, ebp
sub eax, dword [esp + 0x48]
mov dword [edi + 8], 0
mov dword [edi + 4], 0
mov dword [edi], 0
mov dword [esp + 0x20], eax
cmp eax, ebp
jbe 0x432121
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
lea esi, [eax - 1]
xor ebx, ebx
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
jmp 0x431f03
mov edi, ebx
mov eax, dword [esp + 8]
sub edi, eax
mov ecx, edi
sar ecx, 2
mov dword [esp], ebx
cmp ebx, dword [esp + 0x10]
je 0x431f59
mov ebx, dword [esp]
mov edi, dword [esp + 0x38]
mov dword [eax + ecx*4], ebp
add ebx, 4
mov dword [edi + 4], ebx
add ebp, esi
inc ebp
cmp ebp, dword [esp + 0x20]
jae 0x432121
test edx, edx
je 0x431f0c
cmp byte [edx], 0x3f
je 0x431f18
movzx ecx, byte [ebp]
mov eax, dword [esp + 0x44]
cmp cl, byte [eax]
jne 0x431ef8
cmp dword [esp + 0x48], 2
jb 0x431ed0
xor ecx, ecx
jmp 0x431f4c
movzx edx, byte [ebp + ecx + 1]
mov eax, dword [esp + 0x44]
cmp dl, byte [eax + ecx + 1]
mov edx, dword [esp + 0x4c]
jne 0x432010
inc ecx
cmp esi, ecx
je 0x431ed0
test edx, edx
je 0x431f30
cmp byte [edx + ecx + 1], 0x3f
jne 0x431f30
jmp 0x431f47
mov dword [esp + 0xc], edi
lea eax, [ecx + 1]
mov edx, ecx
shr edx, 1
add edx, ecx
cmp edx, eax
ja 0x431f6c
mov edx, eax
mov dword [esp + 0x1c], ecx
mov eax, 0xffffffff
cmp edx, 0x40000000
mov edi, dword [esp + 0x38]
jae 0x431f88
lea eax, [edx*4]
mov dword [esp + 0x10], edx
push eax
call fcn.00430d10
add esp, 4
mov edx, dword [esp + 8]
test edx, edx
mov dword [esp + 4], eax
je 0x4320f5
cmp eax, edx
jae 0x432017
mov edi, eax
mov ebx, dword [esp + 0xc]
mov ecx, ebx
shr ecx, 2
mov eax, edx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, ebx
and eax, 0xfffffffc
mov ecx, dword [esp + 4]
lea edi, [ecx + eax]
add eax, edx
mov ecx, ebx
and ecx, 3
mov dword [esp + 0x14], ecx
shr ecx, 1
mov edx, eax
mov dword [esp], eax
mov dword [esp + 0x18], edi
mov edx, dword [esp]
xchg esi, edx
rep movsw word es:[edi], word [esi]
xchg esi, edx
test bl, 1
je 0x4320e1
mov ecx, ebx
and ecx, 2
mov edx, dword [esp + 0x14]
xor edx, 1
or ebx, 2
and ebx, edx
movzx eax, byte [eax + ecx]
mov ecx, dword [esp + 0x18]
mov byte [ecx + ebx], al
jmp 0x4320e1
add ebp, ecx
jmp 0x431ef8
mov edi, dword [esp + 0xc]
test edi, edi
je 0x4320e1
mov ebx, dword [esp + 8]
lea eax, [edi + ebx]
dec eax
mov ecx, edi
or ecx, 0xfffffffe
mov edx, edi
and edx, 0xfffffffe
add edx, ecx
mov ecx, dword [esp + 4]
add ecx, edx
inc ecx
mov edx, ebx
not edx
add edx, dword [esp]
mov ebx, edi
and ebx, 7
je 0x432080
mov dword [esp], edx
neg ebx
xor edi, edi
nop
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 0x432060
add eax, edi
mov ebx, dword [esp + 0xc]
add ebx, edi
add ecx, edi
mov edx, dword [esp]
cmp edx, 7
jae 0x432089
jmp 0x4320e1
mov ebx, dword [esp + 0xc]
cmp edx, 7
jb 0x4320e1
neg ebx
xor edx, edx
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 0x432090
push dword [esp + 8]
call fcn.00430e90
add esp, 4
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 4]
mov dword [edi], eax
mov ecx, dword [esp + 0x1c]
lea ebx, [eax + ecx*4]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 4]
lea edx, [edx + eax*4]
mov eax, dword [esp + 4]
mov dword [esp + 0x10], edx
mov dword [edi + 8], edx
mov dword [esp + 8], eax
mov edx, dword [esp + 0x4c]
jmp 0x431eed
mov eax, edi
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret