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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.004064a0
xor eax, eax
push ebp
push 0x589b51
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.00406160
test eax, eax
jns 0x589654
add eax, 3
sar eax, 2
mov dword [ebp - 0x10], eax
mov al, byte [ebp - 0x10]
add al, 6
mov byte [ebx + 0x14], al
push 4
mov eax, dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
mov ecx, 2
mov edx, dword [0x584bf4]
call fcn.0040631c
add esp, 8
mov eax, dword [ebp - 0x10]
dec eax
test eax, eax
jl 0x5896bb
inc eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], 0
xor esi, esi
mov eax, dword [ebp - 8]
shl eax, 2
add eax, esi
mov edx, dword [ebp - 4]
mov al, byte [edx + eax]
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
mov edx, dword [edx + ecx*4]
mov byte [edx + esi], al
inc esi
cmp esi, 4
jne 0x589693
inc dword [ebp - 8]
dec dword [ebp - 0x20]
jne 0x589691
xor eax, eax
mov dword [ebp - 0xc], eax
xor esi, esi
xor edi, edi
push 4
xor eax, eax
mov al, byte [ebx + 0x14]
inc eax
push eax
lea eax, [ebx + 0x1c]
mov ecx, 2
mov edx, dword [0x584c3c]
call fcn.0040631c
add esp, 8
push 4
xor eax, eax
mov al, byte [ebx + 0x14]
inc eax
push eax
lea eax, [ebx + 0x18]
mov ecx, 2
mov edx, dword [0x584c3c]
call fcn.0040631c
add esp, 8
jmp 0x589749
mov ecx, edi
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
mov dword [ebp - 0x18], eax
mov eax, dword [ebx + 0x1c]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edx*4]
mov edx, dword [ebp - 0x18]
mov dword [eax + esi*4], edx
mov eax, dword [ebx + 0x18]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edx*4]
mov edx, dword [ebp - 0x18]
mov dword [eax + esi*4], edx
inc edi
inc esi
cmp edi, dword [ebp - 0x10]
jge 0x58973f
cmp esi, 4
jl 0x589706
cmp esi, 4
jne 0x589749
xor esi, esi
inc dword [ebp - 0xc]
cmp edi, dword [ebp - 0x10]
jge 0x589759
xor eax, eax
mov al, byte [ebx + 0x14]
inc eax
cmp eax, dword [ebp - 0xc]
jg 0x589735
xor eax, eax
mov dword [ebp - 0x1c], eax
jmp 0x589a64
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov eax, dword [eax + edx*4 - 4]
movzx eax, byte [eax + 1]
mov al, byte [eax + 0x6416dc]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx]
xor byte [edx], al
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov eax, dword [eax + edx*4 - 4]
movzx eax, byte [eax + 2]
mov al, byte [eax + 0x6416dc]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx]
xor byte [edx + 1], al
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov eax, dword [eax + edx*4 - 4]
movzx eax, byte [eax + 3]
mov al, byte [eax + 0x6416dc]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx]
xor byte [edx + 2], al
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov eax, dword [eax + edx*4 - 4]
movzx eax, byte [eax]
mov al, byte [eax + 0x6416dc]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx]
xor byte [edx + 3], al
mov eax, dword [ebp - 0x1c]
mov al, byte [eax + 0x6417dc]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx]
xor byte [edx], al
inc dword [ebp - 0x1c]
mov ecx, 1
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
mov edi, eax
xor ecx, ecx
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
xor edi, eax
push edi
mov ecx, 1
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005894a0
mov ecx, 2
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
mov edi, eax
mov ecx, 1
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
xor edi, eax
push edi
mov ecx, 2
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005894a0
mov ecx, 3
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
mov edi, eax
mov ecx, 2
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
xor edi, eax
push edi
mov ecx, 3
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005894a0
mov eax, dword [ebp - 0x10]
sub eax, 4
je 0x589a0b
sub eax, 2
je 0x58998f
sub eax, 2
jne 0x5899f5
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
movzx eax, byte [eax]
mov al, byte [eax + 0x6416dc]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x10]
xor byte [edx], al
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
movzx eax, byte [eax + 1]
mov al, byte [eax + 0x6416dc]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x10]
xor byte [edx + 1], al
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
movzx eax, byte [eax + 2]
mov al, byte [eax + 0x6416dc]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x10]
xor byte [edx + 2], al
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
movzx eax, byte [eax + 3]
mov al, byte [eax + 0x6416dc]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x10]
xor byte [edx + 3], al
mov ecx, 5
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
mov edi, eax
mov ecx, 4
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
xor edi, eax
push edi
mov ecx, 5
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005894a0
mov ecx, 6
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
mov edi, eax
mov ecx, 5
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
xor edi, eax
push edi
mov ecx, 6
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005894a0
mov ecx, 7
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
mov edi, eax
mov ecx, 6
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
xor edi, eax
push edi
mov ecx, 7
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005894a0
jmp 0x589a0b
mov ecx, 4
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
mov edi, eax
mov ecx, 3
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
xor edi, eax
push edi
mov ecx, 4
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005894a0
mov ecx, 5
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
mov edi, eax
mov ecx, 4
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
xor edi, eax
push edi
mov ecx, 5
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005894a0
jmp 0x589a0b
mov ecx, 0x589b68
mov dl, 1
mov eax, dword [0x40880c]
call fcn.0040e18c
call fcn.00404404
xor edi, edi
jmp 0x589a54
mov ecx, edi
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00589440
mov dword [ebp - 0x18], eax
mov eax, dword [ebx + 0x1c]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edx*4]
mov edx, dword [ebp - 0x18]
mov dword [eax + esi*4], edx
mov eax, dword [ebx + 0x18]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edx*4]
mov edx, dword [ebp - 0x18]
mov dword [eax + esi*4], edx
inc edi
inc esi
cmp edi, dword [ebp - 0x10]
jge 0x589a4a
cmp esi, 4
jl 0x589a11
cmp esi, 4
jne 0x589a54
inc dword [ebp - 0xc]
xor esi, esi
cmp edi, dword [ebp - 0x10]
jge 0x589a64
xor eax, eax
mov al, byte [ebx + 0x14]
inc eax
cmp eax, dword [ebp - 0xc]
jg 0x589a40
xor eax, eax
mov al, byte [ebx + 0x14]
inc eax
cmp eax, dword [ebp - 0xc]
jg 0x589763
xor eax, eax
mov al, byte [ebx + 0x14]
dec eax
test eax, eax
jle 0x589b27
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], 1
xor esi, esi
mov eax, dword [ebx + 0x18]
mov edx, dword [ebp - 8]
mov eax, dword [eax + edx*4]
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x18], eax
xor ecx, ecx
mov edx, dword [ebp - 0x18]
mov eax, ebx
call fcn.005895f4
and eax, 0xff
mov edi, dword [eax*4 + 0x63e4dc]
mov ecx, 1
mov edx, dword [ebp - 0x18]
mov eax, ebx
call fcn.005895f4
and eax, 0xff
xor edi, dword [eax*4 + 0x63e8dc]
mov ecx, 2
mov edx, dword [ebp - 0x18]
mov eax, ebx
call fcn.005895f4
and eax, 0xff
xor edi, dword [eax*4 + 0x63ecdc]
mov ecx, 3
mov edx, dword [ebp - 0x18]
mov eax, ebx
call fcn.005895f4
and eax, 0xff
xor edi, dword [eax*4 + 0x63f0dc]
mov eax, dword [ebx + 0x18]
mov edx, dword [ebp - 8]
mov eax, dword [eax + edx*4]
mov dword [eax + esi*4], edi
inc esi
cmp esi, 4
jne 0x589a8d
inc dword [ebp - 8]
dec dword [ebp - 0x20]
jne 0x589a8b
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x589b58
lea eax, [ebp - 0x14]
mov edx, dword [0x584bf4]
call fcn.0040643c
lea eax, [ebp - 4]
mov edx, dword [0x4fc9c8]
call fcn.0040643c
ret