Function at 0x10010360
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xa4
push ebx
push ebp
mov ebp, dword [esp + 0xb0]
mov eax, dword [ebp]
push esi
xor esi, esi
mov dword [eax + 8], esi
push edi
mov eax, ebp
call fcn.1000f880
test eax, eax
jne 0x1001039a
push ebp
call fcn.100102f0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa4
ret
mov eax, dword [ebp]
mov eax, dword [eax + 8]
cmp eax, esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
jle 0x1001047d
lea esi, [esp + 0x40]
lea ebx, [ebp + 0x45a0]
mov eax, dword [ebp]
mov eax, dword [eax]
add eax, 3
push eax
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
mov dword [ebx + 0x34], eax
test eax, eax
je 0x10010501
mov eax, dword [ebp + 0x4584]
cdq
idiv dword [ebx]
mov dword [esi + 0xc], 0
mov ecx, eax
mov eax, dword [ebp + 0x4588]
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 0x1001043a
cmp edi, ecx
jne 0x1001042c
mov dword [esi - 0x10], 0x1000fae0
jmp 0x10010464
cmp edi, 2
jne 0x1001043a
mov dword [esi - 0x10], 0x1000faf0
jmp 0x10010464
cmp ecx, 2
jne 0x1001045d
cmp edi, 1
jne 0x1001044d
mov dword [esi - 0x10], 0x1000fb40
jmp 0x10010464
cmp edi, 2
jne 0x1001045d
mov ecx, dword [ebp + 0x470c]
mov dword [esi - 0x10], ecx
jmp 0x10010464
mov dword [esi - 0x10], 0x1000fe50
mov eax, dword [esp + 0x10]
inc eax
add esi, 0x20
add ebx, 0x48
cmp eax, dword [esp + 0x14]
mov dword [esp + 0x10], eax
jl 0x100103ba
mov eax, dword [ebp]
mov edx, dword [eax + 4]
imul edx, dword [eax]
lea eax, [edx*4 + 1]
push eax
call dword [sym.imp.MSVCR90.dll_malloc]
mov edi, eax
add esp, 4
mov dword [esp + 0x1c], edi
test edi, edi
je 0x10010501
mov eax, dword [ebp]
xor ecx, ecx
mov dword [esp + 0x18], ecx
cmp dword [eax + 4], ecx
jbe 0x10010633
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
jmp 0x100104c0
mov eax, dword [eax]
imul eax, ecx
cmp dword [esp + 0x14], 0
lea edi, [edi + eax*4]
mov dword [esp + 0x10], 0
jle 0x1001058a
lea ebx, [ebp + 0x45bc]
lea esi, [esp + 0x48]
mov eax, dword [esi - 8]
mov ecx, dword [esi]
sar eax, 1
xor edx, edx
cmp ecx, eax
setge dl
mov eax, edx
test eax, eax
je 0x10010521
mov ecx, dword [esi - 0x14]
mov eax, dword [esi - 0x10]
jmp 0x10010527
push ebp
call fcn.100102f0
add esp, 4
mov dword [0x100a6abc], 0x1006cf68
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa4
ret
mov ecx, dword [esi - 0x10]
mov eax, dword [esi - 0x14]
mov edx, dword [esi - 0xc]
push edx
mov edx, dword [esi - 4]
push edx
push ecx
mov ecx, dword [esi - 0x18]
push eax
mov eax, dword [ebx + 0x18]
push eax
call ecx
mov edx, dword [esp + 0x24]
mov dword [esp + edx*4 + 0x34], eax
mov eax, dword [esi]
inc eax
add esp, 0x14
cmp eax, dword [esi - 8]
mov dword [esi], eax
jl 0x1001056d
inc dword [esi + 4]
mov ecx, dword [esi + 4]
cmp ecx, dword [ebx]
mov eax, dword [esi - 0x10]
mov dword [esi], 0
mov dword [esi - 0x14], eax
jge 0x1001056d
mov ecx, dword [ebx + 4]
add ecx, eax
mov dword [esi - 0x10], ecx
inc edx
add esi, 0x20
add ebx, 0x48
cmp edx, dword [esp + 0x14]
mov dword [esp + 0x10], edx
jl 0x100104e5
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
mov eax, dword [ebp]
mov ecx, 3
cmp dword [eax + 8], ecx
jne 0x100105f8
cmp dword [ebp + 0x46e4], ecx
jne 0x100105de
xor ecx, ecx
cmp dword [eax], ecx
jbe 0x1001061a
mov edx, dword [esp + 0x28]
sub esi, ebx
sub edx, dword [esp + 0x24]
mov eax, ebx
movzx ebx, byte [esi + eax]
mov byte [edi], bl
movzx ebx, byte [eax]
mov byte [edi + 1], bl
movzx ebx, byte [edx + eax]
mov byte [edi + 2], bl
mov byte [edi + 3], 0xff
mov ebx, dword [ebp]
inc ecx
add edi, 4
inc eax
cmp ecx, dword [ebx]
jb 0x100105b1
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
jmp 0x1001061a
mov edx, dword [eax]
mov eax, dword [esp + 0x28]
mov ecx, dword [ebp + 0x4708]
push 4
push edx
push eax
push ebx
push esi
push edi
call ecx
add esp, 0x18
jmp 0x1001061a
xor ecx, ecx
cmp dword [eax], ecx
jbe 0x1001061a
mov edi, edi
mov al, byte [ecx + esi]
mov byte [edi + 2], al
mov byte [edi + 1], al
mov byte [edi], al
mov byte [edi + 3], 0xff
mov edx, dword [ebp]
inc ecx
add edi, 4
cmp ecx, dword [edx]
jb 0x10010600
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp]
mov edi, dword [esp + 0x1c]
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, dword [eax + 4]
jb 0x100104c0
push ebp
call fcn.100102f0
mov ebp, dword [ebp]
mov eax, dword [ebp]
mov ecx, dword [esp + 0xc0]
mov edx, dword [ebp + 4]
mov dword [ecx], eax
mov eax, dword [esp + 0xc4]
mov dword [eax], edx
mov eax, dword [esp + 0xc8]
add esp, 4
test eax, eax
je 0x10010667
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa4
ret