Function at 0x10003e40
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
mov ebp, dword [esp + 0x14]
push esi
cmp dword [ebx + 0x360], 0xfffffffe
mov esi, dword [esp + 0x1c]
push edi
je 0x10003e74
cmp esi, 0x20
ja 0x1000452f
push esi
lea eax, [ebx + 0x3b4]
push ebp
push eax
call fcn.10058800
add esp, 0xc
cmp dword [esp + 0x2c], 0
je 0x10003eae
cmp esi, 0x10
je 0x10003eae
cmp esi, 0x18
je 0x10003eae
cmp esi, 0x20
jne 0x1000452f
mov edi, esi
mov dword [ebx + 0x3b0], 0
shr edi, 2
mov dword [ebx + 0xf4], esi
lea eax, [edi + 6]
mov dword [ebx + 0xf0], eax
jmp 0x10003ed8
mov edi, esi
mov dword [ebx + 0x3b0], 0
shr edi, 2
mov dword [ebx + 0xf4], esi
lea eax, [edi + 6]
mov dword [ebx + 0xf0], eax
cmp esi, 0xf0
ja 0x1000452f
push esi
push ebp
push ebx
call fcn.10058800
add esp, 0xc
test bl, 3
jne 0x10003f12
xor edx, edx
test edi, edi
je 0x10003f42
nop
mov eax, dword [ebx + edx*4]
mov ecx, eax
ror ecx, 8
rol eax, 8
and ecx, 0xff00ff00
and eax, 0xff00ff
or ecx, eax
mov dword [ebx + edx*4], ecx
inc edx
cmp edx, edi
jb 0x10003ef0
jmp 0x10003f42
mov edi, esi
mov edx, 0
and edi, 0xfffffffc
jbe 0x10003f42
nop
mov eax, dword [edx + ebx]
mov ecx, eax
ror ecx, 8
rol eax, 8
and ecx, 0xff00ff00
and eax, 0xff00ff
or ecx, eax
mov dword [edx + ebx], ecx
add edx, 4
cmp edx, edi
jb 0x10003f20
cmp esi, 0x10
je 0x100041e2
cmp esi, 0x18
je 0x100040cc
cmp esi, 0x20
jne 0x1000452f
mov ecx, dword [ebx + 0x1c]
lea esi, [ebx + 0x30]
mov eax, ecx
mov edi, 4
shr eax, 0x10
movzx eax, al
mov edx, dword [eax*4 + 0x100839f8]
mov eax, ecx
shr eax, 8
xor edx, 0x1000000
movzx eax, al
and edx, 0xff000000
mov eax, dword [eax*4 + 0x10083df8]
and eax, 0xff0000
xor edx, eax
mov eax, ecx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100835f8]
xor edx, eax
movzx eax, cl
mov ecx, dword [ebx + 8]
mov eax, dword [eax*4 + 0x100831f8]
and eax, 0xff00
xor edx, eax
mov eax, dword [ebx + 4]
xor edx, dword [ebx]
xor eax, edx
mov dword [ebx + 0x20], edx
xor ecx, eax
mov dword [ebx + 0x24], eax
mov eax, dword [ebx + 0xc]
xor eax, ecx
mov dword [ebx + 0x28], ecx
mov dword [ebx + 0x2c], eax
mov ecx, dword [esi - 4]
lea esi, [esi + 0x20]
mov eax, ecx
shr eax, 0x10
movzx eax, al
mov edx, dword [eax*4 + 0x10083df8]
mov eax, ecx
shr eax, 8
and edx, 0xff0000
movzx eax, al
mov eax, dword [eax*4 + 0x100831f8]
and eax, 0xff00
xor edx, eax
mov eax, ecx
shr eax, 0x18
mov eax, dword [eax*4 + 0x100839f8]
and eax, 0xff000000
xor edx, eax
movzx eax, cl
mov ecx, dword [esi - 0x38]
movzx eax, byte [eax*4 + 0x100835f8]
xor edx, eax
mov eax, dword [esi - 0x3c]
xor edx, dword [esi - 0x40]
xor eax, edx
mov dword [esi - 0x20], edx
mov dword [esi - 0x1c], eax
xor ecx, eax
mov eax, dword [esi - 0x34]
xor eax, ecx
mov dword [esi - 0x18], ecx
mov dword [esi - 0x14], eax
mov ecx, dword [esi - 0x14]
mov eax, ecx
shr eax, 8
movzx eax, al
mov dword [esp + 0x10], ecx
mov edx, dword [eax*4 + 0x10083df8]
mov eax, ecx
shr eax, 0x10
and edx, 0xff0000
movzx eax, al
mov eax, dword [eax*4 + 0x100839f8]
and eax, 0xff000000
xor edx, eax
mov eax, ecx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100835f8]
xor edx, eax
movzx eax, cl
mov eax, dword [eax*4 + 0x100831f8]
and eax, 0xff00
xor edx, eax
xor edx, dword [edi + 0x100831d0]
add edi, 4
xor edx, dword [esi - 0x30]
mov dword [esi - 0x10], edx
mov eax, dword [esi - 0x2c]
xor eax, edx
mov dword [esi - 0xc], eax
mov ecx, dword [esi - 0x28]
xor ecx, eax
mov dword [esi - 8], ecx
mov eax, dword [esi - 0x24]
xor eax, ecx
mov dword [esi - 4], eax
cmp edi, 0x1c
jne 0x10003fd6
jmp 0x100042e2
mov ecx, dword [ebx + 0x14]
mov edi, 4
mov eax, ecx
shr eax, 0x10
movzx eax, al
mov edx, dword [eax*4 + 0x100839f8]
mov eax, ecx
shr eax, 8
xor edx, 0x1000000
movzx eax, al
and edx, 0xff000000
mov eax, dword [eax*4 + 0x10083df8]
and eax, 0xff0000
xor edx, eax
mov eax, ecx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100835f8]
xor edx, eax
movzx eax, cl
mov ecx, dword [ebx + 8]
mov eax, dword [eax*4 + 0x100831f8]
and eax, 0xff00
xor edx, eax
mov eax, dword [ebx + 4]
xor edx, dword [ebx]
xor eax, edx
mov dword [ebx + 0x18], edx
xor ecx, eax
mov dword [ebx + 0x1c], eax
mov eax, dword [ebx + 0xc]
xor eax, ecx
mov dword [ebx + 0x20], ecx
mov dword [ebx + 0x24], eax
lea eax, [ebx + 0x28]
mov edx, dword [eax - 0x18]
lea eax, [eax + 0x18]
xor edx, dword [eax - 0x1c]
mov ecx, dword [eax - 0x2c]
xor ecx, edx
mov dword [eax - 0x18], edx
mov dword [eax - 0x14], ecx
mov edx, dword [eax - 0x14]
mov ecx, edx
shr ecx, 8
movzx ecx, cl
mov dword [esp + 0x10], edx
mov esi, dword [ecx*4 + 0x10083df8]
mov ecx, edx
shr ecx, 0x10
and esi, 0xff0000
movzx ecx, cl
mov ecx, dword [ecx*4 + 0x100839f8]
and ecx, 0xff000000
xor esi, ecx
mov ecx, edx
shr ecx, 0x18
movzx ecx, byte [ecx*4 + 0x100835f8]
xor esi, ecx
movzx ecx, dl
mov ecx, dword [ecx*4 + 0x100831f8]
and ecx, 0xff00
xor esi, ecx
xor esi, dword [edi + 0x100831d0]
add edi, 4
xor esi, dword [eax - 0x28]
mov dword [eax - 0x10], esi
mov ecx, dword [eax - 0x24]
xor ecx, esi
mov dword [eax - 0xc], ecx
mov edx, dword [eax - 0x20]
xor edx, ecx
mov dword [eax - 8], edx
mov ecx, dword [eax - 0x1c]
xor ecx, edx
mov dword [eax - 4], ecx
cmp edi, 0x20
jne 0x10004145
jmp 0x100042e2
mov ebx, dword [ebx + 0xc]
mov eax, ebx
shr eax, 0x10
movzx eax, al
mov esi, dword [esp + 0x18]
lea edi, [esi + 0x10]
mov edx, dword [eax*4 + 0x100839f8]
mov eax, ebx
shr eax, 8
xor edx, 0x1000000
movzx eax, al
and edx, 0xff000000
mov ecx, dword [esi + 4]
mov eax, dword [eax*4 + 0x10083df8]
and eax, 0xff0000
xor edx, eax
mov eax, ebx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100835f8]
xor edx, eax
movzx eax, bl
mov eax, dword [eax*4 + 0x100831f8]
and eax, 0xff00
xor edx, eax
mov eax, dword [esi + 8]
xor edx, dword [esi]
xor ecx, edx
mov dword [edi], edx
xor eax, ecx
mov dword [esi + 0x14], ecx
mov dword [esi + 0x18], eax
xor eax, ebx
mov dword [esi + 0x1c], eax
mov esi, 4
nop dword [eax + eax]
mov ebx, dword [edi + 0xc]
mov edx, edi
add edi, 0x10
mov dword [esp + 0x10], ebx
mov eax, ebx
shr eax, 8
movzx eax, al
mov ecx, dword [eax*4 + 0x10083df8]
mov eax, ebx
shr eax, 0x10
and ecx, 0xff0000
movzx eax, al
mov eax, dword [eax*4 + 0x100839f8]
and eax, 0xff000000
xor ecx, eax
mov eax, ebx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100835f8]
xor ecx, eax
movzx eax, bl
mov eax, dword [eax*4 + 0x100831f8]
and eax, 0xff00
xor ecx, eax
xor ecx, dword [esi + 0x100831d0]
add esi, 4
xor ecx, dword [edx]
mov dword [edi], ecx
mov eax, dword [edi - 0xc]
xor eax, ecx
mov dword [edi + 4], eax
mov ecx, dword [edi - 8]
xor ecx, eax
mov dword [edi + 8], ecx
xor ecx, ebx
mov dword [edi + 0xc], ecx
cmp esi, 0x28
jne 0x10004260
mov ebx, dword [esp + 0x18]
mov eax, 4
lea ecx, [esp + 0x10]
nop dword [eax + eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x100042f0
cmp dword [esp + 0x28], 1
jne 0x10004506
mov edi, dword [ebx + 0xf0]
xor ebp, ebp
shl edi, 2
test edi, edi
je 0x10004364
lea edx, [edi + 2]
lea edx, [ebx + edx*4]
lea esi, [ebx + 8]
nop
mov ecx, dword [esi - 8]
lea esi, [esi + 0x10]
mov eax, dword [edx - 8]
lea edx, [edx - 0x10]
mov dword [esi - 0x18], eax
add ebp, 4
mov eax, dword [edx + 0xc]
sub edi, 4
mov dword [edx + 8], ecx
mov ecx, dword [esi - 0x14]
mov dword [esi - 0x14], eax
mov eax, dword [edx + 0x10]
mov dword [edx + 0xc], ecx
mov ecx, dword [esi - 0x10]
mov dword [esi - 0x10], eax
mov eax, dword [edx + 0x14]
mov dword [edx + 0x10], ecx
mov ecx, dword [esi - 0xc]
mov dword [esi - 0xc], eax
mov dword [edx + 0x14], ecx
mov dword [esp + 0x10], ecx
cmp ebp, edi
jb 0x10004320
mov eax, 4
lea ecx, [esp + 0x10]
nop dword [eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x10004370
mov edi, 1
cmp dword [ebx + 0xf0], edi
jbe 0x10004506
lea esi, [ebx + 8]
nop
mov edx, dword [esi + 8]
lea esi, [esi + 0x10]
mov eax, edx
inc edi
shr eax, 8
movzx eax, al
movzx ecx, byte [eax*4 + 0x100835f8]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x100849f8]
movzx eax, byte [eax*4 + 0x100835f8]
xor ecx, dword [eax*4 + 0x100845f8]
mov eax, edx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100835f8]
xor ecx, dword [eax*4 + 0x100841f8]
movzx eax, dl
mov edx, dword [esi - 4]
movzx eax, byte [eax*4 + 0x100835f8]
xor ecx, dword [eax*4 + 0x10084df8]
mov eax, edx
shr eax, 8
movzx eax, al
mov dword [esi - 8], ecx
movzx ecx, byte [eax*4 + 0x100835f8]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x100849f8]
movzx eax, byte [eax*4 + 0x100835f8]
xor ecx, dword [eax*4 + 0x100845f8]
mov eax, edx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100835f8]
xor ecx, dword [eax*4 + 0x100841f8]
movzx eax, dl
mov edx, dword [esi]
movzx eax, byte [eax*4 + 0x100835f8]
xor ecx, dword [eax*4 + 0x10084df8]
mov eax, edx
shr eax, 8
movzx eax, al
mov dword [esi - 4], ecx
movzx ecx, byte [eax*4 + 0x100835f8]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x100849f8]
movzx eax, byte [eax*4 + 0x100835f8]
xor ecx, dword [eax*4 + 0x100845f8]
mov eax, edx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100835f8]
xor ecx, dword [eax*4 + 0x100841f8]
movzx eax, dl
mov edx, dword [esi + 4]
movzx eax, byte [eax*4 + 0x100835f8]
xor ecx, dword [eax*4 + 0x10084df8]
mov eax, edx
shr eax, 8
movzx eax, al
mov dword [esi], ecx
movzx ecx, byte [eax*4 + 0x100835f8]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x100849f8]
movzx eax, byte [eax*4 + 0x100835f8]
xor ecx, dword [eax*4 + 0x100845f8]
mov eax, edx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100835f8]
xor ecx, dword [eax*4 + 0x100841f8]
movzx eax, dl
movzx eax, byte [eax*4 + 0x100835f8]
xor ecx, dword [eax*4 + 0x10084df8]
mov dword [esi + 4], ecx
cmp edi, dword [ebx + 0xf0]
jb 0x10004390
mov eax, dword [esp + 0x24]
test eax, eax
je 0x10004513
movups xmm0, xmmword [eax]
jmp 0x10004516
xorps xmm0, xmm0
pop edi
pop esi
movups xmmword [ebx + 0x100], xmm0
pop ebp
mov dword [ebx + 0x3b0], 0
xor eax, eax
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
mov eax, 0xffffff53
pop ebx
pop ecx
ret