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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x5732cc]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x578a2c], 0
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, ecx
mov ecx, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], ecx
jne 0x410088
call fcn.00415860
cmp byte [0x578a30], 0
je 0x41048e
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x18]
shl edx, 4
add edx, eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x2c], edx
mov edx, dword [0x5767b8]
mov edi, dword [ebp - 0x20]
mov esi, dword [ebp - 0x38]
movd mm5, dword [ebp - 0x2c]
push ebp
lea ebp, [0x53fe90]
mov eax, dword [esi]
xor eax, dword [edi]
movd mm0, eax
mov ebx, dword [esi + 4]
xor ebx, dword [edi + 4]
movd mm1, ebx
and ebx, eax
mov eax, dword [esi + 8]
xor eax, dword [edi + 8]
movd mm2, eax
and ebx, eax
mov ecx, dword [esi + 0xc]
xor ecx, dword [edi + 0xc]
and ebx, ecx
and ebx, 0
mov edi, ebx
and ebx, dword [ebp + edi]
add edi, edx
and ebx, dword [ebp + edi]
add edi, edx
and ebx, dword [ebp + edi]
add edi, edx
and ebx, dword [ebp + edi]
add edi, edx
cmp edi, 0x400
jl 0x4100e7
and ebx, dword [ebp + 0x3fc]
movd mm6, ebx
pxor mm2, mm6
pxor mm1, mm6
pxor mm0, mm6
xor ecx, ebx
mov edi, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
add esi, 0x20
movd mm4, esi
movzx esi, cl
xor edx, dword [ebp + esi*4]
movzx esi, ch
xor ebx, dword [ebp + esi*4 + 0x400]
shr ecx, 0x10
movzx esi, cl
xor eax, dword [ebp + esi*4 + 0x800]
movzx esi, ch
xor edi, dword [ebp + esi*4 + 0xc00]
movd ecx, mm2
movzx esi, cl
xor ebx, dword [ebp + esi*4]
movzx esi, ch
xor eax, dword [ebp + esi*4 + 0x400]
shr ecx, 0x10
movzx esi, cl
xor edi, dword [ebp + esi*4 + 0x800]
movzx esi, ch
xor edx, dword [ebp + esi*4 + 0xc00]
movd ecx, mm1
movzx esi, cl
xor eax, dword [ebp + esi*4]
movzx esi, ch
xor edi, dword [ebp + esi*4 + 0x400]
shr ecx, 0x10
movzx esi, cl
xor edx, dword [ebp + esi*4 + 0x800]
movzx esi, ch
xor ebx, dword [ebp + esi*4 + 0xc00]
movd ecx, mm0
movzx esi, cl
xor edi, dword [ebp + esi*4]
movzx esi, ch
xor edx, dword [ebp + esi*4 + 0x400]
shr ecx, 0x10
movzx esi, cl
xor ebx, dword [ebp + esi*4 + 0x800]
movzx esi, ch
xor eax, dword [ebp + esi*4 + 0xc00]
movd mm2, ebx
movd mm1, eax
movd mm0, edi
movd esi, mm4
mov edi, dword [esi]
mov eax, dword [esi + 4]
mov ebx, dword [esi + 8]
mov ecx, dword [esi + 0xc]
movzx esi, dl
xor edi, dword [ebp + esi*4 + 0xc00]
movzx esi, dh
xor eax, dword [ebp + esi*4 + 0x800]
shr edx, 0x10
movzx esi, dl
xor ebx, dword [ebp + esi*4 + 0x400]
movzx esi, dh
xor ecx, dword [ebp + esi*4]
movd edx, mm2
movzx esi, dl
xor ecx, dword [ebp + esi*4 + 0xc00]
movzx esi, dh
xor edi, dword [ebp + esi*4 + 0x800]
shr edx, 0x10
movzx esi, dl
xor eax, dword [ebp + esi*4 + 0x400]
movzx esi, dh
xor ebx, dword [ebp + esi*4]
movd edx, mm1
movzx esi, dl
xor ebx, dword [ebp + esi*4 + 0xc00]
movzx esi, dh
xor ecx, dword [ebp + esi*4 + 0x800]
shr edx, 0x10
movzx esi, dl
xor edi, dword [ebp + esi*4 + 0x400]
movzx esi, dh
xor eax, dword [ebp + esi*4]
movd edx, mm0
movzx esi, dl
xor eax, dword [ebp + esi*4 + 0xc00]
movzx esi, dh
xor ebx, dword [ebp + esi*4 + 0x800]
shr edx, 0x10
movzx esi, dl
xor ecx, dword [ebp + esi*4 + 0x400]
movzx esi, dh
xor edi, dword [ebp + esi*4]
movd esi, mm4
movd mm2, ebx
movd mm1, eax
movd mm0, edi
mov edi, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
movzx esi, cl
xor edi, dword [ebp + esi*4 + 0xc00]
movzx esi, ch
xor eax, dword [ebp + esi*4 + 0x800]
shr ecx, 0x10
movzx esi, cl
xor ebx, dword [ebp + esi*4 + 0x400]
movzx esi, ch
xor edx, dword [ebp + esi*4]
movd ecx, mm2
movzx esi, cl
xor edx, dword [ebp + esi*4 + 0xc00]
movzx esi, ch
xor edi, dword [ebp + esi*4 + 0x800]
shr ecx, 0x10
movzx esi, cl
xor eax, dword [ebp + esi*4 + 0x400]
movzx esi, ch
xor ebx, dword [ebp + esi*4]
movd ecx, mm1
movzx esi, cl
xor ebx, dword [ebp + esi*4 + 0xc00]
movzx esi, ch
xor edx, dword [ebp + esi*4 + 0x800]
shr ecx, 0x10
movzx esi, cl
xor edi, dword [ebp + esi*4 + 0x400]
movzx esi, ch
xor eax, dword [ebp + esi*4]
movd ecx, mm0
movzx esi, cl
xor eax, dword [ebp + esi*4 + 0xc00]
movzx esi, ch
xor ebx, dword [ebp + esi*4 + 0x800]
shr ecx, 0x10
movzx esi, cl
xor edx, dword [ebp + esi*4 + 0x400]
movzx esi, ch
xor edi, dword [ebp + esi*4]
movd mm2, ebx
movd mm1, eax
movd mm0, edi
movd esi, mm4
movd edi, mm5
add esi, 0x20
movd mm4, esi
cmp edi, esi
jne 0x4101e2
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov esi, dword [edi + 8]
mov edi, dword [edi + 0xc]
movzx ebx, dl
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x18
xor eax, ebx
movzx ebx, dh
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x10
xor ecx, ebx
shr edx, 0x10
movzx ebx, dl
shr edx, 8
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 8
xor esi, ebx
movzx ebx, byte [ebp + edx*4 + 1]
xor edi, ebx
movd edx, mm2
movzx ebx, dl
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x18
xor edi, ebx
movzx ebx, dh
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x10
xor eax, ebx
shr edx, 0x10
movzx ebx, dl
shr edx, 8
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 8
xor ecx, ebx
movzx ebx, byte [ebp + edx*4 + 1]
xor esi, ebx
movd edx, mm1
movzx ebx, dl
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x18
xor esi, ebx
movzx ebx, dh
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x10
xor edi, ebx
shr edx, 0x10
movzx ebx, dl
shr edx, 8
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 8
xor eax, ebx
movzx ebx, byte [ebp + edx*4 + 1]
xor ecx, ebx
movd edx, mm0
movzx ebx, dl
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x18
xor ecx, ebx
movzx ebx, dh
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x10
xor esi, ebx
shr edx, 0x10
movzx ebx, dl
shr edx, 8
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 8
xor edi, ebx
movzx ebx, byte [ebp + edx*4 + 1]
xor eax, ebx
emms
pop ebp
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x41046d
xor eax, dword [ebx]
xor ecx, dword [ebx + 4]
xor esi, dword [ebx + 8]
xor edi, dword [ebx + 0xc]
mov ebx, dword [ebp - 0x3c]
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], esi
mov dword [ebx + 0xc], edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004db901
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [esi + 0x18]
mov edx, dword [edi + 8]
xor edx, dword [esi + 8]
mov eax, dword [edi]
mov ecx, dword [edi + 4]
xor eax, dword [esi]
xor ecx, dword [esi + 4]
mov edi, dword [edi + 0xc]
xor edi, dword [esi + 0xc]
mov ebx, dword [esi + 0x1c]
mov dword [ebp - 0x20], edx
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x28], edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x24], edx
mov edx, dword [esi + 0x18]
add esi, 0x20
cmp byte [0x578a2c], 0
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x38], esi
jne 0x4104e2
call fcn.00415860
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x1c]
xor edi, edi
xor edx, edx
jmp 0x4104f3
mov edi, dword [ebp - 0x1c]
and edi, dword [edx + 0x53fe90]
add edx, dword [0x5767b8]
mov dword [ebp - 0x1c], edi
cmp edx, 0x400
jb 0x4104f0
mov edx, edi
and edx, 0x2c16163a
or dword [ebp - 0x20], edx
or ecx, edx
or eax, edx
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x30]
or edx, dword [ebp - 0x1c]
movzx edi, dl
xor ebx, dword [edi*4 + 0x53fe90]
shr edx, 8
movzx edi, dl
mov edi, dword [edi*4 + 0x53fe90]
shr edx, 8
ror edi, 8
mov dword [ebp - 0x30], edi
movzx edi, dl
mov edi, dword [edi*4 + 0x53fe90]
shr edx, 8
mov edx, dword [edx*4 + 0x53fe90]
ror edi, 0x10
ror edx, 0x18
mov dword [ebp - 0x1c], edx
movzx edx, byte [ebp - 0x20]
mov edx, dword [edx*4 + 0x53fe90]
xor edx, dword [ebp - 0x30]
mov dword [ebp - 0x2c], edi
xor dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x20]
shr edx, 8
movzx edi, dl
mov edi, dword [edi*4 + 0x53fe90]
shr edx, 8
ror edi, 8
mov dword [ebp - 0x30], edi
movzx edi, dl
mov edi, dword [edi*4 + 0x53fe90]
shr edx, 8
mov edx, dword [edx*4 + 0x53fe90]
ror edi, 0x10
ror edx, 0x18
mov dword [ebp - 0x44], edx
movzx edx, cl
mov edx, dword [edx*4 + 0x53fe90]
xor edx, dword [ebp - 0x30]
shr ecx, 8
xor edx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], edi
xor dword [ebp - 0x24], edx
movzx edx, cl
mov edx, dword [edx*4 + 0x53fe90]
shr ecx, 8
movzx edi, cl
mov edi, dword [edi*4 + 0x53fe90]
shr ecx, 8
mov ecx, dword [ecx*4 + 0x53fe90]
ror edx, 8
ror edi, 0x10
ror ecx, 0x18
mov dword [ebp - 0x30], ecx
movzx ecx, al
mov ecx, dword [ecx*4 + 0x53fe90]
xor ecx, edx
xor ecx, dword [ebp - 0x20]
shr eax, 8
xor ecx, dword [ebp - 0x1c]
movzx edx, al
xor dword [ebp - 0x28], ecx
mov ecx, dword [edx*4 + 0x53fe90]
ror ecx, 8
xor ecx, edi
xor ecx, dword [ebp - 0x44]
shr eax, 8
movzx edx, al
xor ebx, ecx
mov ecx, dword [edx*4 + 0x53fe90]
ror ecx, 0x10
xor ecx, dword [ebp - 0x30]
xor dword [ebp - 0x18], ecx
shr eax, 8
mov edx, dword [eax*4 + 0x53fe90]
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0xc]
ror edx, 0x18
xor dword [ebp - 0x24], edx
shr eax, 1
dec eax
mov dword [ebp - 0x2c], eax
movzx ecx, bl
mov eax, dword [ecx*4 + 0x540a90]
shr ebx, 8
movzx edx, bl
mov edi, dword [edx*4 + 0x540690]
xor edi, dword [esi + 4]
shr ebx, 8
movzx ecx, bl
mov edx, dword [ecx*4 + 0x540290]
movzx ecx, byte [ebp - 0x18]
xor eax, dword [esi]
shr ebx, 8
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebx*4 + 0x53fe90]
mov ebx, dword [ebp - 0x34]
xor ecx, dword [ebx*4 + 0x540a90]
mov ebx, dword [ebp - 0x18]
shr ebx, 8
mov dword [ebp - 0x18], ebx
movzx ebx, bl
xor eax, dword [ebx*4 + 0x540690]
mov ebx, dword [ebp - 0x18]
xor edx, dword [esi + 8]
xor ecx, dword [esi + 0xc]
shr ebx, 8
mov dword [ebp - 0x18], ebx
movzx ebx, bl
xor edi, dword [ebx*4 + 0x540290]
movzx ebx, byte [ebp - 0x24]
mov dword [ebp - 0x1c], edi
mov edi, dword [ebp - 0x18]
shr edi, 8
mov edi, dword [edi*4 + 0x53fe90]
xor edi, dword [ebx*4 + 0x540a90]
mov ebx, dword [ebp - 0x24]
xor edx, edi
shr ebx, 8
movzx edi, bl
xor ecx, dword [edi*4 + 0x540690]
shr ebx, 8
movzx edi, bl
xor eax, dword [edi*4 + 0x540290]
movzx edi, byte [ebp - 0x28]
shr ebx, 8
mov ebx, dword [ebx*4 + 0x53fe90]
xor ebx, dword [edi*4 + 0x540a90]
xor dword [ebp - 0x1c], ebx
mov ebx, dword [ebp - 0x28]
shr ebx, 8
movzx edi, bl
xor edx, dword [edi*4 + 0x540690]
shr ebx, 8
movzx edi, bl
xor ecx, dword [edi*4 + 0x540290]
shr ebx, 8
xor eax, dword [ebx*4 + 0x53fe90]
movzx edi, cl
mov edi, dword [edi*4 + 0x540a90]
xor edi, dword [esi + 0x10]
shr ecx, 8
mov dword [ebp - 0x28], edi
movzx edi, cl
mov edi, dword [edi*4 + 0x540690]
xor edi, dword [esi + 0x14]
shr ecx, 8
mov dword [ebp - 0x24], edi
movzx ebx, dl
mov edi, ecx
shr edi, 8
mov edi, dword [edi*4 + 0x53fe90]
xor edi, dword [ebx*4 + 0x540a90]
shr edx, 8
xor edi, dword [esi + 0x1c]
movzx esi, dl
mov esi, dword [esi*4 + 0x540690]
xor dword [ebp - 0x28], esi
shr edx, 8
mov esi, edx
mov ebx, edi
mov dword [ebp - 0x20], edx
shr esi, 8
mov edx, dword [ebp - 0x1c]
mov esi, dword [esi*4 + 0x53fe90]
movzx ecx, cl
movzx edi, dl
xor esi, dword [edi*4 + 0x540a90]
shr edx, 8
xor esi, dword [ecx*4 + 0x540290]
movzx ecx, dl
xor ebx, dword [ecx*4 + 0x540690]
mov edi, esi
mov esi, dword [ebp - 0x38]
xor edi, dword [esi + 0x18]
shr edx, 8
mov dword [ebp - 0x18], edi
movzx edi, al
mov ecx, edx
shr ecx, 8
mov ecx, dword [ecx*4 + 0x53fe90]
xor ecx, dword [edi*4 + 0x540a90]
movzx edi, byte [ebp - 0x20]
xor ecx, dword [edi*4 + 0x540290]
shr eax, 8
xor dword [ebp - 0x24], ecx
movzx ecx, al
mov ecx, dword [ecx*4 + 0x540690]
xor dword [ebp - 0x18], ecx
shr eax, 8
movzx ecx, al
xor ebx, dword [ecx*4 + 0x540290]
shr eax, 8
mov eax, dword [eax*4 + 0x53fe90]
movzx edx, dl
xor eax, dword [edx*4 + 0x540290]
add esi, 0x20
xor dword [ebp - 0x28], eax
dec dword [ebp - 0x2c]
mov dword [ebp - 0x38], esi
jne 0x41064d
xor edx, edx
xor eax, eax
jmp 0x410840
and edx, dword [eax + str.cw]
add eax, dword [0x5767b8]
cmp eax, 0x100
jb 0x410840
and edx, dword [0x53fd8c]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
or ecx, edx
or eax, edx
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x18]
or edx, dword [ebp - 0x1c]
or ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], edx
movzx edx, dl
movzx edx, byte [edx + str.cw]
mov byte [ebp - 5], dl
mov edx, dword [ebp - 0x18]
shr edx, 8
mov dword [ebp - 0x18], edx
movzx edx, dl
movzx edx, byte [edx + str.cw]
mov byte [ebp - 0x12], dl
mov edx, dword [ebp - 0x18]
shr edx, 8
mov dword [ebp - 0x18], edx
mov edi, dword [ebp - 0x18]
movzx edx, dl
movzx edx, byte [edx + str.cw]
mov byte [ebp - 0xf], dl
shr edi, 8
movzx edx, byte [edi + str.cw]
mov byte [ebp - 0xc], dl
movzx edx, cl
movzx edx, byte [edx + str.cw]
shr ecx, 8
mov byte [ebp - 9], dl
movzx edx, cl
movzx edx, byte [edx + str.cw]
shr ecx, 8
mov byte [ebp - 6], dl
movzx edx, cl
movzx edx, byte [edx + str.cw]
shr ecx, 8
movzx ecx, byte [ecx + str.cw]
mov byte [ebp - 0x13], dl
movzx edx, al
shr eax, 8
mov byte [ebp - 0x10], cl
movzx ecx, byte [edx + str.cw]
movzx edx, al
shr eax, 8
mov byte [ebp - 0xd], cl
movzx ecx, byte [edx + str.cw]
movzx edx, al
shr eax, 8
mov byte [ebp - 0xa], cl
movzx ecx, byte [edx + str.cw]
movzx edx, byte [eax + str.cw]
movzx eax, bl
shr ebx, 8
mov byte [ebp - 0x14], dl
movzx edx, bl
mov byte [ebp - 7], cl
movzx ecx, byte [eax + str.cw]
movzx eax, byte [edx + str.cw]
shr ebx, 8
mov byte [ebp - 0x11], cl
movzx ecx, bl
movzx edx, byte [ecx + str.cw]
shr ebx, 8
mov byte [ebp - 0xe], al
movzx eax, byte [ebx + str.cw]
mov byte [ebp - 8], al
mov eax, dword [ebp - 0x40]
mov byte [ebp - 0xb], dl
test eax, eax
je 0x4109b3
mov edx, dword [eax]
xor edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x3c]
xor edx, dword [esi]
mov dword [ecx], edx
mov edx, dword [eax + 4]
xor edx, dword [esi + 4]
xor edx, dword [ebp - 0x10]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
xor edx, dword [esi + 8]
xor edx, dword [ebp - 0xc]
mov dword [ecx + 8], edx
mov eax, dword [eax + 0xc]
xor eax, dword [esi + 0xc]
xor eax, dword [ebp - 8]
mov dword [ecx + 0xc], eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004db901
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esi]
xor ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x3c]
mov dword [eax], ecx
mov edx, dword [esi + 4]
xor edx, dword [ebp - 0x10]
pop edi
mov dword [eax + 4], edx
mov ecx, dword [esi + 8]
xor ecx, dword [ebp - 0xc]
mov dword [eax + 8], ecx
mov edx, dword [esi + 0xc]
xor edx, dword [ebp - 8]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
mov dword [eax + 0xc], edx
pop ebx
call fcn.004db901
mov esp, ebp
pop ebp
ret 0xc