Function at 0x10072880
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x1c
push ebx
mov ebx, dword [esp + 0x2c]
mov eax, edx
push ebp
push esi
mov esi, dword [esp + 0x30]
mov ebp, ecx
push edi
mov edi, dword [esp + 0x30]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebp
cmp edi, eax
jne 0x100728ad
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x1c
ret
test edi, edi
js 0x10072c2a
test esi, esi
js 0x10072c2a
je 0x100728d0
xor edx, edx
mov eax, 0x7fffffff
div esi
cmp edi, eax
jg 0x10072c2a
mov ecx, edi
imul ecx, esi
mov dword [esp + 0x28], ecx
test ecx, ecx
js 0x10072c2a
test ebx, ebx
js 0x10072c2a
je 0x100728fc
xor edx, edx
mov eax, 0x7fffffff
div ebx
cmp ecx, eax
jg 0x10072c2a
mov eax, ecx
imul eax, ebx
push eax
call fcn.1012189d
mov edx, eax
add esp, 4
mov dword [esp + 0x1c], edx
test edx, edx
je 0x10072c2a
mov dword [esp + 0x10], 0
test ebx, ebx
jle 0x10072bdd
mov eax, dword [esp + 0x14]
lea ebx, [esi - 1]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ecx
lea ebp, [eax*8 - 0xa]
imul eax, esi
add ebp, edi
mov dword [esp + 0x14], eax
mov eax, edx
mov dword [esp + 0x24], eax
xor edx, edx
mov esi, ecx
cmp ebp, 0x19
ja case.0x10072965.3
movzx ecx, byte [ebp + 0x10072c8c]
jmp dword [ecx*4 + 0x10072c58]
mov edx, ebx
test edx, edx
js 0x10072bae
sub edx, 1
mov cl, byte [esi]
mov byte [eax], cl
lea esi, [esi + 1]
mov byte [eax + 1], 0xff
lea eax, [eax + 2]
jns 0x10072976
jmp 0x10072bae
mov edx, ebx
test edx, edx
js 0x10072bae
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 1]
mov byte [eax + 1], cl
lea eax, [eax + 3]
mov byte [eax - 3], cl
jns 0x10072998
jmp 0x10072bae
mov edx, ebx
test edx, edx
js 0x10072bae
nop dword [eax]
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 1]
mov byte [eax + 1], cl
lea eax, [eax + 4]
mov byte [eax - 4], cl
mov byte [eax - 1], 0xff
jns 0x100729c0
jmp 0x10072bae
mov edx, ebx
test edx, edx
js 0x10072bae
nop dword [eax]
sub edx, 1
mov cl, byte [esi]
mov byte [eax], cl
lea esi, [esi + 2]
lea eax, [eax + 1]
jns 0x100729f0
jmp 0x10072bae
mov edx, ebx
test edx, edx
js 0x10072bae
nop
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 2]
mov byte [eax + 1], cl
lea eax, [eax + 3]
mov byte [eax - 3], cl
jns 0x10072a10
jmp 0x10072bae
mov edx, ebx
test edx, edx
js 0x10072bae
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 2]
mov byte [eax + 1], cl
lea eax, [eax + 4]
mov byte [eax - 4], cl
movzx ecx, byte [esi - 1]
mov byte [eax - 1], cl
jns 0x10072a35
jmp 0x10072bae
mov edx, ebx
test edx, edx
js 0x10072bae
sub edx, 1
movzx ecx, byte [esi]
mov byte [eax], cl
lea esi, [esi + 3]
movzx ecx, byte [esi - 2]
lea eax, [eax + 4]
mov byte [eax - 3], cl
movzx ecx, byte [esi - 1]
mov byte [eax - 2], cl
mov byte [eax - 1], 0xff
jns 0x10072a61
jmp 0x10072bae
mov edi, ebx
test edi, edi
js 0x10072bb2
movzx ecx, byte [esi + 1]
lea esi, [esi + 3]
imul edx, ecx, 0x96
lea eax, [eax + 1]
movzx ecx, byte [esi - 1]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 3]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 1], dl
jns 0x10072a92
jmp 0x10072bae
mov edi, ebx
test edi, edi
js 0x10072bb2
nop
movzx ecx, byte [esi + 1]
lea esi, [esi + 3]
imul edx, ecx, 0x96
lea eax, [eax + 2]
movzx ecx, byte [esi - 1]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 3]
imul ecx, ecx, 0x4d
mov byte [eax - 1], 0xff
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 2], dl
jns 0x10072ad0
jmp 0x10072bae
mov edi, ebx
test edi, edi
js 0x10072bb2
movzx ecx, byte [esi + 1]
lea esi, [esi + 4]
imul edx, ecx, 0x96
lea eax, [eax + 1]
movzx ecx, byte [esi - 2]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 4]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 1], dl
jns 0x10072b10
jmp 0x10072bae
mov edi, ebx
test edi, edi
js 0x10072bb2
nop dword [eax]
movzx ecx, byte [esi + 1]
lea esi, [esi + 4]
imul edx, ecx, 0x96
lea eax, [eax + 2]
movzx ecx, byte [esi - 2]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 4]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 2], dl
mov cl, byte [esi - 1]
mov byte [eax - 1], cl
jns 0x10072b50
jmp 0x10072bae
mov edx, ebx
test edx, edx
js 0x10072bae
nop dword [eax + eax]
sub edx, 1
movzx ecx, byte [esi]
mov byte [eax], cl
lea esi, [esi + 4]
movzx ecx, byte [esi - 3]
lea eax, [eax + 3]
mov byte [eax - 2], cl
movzx ecx, byte [esi - 2]
mov byte [eax - 1], cl
jns 0x10072b90
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
inc edx
mov eax, dword [esp + 0x24]
add ecx, dword [esp + 0x14]
add eax, dword [esp + 0x28]
mov dword [esp + 0x10], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
cmp edx, dword [esp + 0x38]
jl 0x10072953
mov ebp, dword [esp + 0x18]
push ebp
call fcn.1011b2ad
mov eax, dword [esp + 0x20]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
push dword [esp + 0x18]
call fcn.1011b2ad
push dword [esp + 0x20]
call fcn.1011b2ad
mov ecx, dword [0x10203278]
add esp, 8
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop esi
pop ebp
pop ebx
mov dword [eax + 0x10], str.unsupported
xor eax, eax
add esp, 0x1c
ret
push ebp
call fcn.1011b2ad
mov ecx, dword [0x10203278]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop esi
pop ebp
pop ebx
mov dword [eax + 0x10], str.outofmem
xor eax, eax
add esp, 0x1c
ret