Function at 0x5871c0
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using aes via x86 extensions
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x38
push esi
push edi
mov edi, dword [ebp + 0xc]
mov eax, edi
shr eax, 2
mov dword [esp + 0x14], eax
add eax, 6
push ecx
mov dword [ecx + 0x10], eax
mov dword [esp + 0x20], ecx
lea ecx, [ecx + 0x18]
lea esi, [eax*4 + 4]
push esi
push dword [ecx + 0x100]
push dword [ecx + 0x104]
call fcn.00588c30
cmp byte [0x8342b8], 0
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 0x118], esi
mov esi, eax
mov dword [ecx + 0x11c], eax
jne 0x58721e
call fcn.00586dd0
cmp byte [0x8342aa], 0
push edi
je 0x587410
mov eax, dword [ebp + 8]
push eax
push esi
movups xmm0, xmmword [eax + edi - 0x10]
movaps xmmword [esp + 0x3c], xmm0
call fcn.0066eca0
mov edx, dword [esp + 0x20]
add esp, 0xc
movaps xmm1, xmmword [esp + 0x30]
lea edi, [esi + edx*4]
aeskeygenassist xmm0, xmm1, 0
pextrd ecx, xmm0, 3
xor ecx, dword [esi]
xor ecx, 1
mov dword [esp + 0x20], 0x757734
mov dword [edi], ecx
mov eax, dword [esi + 4]
xor eax, ecx
mov dword [edi + 4], eax
mov ecx, dword [esi + 8]
xor ecx, eax
lea eax, [edx*4 + 8]
mov dword [eax + esi], ecx
mov dword [esp + 0x18], eax
lea eax, [edx*4 + 0xc]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0xc]
xor eax, ecx
mov dword [esi + edx*4 + 0xc], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x118]
mov eax, dword [eax + 0x11c]
lea ecx, [eax + ecx*4]
lea eax, [edx + 4]
lea eax, [esi + eax*4]
cmp eax, ecx
je 0x587393
lea ebx, [ebx]
mov eax, dword [ebp + 0xc]
cmp eax, 0x18
jne 0x5872e1
mov eax, dword [esi + 0x24]
xor eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
xor ecx, eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], ecx
pinsrd xmm1, ecx, 3
jmp 0x587326
cmp eax, 0x20
jne 0x58731f
pinsrd xmm1, dword [esi + 0x2c], 3
mov eax, dword [esi + 0x14]
aeskeygenassist xmm0, xmm1, 0
pextrd ecx, xmm0, 2
xor ecx, dword [esi + 0x10]
xor eax, ecx
mov dword [esi + 0x30], ecx
mov ecx, dword [esi + 0x18]
xor ecx, eax
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0x1c]
xor eax, ecx
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
pinsrd xmm1, eax, 3
jmp 0x587326
pinsrd xmm1, dword [esi + 0x1c], 3
mov eax, dword [esp + 0x14]
mov esi, edi
mov ecx, dword [esp + 0x20]
mov edx, edi
lea edi, [esi + eax*4]
aeskeygenassist xmm0, xmm1, 0
pextrd eax, xmm0, 3
xor eax, dword [ecx]
add ecx, 4
xor eax, dword [esi]
mov dword [edi], eax
mov eax, dword [esi + 4]
xor eax, dword [edi]
mov dword [edi + 4], eax
mov dword [esp + 0x20], ecx
mov ecx, dword [esi + 8]
xor ecx, eax
mov eax, dword [esp + 0x18]
mov dword [eax + esi], ecx
mov eax, dword [esi + 0xc]
xor eax, ecx
mov ecx, dword [esp + 0x24]
mov dword [ecx + esi], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x118]
mov eax, dword [eax + 0x11c]
lea ecx, [eax + ecx*4]
mov eax, dword [esp + 0x14]
add eax, 4
lea eax, [edx + eax*4]
cmp eax, ecx
jne 0x5872c0
mov esi, dword [esp + 0x1c]
mov eax, dword [esi + 4]
lea ecx, [esi + 4]
mov eax, dword [eax + 0x1c]
call eax
test al, al
jne 0x587c45
mov eax, dword [esi + 0x10]
mov ecx, 4
mov edx, dword [esi + 0x11c]
add eax, eax
movaps xmm0, xmmword [edx + eax*8]
movaps xmm1, xmmword [edx]
movaps xmmword [edx], xmm0
movaps xmmword [edx + eax*8], xmm1
mov eax, dword [esi + 0x10]
lea eax, [eax*4 - 4]
cmp eax, ecx
jbe 0x5873fe
jmp 0x5873e0
aesimc xmm0, xmmword [edx + eax*4]
aesimc xmm1, xmmword [edx + ecx*4]
movaps xmmword [edx + ecx*4], xmm0
add ecx, 4
movaps xmmword [edx + eax*4], xmm1
sub eax, 4
cmp ecx, eax
jb 0x5873e0
aesimc xmm0, xmmword [edx + ecx*4]
movaps xmmword [edx + ecx*4], xmm0
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [esp + 0x18]
mov ecx, esi
push dword [ebp + 8]
shl edx, 2
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], 4
call fcn.005819d0
mov ecx, dword [esp + 0x1c]
lea eax, [ecx*4]
sub eax, edi
push eax
lea eax, [esi + edi]
push 0
push eax
call fcn.0066f220
add esp, 0x14
lea edx, [esp + 0x24]
lea ecx, [esp + 0x20]
call fcn.00588f50
mov edx, eax
xor ecx, ecx
shr edx, 2
test edx, edx
je 0x58746e
mov eax, dword [esi + ecx*4]
bswap eax
mov dword [esi + ecx*4], eax
inc ecx
cmp ecx, edx
jb 0x587461
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], 0x748824
lea edi, [ecx*4]
mov ecx, dword [edi + esi - 4]
add edi, esi
mov eax, ecx
shr eax, 0x10
movzx eax, al
mov dword [esp + 0x20], edi
movzx edx, byte [eax + str.cw]
mov eax, ecx
shr eax, 8
xor edx, 1
movzx eax, al
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, cl
shr ecx, 0x18
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, byte [ecx + str.cw]
shl edx, 8
xor edx, eax
xor edx, dword [esi]
mov dword [edi], edx
mov eax, dword [esi + 4]
xor eax, edx
mov edx, dword [esp + 0x14]
mov dword [edi + 4], eax
mov ecx, dword [esi + 8]
xor ecx, eax
lea eax, [edx*4 + 8]
mov dword [eax + esi], ecx
mov dword [esp + 0x24], eax
lea eax, [edx*4 + 0xc]
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0xc]
xor eax, ecx
mov dword [esi + edx*4 + 0xc], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x118]
mov eax, dword [eax + 0x11c]
lea ecx, [eax + ecx*4]
lea eax, [edx*4]
add eax, 0x10
add eax, esi
cmp eax, ecx
je 0x587671
lea ecx, [ecx]
mov eax, dword [ebp + 0xc]
cmp eax, 0x18
jne 0x58754b
mov ecx, dword [esi + 0x24]
xor ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
xor eax, ecx
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], eax
jmp 0x5875b8
cmp eax, 0x20
jne 0x5875b8
mov ecx, dword [esi + 0x2c]
mov eax, ecx
shr eax, 0x18
movzx edx, byte [eax + str.cw]
mov eax, ecx
shr eax, 0x10
movzx eax, al
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
mov eax, ecx
shr eax, 8
movzx eax, al
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, cl
mov ecx, dword [esi + 0x18]
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
mov eax, dword [esi + 0x14]
xor edx, dword [esi + 0x10]
xor eax, edx
mov dword [esi + 0x30], edx
mov edx, dword [esp + 0x14]
xor ecx, eax
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0x1c]
xor eax, ecx
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
mov esi, dword [esp + 0x20]
lea eax, [edx*4]
add eax, esi
mov dword [esp + 0x20], eax
mov ecx, dword [eax - 4]
mov eax, ecx
shr eax, 0x10
movzx eax, al
movzx edx, byte [eax + str.cw]
mov eax, ecx
shr eax, 8
movzx eax, al
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, cl
shr ecx, 0x18
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, byte [ecx + str.cw]
mov ecx, dword [esp + 0x20]
shl edx, 8
xor edx, eax
mov eax, dword [esp + 0x18]
xor edx, dword [esi]
xor edx, dword [eax]
add eax, 4
mov dword [ecx], edx
mov dword [esp + 0x18], eax
mov eax, dword [esi + 4]
xor eax, edx
mov edx, dword [esp + 0x14]
mov dword [ecx + 4], eax
mov ecx, dword [esi + 8]
xor ecx, eax
mov eax, dword [esp + 0x24]
mov dword [eax + esi], ecx
mov eax, dword [esi + 0xc]
xor eax, ecx
mov ecx, dword [esp + 0x28]
mov dword [ecx + esi], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x118]
mov eax, dword [eax + 0x11c]
lea ecx, [eax + ecx*4]
lea eax, [edx*4]
add eax, 0x10
add eax, edi
mov edi, dword [esp + 0x20]
cmp eax, ecx
jne 0x587530
mov esi, dword [esp + 0x1c]
mov eax, dword [esi + 4]
lea ecx, [esi + 4]
mov edi, dword [esi + 0x11c]
mov eax, dword [eax + 0x1c]
mov dword [esp + 0x2c], edi
call eax
test al, al
je 0x5876d9
cmp byte [0x8342b9], 0
jne 0x58769c
call fcn.00586fd0
xor ecx, ecx
mov edi, edi
mov eax, dword [edi + ecx*4]
bswap eax
mov dword [edi + ecx*4], eax
inc ecx
cmp ecx, 4
jb 0x5876a0
mov ecx, dword [esi + 0x10]
mov edx, 4
shl ecx, 4
add ecx, edi
mov esi, ecx
sub esi, ecx
nop
mov eax, dword [esi + ecx]
lea ecx, [ecx + 4]
bswap eax
mov dword [ecx - 4], eax
sub edx, 1
jne 0x5876c0
mov esi, dword [esp + 0x1c]
jmp 0x587c07
cmp byte [0x8342ba], 0
jne 0x5876e7
call fcn.00587060
mov eax, dword [esi + 0x10]
mov ecx, 4
mov dword [esp + 0x20], ecx
lea eax, [eax*4 - 4]
mov dword [esp + 0x28], eax
cmp eax, ecx
jbe 0x587a2e
add eax, 2
lea eax, [edi + eax*4]
mov dword [esp + 0x18], eax
lea eax, [edi + 0x18]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x14], eax
jmp 0x587720
mov edx, dword [eax - 8]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov esi, dword [ecx*8 + 0x856a14]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x856a11]
movzx eax, dl
mov edx, dword [esp + 0x18]
movzx eax, byte [eax + str.cw]
mov edx, dword [edx - 8]
xor esi, dword [eax*8 + 0x856a12]
mov eax, dword [esp + 0x14]
movzx eax, byte [eax - 8]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x856a13]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x856a14]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a11]
movzx eax, dl
mov edx, dword [esp + 0x18]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a12]
movzx eax, byte [edx - 8]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a13]
mov eax, dword [esp + 0x14]
mov dword [eax - 8], ecx
mov dword [edx - 8], esi
mov edx, dword [eax - 4]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov esi, dword [ecx*8 + 0x856a14]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x856a11]
movzx eax, dl
mov edx, dword [esp + 0x18]
movzx eax, byte [eax + str.cw]
mov edx, dword [edx - 4]
xor esi, dword [eax*8 + 0x856a12]
mov eax, dword [esp + 0x14]
movzx eax, byte [eax - 4]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x856a13]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x856a14]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a11]
movzx eax, dl
mov edx, dword [esp + 0x18]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a12]
movzx eax, byte [edx - 4]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a13]
mov eax, dword [esp + 0x14]
mov dword [eax - 4], ecx
mov dword [edx - 4], esi
mov edx, dword [eax]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov esi, dword [ecx*8 + 0x856a14]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x856a11]
movzx eax, dl
mov edx, dword [esp + 0x18]
movzx eax, byte [eax + str.cw]
mov edx, dword [edx]
xor esi, dword [eax*8 + 0x856a12]
mov eax, dword [esp + 0x14]
movzx eax, byte [eax]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x856a13]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x856a14]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a11]
movzx eax, dl
mov edx, dword [esp + 0x18]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a12]
movzx eax, byte [edx]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a13]
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
mov dword [edx], esi
mov edx, dword [eax + 4]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov esi, dword [ecx*8 + 0x856a14]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x856a11]
movzx eax, dl
mov edx, dword [esp + 0x18]
movzx eax, byte [eax + str.cw]
mov edx, dword [edx + 4]
xor esi, dword [eax*8 + 0x856a12]
mov eax, dword [esp + 0x14]
movzx eax, byte [eax + 4]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x856a13]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x856a14]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a11]
movzx eax, dl
mov edx, dword [esp + 0x18]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a12]
movzx eax, byte [edx + 4]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a13]
mov eax, dword [esp + 0x14]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x20]
mov dword [edx + 4], esi
add ecx, 4
add eax, 0x10
mov dword [esp + 0x20], ecx
sub edi, 4
mov dword [esp + 0x14], eax
sub edx, 0x10
mov dword [esp + 0x18], edx
cmp ecx, edi
jb 0x587720
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x1c]
mov edx, dword [edi + ecx*4]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x856a14]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a11]
movzx eax, dl
mov edx, dword [esp + 0x20]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a12]
movzx eax, byte [edi + edx*4]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a13]
mov dword [edi + edx*4], ecx
mov edx, dword [edi + edx*4 + 4]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x856a14]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a11]
movzx eax, dl
mov edx, dword [esp + 0x20]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a12]
movzx eax, byte [edi + edx*4 + 4]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a13]
mov dword [edi + edx*4 + 4], ecx
mov edx, dword [edi + edx*4 + 8]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x856a14]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a11]
movzx eax, dl
mov edx, dword [esp + 0x20]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a12]
movzx eax, byte [edi + edx*4 + 8]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a13]
mov dword [edi + edx*4 + 8], ecx
mov edx, dword [edi + edx*4 + 0xc]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x856a14]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a11]
movzx eax, dl
mov edx, dword [esp + 0x20]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a12]
movzx eax, byte [edi + edx*4 + 0xc]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x856a13]
mov dword [edi + edx*4 + 0xc], ecx
mov eax, dword [esi + 0x10]
mov ecx, dword [edi]
add eax, eax
bswap ecx
mov eax, dword [edi + eax*8]
bswap eax
mov dword [edi], eax
mov eax, dword [esi + 0x10]
add eax, eax
mov dword [edi + eax*8], ecx
mov eax, dword [esi + 0x10]
mov ecx, dword [edi + 4]
add eax, eax
bswap ecx
mov eax, dword [edi + eax*8 + 4]
bswap eax
mov dword [edi + 4], eax
mov eax, dword [esi + 0x10]
add eax, eax
mov dword [edi + eax*8 + 4], ecx
mov eax, dword [esi + 0x10]
mov ecx, dword [edi + 8]
add eax, eax
bswap ecx
mov eax, dword [edi + eax*8 + 8]
bswap eax
mov dword [edi + 8], eax
mov eax, dword [esi + 0x10]
add eax, eax
mov dword [edi + eax*8 + 8], ecx
mov eax, dword [esi + 0x10]
mov ecx, dword [edi + 0xc]
add eax, eax
bswap ecx
mov eax, dword [edi + eax*8 + 0xc]
bswap eax
mov dword [edi + 0xc], eax
mov eax, dword [esi + 0x10]
add eax, eax
mov dword [edi + eax*8 + 0xc], ecx
cmp byte [0x8342b8], 0
jne 0x587c15
call fcn.00586dd0
cmp byte [0x8342aa], 0
je 0x587c45
mov edx, dword [esi + 0x10]
lea ecx, [edi + 0x10]
shl edx, 4
sub edx, 0x10
shr edx, 2
test edx, edx
je 0x587c45
mov esi, ecx
sub esi, ecx
mov eax, dword [esi + ecx]
lea ecx, [ecx + 4]
bswap eax
mov dword [ecx - 4], eax
sub edx, 1
jne 0x587c35
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc