Function at 0x43e580
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
add eax, esi
sub eax, dword [esp + 0x44]
mov dword [ecx + 8], 0
mov dword [ecx + 4], 0
mov dword [ecx], 0
mov dword [esp + 0x1c], eax
cmp eax, esi
jbe 0x43e80b
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
lea ebp, [eax - 1]
xor edi, edi
mov dword [esp], 0
xor eax, eax
mov dword [esp + 0x18], ebp
jmp 0x43e610
mov ebp, edi
mov ecx, dword [esp]
sub ebp, ecx
cmp edi, eax
je 0x43e659
mov ebx, ecx
mov ecx, dword [esp + 0x34]
mov dword [ebx + ebp], esi
add edi, 4
mov dword [ecx + 4], edi
mov ecx, dword [esp + 0x44]
add esi, ecx
dec esi
mov ebp, dword [esp + 0x18]
inc esi
cmp esi, dword [esp + 0x1c]
jae 0x43e80b
test edx, edx
je 0x43e619
cmp byte [edx], 0x3f
je 0x43e624
movzx ecx, byte [esi]
mov ebx, dword [esp + 0x40]
cmp cl, byte [ebx]
jne 0x43e605
cmp dword [esp + 0x44], 2
jb 0x43e5e0
xor ecx, ecx
jmp 0x43e64c
movzx edx, byte [esi + ecx + 1]
mov ebx, dword [esp + 0x40]
cmp dl, byte [ebx + ecx + 1]
mov edx, dword [esp + 0x48]
jne 0x43e77f
inc ecx
cmp ebp, ecx
je 0x43e5e0
test edx, edx
je 0x43e630
cmp byte [edx + ecx + 1], 0x3f
jne 0x43e630
jmp 0x43e647
mov dword [esp + 0xc], ebp
sar ebp, 2
lea edx, [ebp + 1]
mov eax, ebp
shr eax, 1
add eax, ebp
cmp eax, edx
ja 0x43e66f
mov eax, edx
mov ebx, eax
and ebx, 4
mov ecx, eax
or ecx, 4
imul ecx, ebx
xor ebx, 4
mov dword [esp + 0x14], eax
and eax, 0xfffffffb
imul eax, ebx
add ecx, eax
push ecx
call fcn.0040c9c0
add esp, 4
mov edx, dword [esp]
test edx, edx
mov ebx, dword [esp + 0xc]
je 0x43e7e5
mov ecx, edi
not ecx
and ecx, edx
mov ebp, edx
not ebp
and ebp, edi
mov dword [esp + 8], ebp
sub ebp, ecx
cmp eax, edx
mov edi, eax
mov dword [esp + 0x10], eax
jbe 0x43e786
lea eax, [edx + ebp]
cmp eax, edi
jbe 0x43e786
test ebp, ebp
je 0x43e7d6
mov dword [esp + 4], ecx
mov eax, dword [esp]
add eax, ebp
dec eax
mov ecx, dword [esp + 0x10]
add ecx, ebp
dec ecx
mov edx, ebp
and edx, 7
je 0x43e716
neg edx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [eax + edi]
mov byte [ecx + edi], bl
dec edi
cmp edx, edi
jne 0x43e700
add eax, edi
add ecx, edi
add ebp, edi
mov ebx, dword [esp + 0xc]
mov edx, dword [esp + 4]
sub edx, dword [esp + 8]
cmp edx, 0xfffffff8
ja 0x43e7d6
neg ebp
xor edi, edi
nop
nop
nop
nop
nop
movzx edx, byte [eax + edi]
mov byte [ecx + edi], dl
movzx edx, byte [eax + edi - 1]
mov byte [ecx + edi - 1], dl
movzx edx, byte [eax + edi - 2]
mov byte [ecx + edi - 2], dl
movzx edx, byte [eax + edi - 3]
mov byte [ecx + edi - 3], dl
movzx edx, byte [eax + edi - 4]
mov byte [ecx + edi - 4], dl
movzx edx, byte [eax + edi - 5]
mov byte [ecx + edi - 5], dl
movzx edx, byte [eax + edi - 6]
mov byte [ecx + edi - 6], dl
movzx edx, byte [eax + edi - 7]
mov byte [ecx + edi - 7], dl
add edi, 0xfffffff8
cmp ebp, edi
jne 0x43e730
jmp 0x43e7d6
add esi, ecx
jmp 0x43e605
mov ecx, ebp
shr ecx, 2
mov eax, edx
mov ebx, edi
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, ebp
and eax, 0xfffffffc
lea edi, [ebx + eax]
mov ebx, dword [esp + 0xc]
add eax, edx
mov ecx, ebp
not ecx
or ecx, 3
lea edx, [ecx + ebp]
inc edx
mov ecx, edx
shr ecx, 1
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov ebp, dword [esp + 8]
xchg esi, ebp
rep movsw word es:[edi], word [esi]
xchg esi, ebp
test dl, 1
je 0x43e7d6
and edx, 0xfffffffe
movzx eax, byte [eax + edx]
mov ecx, dword [esp + 4]
mov byte [ecx + edx], al
push dword [esp]
call fcn.0040c9d0
add esp, 4
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x34]
mov dword [ecx], eax
mov ebp, ebx
mov ebx, eax
mov eax, dword [esp + 0x14]
lea eax, [ebx + eax*4]
mov edi, ebx
add edi, ebp
mov dword [ecx + 8], eax
mov edx, ebx
mov dword [esp], ebx
mov edx, dword [esp + 0x48]
jmp 0x43e5f1
mov eax, dword [esp + 0x34]
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret