Function at 0x429d70
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x18]
mov ecx, dword [ebx + 0x28]
mov eax, dword [ebx + 0xc]
lea eax, [eax + ecx - 1]
cdq
idiv ecx
mov ecx, dword [ebx + 0x2c]
mov edx, dword [ebx + 0x10]
push esi
mov esi, eax
lea eax, [ecx + edx - 1]
cdq
idiv ecx
cmp dword [ebx + 0x1c], 0
mov dword [ebx + 0x30], esi
mov dword [ebx + 0x34], eax
je 0x429dc5
test esi, esi
jle 0x429dc5
test eax, eax
jle 0x429dc5
mov eax, dword [ebx + 0x38]
push eax
call fcn.00452d18
mov ecx, dword [ebx + 0x30]
imul ecx, dword [ebx + 0x34]
push ecx
call fcn.00452d7b
add esp, 8
mov dword [ebx + 0x38], eax
mov eax, dword [esp + 0x18]
cmp eax, 4
ja case.default.0x429dd4
push ebp
push edi
jmp dword [eax*4 + 0x42a124]
cmp dword [ebx + 0x1c], 0
je case.0x429dd4.4
mov eax, dword [ebx + 0xc]
add eax, eax
xor edi, edi
add eax, eax
cmp dword [ebx + 0x34], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], edi
jle case.0x429dd4.4
nop
mov eax, dword [ebx + 0x2c]
mov ecx, dword [ebx + 0x10]
mov edx, eax
imul edx, edi
sub ecx, edx
cmp ecx, eax
mov dword [esp + 0x24], ecx
jle 0x429e19
mov dword [esp + 0x24], eax
xor ebp, ebp
cmp dword [ebx + 0x30], ebp
mov dword [esp + 0x10], ebp
jle 0x429ebc
mov ecx, dword [ebx + 0x28]
mov esi, dword [ebx + 0xc]
mov eax, ecx
imul eax, ebp
mov edx, esi
sub edx, eax
cmp edx, ecx
jle 0x429e3d
mov edx, ecx
mov ecx, dword [ebx + 0x2c]
imul ecx, esi
imul ecx, edi
add ecx, eax
mov eax, dword [ebx + 0x24]
lea edi, [eax + ecx*4 + 3]
mov al, byte [edi]
test al, al
je 0x429e99
cmp al, 0xff
je 0x429e99
xor ebp, ebp
cmp dword [esp + 0x24], ebp
jle 0x429e95
xor esi, esi
test edx, edx
mov ecx, edi
jle 0x429e88
lea esp, [esp]
or al, 0xff
sub al, byte [ecx]
add ecx, 4
cmp al, 0x80
jne 0x429e84
add esi, 1
cmp esi, edx
jl 0x429e70
jmp 0x429e88
mov ebp, dword [esp + 0x24]
add edi, dword [esp + 0x14]
add ebp, 1
cmp ebp, dword [esp + 0x24]
jl 0x429e61
mov ebp, dword [esp + 0x10]
mov ecx, dword [ebx + 0x30]
imul ecx, dword [esp + 0x20]
add ecx, dword [ebx + 0x38]
mov edi, dword [esp + 0x20]
mov byte [ecx + ebp], 0x80
add ebp, 1
cmp ebp, dword [ebx + 0x30]
mov dword [esp + 0x10], ebp
jl 0x429e28
add edi, 1
cmp edi, dword [ebx + 0x34]
mov dword [esp + 0x20], edi
jl 0x429e00
pop edi
pop ebp
pop esi
pop ebx
add esp, 0xc
ret
cmp dword [ebx + 0x1c], 0
je case.0x429dd4.4
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebx + 0xc]
mov edi, dword [ebx + 0x24]
imul ecx, eax
add edi, 0x400
lea edx, [edi + eax*4]
push ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], edx
call fcn.0045397e
xor ecx, ecx
add esp, 4
cmp dword [ebx + 0x10], ecx
mov ebp, eax
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ecx
jle 0x42a10c
lea esp, [esp]
mov eax, dword [ebx + 0xc]
mov edx, dword [edi + ecx*4]
add edx, dword [esp + 0x14]
mov esi, eax
imul esi, ecx
add esi, ebp
xor ebp, ebp
test eax, eax
jle 0x42a00a
jmp 0x429f40
mov al, byte [edx]
movzx ecx, al
mov edi, ecx
and edi, 1
test al, 2
je 0x429f5f
movzx ecx, word [edx]
shr ecx, 2
and ecx, 0x3ff
add edx, 1
jmp 0x429f65
shr ecx, 2
and ecx, 3
test edi, edi
je 0x429fa6
movzx edi, byte [edx]
shr edi, 4
add edx, 1
test edi, edi
je 0x429f80
shl edi, 4
or edi, 0xf
mov eax, edi
jmp 0x429f82
xor eax, eax
add edx, 1
test ecx, ecx
je 0x429ff9
lea esp, [esp]
sub ecx, 1
cmp ebp, dword [ebx + 0xc]
jge 0x42a002
mov byte [esi], al
add esi, 1
add ebp, 1
test ecx, ecx
jne 0x429f90
jmp 0x429ff9
xor eax, eax
test ecx, ecx
je 0x429ff6
lea esp, [esp]
sub ecx, 1
cmp ebp, dword [ebx + 0xc]
jge 0x429ff2
xor eax, 1
mov dword [esp + 0x24], eax
test al, 1
movzx eax, byte [edx]
je 0x429fce
shr eax, 4
add edx, 2
jmp 0x429fd4
and eax, 0xf
add edx, 1
test eax, eax
je 0x429fe0
shl eax, 4
or eax, 0xf
jmp 0x429fe2
xor eax, eax
mov byte [esi], al
mov eax, dword [esp + 0x24]
add esi, 1
add ebp, 1
test ecx, ecx
jne 0x429fb0
test eax, eax
jne 0x429ff9
add edx, 1
cmp ebp, dword [ebx + 0xc]
jl 0x429f40
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
mov ebp, dword [esp + 0x10]
add ecx, 1
cmp ecx, dword [ebx + 0x10]
mov dword [esp + 0x20], ecx
jl 0x429f20
jmp 0x42a10c
cmp dword [ebx + 0x1c], 0
je case.0x429dd4.4
mov edx, dword [ebx + 0xc]
imul edx, dword [ebx + 0x10]
push edx
call fcn.0045397e
mov edi, dword [ebx + 0x24]
mov ebp, eax
mov eax, dword [ebx + 0x10]
xor edx, edx
add esp, 4
test eax, eax
lea ecx, [edi + eax*4]
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], edx
jle 0x42a10c
mov eax, dword [ebx + 0xc]
mov ecx, dword [edi + edx*4]
add ecx, dword [esp + 0x18]
mov esi, eax
imul esi, edx
add esi, ebp
xor ebp, ebp
test eax, eax
jle 0x42a0f8
lea esp, [esp]
movzx dx, byte [ecx]
movzx edx, dx
movzx eax, dl
add ecx, 1
and eax, 0x3f
test dl, 0x40
je 0x42a0a6
xor ebx, ebx
mov bh, al
add ecx, 1
mov bl, byte [ecx - 1]
movzx eax, bx
mov ebx, dword [esp + 0x24]
movzx edi, ax
add ebp, edi
test dl, dl
jns 0x42a0ce
test ax, ax
je 0x42a0c9
or dl, 0xff
sub dl, byte [ecx + 3]
add eax, 0xffff
mov byte [esi], dl
add esi, 1
test ax, ax
jne 0x42a0b4
add ecx, 4
jmp 0x42a0eb
test ax, ax
je 0x42a0eb
or dl, 0xff
sub dl, byte [ecx + 3]
add eax, 0xffff
mov byte [esi], dl
add esi, 1
add ecx, 4
test ax, ax
jne 0x42a0d3
cmp ebp, dword [ebx + 0xc]
jl 0x42a080
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov ebp, dword [esp + 0x10]
add edx, 1
cmp edx, dword [ebx + 0x10]
mov dword [esp + 0x20], edx
jl 0x42a062
push ebp
push ebx
call fcn.00429c20
push ebp
call fcn.004536c0
add esp, 0xc
pop edi
pop ebp
pop esi
pop ebx
add esp, 0xc
ret