Function at 0x58b408
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, 0xffffffc8
cmp dword [ebp + 8], 0
je 0x58b982
mov eax, dword [ebp + 0x10]
sub eax, 0x10
je 0x58b982
sub eax, 8
je 0x58b982
sub eax, 8
je 0x58b982
mov eax, dword [ebp + 0x14]
sub eax, 0x10
je 0x58b982
sub eax, 8
je 0x58b982
sub eax, 8
je 0x58b982
mov eax, dword [ebp + 0x10]
mov dword [0x5ba128], eax
mov eax, dword [ebp + 0x14]
mov dword [0x5ba12c], eax
mov edx, dword [ebp + 0xc]
mov eax, 0x5ba130
mov ecx, dword [ebp + 0x14]
call fcn.00407370
mov edx, dword [ebp + 0xc]
mov eax, 0x5ba150
mov ecx, dword [ebp + 0x14]
call fcn.00407370
mov eax, dword [ebp + 0x10]
sub eax, 0x10
je 0x58b493
sub eax, 8
je 0x58b4c3
jmp 0x58b4e1
cmp dword [ebp + 0x14], 0x10
jne 0x58b4a5
mov dword [0x5ba170], 0xa
jmp 0x58b4eb
cmp dword [ebp + 0x14], 0x18
jne 0x58b4b7
mov dword [0x5ba170], 0xc
jmp 0x58b4eb
mov dword [0x5ba170], 0xe
jmp 0x58b4eb
cmp dword [ebp + 0x14], 0x20
je 0x58b4d5
mov dword [0x5ba170], 0xc
jmp 0x58b4eb
mov dword [0x5ba170], 0xe
jmp 0x58b4eb
mov dword [0x5ba170], 0xe
mov eax, dword [ebp + 0x14]
shr eax, 2
mov dword [ebp - 4], eax
mov eax, dword [0x5ba170]
dec eax
test eax, eax
jl 0x58b541
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 8], 0
mov eax, dword [ebp - 4]
dec eax
test eax, eax
jl 0x58b539
inc eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 8]
shl eax, 2
lea eax, [eax*8 + 0x5b9d68]
mov edx, dword [ebp - 0xc]
xor ecx, ecx
mov dword [eax + edx*4], ecx
inc dword [ebp - 0xc]
dec dword [ebp - 0x38]
jne 0x58b51c
inc dword [ebp - 8]
dec dword [ebp - 0x34]
jne 0x58b509
mov eax, dword [0x5ba170]
dec eax
test eax, eax
jl 0x58b58e
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 8], 0
mov eax, dword [ebp - 4]
dec eax
test eax, eax
jl 0x58b586
inc eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 8]
shl eax, 2
lea eax, [eax*8 + 0x5b9d68]
mov edx, dword [ebp - 0xc]
xor ecx, ecx
mov dword [eax + edx*4], ecx
inc dword [ebp - 0xc]
dec dword [ebp - 0x38]
jne 0x58b569
inc dword [ebp - 8]
dec dword [ebp - 0x34]
jne 0x58b556
mov eax, dword [0x5ba170]
inc eax
imul dword [ebp - 4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x10]
shr eax, 2
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], 0x5ba174
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x18]
dec eax
test eax, eax
jl 0x58b5dd
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x20]
mov ecx, dword [ecx]
xor dword [eax + edx*4], ecx
add dword [ebp - 0x20], 4
inc dword [ebp - 8]
dec dword [ebp - 0x34]
jne 0x58b5c3
xor eax, eax
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0xc], eax
jmp 0x58b647
mov eax, dword [ebp - 0x24]
cdq
idiv dword [ebp - 4]
mov ecx, edx
mov eax, dword [ebp - 0x24]
cdq
idiv dword [ebp - 0x18]
shl eax, 2
lea eax, [eax*8 + 0x5b9d68]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx*4 + 0x5ba174]
mov dword [eax + ecx*4], edx
mov eax, dword [ebp - 0x24]
cdq
idiv dword [ebp - 4]
mov edx, dword [0x5ba170]
sub edx, eax
mov eax, edx
shl eax, 2
lea eax, [eax*8 + 0x5b9f48]
push eax
mov eax, dword [ebp - 0x24]
cdq
idiv dword [ebp - 4]
pop eax
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x5ba174]
mov dword [eax + edx*4], ecx
inc dword [ebp - 0x24]
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x18]
jge 0x58b657
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x14]
jl 0x58b5e9
xor eax, eax
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x14]
jge 0x58b97b
mov eax, dword [ebp - 0x18]
mov eax, dword [eax*4 + 0x5ba170]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
shr eax, 0x10
and eax, 0xff
mov al, byte [eax + str.cw]
and ax, 0xff
movsx eax, ax
shl eax, 0x18
xor eax, dword [0x5ba174]
mov edx, dword [ebp - 0x28]
shr edx, 8
and edx, 0xff
mov dl, byte [edx + str.cw]
and dx, 0xff
movsx edx, dx
shl edx, 0x10
xor eax, edx
mov edx, dword [ebp - 0x28]
and edx, 0xff
mov dl, byte [edx + str.cw]
and dx, 0xff
movsx edx, dx
shl edx, 8
xor eax, edx
mov edx, dword [ebp - 0x28]
shr edx, 0x18
and edx, 0xff
mov dl, byte [edx + str.cw]
and dx, 0xff
movsx edx, dx
xor eax, edx
mov edx, dword [ebp - 0x2c]
mov dl, byte [edx + 0x5b206c]
and dx, 0xff
movsx edx, dx
shl edx, 0x18
xor eax, edx
mov dword [0x5ba174], eax
inc dword [ebp - 0x2c]
mov dword [ebp - 8], 1
xor eax, eax
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x18], 8
je 0x58b750
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x18]
jge 0x58b8ca
mov eax, dword [ebp - 0xc]
mov eax, dword [eax*4 + 0x5ba174]
mov edx, dword [ebp - 8]
xor dword [edx*4 + 0x5ba174], eax
inc dword [ebp - 8]
inc dword [ebp - 0xc]
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x18]
jl 0x58b729
jmp 0x58b8ca
mov eax, dword [ebp - 0x18]
shr eax, 1
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], 1
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jge 0x58b78e
mov eax, dword [ebp - 0xc]
mov eax, dword [eax*4 + 0x5ba174]
mov edx, dword [ebp - 8]
xor dword [edx*4 + 0x5ba174], eax
inc dword [ebp - 0xc]
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jl 0x58b76c
mov eax, dword [ebp - 0x18]
sar eax, 1
jns 0x58b798
adc eax, 0
mov eax, dword [eax*4 + 0x5ba170]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
shr eax, 8
and eax, 0xff
mov al, byte [eax + str.cw]
and ax, 0xff
movsx eax, ax
shl eax, 8
mov edx, dword [ebp - 0x18]
sar edx, 1
jns 0x58b7c7
adc edx, 0
xor eax, dword [edx*4 + 0x5ba174]
mov edx, dword [ebp - 0x28]
shr edx, 0x10
and edx, 0xff
mov dl, byte [edx + str.cw]
and dx, 0xff
movsx edx, dx
shl edx, 0x10
xor eax, edx
mov edx, dword [ebp - 0x28]
shr edx, 0x18
and edx, 0xff
mov dl, byte [edx + str.cw]
and dx, 0xff
movsx edx, dx
shl edx, 0x18
xor eax, edx
mov edx, dword [ebp - 0x18]
sar edx, 1
jns 0x58b816
adc edx, 0
mov dword [edx*4 + 0x5ba174], eax
mov eax, dword [ebp - 0x18]
sar eax, 1
jns 0x58b827
adc eax, 0
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x18]
jge 0x58b85b
mov eax, dword [ebp - 0xc]
mov eax, dword [eax*4 + 0x5ba174]
mov edx, dword [ebp - 8]
xor dword [edx*4 + 0x5ba174], eax
inc dword [ebp - 8]
inc dword [ebp - 0xc]
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x18]
jl 0x58b839
xor eax, eax
mov dword [ebp - 0xc], eax
jmp 0x58b8ba
mov eax, dword [ebp - 0x24]
cdq
idiv dword [ebp - 4]
mov ecx, edx
mov eax, dword [ebp - 0x24]
cdq
idiv dword [ebp - 4]
shl eax, 2
lea eax, [eax*8 + 0x5b9d68]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx*4 + 0x5ba174]
mov dword [eax + ecx*4], edx
mov eax, dword [ebp - 0x24]
cdq
idiv dword [ebp - 4]
mov edx, dword [0x5ba170]
sub edx, eax
mov eax, edx
shl eax, 2
lea eax, [eax*8 + 0x5b9f48]
push eax
mov eax, dword [ebp - 0x24]
cdq
idiv dword [ebp - 4]
pop eax
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x5ba174]
mov dword [eax + edx*4], ecx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x18]
jge 0x58b8ca
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x14]
jl 0x58b862
mov eax, dword [0x5ba170]
dec eax
test eax, eax
jle 0x58b96f
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], 1
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 4]
jge 0x58b963
mov eax, dword [ebp - 0x30]
shl eax, 2
lea eax, [eax*8 + 0x5b9f48]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edx*4]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
shr eax, 0x18
and eax, 0xff
mov eax, dword [eax*4 + 0x5aff6c]
mov edx, dword [ebp - 0x28]
shr edx, 0x10
and edx, 0xff
xor eax, dword [edx*4 + 0x5b036c]
mov edx, dword [ebp - 0x28]
shr edx, 8
and edx, 0xff
xor eax, dword [edx*4 + 0x5b076c]
mov edx, dword [ebp - 0x28]
and edx, 0xff
xor eax, dword [edx*4 + 0x5b0b6c]
mov edx, dword [ebp - 0x30]
shl edx, 2
lea edx, [edx*8 + 0x5b9f48]
mov ecx, dword [ebp - 0xc]
mov dword [edx + ecx*4], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 4]
jl 0x58b8ea
inc dword [ebp - 0x30]
dec dword [ebp - 0x34]
jne 0x58b8e2
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x14]
jl 0x58b668
mov byte [0x5b20ec], 1
mov esp, ebp
pop ebp
ret 0x10