Function at 0x429050
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xb4
push ebx
push ebp
mov ebp, dword [esp + 0xc0]
mov eax, dword [ebp]
push esi
push edi
xor edi, edi
mov dword [eax + 8], edi
mov eax, ebp
call fcn.004285d0
test eax, eax
jne 0x429092
mov ecx, dword [ebp]
mov eax, dword [ecx + 8]
push edi
mov ecx, ebp
call fcn.00427e90
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb4
ret
mov eax, dword [ebp]
mov eax, dword [eax + 8]
cmp eax, 3
jne 0x4290bf
cmp dword [ebp + 0x47ec], eax
je 0x4290b5
cmp dword [ebp + 0x47e8], edi
jne 0x4290bf
cmp dword [ebp + 0x47e4], edi
jne 0x4290bf
mov dword [esp + 0x30], 1
jmp 0x4290c3
mov dword [esp + 0x30], edi
xor ebx, ebx
cmp eax, edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], edi
jle 0x4291b9
lea esi, [esp + 0x50]
lea ebx, [ebp + 0x46a0]
mov eax, dword [ebp]
mov eax, dword [eax]
add eax, 3
push eax
call fcn.004876f9
add esp, 4
mov dword [ebx + 0x34], eax
test eax, eax
je 0x429264
mov eax, dword [ebp + 0x4684]
cdq
idiv dword [ebx]
mov dword [esi + 0xc], 0
mov ecx, eax
mov eax, dword [ebp + 0x4688]
cdq
idiv dword [ebx + 4]
mov dword [esi - 4], ecx
mov edi, eax
mov eax, dword [ebp]
mov eax, dword [eax]
mov edx, edi
sar edx, 1
mov dword [esi + 8], edx
lea eax, [ecx + eax - 1]
xor edx, edx
div ecx
mov dword [esi], edi
mov dword [esi + 4], eax
mov eax, dword [ebx + 0x28]
mov dword [esi - 8], eax
mov dword [esi - 0xc], eax
cmp ecx, 1
jne 0x42916e
cmp edi, ecx
jne 0x429160
mov dword [esi - 0x10], 0x428840
jmp 0x429198
cmp edi, 2
jne 0x42916e
mov dword [esi - 0x10], 0x428850
jmp 0x429198
cmp ecx, 2
jne 0x429191
cmp edi, 1
jne 0x429181
mov dword [esi - 0x10], 0x4288a0
jmp 0x429198
cmp edi, 2
jne 0x429191
mov ecx, dword [ebp + 0x4814]
mov dword [esi - 0x10], ecx
jmp 0x429198
mov dword [esi - 0x10], 0x428bb0
mov eax, dword [esp + 0x14]
inc eax
add esi, 0x20
add ebx, 0x48
cmp eax, dword [esp + 0x2c]
mov dword [esp + 0x14], eax
jl 0x4290ef
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov eax, dword [ebp]
mov esi, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x28], ecx
test esi, esi
jl 0x429235
je 0x4291e1
mov eax, SysReAllocString
cdq
idiv esi
xor edx, edx
cmp eax, 4
setge dl
mov eax, edx
test eax, eax
je 0x429235
lea eax, [esi*4]
test eax, eax
jl 0x429235
test ecx, ecx
jl 0x429235
je 0x429212
mov eax, SysReAllocString
cdq
idiv ecx
xor edx, edx
lea ecx, [esi*4]
cmp ecx, eax
setle dl
mov eax, edx
test eax, eax
je 0x429235
mov ecx, dword [esp + 0x28]
imul esi, ecx
add esi, esi
add esi, esi
cmp esi, 0x7ffffffe
jg 0x429235
inc esi
push esi
call fcn.004876f9
mov esi, eax
add esp, 4
mov dword [esp + 0x28], esi
test esi, esi
jne 0x429292
mov eax, dword [ebp]
mov eax, dword [eax + 8]
push 0
mov ecx, ebp
call fcn.00427e90
mov ecx, dword fs:[0x2c]
mov edx, dword [ecx]
add esp, 4
mov dword [edx + 4], str.outofmem
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb4
ret
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push 0
mov ecx, ebp
call fcn.00427e90
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
add esp, 4
mov dword [ecx + 4], str.outofmem
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb4
ret
mov eax, dword [ebp]
xor ecx, ecx
mov dword [esp + 0x34], ecx
cmp dword [eax + 4], ecx
jbe 0x429489
mov eax, dword [eax]
imul eax, ecx
cmp dword [esp + 0x2c], 0
lea esi, [esi + eax*4]
mov dword [esp + 0x14], 0
jle 0x429351
lea ebx, [ebp + 0x46bc]
lea edi, [esp + 0x58]
lea esp, [esp]
mov eax, dword [edi - 8]
mov ecx, dword [edi]
sar eax, 1
xor edx, edx
cmp ecx, eax
setge dl
mov eax, edx
test eax, eax
je 0x4292ec
mov ecx, dword [edi - 0x14]
mov eax, dword [edi - 0x10]
jmp 0x4292f2
mov ecx, dword [edi - 0x10]
mov eax, dword [edi - 0x14]
mov edx, dword [edi - 0xc]
push edx
mov edx, dword [edi - 4]
push edx
push ecx
mov ecx, dword [edi - 0x18]
push eax
mov eax, dword [ebx + 0x18]
push eax
call ecx
mov edx, dword [esp + 0x28]
mov dword [esp + edx*4 + 0x2c], eax
mov eax, dword [edi]
inc eax
add esp, 0x14
cmp eax, dword [edi - 8]
mov dword [edi], eax
jl 0x429338
inc dword [edi + 4]
mov ecx, dword [edi + 4]
cmp ecx, dword [ebx]
mov eax, dword [edi - 0x10]
mov dword [edi], 0
mov dword [edi - 0x14], eax
jge 0x429338
mov ecx, dword [ebx + 4]
add ecx, eax
mov dword [edi - 0x10], ecx
inc edx
add edi, 0x20
add ebx, 0x48
cmp edx, dword [esp + 0x2c]
mov dword [esp + 0x14], edx
jl 0x4292d0
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
cmp ecx, 3
jne 0x4293c6
cmp dword [esp + 0x30], 0
je 0x4293a9
xor ecx, ecx
cmp dword [eax], ecx
jbe 0x429470
mov edx, edi
sub edx, ebx
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x20]
mov eax, ebx
sub edx, ebx
mov ebx, dword [esp + 0x14]
movzx ebx, byte [ebx + eax]
mov byte [esi], bl
movzx ebx, byte [eax]
mov byte [esi + 1], bl
movzx ebx, byte [edx + eax]
mov byte [esi + 2], bl
mov byte [esi + 3], 0xff
mov ebx, dword [ebp]
inc ecx
add esi, 4
inc eax
cmp ecx, dword [ebx]
jb 0x42937d
jmp 0x42946c
mov edx, dword [eax]
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 0x4810]
push 4
push edx
push eax
push ebx
push edi
push esi
call ecx
add esp, 0x18
jmp 0x429470
cmp ecx, 4
jne 0x429592
mov ecx, dword [ebp + 0x47e8]
test ecx, ecx
jne 0x4294e2
xor edx, edx
cmp dword [eax], edx
jbe 0x429470
mov eax, dword [esp + 0x24]
sub ebx, edi
mov dword [esp + 0x38], ebx
mov ebx, dword [esp + 0x20]
sub eax, edi
sub ebx, edi
mov ecx, edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x3c], ebx
jmp 0x429409
mov eax, dword [esp + 0x14]
movzx edi, byte [ecx + eax]
movzx eax, byte [ecx]
imul eax, edi
sub eax, 0xffffff80
mov ebx, eax
shr ebx, 8
add ebx, eax
mov eax, dword [esp + 0x38]
shr ebx, 8
mov byte [esi], bl
movzx eax, byte [ecx + eax]
imul eax, edi
sub eax, 0xffffff80
mov ebx, eax
shr ebx, 8
add ebx, eax
mov eax, dword [esp + 0x3c]
shr ebx, 8
mov byte [esi + 1], bl
movzx eax, byte [ecx + eax]
imul eax, edi
sub eax, 0xffffff80
mov ebx, eax
shr ebx, 8
add ebx, eax
shr ebx, 8
mov byte [esi + 2], bl
mov byte [esi + 3], 0xff
mov eax, dword [ebp]
inc edx
add esi, 4
inc ecx
cmp edx, dword [eax]
jb 0x429405
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x34]
mov eax, dword [ebp]
mov esi, dword [esp + 0x28]
inc ecx
mov dword [esp + 0x34], ecx
cmp ecx, dword [eax + 4]
jb 0x4292a4
mov ecx, dword [ebp]
mov eax, dword [ecx + 8]
push 0
mov ecx, ebp
call fcn.00427e90
mov edx, dword [ebp]
mov eax, dword [edx]
mov ecx, dword [esp + 0xd0]
mov dword [ecx], eax
mov edx, dword [ebp]
mov eax, dword [edx + 4]
mov ecx, dword [esp + 0xd4]
mov dword [ecx], eax
mov eax, dword [esp + 0xd8]
add esp, 4
test eax, eax
je 0x4294d5
mov edx, dword [ebp]
xor ecx, ecx
cmp dword [edx + 8], 3
setge cl
lea ecx, [ecx + ecx + 1]
mov dword [eax], ecx
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xb4
ret
push 4
cmp ecx, 2
jne 0x429577
mov ecx, dword [eax]
mov edx, dword [esp + 0x24]
mov eax, dword [ebp + 0x4810]
push ecx
push edx
push ebx
push edi
push esi
call eax
mov ecx, dword [ebp]
xor edi, edi
add esp, 0x18
cmp dword [ecx], edi
jbe 0x429468
mov edx, dword [esp + 0x24]
movzx ecx, byte [edi + edx]
or al, 0xff
sub al, byte [esi]
inc edi
movzx eax, al
imul eax, ecx
sub eax, 0xffffff80
mov edx, eax
shr edx, 8
add edx, eax
or al, 0xff
sub al, byte [esi + 1]
shr edx, 8
movzx eax, al
imul eax, ecx
sub eax, 0xffffff80
mov byte [esi], dl
mov edx, eax
shr edx, 8
add edx, eax
or al, 0xff
sub al, byte [esi + 2]
shr edx, 8
movzx eax, al
imul eax, ecx
sub eax, 0xffffff80
mov ecx, eax
shr ecx, 8
add ecx, eax
shr ecx, 8
mov byte [esi + 1], dl
mov byte [esi + 2], cl
mov edx, dword [ebp]
add esi, 4
cmp edi, dword [edx]
jb 0x429510
jmp 0x429468
mov eax, dword [eax]
mov ecx, dword [esp + 0x24]
mov edx, dword [ebp + 0x4810]
push eax
push ecx
push ebx
push edi
push esi
call edx
add esp, 0x18
jmp 0x429470
xor ecx, ecx
cmp dword [eax], ecx
jbe 0x429470
lea esp, [esp]
mov al, byte [ecx + edi]
mov byte [esi + 2], al
mov byte [esi + 1], al
mov byte [esi], al
mov byte [esi + 3], 0xff
mov eax, dword [ebp]
inc ecx
add esi, 4
cmp ecx, dword [eax]
jb 0x4295a0
jmp 0x429470