Function at 0x58b964
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using rc4 ksa
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp byte [0x5b20ec], 0
je 0x58bc34
cmp dword [0x5ba12c], 0x10
jne 0x58b996
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.0058b954
jmp 0x58bc34
mov eax, dword [0x5ba12c]
test eax, eax
jns 0x58b9a2
add eax, 3
sar eax, 2
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 4
jne 0x58b9b5
xor eax, eax
mov dword [ebp - 0x10], eax
jmp 0x58b9cb
cmp dword [ebp - 0xc], 6
jne 0x58b9c4
mov dword [ebp - 0x10], 1
jmp 0x58b9cb
mov dword [ebp - 0x10], 2
mov eax, dword [ebp - 0x10]
shl eax, 2
mov eax, dword [eax*8 + 0x5b2094]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
shl eax, 2
mov eax, dword [eax*8 + 0x5b209c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
shl eax, 2
mov eax, dword [eax*8 + 0x5b20a4]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], 0x5ba1b4
xor eax, eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0xc]
dec eax
test eax, eax
jl 0x58ba47
inc eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x20]
mov eax, dword [eax + edx*4]
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x20]
mov dword [edx + ecx*4], eax
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
mov ecx, dword [ecx*4 + 0x5b9d68]
xor dword [eax + edx*4], ecx
inc dword [ebp - 0x20]
dec dword [ebp - 0x38]
jne 0x58ba1a
mov eax, dword [0x5ba170]
dec eax
test eax, eax
jle 0x58bb39
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x2c], 1
mov eax, dword [ebp - 0xc]
dec eax
test eax, eax
jl 0x58bb18
inc eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x14]
cdq
idiv dword [ebp - 0xc]
mov eax, dword [edx*4 + 0x5ba1b4]
shr eax, 0x10
and eax, 0xff
mov ecx, dword [eax*4 + 0x5b136c]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax*4 + 0x5ba1b4]
shr eax, 0x18
and eax, 0xff
xor ecx, dword [eax*4 + 0x5b0f6c]
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x18]
cdq
idiv dword [ebp - 0xc]
mov eax, dword [edx*4 + 0x5ba1b4]
shr eax, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x5b176c]
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x1c]
cdq
idiv dword [ebp - 0xc]
mov eax, dword [edx*4 + 0x5ba1b4]
shr eax, 0
and eax, 0xff
xor ecx, dword [eax*4 + 0x5b1b6c]
mov eax, dword [ebp - 0x2c]
shl eax, 2
lea eax, [eax*8 + 0x5b9d68]
mov edx, dword [ebp - 0x20]
xor ecx, dword [eax + edx*4]
mov eax, dword [ebp - 0x20]
mov dword [eax*4 + 0x5ba194], ecx
inc dword [ebp - 0x20]
dec dword [ebp - 0x3c]
jne 0x58ba76
mov ecx, dword [ebp - 0xc]
shl ecx, 2
mov edx, 0x5ba194
mov eax, 0x5ba1b4
call fcn.00407370
inc dword [ebp - 0x2c]
dec dword [ebp - 0x38]
jne 0x58ba5f
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0xc]
dec eax
test eax, eax
jl 0x58bc34
inc eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x20], 0
mov eax, dword [0x5ba170]
shl eax, 2
lea eax, [eax*8 + 0x5b9d68]
mov edx, dword [ebp - 0x20]
mov eax, dword [eax + edx*4]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax*4 + 0x5ba1b4]
shr eax, 0x18
and eax, 0xff
mov al, byte [eax + str.cw]
mov edx, dword [ebp - 0x24]
shr edx, 0x18
xor al, dl
mov edx, dword [ebp - 0x34]
mov byte [edx], al
inc dword [ebp - 0x34]
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x14]
cdq
idiv dword [ebp - 0xc]
mov eax, dword [edx*4 + 0x5ba1b4]
shr eax, 0x10
and eax, 0xff
mov al, byte [eax + str.cw]
mov edx, dword [ebp - 0x24]
shr edx, 0x10
xor al, dl
mov edx, dword [ebp - 0x34]
mov byte [edx], al
inc dword [ebp - 0x34]
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x18]
cdq
idiv dword [ebp - 0xc]
mov eax, dword [edx*4 + 0x5ba1b4]
shr eax, 8
and eax, 0xff
mov al, byte [eax + str.cw]
mov edx, dword [ebp - 0x24]
shr edx, 8
xor al, dl
mov edx, dword [ebp - 0x34]
mov byte [edx], al
inc dword [ebp - 0x34]
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x1c]
cdq
idiv dword [ebp - 0xc]
mov eax, dword [edx*4 + 0x5ba1b4]
shr eax, 0
and eax, 0xff
mov al, byte [eax + str.cw]
xor al, byte [ebp - 0x24]
mov edx, dword [ebp - 0x34]
mov byte [edx], al
inc dword [ebp - 0x34]
inc dword [ebp - 0x20]
dec dword [ebp - 0x38]
jne 0x58bb60
mov esp, ebp
pop ebp
ret