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

Disassembly:
push ebp
push edi
mov edi, dword [esp + 0x14]
mov eax, edi
sub eax, 0x80
je 0x4d1a79
sub eax, 0x40
je 0x4d1a6c
sub eax, 0x40
je 0x4d1a5f
pop edi
or eax, 0xffffffff
pop ebp
ret
mov ebp, dword [esp + 0xc]
mov dword [ebp], 0xe
jmp 0x4d1a84
mov ebp, dword [esp + 0xc]
mov dword [ebp], 0xc
jmp 0x4d1a84
mov ebp, dword [esp + 0xc]
mov dword [ebp], 0xa
push ebx
push esi
sar edi, 5
lea eax, [ebp + 8]
xor esi, esi
test edi, edi
mov dword [ebp + 4], eax
jle 0x4d1ac5
mov ecx, dword [esp + 0x18]
add ecx, 2
lea esp, [esp]
movzx ebx, byte [ecx - 1]
xor edx, edx
mov dh, byte [ecx + 1]
add ecx, 4
mov dl, byte [ecx - 4]
shl edx, 8
or edx, ebx
movzx ebx, byte [ecx - 6]
shl edx, 8
or edx, ebx
mov dword [eax + esi*4], edx
inc esi
cmp esi, edi
jl 0x4d1aa0
mov ebp, dword [ebp]
sub ebp, 0xa
je 0x4d1d9a
sub ebp, 2
je 0x4d1bbb
sub ebp, 2
jne 0x4d1f92
mov ebp, 0x51f318
mov edi, dword [eax + 0x1c]
xor edx, edx
mov ecx, edi
and ecx, 0xff
mov dh, byte [ecx + 0x51d118]
movzx ecx, byte [eax + 0x1f]
movzx ecx, byte [ecx + 0x51d118]
xor edx, ecx
movzx ecx, byte [eax + 0x1e]
movzx ecx, byte [ecx + 0x51d118]
mov ebx, dword [eax]
mov esi, dword [eax + 8]
shl edx, 8
xor edx, ecx
movzx ecx, byte [eax + 0x1d]
movzx ecx, byte [ecx + 0x51d118]
shl edx, 8
xor edx, ecx
mov ecx, dword [ebp]
xor ecx, edx
mov edx, dword [eax + 4]
xor ecx, ebx
xor edx, ecx
mov dword [eax + 0x20], ecx
mov ecx, dword [eax + 0xc]
xor esi, edx
xor ecx, esi
mov dword [eax + 0x2c], ecx
mov dword [eax + 0x24], edx
movzx edx, byte [eax + 0x2f]
xor ebx, ebx
mov dword [eax + 0x28], esi
mov bh, byte [edx + 0x51d118]
movzx edx, byte [eax + 0x2e]
movzx edx, byte [edx + 0x51d118]
xor ebx, edx
movzx edx, byte [eax + 0x2d]
movzx edx, byte [edx + 0x51d118]
and ecx, 0xff
movzx ecx, byte [ecx + 0x51d118]
shl ebx, 8
xor ebx, edx
mov edx, dword [eax + 0x14]
shl ebx, 8
xor ecx, ebx
xor ecx, dword [eax + 0x10]
xor edx, ecx
mov dword [eax + 0x30], ecx
mov ecx, dword [eax + 0x18]
xor ecx, edx
mov dword [eax + 0x38], ecx
xor ecx, edi
mov dword [eax + 0x34], edx
mov dword [eax + 0x3c], ecx
add ebp, 4
add eax, 0x20
cmp ebp, 0x51f334
jl 0x4d1ae8
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
ret
mov esi, 0x51f31c
mov ecx, dword [eax + 0x14]
mov edx, ecx
and edx, 0xff
mov ebp, dword [esi - 4]
xor ebx, ebx
mov bh, byte [edx + 0x51d118]
movzx edx, byte [eax + 0x17]
movzx edx, byte [edx + 0x51d118]
xor ebx, edx
movzx edx, byte [eax + 0x16]
movzx edx, byte [edx + 0x51d118]
mov edi, dword [eax]
shl ebx, 8
xor ebx, edx
movzx edx, byte [eax + 0x15]
movzx edx, byte [edx + 0x51d118]
shl ebx, 8
xor ebx, edx
xor ebx, ebp
mov edx, ebx
xor edx, edi
mov edi, dword [eax + 4]
mov dword [eax + 0x18], edx
xor edi, edx
mov edx, dword [eax + 8]
xor edx, edi
mov dword [eax + 0x20], edx
mov dword [eax + 0x1c], edi
mov edi, dword [eax + 0xc]
xor edi, edx
mov edx, dword [eax + 0x10]
xor edx, edi
xor ecx, edx
mov dword [eax + 0x28], edx
mov dword [eax + 0x2c], ecx
and ecx, 0xff
xor edx, edx
mov dword [eax + 0x24], edi
mov dh, byte [ecx + 0x51d118]
movzx ecx, byte [eax + 0x2f]
movzx ecx, byte [ecx + 0x51d118]
xor edx, ecx
movzx ecx, byte [eax + 0x2e]
movzx ecx, byte [ecx + 0x51d118]
mov edi, dword [eax + 0x18]
shl edx, 8
xor edx, ecx
movzx ecx, byte [eax + 0x2d]
movzx ecx, byte [ecx + 0x51d118]
shl edx, 8
xor edx, ecx
xor edx, edi
mov edi, dword [eax + 0x28]
mov ecx, edx
xor ecx, dword [esi]
mov edx, dword [eax + 0x1c]
xor edx, ecx
mov dword [eax + 0x30], ecx
mov ecx, dword [eax + 0x20]
xor ecx, edx
mov dword [eax + 0x34], edx
mov edx, dword [eax + 0x24]
xor edx, ecx
mov dword [eax + 0x38], ecx
mov ecx, dword [eax + 0x2c]
xor edi, edx
xor ecx, edi
mov dword [eax + 0x3c], edx
mov dword [eax + 0x44], ecx
and ecx, 0xff
xor edx, edx
mov dword [eax + 0x40], edi
mov dh, byte [ecx + 0x51d118]
movzx ecx, byte [eax + 0x47]
movzx ecx, byte [ecx + 0x51d118]
xor edx, ecx
movzx ecx, byte [eax + 0x46]
movzx ecx, byte [ecx + 0x51d118]
shl edx, 8
xor edx, ecx
mov edi, dword [esi + 4]
movzx ecx, byte [eax + 0x45]
movzx ecx, byte [ecx + 0x51d118]
shl edx, 8
xor edx, ecx
xor edx, edi
mov edi, dword [eax + 0x40]
mov ecx, edx
xor ecx, dword [eax + 0x30]
mov edx, dword [eax + 0x34]
xor edx, ecx
mov dword [eax + 0x48], ecx
mov ecx, dword [eax + 0x38]
xor ecx, edx
mov dword [eax + 0x4c], edx
mov edx, dword [eax + 0x3c]
xor edx, ecx
mov dword [eax + 0x50], ecx
mov ecx, dword [eax + 0x44]
xor edi, edx
mov dword [eax + 0x54], edx
xor ecx, edi
mov dword [eax + 0x5c], ecx
and ecx, 0xff
xor edx, edx
mov dword [eax + 0x58], edi
mov dh, byte [ecx + 0x51d118]
movzx ecx, byte [eax + 0x5f]
movzx ecx, byte [ecx + 0x51d118]
xor edx, ecx
movzx ecx, byte [eax + 0x5e]
movzx ecx, byte [ecx + 0x51d118]
mov ebp, dword [eax + 0x48]
shl edx, 8
xor edx, ecx
movzx ecx, byte [eax + 0x5d]
movzx ecx, byte [ecx + 0x51d118]
shl edx, 8
xor edx, ecx
mov ecx, dword [esi + 8]
xor ecx, edx
mov edx, dword [eax + 0x4c]
xor ecx, ebp
xor edx, ecx
mov dword [eax + 0x60], ecx
mov ecx, dword [eax + 0x50]
xor ecx, edx
mov dword [eax + 0x64], edx
mov edx, dword [eax + 0x54]
xor edx, ecx
mov dword [eax + 0x68], ecx
mov dword [eax + 0x6c], edx
mov ecx, edi
xor ecx, edx
mov edx, dword [eax + 0x5c]
xor edx, ecx
mov dword [eax + 0x70], ecx
mov dword [eax + 0x74], edx
add esi, 0x10
add eax, 0x60
cmp esi, 0x51f33c
jl 0x4d1bc0
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
ret
mov ecx, 0x51f31c
nop
mov ebp, dword [eax + 0xc]
xor ebx, ebx
mov edx, ebp
and edx, 0xff
mov bh, byte [edx + 0x51d118]
movzx edx, byte [eax + 0xf]
movzx edx, byte [edx + 0x51d118]
xor ebx, edx
movzx edx, byte [eax + 0xe]
movzx edx, byte [edx + 0x51d118]
mov edi, dword [eax]
mov esi, dword [eax + 8]
shl ebx, 8
xor ebx, edx
movzx edx, byte [eax + 0xd]
movzx edx, byte [edx + 0x51d118]
shl ebx, 8
xor ebx, edx
mov edx, dword [ecx - 4]
xor edx, ebx
xor edx, edi
mov edi, dword [eax + 4]
xor edi, edx
xor esi, edi
mov dword [eax + 0x10], edx
mov dword [eax + 0x18], esi
xor esi, ebp
mov dword [eax + 0x1c], esi
and esi, 0xff
xor edx, edx
mov dword [eax + 0x14], edi
mov dh, byte [esi + 0x51d118]
movzx esi, byte [eax + 0x1f]
movzx esi, byte [esi + 0x51d118]
xor edx, esi
movzx esi, byte [eax + 0x1e]
movzx esi, byte [esi + 0x51d118]
mov edi, dword [eax + 0x10]
shl edx, 8
xor edx, esi
movzx esi, byte [eax + 0x1d]
movzx esi, byte [esi + 0x51d118]
shl edx, 8
xor edx, esi
mov esi, dword [ecx]
xor edx, edi
xor edx, esi
mov esi, dword [eax + 0x14]
xor esi, edx
mov dword [eax + 0x20], edx
mov edx, dword [eax + 0x18]
xor edx, esi
mov dword [eax + 0x24], esi
mov esi, dword [eax + 0x1c]
xor esi, edx
mov dword [eax + 0x28], edx
mov dword [eax + 0x2c], esi
and esi, 0xff
xor edx, edx
mov dh, byte [esi + 0x51d118]
movzx esi, byte [eax + 0x2f]
movzx esi, byte [esi + 0x51d118]
mov edi, dword [ecx + 4]
xor edx, esi
movzx esi, byte [eax + 0x2e]
movzx esi, byte [esi + 0x51d118]
shl edx, 8
xor edx, esi
movzx esi, byte [eax + 0x2d]
movzx esi, byte [esi + 0x51d118]
shl edx, 8
xor edx, esi
mov esi, dword [eax + 0x20]
xor edx, edi
xor edx, esi
mov esi, dword [eax + 0x24]
xor esi, edx
mov dword [eax + 0x30], edx
mov edx, dword [eax + 0x28]
mov dword [eax + 0x34], esi
xor edx, esi
mov esi, dword [eax + 0x2c]
xor esi, edx
mov dword [eax + 0x38], edx
mov dword [eax + 0x3c], esi
and esi, 0xff
xor edx, edx
mov dh, byte [esi + 0x51d118]
movzx esi, byte [eax + 0x3f]
movzx esi, byte [esi + 0x51d118]
xor edx, esi
movzx esi, byte [eax + 0x3e]
movzx esi, byte [esi + 0x51d118]
mov edi, dword [ecx + 8]
shl edx, 8
xor edx, esi
movzx esi, byte [eax + 0x3d]
movzx esi, byte [esi + 0x51d118]
shl edx, 8
xor edx, esi
mov esi, dword [eax + 0x30]
xor edx, edi
xor edx, esi
mov esi, dword [eax + 0x34]
xor esi, edx
mov dword [eax + 0x40], edx
mov edx, dword [eax + 0x38]
xor edx, esi
mov dword [eax + 0x44], esi
mov esi, dword [eax + 0x3c]
xor esi, edx
mov dword [eax + 0x48], edx
mov dword [eax + 0x4c], esi
and esi, 0xff
xor edx, edx
mov dh, byte [esi + 0x51d118]
movzx esi, byte [eax + 0x4f]
movzx esi, byte [esi + 0x51d118]
mov edi, dword [ecx + 0xc]
xor edx, esi
movzx esi, byte [eax + 0x4e]
movzx esi, byte [esi + 0x51d118]
shl edx, 8
xor edx, esi
movzx esi, byte [eax + 0x4d]
movzx esi, byte [esi + 0x51d118]
shl edx, 8
xor edx, esi
mov esi, dword [eax + 0x40]
xor edx, edi
xor edx, esi
mov esi, dword [eax + 0x44]
xor esi, edx
mov dword [eax + 0x50], edx
mov edx, dword [eax + 0x48]
xor edx, esi
mov dword [eax + 0x54], esi
mov esi, dword [eax + 0x4c]
xor esi, edx
mov dword [eax + 0x58], edx
mov dword [eax + 0x5c], esi
add ecx, 0x14
add eax, 0x50
cmp ecx, 0x51f344
jl 0x4d1da0
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
ret