Function at 0x439c40
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov eax, dword [esp + 0x3c]
mov ebp, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
add edx, ebp
sub edx, dword [esp + 0x4c]
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
cmp edx, ebp
jbe 0x439fc2
mov esi, dword [esp + 0x50]
mov ebx, dword [esp + 0x48]
mov eax, dword [esp + 0x4c]
dec eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], 0
mov dword [esp], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x24], edx
jmp 0x439ce5
mov eax, dword [esp + 8]
mov dword [eax + esi*4], ebp
mov edx, dword [esp + 4]
add edx, 4
mov ecx, dword [esp + 0x3c]
mov dword [ecx + 4], edx
add ebp, dword [esp + 0x1c]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x50]
mov ebx, dword [esp + 0x48]
inc ebp
mov dword [esp], eax
cmp ebp, edx
jae 0x439fc2
test esi, esi
je 0x439cee
cmp byte [esi], 0x3f
je 0x439cfa
movzx eax, byte [ebp]
cmp al, byte [ebx]
jne 0x439e20
cmp dword [esp + 0x4c], 2
jb 0x439d40
xor eax, eax
jmp 0x439d26
movzx ecx, byte [ebp + eax + 1]
cmp cl, byte [ebx + eax + 1]
jne 0x439e28
inc eax
cmp dword [esp + 0x1c], eax
je 0x439d40
test esi, esi
je 0x439d10
cmp byte [esi + eax + 1], 0x3f
jne 0x439d10
jmp 0x439d1f
mov ecx, dword [esp + 0x14]
mov edi, ecx
mov edx, dword [esp]
sub edi, edx
mov ebx, edi
sar ebx, 2
mov esi, edx
not esi
mov eax, edx
mov dword [esp + 4], ecx
cmp ecx, dword [esp + 0x10]
jne 0x439f29
mov dword [esp + 0x18], esi
mov dword [esp + 4], edi
lea eax, [ebx + 1]
mov edi, ebx
shr edi, 1
mov dword [esp + 0x20], ebx
add edi, ebx
cmp edi, eax
ja 0x439d7f
mov edi, eax
lea eax, [edi*4]
push eax
call fcn.00409230
add esp, 4
mov edx, dword [esp]
test edx, edx
je 0x439ef7
mov dword [esp + 0x10], edi
cmp eax, edx
mov edi, eax
mov ebx, dword [esp + 4]
mov dword [esp + 8], eax
jbe 0x439e32
lea eax, [edx + ebx]
cmp eax, edi
jbe 0x439e32
test ebx, ebx
je 0x439ee1
mov eax, dword [esp]
add eax, ebx
dec eax
mov ecx, dword [esp + 8]
lea ecx, [ecx + ebx - 1]
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
add edx, esi
and ebx, 7
je 0x439e7a
mov dword [esp + 0xc], 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 0x439df0
add eax, edi
add ecx, edi
mov ebx, dword [esp + 4]
add ebx, edi
mov edx, dword [esp + 0xc]
cmp edx, 7
jae 0x439e83
jmp 0x439ee1
mov eax, dword [esp]
jmp 0x439cd9
add ebp, eax
mov eax, dword [esp]
jmp 0x439cd9
mov ecx, ebx
shr ecx, 2
mov dword [esp + 0xc], edx
mov eax, dword [esp + 0xc]
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov ecx, edx
mov edx, ebx
and edx, 0xfffffffc
mov eax, dword [esp + 8]
lea edi, [eax + edx]
add edx, ecx
mov ecx, ebx
shr ecx, 1
and ecx, 1
mov eax, edx
mov dword [esp + 0xc], edi
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
test bl, 1
je 0x439ee1
and ebx, 2
movzx ecx, byte [edx + ebx]
mov eax, dword [esp + 0xc]
mov byte [eax + ebx], cl
jmp 0x439ee1
mov ebx, dword [esp + 4]
cmp edx, 7
jb 0x439ee1
neg ebx
xor edx, edx
nop
nop
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 0x439e90
mov ebx, dword [esp]
push ebx
call fcn.00409240
mov edx, ebx
add esp, 4
mov eax, dword [esp + 8]
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x3c]
mov dword [ecx], eax
mov ebx, dword [esp + 0x20]
lea ecx, [eax + ebx*4]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 4]
mov esi, dword [esp + 0x3c]
mov dword [esi + 4], ecx
lea edi, [eax + edi*4]
mov dword [esp + 0x10], edi
mov ecx, dword [esp + 0x3c]
mov dword [ecx + 8], edi
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov dword [esp + 8], eax
mov eax, edx
xor eax, ecx
and esi, ecx
add esi, esi
sub esi, eax
sar esi, 2
cmp esi, ebx
jae 0x439cb0
lea edx, [edx + ebx*4]
mov edi, ecx
mov dword [esp], edx
sub edx, ecx
mov ecx, dword [esp + 8]
lea ebx, [ecx + esi*4]
lea eax, [ecx + esi*4]
add eax, 4
lea ecx, [ebx + edx]
cmp ecx, eax
jbe 0x439f79
cmp dword [esp], edi
je 0x439cb0
push edx
push ebx
push eax
call fcn.004092c0
add esp, 0xc
jmp 0x439cb0
mov dword [esp], eax
mov ecx, edx
shr ecx, 2
mov eax, ebx
mov edi, dword [esp]
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, edx
and eax, 0xfffffffc
add dword [esp], eax
add eax, ebx
mov ecx, edx
shr ecx, 1
and ecx, 1
mov ebx, eax
mov edi, dword [esp]
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
mov ecx, dword [esp]
test dl, 1
je 0x439cb0
and edx, 2
movzx eax, byte [eax + edx]
mov byte [ecx + edx], al
jmp 0x439cb0
mov eax, dword [esp + 0x3c]
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret