Function at 0x402daf
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
mov esi, ecx
mov dword [ebp - 0x24], edx
push edi
test esi, esi
je 0x4032f7
test edx, edx
je 0x4032f7
mov edi, dword [ebp + 8]
test edi, edi
je 0x4032f7
mov eax, dword [esi]
mov edx, 0xff00ff00
mov ecx, eax
rol eax, 8
ror ecx, 8
and ecx, edx
push ebx
mov ebx, 0xff00ff
and eax, ebx
or ecx, eax
mov eax, dword [esi + 4]
xor ecx, dword [edi]
mov dword [ebp - 0x18], ecx
mov ecx, eax
rol eax, 8
and eax, ebx
ror ecx, 8
and ecx, edx
or ecx, eax
mov eax, dword [esi + 8]
xor ecx, dword [edi + 4]
mov ebx, eax
rol eax, 8
mov dword [ebp - 0x10], ecx
mov ecx, 0xff00ff
and eax, ecx
ror ebx, 8
and ebx, edx
or ebx, eax
mov eax, dword [esi + 0xc]
xor ebx, dword [edi + 8]
mov edx, eax
rol eax, 8
mov esi, 0xff
and eax, ecx
ror edx, 8
and edx, 0xff00ff00
or edx, eax
mov eax, ebx
xor edx, dword [edi + 0xc]
shr eax, 8
mov ecx, edx
shr ecx, 0x10
and eax, esi
and ecx, esi
mov esi, dword [ebp - 0x18]
mov ecx, dword [ecx*4 + 0x5e2090]
xor ecx, dword [eax*4 + 0x5e1c90]
mov eax, esi
shr eax, 0x18
xor ecx, dword [eax*4 + 0x5e2490]
mov eax, dword [ebp - 0x10]
movzx eax, al
xor ecx, dword [eax*4 + 0x5e1890]
mov eax, esi
xor ecx, dword [edi + 0x10]
mov edi, 0xff
mov dword [ebp - 0xc], ecx
mov ecx, edx
shr ecx, 8
and ecx, edi
shr eax, 0x10
and eax, edi
mov ecx, dword [ecx*4 + 0x5e1c90]
xor ecx, dword [eax*4 + 0x5e2090]
mov dword [ebp - 4], ecx
mov ecx, dword [ebp - 0x10]
mov eax, ecx
mov edi, dword [ebp - 4]
shr eax, 0x18
shr ecx, 0x10
xor edi, dword [eax*4 + 0x5e2490]
movzx eax, bl
xor edi, dword [eax*4 + 0x5e1890]
mov dword [ebp - 4], edi
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 4]
xor eax, dword [edi + 0x14]
and ecx, 0xff
mov dword [ebp - 4], eax
mov eax, esi
mov ecx, dword [ecx*4 + 0x5e2090]
mov esi, 0xff
shr eax, 8
and eax, esi
xor ecx, dword [eax*4 + 0x5e1c90]
mov eax, ebx
shr eax, 0x18
shr ebx, 0x10
and ebx, esi
xor ecx, dword [eax*4 + 0x5e2490]
movzx eax, dl
shr edx, 0x18
xor ecx, dword [eax*4 + 0x5e1890]
xor ecx, dword [edi + 0x18]
mov eax, dword [ebp - 0x10]
shr eax, 8
and eax, esi
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebx*4 + 0x5e2090]
xor ecx, dword [eax*4 + 0x5e1c90]
mov eax, dword [ebp - 0x18]
xor ecx, dword [edx*4 + 0x5e2490]
movzx eax, al
xor ecx, dword [eax*4 + 0x5e1890]
lea eax, [edi + 0x20]
xor ecx, dword [edi + 0x1c]
mov dword [ebp - 0x10], eax
mov eax, dword [edi + 0xf0]
mov edi, dword [ebp - 0x10]
sar eax, 1
dec eax
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 4]
mov dword [ebp - 8], ecx
je 0x403166
shr ecx, 0x10
mov eax, ebx
and ecx, esi
shr eax, 8
and eax, esi
mov esi, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x5e2090]
xor ecx, dword [eax*4 + 0x5e1c90]
mov eax, esi
shr eax, 0x18
xor ecx, dword [eax*4 + 0x5e2490]
movzx eax, dl
xor ecx, dword [eax*4 + 0x5e1890]
mov eax, esi
xor ecx, dword [edi]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 8]
shr ecx, 8
shr eax, 0x10
and ecx, 0xff
and eax, 0xff
mov ecx, dword [ecx*4 + 0x5e1c90]
xor ecx, dword [eax*4 + 0x5e2090]
mov eax, edx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x5e2490]
movzx eax, bl
xor ecx, dword [eax*4 + 0x5e1890]
mov eax, esi
xor ecx, dword [edi + 4]
mov esi, 0xff
mov dword [ebp - 0x18], ecx
mov ecx, edx
shr eax, 8
and eax, esi
shr ecx, 0x10
and ecx, 0xff
shr edx, 8
and edx, esi
mov dword [ebp - 4], edx
mov ebx, dword [ecx*4 + 0x5e2090]
xor ebx, dword [eax*4 + 0x5e1c90]
mov ecx, dword [ebp - 0x14]
mov eax, ecx
shr eax, 0x18
shr ecx, 0x10
and ecx, esi
xor ebx, dword [eax*4 + 0x5e2490]
mov eax, dword [ebp - 8]
mov edx, dword [ecx*4 + 0x5e2090]
movzx eax, al
xor ebx, dword [eax*4 + 0x5e1890]
mov eax, dword [ebp - 4]
xor ebx, dword [edi + 8]
xor edx, dword [eax*4 + 0x5e1c90]
mov eax, dword [ebp - 8]
shr eax, 0x18
xor edx, dword [eax*4 + 0x5e2490]
mov eax, dword [ebp - 0xc]
movzx eax, al
xor edx, dword [eax*4 + 0x5e1890]
mov eax, ebx
xor edx, dword [edi + 0xc]
shr eax, 8
mov ecx, edx
shr ecx, 0x10
and eax, esi
and ecx, esi
mov esi, dword [ebp - 0x1c]
mov ecx, dword [ecx*4 + 0x5e2090]
xor ecx, dword [eax*4 + 0x5e1c90]
mov eax, esi
shr eax, 0x18
xor ecx, dword [eax*4 + 0x5e2490]
mov eax, dword [ebp - 0x18]
movzx eax, al
xor ecx, dword [eax*4 + 0x5e1890]
xor ecx, dword [edi + 0x10]
mov dword [ebp - 0xc], ecx
mov ecx, edx
shr ecx, 8
mov edi, 0xff
mov eax, esi
and ecx, edi
shr eax, 0x10
and eax, edi
mov edi, dword [ecx*4 + 0x5e1c90]
xor edi, dword [eax*4 + 0x5e2090]
mov ecx, dword [ebp - 0x18]
mov eax, ecx
shr eax, 0x18
shr ecx, 0x10
and ecx, 0xff
xor edi, dword [eax*4 + 0x5e2490]
movzx eax, bl
mov ecx, dword [ecx*4 + 0x5e2090]
xor edi, dword [eax*4 + 0x5e1890]
mov eax, dword [ebp - 0x10]
xor edi, dword [eax + 0x14]
mov eax, esi
shr eax, 8
mov esi, 0xff
and eax, esi
mov dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
xor ecx, dword [eax*4 + 0x5e1c90]
mov eax, ebx
shr eax, 0x18
shr ebx, 0x10
and ebx, esi
xor ecx, dword [eax*4 + 0x5e2490]
movzx eax, dl
shr edx, 0x18
xor ecx, dword [eax*4 + 0x5e1890]
xor ecx, dword [edi + 0x18]
mov eax, dword [ebp - 0x18]
shr eax, 8
and eax, esi
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebx*4 + 0x5e2090]
xor ecx, dword [eax*4 + 0x5e1c90]
mov eax, dword [ebp - 0x1c]
xor ecx, dword [edx*4 + 0x5e2490]
movzx eax, al
xor ecx, dword [eax*4 + 0x5e1890]
xor ecx, dword [edi + 0x1c]
add edi, 0x20
dec dword [ebp - 0x20]
mov dword [ebp - 0x10], edi
jmp 0x402f5a
mov eax, ecx
shr eax, 0x10
and eax, esi
movzx ecx, byte [eax + 0x5e1788]
mov eax, dword [ebp - 0xc]
shr eax, 0x18
movzx eax, byte [eax + 0x5e1788]
shl eax, 8
xor ecx, eax
mov eax, ebx
shr eax, 8
and eax, esi
shl ecx, 8
mov esi, dword [ebp - 0x24]
movzx eax, byte [eax + 0x5e1788]
xor ecx, eax
movzx eax, dl
shl ecx, 8
movzx eax, byte [eax + 0x5e1788]
xor ecx, eax
xor ecx, dword [edi]
mov eax, ecx
rol ecx, 8
ror eax, 8
and ecx, 0xff00ff
and eax, 0xff00ff00
or eax, ecx
mov dword [esi], eax
mov eax, dword [ebp - 0xc]
shr eax, 0x10
and eax, 0xff
movzx ecx, byte [eax + 0x5e1788]
mov eax, edx
shr eax, 0x18
movzx eax, byte [eax + 0x5e1788]
shl eax, 8
xor ecx, eax
mov eax, dword [ebp - 8]
shr eax, 8
and eax, 0xff
shl ecx, 8
movzx eax, byte [eax + 0x5e1788]
xor ecx, eax
movzx eax, bl
shl ecx, 8
movzx eax, byte [eax + 0x5e1788]
xor ecx, eax
xor ecx, dword [edi + 4]
mov eax, ecx
rol ecx, 8
ror eax, 8
and ecx, 0xff00ff
and eax, 0xff00ff00
or eax, ecx
mov dword [esi + 4], eax
mov eax, edx
shr eax, 0x10
and eax, 0xff
movzx ecx, byte [eax + 0x5e1788]
mov eax, ebx
shr eax, 0x18
movzx eax, byte [eax + 0x5e1788]
shl eax, 8
xor ecx, eax
mov eax, dword [ebp - 0xc]
shr eax, 8
and eax, 0xff
shl ecx, 8
movzx eax, byte [eax + 0x5e1788]
xor ecx, eax
mov eax, dword [ebp - 8]
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x5e1788]
xor ecx, eax
xor ecx, dword [edi + 8]
mov eax, ecx
rol ecx, 8
ror eax, 8
and eax, 0xff00ff00
and ecx, 0xff00ff
or eax, ecx
shr ebx, 0x10
mov dword [esi + 8], eax
and ebx, 0xff
mov eax, dword [ebp - 8]
shr eax, 0x18
shr edx, 8
movzx ecx, byte [ebx + 0x5e1788]
and edx, 0xff
pop ebx
movzx eax, byte [eax + 0x5e1788]
shl eax, 8
xor ecx, eax
movzx eax, byte [edx + 0x5e1788]
shl ecx, 8
xor ecx, eax
mov eax, dword [ebp - 0xc]
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x5e1788]
xor ecx, eax
xor ecx, dword [edi + 0xc]
mov eax, ecx
rol ecx, 8
ror eax, 8
and ecx, 0xff00ff
and eax, 0xff00ff00
or eax, ecx
mov dword [esi + 0xc], eax
xor eax, eax
jmp 0x4032fa
or eax, 0xffffffff
pop edi
pop esi
mov esp, ebp
pop ebp
ret