Function at 0x429380
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x44c
push ebx
push ebp
xor eax, eax
push esi
mov esi, dword [esp + 0x45c]
movzx edx, word [esi + 0x24]
xor ebp, ebp
cmp byte [esi + 0x22], al
mov dword [esp + 0x2c], edx
movzx edx, byte [esi + 0x2a]
sete al
xor ecx, ecx
cmp byte [esi + 0x12], cl
push edi
sete cl
push 0x400
mov dword [esp + 0x40], edx
lea edx, [esp + 0x60]
push ebp
push edx
mov dword [esp + 0x28], ebp
cmp ecx, eax
movzx eax, word [esi + 0x26]
movzx ecx, word [esi + 0x28]
mov dword [esp + 0x40], eax
movzx eax, byte [esi + 0x2b]
mov dword [esp + 0x44], ecx
movzx ecx, byte [esi + 0x2c]
setne byte [esp + 0x1f]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ecx
call fcn.00463710
mov edi, dword [esp + 0x474]
xor ebx, ebx
add esp, 0xc
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebp
test edi, edi
jle 0x4295e0
jmp 0x429414
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x464]
cmp ebp, edx
jge 0x4295e0
mov eax, edi
sub eax, ebx
xor ecx, ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x48], eax
test eax, eax
jle 0x4295b6
mov eax, edx
sub eax, ebp
add eax, 0xfffffff9
mov dword [esp + 0x58], eax
mov eax, ebx
imul eax, edx
mov dword [esp + 0x20], eax
jmp 0x429458
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
cmp ecx, dword [esp + 0x58]
jge 0x4295b6
add eax, ecx
add eax, dword [esp + 0x14]
cmp byte [esp + 0x13], 0
mov ecx, dword [esi + 0x197c]
lea esi, [ecx + eax*4]
mov eax, dword [esi]
je 0x42949f
mov edx, eax
mov ecx, eax
shr ecx, 0x10
and edx, 0xff0000
or edx, ecx
mov ecx, eax
shl ecx, 0x10
and eax, 0xff00
or ecx, eax
shr edx, 8
shl ecx, 8
or edx, ecx
mov eax, edx
mov ecx, dword [esp + 0x3c]
mov ebx, eax
shr ebx, cl
mov ecx, dword [esp + 0x40]
mov edx, eax
shr edx, cl
mov ecx, dword [esp + 0x44]
and ebx, dword [esp + 0x30]
shr eax, cl
and edx, dword [esp + 0x34]
add esi, 4
mov dword [esp + 0x50], edx
and eax, dword [esp + 0x38]
mov dword [esp + 0x28], esi
mov dword [esp + 0x54], eax
mov eax, 7
add dword [esp + 0x1c], eax
mov dword [esp + 0x2c], eax
lea ecx, [ecx]
cmp byte [esp + 0x13], 0
mov edx, dword [esp + 0x28]
mov edi, dword [edx]
je 0x429512
mov eax, edi
mov ecx, edi
mov edx, edi
and eax, 0xff0000
shl edx, 0x10
and edi, 0xff00
shr ecx, 0x10
or edx, edi
or eax, ecx
shr eax, 8
shl edx, 8
or eax, edx
mov edi, eax
mov ecx, dword [esp + 0x3c]
mov ebp, edi
shr ebp, cl
mov ecx, dword [esp + 0x40]
and ebp, dword [esp + 0x30]
mov eax, ebp
sub eax, ebx
cdq
mov ebx, ebp
mov ebp, edi
mov esi, eax
shr ebp, cl
mov ecx, dword [esp + 0x44]
xor esi, edx
sub esi, edx
and ebp, dword [esp + 0x34]
shr edi, cl
mov eax, ebp
sub eax, dword [esp + 0x50]
mov dword [esp + 0x50], ebp
and edi, dword [esp + 0x38]
cdq
xor eax, edx
sub eax, edx
add esi, eax
mov eax, edi
sub eax, dword [esp + 0x54]
mov dword [esp + 0x54], edi
cdq
xor eax, edx
sub eax, edx
add esi, eax
cmp esi, 0xff
jle 0x429570
mov esi, 0xff
inc dword [esp + esi*4 + 0x5c]
add dword [esp + 0x28], 4
sub dword [esp + 0x2c], 1
lea esi, [esp + esi*4 + 0x5c]
jne 0x4294e0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x464]
add dword [esp + 0x20], ecx
mov edi, dword [esp + 0x468]
mov esi, dword [esp + 0x460]
inc eax
cmp eax, dword [esp + 0x48]
mov dword [esp + 0x24], eax
mov edx, ecx
jl 0x429450
cmp edx, edi
jle 0x4295c8
add dword [esp + 0x14], edi
mov dword [esp + 0x18], 0
jmp 0x4295d4
add dword [esp + 0x18], edx
mov dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
cmp ebx, edi
jl 0x429410
mov edx, dword [esp + 0x60]
mov ebx, dword [esp + 0x5c]
lea eax, [edx + ebx]
imul eax, eax, 0x64
cdq
idiv dword [esp + 0x1c]
cmp eax, 0x5a
jl 0x429607
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44c
ret 0xc
xor edi, edi
mov eax, 1
mov edi, edi
mov ecx, dword [esp + eax*4 + 0x5c]
mov edx, ecx
imul edx, eax
imul edx, eax
add edi, edx
test ecx, ecx
je 0x4295f8
mov edx, dword [esp + eax*4 + 0x58]
add edx, edx
cmp ecx, edx
jg 0x4295f8
inc eax
cmp eax, 8
jl 0x429610
mov ecx, pe_nt_image_headers32
sub ecx, eax
xor edx, edx
xor esi, esi
cmp ecx, 2
jl 0x42966a
lea ecx, [eax + 1]
mov ebp, dword [esp + eax*4 + 0x5c]
imul ebp, eax
imul ebp, eax
add edx, ebp
mov ebp, dword [esp + eax*4 + 0x60]
imul ebp, ecx
imul ebp, ecx
add eax, 2
add esi, ebp
add ecx, 2
cmp eax, 0xff
jl 0x429645
cmp eax, 0x100
jge 0x42967d
mov ecx, dword [esp + eax*4 + 0x5c]
imul ecx, eax
imul ecx, eax
add edi, ecx
mov ecx, dword [esp + 0x1c]
lea eax, [esi + edx]
add eax, edi
pop edi
pop esi
sub ecx, ebx
xor edx, edx
pop ebp
div ecx
pop ebx
add esp, 0x44c
ret 0xc