Function at 0x100104a9
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using rc4 ksa
Reference aes constants

Disassembly:
sub esp, 0x38
push esi
mov esi, ecx
cmp byte [esi + 4], 0
je 0x1001077d
mov eax, dword [esi + 0x3cc]
cmp eax, 0x10
jne 0x100104d6
push dword [esp + 0x44]
push dword [esp + 0x44]
call fcn.100100e1
jmp 0x10010776
cdq
and edx, 3
push ebx
push ebp
xor ecx, ecx
push edi
lea edi, [edx + eax]
sar edi, 2
cmp edi, 6
setne cl
xor eax, eax
mov dword [esp + 0x2c], edi
inc ecx
cmp edi, 4
cmove ecx, eax
shl ecx, 5
mov ebp, dword [ecx + 0x10085500]
mov eax, dword [ecx + 0x10085508]
mov edx, dword [ecx + 0x10085510]
lea ecx, [esi + 0x454]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ecx
mov ebx, ecx
test edi, edi
jle 0x10010573
mov edx, dword [esp + 0x4c]
lea ebp, [esi + 8]
movzx eax, byte [edx]
shl eax, 0x18
mov dword [ebx], eax
movzx eax, byte [edx + 1]
shl eax, 0x10
or dword [ebx], eax
movzx eax, byte [edx + 2]
shl eax, 8
or dword [ebx], eax
movzx eax, byte [edx + 3]
or dword [ebx], eax
mov eax, dword [ebp]
mov ecx, ebx
add ebx, 4
xor dword [ecx], eax
lea edx, [edx + 4]
lea ebp, [ebp + 4]
dec edi
jne 0x10010530
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
xor ebx, ebx
inc ebx
mov dword [esp + 0x2c], ebx
cmp dword [esi + 0x3d0], ebx
jle 0x10010692
lea ecx, [esi + 0x28]
mov dword [esp + 0x30], ecx
test edi, edi
jle 0x10010652
sub eax, ebp
mov dword [esp + 0x34], eax
lea ebx, [esi + 0x434]
mov eax, edx
sub eax, ebp
mov dword [esp + 0x4c], ebp
mov ebp, dword [esp + 0x34]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x38], eax
mov ebx, eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], edi
add eax, ebp
cdq
idiv edi
mov eax, dword [esp + 0x4c]
add eax, ebx
mov ecx, dword [esi + edx*4 + 0x454]
cdq
idiv edi
sar ecx, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x100850f8]
movzx eax, byte [esi + edx*4 + 0x454]
xor ecx, dword [eax*4 + 0x100844f8]
mov eax, dword [esp + 0x4c]
cdq
idiv edi
movsx eax, word [esi + edx*4 + 0x456]
mov edx, dword [esp + 0x20]
and eax, 0xff
xor ecx, dword [eax*4 + 0x100848f8]
movzx eax, byte [edx + 0x23]
xor ecx, dword [eax*4 + 0x10086358]
mov eax, dword [esp + 0x1c]
xor ecx, dword [eax]
add eax, 4
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x4c]
mov dword [edx], ecx
add edx, 4
inc eax
dec dword [esp + 0x24]
mov dword [esp + 0x20], edx
mov dword [esp + 0x4c], eax
jne 0x100105c3
mov ebx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
mov eax, edi
shl eax, 2
push eax
lea eax, [esi + 0x434]
push eax
lea eax, [esi + 0x454]
push eax
call fcn.1005b1c0
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
add esp, 0xc
inc ebx
add ecx, 0x20
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ecx
cmp ebx, dword [esi + 0x3d0]
jl 0x1001058d
xor ebx, ebx
mov dword [esp + 0x30], ebx
test edi, edi
jle 0x10010773
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x50]
sub ebp, edx
sub dword [esp + 0x14], edx
mov dword [esp + 0x4c], ecx
mov eax, dword [esi + 0x3d0]
lea eax, [ebx + eax*8]
mov ebx, dword [esi + eax*4 + 8]
mov eax, dword [esp + 0x18]
mov ecx, ebx
movzx eax, byte [eax + 3]
sar ecx, 0x18
xor cl, byte [eax + 0x10085e58]
mov eax, dword [esp + 0x4c]
add dword [esp + 0x18], 4
mov byte [eax], cl
inc eax
mov dword [esp + 0x4c], eax
lea eax, [edx + ebp]
cdq
idiv edi
mov eax, ebx
sar eax, 0x10
movsx ecx, word [esi + edx*4 + 0x456]
and ecx, 0xff
xor al, byte [ecx + 0x10085e58]
mov ecx, dword [esp + 0x4c]
mov byte [ecx], al
mov eax, dword [esp + 0x10]
cdq
idiv edi
inc ecx
mov dword [esp + 0x4c], ecx
mov eax, ebx
sar eax, 8
mov ecx, dword [esi + edx*4 + 0x454]
sar ecx, 8
and ecx, 0xff
xor al, byte [ecx + 0x10085e58]
mov ecx, dword [esp + 0x4c]
mov byte [ecx], al
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0x14]
add ecx, 2
cdq
idiv edi
mov dword [esp + 0x4c], ecx
movzx eax, byte [esi + edx*4 + 0x454]
mov edx, dword [esp + 0x10]
mov al, byte [eax + 0x10085e58]
xor al, bl
mov ebx, dword [esp + 0x30]
mov byte [ecx - 1], al
inc ebx
inc edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x10], edx
cmp ebx, edi
jl 0x100106b2
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x38
ret 8
push 0x1009a9d8
lea ecx, [esp + 0x34]
call fcn.1005850b
push 0x100887f8
lea eax, [esp + 0x34]
push eax
call fcn.1005ff7b
int3