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

Disassembly:
sub esp, 0x20
mov edx, dword [esp + 0x24]
mov eax, dword [ecx + 0x108]
xor eax, dword [edx + 4]
push ebx
push ebp
push esi
mov ebp, dword [ecx + 0x104]
xor ebp, dword [edx]
mov esi, dword [ecx + 0x110]
xor esi, dword [edx + 0xc]
push edi
lea edi, [ecx + 0x104]
mov ecx, dword [edi + 8]
xor ecx, dword [edx + 8]
mov ebx, eax
shr ebx, 0x18
movzx ebx, byte [ebx + 0x51d510]
shl ebx, 8
mov dword [esp + 0x14], esi
mov edx, ecx
shr edx, 0x10
and edx, 0xff
movzx edx, byte [edx + 0x51d510]
xor edx, ebx
mov ebx, esi
shr esi, 0x10
shr ebx, 8
and esi, 0xff
and ebx, 0xff
movzx ebx, byte [ebx + 0x51d510]
shl edx, 8
xor edx, ebx
mov ebx, ebp
and ebx, 0xff
movzx ebx, byte [ebx + 0x51d510]
shl edx, 8
xor edx, ebx
movzx ebx, byte [esi + 0x51d510]
mov esi, ecx
shr esi, 0x18
movzx esi, byte [esi + 0x51d510]
shl esi, 8
xor ebx, esi
mov esi, ebp
shr esi, 8
and esi, 0xff
movzx esi, byte [esi + 0x51d510]
shl ebx, 8
xor ebx, esi
mov esi, eax
and esi, 0xff
movzx esi, byte [esi + 0x51d510]
mov dword [esp + 0x34], ebp
shr ebp, 0x10
shl ebx, 8
xor ebx, esi
mov esi, dword [esp + 0x14]
shr esi, 0x18
movzx esi, byte [esi + 0x51d510]
shl esi, 8
and ebp, 0xff
movzx ebp, byte [ebp + 0x51d510]
xor ebp, esi
mov esi, eax
shr esi, 8
and esi, 0xff
movzx esi, byte [esi + 0x51d510]
shl ebp, 8
xor ebp, esi
mov esi, ecx
and esi, 0xff
movzx esi, byte [esi + 0x51d510]
shl ebp, 8
xor ebp, esi
mov esi, dword [esp + 0x34]
shr esi, 0x18
movzx esi, byte [esi + 0x51d510]
shr eax, 0x10
and eax, 0xff
movzx eax, byte [eax + 0x51d510]
shl esi, 8
xor eax, esi
shr ecx, 8
shl eax, 8
and ecx, 0xff
movzx ecx, byte [ecx + 0x51d510]
xor eax, ecx
mov ecx, dword [esp + 0x14]
shl eax, 8
and ecx, 0xff
movzx ecx, byte [ecx + 0x51d510]
xor eax, ecx
mov dword [esp + 0x2c], eax
mov eax, edx
and eax, 0x80808080
mov ecx, eax
shr ecx, 7
sub eax, ecx
and eax, 0x1b1b1b1b
mov ecx, edx
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov esi, eax
and eax, 0x80808080
mov ecx, eax
shr ecx, 7
sub eax, ecx
and eax, 0x1b1b1b1b
mov ecx, esi
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov dword [esp + 0x34], eax
and eax, 0x80808080
mov ecx, eax
shr ecx, 7
sub eax, ecx
mov ecx, dword [esp + 0x34]
and eax, 0x1b1b1b1b
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov ecx, eax
mov dword [esp + 0x14], eax
xor ecx, edx
mov dword [esp + 0x10], esi
mov eax, ecx
xor eax, esi
mov edx, ecx
xor edx, dword [esp + 0x34]
mov esi, ecx
shr esi, 8
xor esi, edx
shr esi, 8
xor esi, eax
shl eax, 8
xor eax, edx
shl eax, 8
xor eax, ecx
shl eax, 8
shr esi, 8
xor esi, eax
xor esi, dword [esp + 0x14]
mov eax, ebx
xor esi, dword [esp + 0x34]
and eax, 0x80808080
xor esi, dword [esp + 0x10]
mov edx, eax
xor esi, dword [edi + 0x10]
shr edx, 7
sub eax, edx
mov ecx, ebx
and ecx, 0xff7f7f7f
and eax, 0x1b1b1b1b
add ecx, ecx
xor eax, ecx
mov edx, eax
and eax, 0x80808080
mov ecx, eax
mov dword [esp + 0x10], edx
shr ecx, 7
sub eax, ecx
and eax, 0x1b1b1b1b
mov ecx, edx
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov dword [esp + 0x34], eax
and eax, 0x80808080
mov ecx, eax
shr ecx, 7
sub eax, ecx
mov ecx, dword [esp + 0x34]
and eax, 0x1b1b1b1b
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov ecx, eax
mov dword [esp + 0x14], eax
xor ecx, ebx
mov eax, ecx
xor eax, edx
mov ebx, ecx
xor ebx, dword [esp + 0x34]
mov edx, ecx
shr edx, 8
xor edx, ebx
shr edx, 8
xor edx, eax
shl eax, 8
xor eax, ebx
shl eax, 8
xor eax, ecx
shl eax, 8
shr edx, 8
xor edx, eax
xor edx, dword [esp + 0x14]
mov eax, ebp
xor edx, dword [esp + 0x34]
and eax, 0x80808080
xor edx, dword [esp + 0x10]
mov ecx, eax
shr ecx, 7
sub eax, ecx
and eax, 0x1b1b1b1b
mov ecx, ebp
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov ecx, eax
and eax, 0x80808080
mov ebx, eax
mov dword [esp + 0x10], ecx
shr ebx, 7
sub eax, ebx
and eax, 0x1b1b1b1b
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov ecx, eax
xor edx, dword [edi + 0x14]
and eax, 0x80808080
mov ebx, eax
mov dword [esp + 0x34], ecx
shr ebx, 7
sub eax, ebx
and eax, 0x1b1b1b1b
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov ebx, eax
xor ebx, ebp
mov dword [esp + 0x14], eax
mov ebp, ebx
xor ebp, dword [esp + 0x34]
mov eax, ebx
shr eax, 8
mov ecx, ebx
xor ecx, dword [esp + 0x10]
xor eax, ebp
shr eax, 8
xor eax, ecx
shl ecx, 8
xor ecx, ebp
shl ecx, 8
xor ecx, ebx
mov ebx, dword [esp + 0x2c]
shl ecx, 8
shr eax, 8
xor eax, ecx
mov ecx, ebx
and ecx, 0x80808080
mov ebp, ecx
and ebx, 0xff7f7f7f
add ebx, ebx
xor eax, dword [esp + 0x14]
shr ebp, 7
sub ecx, ebp
and ecx, 0x1b1b1b1b
xor ecx, ebx
mov ebp, ecx
xor eax, dword [esp + 0x34]
mov ebx, ebp
and ebx, 0x80808080
mov ecx, ebx
shr ecx, 7
sub ebx, ecx
and ebx, 0x1b1b1b1b
xor eax, dword [esp + 0x10]
mov ecx, ebp
and ecx, 0xff7f7f7f
add ecx, ecx
xor ebx, ecx
mov ecx, ebx
and ecx, 0x80808080
mov dword [esp + 0x34], ebx
mov ebx, ecx
shr ebx, 7
sub ecx, ebx
mov ebx, dword [esp + 0x34]
and ecx, 0x1b1b1b1b
and ebx, 0xff7f7f7f
add ebx, ebx
xor ecx, ebx
mov dword [esp + 0x14], ecx
xor ecx, dword [esp + 0x2c]
xor eax, dword [edi + 0x18]
mov ebx, ecx
mov dword [esp + 0x1c], ecx
xor ebx, ebp
mov dword [esp + 0x10], ebp
mov ebp, ecx
xor ebp, dword [esp + 0x34]
shr ecx, 8
xor ecx, ebp
shr ecx, 8
xor ecx, ebx
shl ebx, 8
xor ebx, ebp
shl ebx, 8
xor ebx, dword [esp + 0x1c]
shr ecx, 8
shl ebx, 8
xor ecx, ebx
xor ecx, dword [esp + 0x14]
mov dword [esp + 0x14], edx
xor ecx, dword [esp + 0x34]
mov dword [esp + 0x34], esi
xor ecx, dword [esp + 0x10]
mov dword [esp + 0x18], eax
xor ecx, dword [edi + 0x1c]
add edi, 0x20
mov dword [esp + 0x1c], 0xe
mov ebp, edx
mov ebx, eax
shr ebp, 0x18
movzx ebp, byte [ebp + 0x51d510]
shr ebx, 0x10
shl ebp, 8
and ebx, 0xff
movzx ebx, byte [ebx + 0x51d510]
xor ebx, ebp
and esi, 0xff
movzx esi, byte [esi + 0x51d510]
mov ebp, ecx
shr ebp, 8
and ebp, 0xff
movzx ebp, byte [ebp + 0x51d510]
shl ebx, 8
xor ebx, ebp
shl ebx, 8
xor ebx, esi
mov esi, ecx
shr esi, 0x10
and esi, 0xff
movzx ebp, byte [esi + 0x51d510]
mov esi, eax
shr esi, 0x18
movzx esi, byte [esi + 0x51d510]
shl esi, 8
xor ebp, esi
mov esi, dword [esp + 0x34]
and edx, 0xff
movzx edx, byte [edx + 0x51d510]
shr esi, 8
and esi, 0xff
movzx esi, byte [esi + 0x51d510]
shl ebp, 8
xor ebp, esi
shl ebp, 8
xor ebp, edx
mov edx, dword [esp + 0x34]
shr edx, 0x10
and edx, 0xff
movzx edx, byte [edx + 0x51d510]
mov esi, ecx
shr esi, 0x18
movzx esi, byte [esi + 0x51d510]
shl esi, 8
xor edx, esi
mov esi, dword [esp + 0x14]
shl edx, 8
shr esi, 8
and eax, 0xff
movzx eax, byte [eax + 0x51d510]
and esi, 0xff
movzx esi, byte [esi + 0x51d510]
xor edx, esi
shl edx, 8
xor edx, eax
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x14]
shr edx, 0x10
and edx, 0xff
movzx eax, byte [edx + 0x51d510]
mov edx, dword [esp + 0x34]
shr edx, 0x18
movzx edx, byte [edx + 0x51d510]
shl edx, 8
xor eax, edx
mov edx, dword [esp + 0x18]
shr edx, 8
and edx, 0xff
movzx edx, byte [edx + 0x51d510]
shl eax, 8
xor eax, edx
and ecx, 0xff
movzx ecx, byte [ecx + 0x51d510]
shl eax, 8
xor eax, ecx
mov dword [esp + 0x2c], eax
mov eax, ebx
and eax, 0x80808080
mov edx, eax
shr edx, 7
sub eax, edx
and eax, 0x1b1b1b1b
mov ecx, ebx
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov edx, eax
and eax, 0x80808080
mov ecx, eax
shr ecx, 7
sub eax, ecx
and eax, 0x1b1b1b1b
mov ecx, edx
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov esi, eax
and eax, 0x80808080
mov ecx, eax
shr ecx, 7
sub eax, ecx
and eax, 0x1b1b1b1b
mov ecx, esi
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov ecx, eax
xor ecx, ebx
mov dword [esp + 0x34], eax
mov ebx, ecx
xor ebx, esi
mov dword [esp + 0x14], esi
mov esi, ecx
mov eax, ecx
xor eax, edx
shr esi, 8
xor esi, ebx
shr esi, 8
xor esi, eax
shl eax, 8
xor eax, ebx
shl eax, 8
xor eax, ecx
shl eax, 8
shr esi, 8
xor esi, eax
xor esi, dword [esp + 0x34]
mov eax, ebp
xor esi, dword [esp + 0x14]
and eax, 0x80808080
xor esi, edx
mov edx, eax
shr edx, 7
sub eax, edx
and eax, 0x1b1b1b1b
mov ecx, ebp
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov edx, eax
and eax, 0x80808080
xor esi, dword [edi]
mov ecx, eax
shr ecx, 7
sub eax, ecx
and eax, 0x1b1b1b1b
mov ecx, edx
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov ebx, eax
and eax, 0x80808080
mov ecx, eax
shr ecx, 7
sub eax, ecx
mov ecx, ebx
and ecx, 0xff7f7f7f
and eax, 0x1b1b1b1b
mov dword [esp + 0x14], ebx
add ecx, ecx
xor eax, ecx
mov ecx, eax
xor ecx, ebp
mov dword [esp + 0x34], eax
mov ebp, ecx
xor ebp, ebx
mov ebx, ecx
mov eax, ecx
xor eax, edx
shr ebx, 8
xor ebx, ebp
shr ebx, 8
xor ebx, eax
shl eax, 8
xor eax, ebp
shl eax, 8
xor eax, ecx
mov ecx, dword [esp + 0x28]
shl eax, 8
shr ebx, 8
xor ebx, eax
xor ebx, dword [esp + 0x34]
mov eax, ecx
xor ebx, dword [esp + 0x14]
and eax, 0x80808080
and ecx, 0xff7f7f7f
xor edx, ebx
mov ebx, eax
add ecx, ecx
shr ebx, 7
sub eax, ebx
and eax, 0x1b1b1b1b
xor eax, ecx
mov ebx, eax
and eax, 0x80808080
mov ecx, eax
shr ecx, 7
sub eax, ecx
and eax, 0x1b1b1b1b
mov ecx, ebx
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov ebp, eax
and eax, 0x80808080
mov ecx, eax
shr ecx, 7
sub eax, ecx
mov ecx, ebp
and eax, 0x1b1b1b1b
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov ecx, eax
xor ecx, dword [esp + 0x28]
mov dword [esp + 0x34], eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebx
mov eax, ecx
xor eax, ebx
mov ebx, ecx
xor ebx, ebp
xor edx, dword [edi + 4]
mov ebp, ecx
shr ebp, 8
xor ebp, ebx
shr ebp, 8
xor ebp, eax
shl eax, 8
xor eax, ebx
mov ebx, dword [esp + 0x2c]
shl eax, 8
shr ebp, 8
xor eax, ecx
shl eax, 8
xor ebp, eax
xor ebp, dword [esp + 0x34]
xor ebp, dword [esp + 0x14]
xor ebp, dword [esp + 0x10]
mov eax, ebp
xor eax, dword [edi + 8]
mov ecx, ebx
and ecx, 0x80808080
mov ebp, ecx
shr ebp, 7
sub ecx, ebp
and ecx, 0x1b1b1b1b
and ebx, 0xff7f7f7f
add ebx, ebx
xor ecx, ebx
mov ebx, ecx
and ecx, 0x80808080
mov ebp, ecx
mov dword [esp + 0x10], ebx
shr ebp, 7
sub ecx, ebp
and ecx, 0x1b1b1b1b
and ebx, 0xff7f7f7f
add ebx, ebx
xor ecx, ebx
mov ebp, ecx
and ecx, 0x80808080
mov ebx, ecx
shr ebx, 7
sub ecx, ebx
mov ebx, ebp
and ecx, 0x1b1b1b1b
and ebx, 0xff7f7f7f
add ebx, ebx
xor ecx, ebx
mov ebx, ecx
xor ebx, dword [esp + 0x2c]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebx
mov ecx, ebx
xor ecx, dword [esp + 0x10]
xor ebx, ebp
mov ebp, dword [esp + 0x18]
shr ebp, 8
xor ebp, ebx
shr ebp, 8
xor ebp, ecx
shl ecx, 8
xor ecx, ebx
mov ebx, dword [esp + 0x1c]
shl ecx, 8
xor ecx, dword [esp + 0x18]
shr ebp, 8
shl ecx, 8
xor ebp, ecx
xor ebp, dword [esp + 0x34]
dec ebx
xor ebp, dword [esp + 0x14]
add edi, 0x10
xor ebp, dword [esp + 0x10]
mov dword [esp + 0x34], esi
mov ecx, ebp
xor ecx, dword [edi - 4]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ebx
test ebx, ebx
jg 0x402c67
mov ebp, edx
shr ebp, 0x18
movzx ebp, byte [ebp + 0x51d510]
shl ebp, 8
mov ebx, eax
shr ebx, 0x10
and ebx, 0xff
movzx ebx, byte [ebx + 0x51d510]
xor ebx, ebp
shl ebx, 8
mov ebp, ecx
shr ebp, 8
and ebp, 0xff
movzx ebp, byte [ebp + 0x51d510]
xor ebx, ebp
shl ebx, 8
mov ebp, esi
and ebp, 0xff
movzx ebp, byte [ebp + 0x51d510]
xor ebx, ebp
xor ebx, dword [edi]
mov ebp, dword [esp + 0x38]
mov dword [ebp], ebx
mov ebp, eax
shr ebp, 0x18
movzx ebp, byte [ebp + 0x51d510]
shl ebp, 8
mov ebx, ecx
shr ebx, 0x10
and ebx, 0xff
movzx ebx, byte [ebx + 0x51d510]
xor ebx, ebp
shl ebx, 8
mov ebp, esi
shr ebp, 8
and ebp, 0xff
movzx ebp, byte [ebp + 0x51d510]
xor ebx, ebp
shl ebx, 8
mov ebp, edx
and ebp, 0xff
movzx ebp, byte [ebp + 0x51d510]
xor ebx, ebp
xor ebx, dword [edi + 4]
mov ebp, dword [esp + 0x38]
mov dword [ebp + 4], ebx
mov ebx, esi
shr ebx, 0x10
and ebx, 0xff
movzx ebp, byte [ebx + 0x51d510]
mov ebx, ecx
shr ebx, 0x18
movzx ebx, byte [ebx + 0x51d510]
shl ebx, 8
xor ebp, ebx
mov ebx, edx
shr ebx, 8
and ebx, 0xff
movzx ebx, byte [ebx + 0x51d510]
shl ebp, 8
xor ebp, ebx
mov ebx, eax
and ebx, 0xff
movzx ebx, byte [ebx + 0x51d510]
shl ebp, 8
xor ebp, ebx
xor ebp, dword [edi + 8]
mov ebx, dword [esp + 0x38]
shr edx, 0x10
shr esi, 0x18
mov dword [ebx + 8], ebp
movzx esi, byte [esi + 0x51d510]
and edx, 0xff
movzx edx, byte [edx + 0x51d510]
shr eax, 8
shl esi, 8
and eax, 0xff
movzx eax, byte [eax + 0x51d510]
xor edx, esi
shl edx, 8
xor edx, eax
and ecx, 0xff
movzx ecx, byte [ecx + 0x51d510]
shl edx, 8
xor edx, ecx
xor edx, dword [edi + 0xc]
pop edi
pop esi
pop ebp
mov dword [ebx + 0xc], edx
pop ebx
add esp, 0x20
ret 8