Function at 0x10003471
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
push esi
mov esi, ecx
mov edx, dword [esi + 0x14]
lea eax, [edx*4]
cmp dword [esp + 0x14], eax
jb 0x1000372f
mov ecx, dword [esi + 0x20]
push ebx
push edi
xor edi, edi
mov ebx, 1
mov dword [esp + 0xc], ebx
cmp ecx, 0xff
jle 0x100034ab
sar ecx, 1
inc edi
cmp ecx, 0xff
jg 0x100034a0
test ecx, ecx
je 0x100034c8
cmp ecx, 0xff
jge 0x100034c8
mov eax, 0xff
cdq
idiv ecx
mov edx, dword [esi + 0x14]
mov ebx, eax
mov dword [esp + 0xc], ebx
cmp byte [esi + 0x30], 0
push ebp
mov ebp, dword [esp + 0x18]
je 0x10003604
mov dword [esp + 0x20], 0
test edx, edx
je 0x10003581
mov eax, dword [esp + 0x1c]
add eax, 2
mov dword [esp + 0x10], eax
mov ecx, dword [esi + 4]
push dword [esp + 0x20]
push ebp
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [esi + 0x34]
push eax
push 0
mov ecx, dword [ecx]
mov edx, dword [ecx]
call dword [edx + 0xc]
push dword [esp + 0x20]
mov ecx, edi
sar eax, cl
mov ecx, dword [esp + 0x14]
imul bl
push ebp
mov byte [ecx - 2], al
mov ecx, dword [esi + 4]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [esi + 0x34]
push eax
push 0
mov ecx, dword [ecx + 4]
mov edx, dword [ecx]
call dword [edx + 0xc]
push dword [esp + 0x20]
mov ecx, edi
sar eax, cl
mov ecx, dword [esp + 0x14]
imul bl
push ebp
mov byte [ecx - 1], al
mov ecx, dword [esi + 4]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [esi + 0x34]
push eax
push 0
mov ecx, dword [ecx + 8]
mov edx, dword [ecx]
call dword [edx + 0xc]
mov ecx, edi
sar eax, cl
mov ecx, dword [esp + 0x10]
imul bl
mov byte [ecx], al
add ecx, 4
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x20], eax
cmp eax, dword [esi + 0x14]
jb 0x100034f2
cmp dword [esi + 0x24], 4
jl 0x100035dc
xor ebp, ebp
cmp dword [esi + 0x14], ebp
jbe 0x1000372c
mov eax, dword [esp + 0x1c]
add eax, 3
mov dword [esp + 0x1c], eax
lea ecx, [ecx]
mov ecx, dword [esi + 4]
push ebp
push dword [esp + 0x1c]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [esi + 0x34]
push eax
push 0
mov ecx, dword [ecx + 0xc]
mov edx, dword [ecx]
call dword [edx + 0xc]
mov ecx, edi
inc ebp
sar eax, cl
mov ecx, dword [esp + 0x1c]
imul bl
mov byte [ecx], al
add ecx, 4
mov dword [esp + 0x1c], ecx
cmp ebp, dword [esi + 0x14]
jb 0x100035a0
pop ebp
pop edi
pop ebx
pop esi
pop ecx
ret 0xc
xor eax, eax
cmp dword [esi + 0x14], eax
jbe 0x1000372c
mov ecx, dword [esp + 0x1c]
add ecx, 3
mov edi, edi
mov byte [ecx], 0xff
lea ecx, [ecx + 4]
inc eax
cmp eax, dword [esi + 0x14]
jb 0x100035f0
pop ebp
pop edi
pop ebx
pop esi
pop ecx
ret 0xc
mov eax, dword [esi + 0x14]
xor edx, edx
cmp dword [esi + 0x24], 3
jl 0x10003686
mov dword [esp + 0x18], edx
test eax, eax
je 0x100036cd
mov eax, dword [esp + 0x1c]
add eax, 2
mov dword [esp + 0x20], eax
mov ecx, dword [esi]
push edx
push ebp
mov eax, dword [ecx]
call dword [eax + 0xc]
push dword [esp + 0x18]
mov ecx, edi
sar eax, cl
mov ecx, dword [esp + 0x24]
imul bl
push ebp
mov byte [ecx - 2], al
mov ecx, dword [esi + 4]
mov eax, dword [ecx]
call dword [eax + 0xc]
push dword [esp + 0x18]
mov ecx, edi
sar eax, cl
mov ecx, dword [esp + 0x24]
imul bl
push ebp
mov byte [ecx - 1], al
mov ecx, dword [esi + 8]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov edx, dword [esp + 0x18]
mov ecx, edi
sar eax, cl
inc edx
mov ecx, dword [esp + 0x20]
imul bl
mov dword [esp + 0x18], edx
mov byte [ecx], al
add ecx, 4
mov dword [esp + 0x20], ecx
cmp edx, dword [esi + 0x14]
jb 0x10003626
jmp 0x100036cd
mov dword [esp + 0x20], edx
test eax, eax
je 0x100036cd
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x10]
inc ebx
mov ecx, dword [esi]
push edx
push dword [esp + 0x1c]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov edx, dword [esp + 0x20]
lea ebx, [ebx + 4]
mov ecx, edi
inc edx
sar eax, cl
imul eax, ebp
mov dword [esp + 0x20], edx
and eax, 0xff
mov byte [ebx - 3], al
mov byte [ebx - 4], al
mov byte [ebx - 5], al
cmp edx, dword [esi + 0x14]
jb 0x10003697
mov ebp, dword [esp + 0x18]
cmp dword [esi + 0x24], 4
jl 0x10003712
xor ebx, ebx
cmp dword [esi + 0x14], ebx
jbe 0x1000372c
mov eax, dword [esp + 0x1c]
add eax, 3
mov dword [esp + 0x1c], eax
mov ecx, dword [esi + 0xc]
push ebx
push ebp
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, edi
inc ebx
sar eax, cl
imul byte [esp + 0x10]
mov ecx, dword [esp + 0x1c]
mov byte [ecx], al
add ecx, 4
mov dword [esp + 0x1c], ecx
cmp ebx, dword [esi + 0x14]
jb 0x100036e5
pop ebp
pop edi
pop ebx
pop esi
pop ecx
ret 0xc
xor eax, eax
cmp dword [esi + 0x14], eax
jbe 0x1000372c
mov ecx, dword [esp + 0x1c]
add ecx, 3
mov byte [ecx], 0xff
lea ecx, [ecx + 4]
inc eax
cmp eax, dword [esi + 0x14]
jb 0x10003720
pop ebp
pop edi
pop ebx
pop esi
pop ecx
ret 0xc