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

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push ebp
mov ebp, dword [esp + 0x10]
push ebp
push eax
push ecx
call fcn.59125bc0
add esp, 0xc
test eax, eax
jl 0x591261f4
mov edx, dword [ebp + 0xf0]
push ebx
push esi
xor esi, esi
shl edx, 2
test edx, edx
push edi
jle 0x59125ff5
lea ecx, [ebp + edx*4 + 8]
lea eax, [ebp + 8]
mov ebx, dword [ecx - 8]
mov edi, dword [eax - 8]
mov dword [eax - 8], ebx
mov dword [ecx - 8], edi
mov ebx, dword [ecx - 4]
mov edi, dword [eax - 4]
mov dword [eax - 4], ebx
mov dword [ecx - 4], edi
mov ebx, dword [ecx]
mov edi, dword [eax]
mov dword [eax], ebx
mov dword [ecx], edi
mov ebx, dword [ecx + 4]
mov edi, dword [eax + 4]
mov dword [eax + 4], ebx
mov dword [ecx + 4], edi
add esi, 4
sub edx, 4
add eax, 0x10
sub ecx, 0x10
cmp esi, edx
jl 0x59125fb9
mov eax, dword [ebp + 0xf0]
mov esi, 1
cmp eax, esi
jle 0x591261ef
lea eax, [ebp + 8]
mov ecx, dword [eax + 8]
add eax, 0x10
xor ebx, ebx
mov dword [esp + 0x1c], ecx
mov bl, ch
xor edx, edx
mov dl, byte [esp + 0x1e]
mov edi, dword [ebx*4 + 0x59157bd8]
mov edx, dword [edx*4 + 0x59157bd8]
and edi, 0xff
and edx, 0xff
mov ebx, dword [edi*4 + 0x59158fd8]
mov edi, ecx
mov edx, dword [edx*4 + 0x59158bd8]
and ecx, 0xff
shr edi, 0x18
mov ecx, dword [ecx*4 + 0x59157bd8]
xor edx, ebx
mov edi, dword [edi*4 + 0x59157bd8]
and ecx, 0xff
and edi, 0xff
mov ebx, dword [edi*4 + 0x591587d8]
xor edx, ebx
mov ebx, dword [ecx*4 + 0x591593d8]
mov ecx, dword [eax - 4]
xor edx, ebx
xor ebx, ebx
mov dword [eax - 8], edx
mov bl, ch
mov dword [esp + 0x1c], ecx
xor edx, edx
mov edi, dword [ebx*4 + 0x59157bd8]
mov dl, byte [esp + 0x1e]
and edi, 0xff
mov edx, dword [edx*4 + 0x59157bd8]
mov ebx, dword [edi*4 + 0x59158fd8]
mov edi, ecx
shr edi, 0x18
and edx, 0xff
and ecx, 0xff
mov edi, dword [edi*4 + 0x59157bd8]
mov edx, dword [edx*4 + 0x59158bd8]
mov ecx, dword [ecx*4 + 0x59157bd8]
and edi, 0xff
xor edx, ebx
and ecx, 0xff
mov ebx, dword [edi*4 + 0x591587d8]
xor edx, ebx
mov ebx, dword [ecx*4 + 0x591593d8]
mov ecx, dword [eax]
xor edx, ebx
xor ebx, ebx
mov dword [eax - 4], edx
mov bl, ch
mov dword [esp + 0x1c], ecx
xor edx, edx
mov edi, dword [ebx*4 + 0x59157bd8]
mov dl, byte [esp + 0x1e]
and edi, 0xff
mov edx, dword [edx*4 + 0x59157bd8]
mov ebx, dword [edi*4 + 0x59158fd8]
mov edi, ecx
shr edi, 0x18
and edx, 0xff
and ecx, 0xff
mov edi, dword [edi*4 + 0x59157bd8]
mov edx, dword [edx*4 + 0x59158bd8]
mov ecx, dword [ecx*4 + 0x59157bd8]
and edi, 0xff
xor edx, ebx
and ecx, 0xff
mov ebx, dword [edi*4 + 0x591587d8]
xor edx, ebx
mov ebx, dword [ecx*4 + 0x591593d8]
mov ecx, dword [eax + 4]
xor edx, ebx
mov dword [eax], edx
mov dword [esp + 0x1c], ecx
xor edx, edx
mov dl, byte [esp + 0x1e]
mov edx, dword [edx*4 + 0x59157bd8]
xor ebx, ebx
and edx, 0xff
mov bl, ch
mov edx, dword [edx*4 + 0x59158bd8]
mov edi, dword [ebx*4 + 0x59157bd8]
and edi, 0xff
mov ebx, dword [edi*4 + 0x59158fd8]
mov edi, ecx
shr edi, 0x18
and ecx, 0xff
xor edx, ebx
mov edi, dword [edi*4 + 0x59157bd8]
mov ecx, dword [ecx*4 + 0x59157bd8]
and edi, 0xff
and ecx, 0xff
mov ebx, dword [edi*4 + 0x591587d8]
mov edi, dword [ecx*4 + 0x591593d8]
xor edx, ebx
xor edx, edi
inc esi
mov dword [eax + 4], edx
mov ecx, dword [ebp + 0xf0]
cmp esi, ecx
jl 0x5912600b
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret