Function at 0x588730
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov eax, ecx
mov ebx, dword [esp + 0x4c]
mov esi, 1
mov ecx, ebx
shl esi, cl
mov dword [esp + 0xc], esi
mov dword [esp + 0x1c], edx
push edx
mov dword [esp + 0x2c], eax
push eax
call fcn.00589cf0
add esp, 8
test eax, eax
je 0x588858
mov esi, dword [esp + 0x48]
mov ebp, dword [esp + 0x44]
cmp ebx, 3
jg 0x58885f
cmp dword [esp + 0x1c], 0
jle 0x58906a
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0xc]
mov edx, eax
and edx, 0xfffffffe
shl eax, 2
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x4c]
xor eax, eax
jmp 0x5887d6
or ebx, eax
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 8]
mov ebp, ecx
mov ecx, dword [esp + 0x20]
mov dword [ecx + eax*4], ebx
mov ecx, ebp
inc eax
mov ebp, edi
add ebp, dword [esp + 0xc]
cmp eax, dword [esp + 0x1c]
je 0x58906a
mov dword [esp + 8], eax
mov edi, ebp
mov ebp, 0
mov ebx, 0
test ecx, ecx
je 0x588834
xor ebp, ebp
xor ebx, ebx
jmp 0x5887fb
or ebx, eax
or ebx, ecx
add ebp, 2
cmp ebp, edx
je 0x588830
mov eax, ebp
xor eax, esi
neg eax
or eax, esi
mov eax, 0
js 0x58880d
mov eax, dword [edi + ebp*4]
lea ecx, [ebp + 1]
xor ecx, esi
neg ecx
or ecx, esi
mov ecx, 0
js 0x5887f0
mov ecx, dword [edi + ebp*4 + 4]
jmp 0x5887f0
mov ecx, dword [esp + 0x4c]
test ecx, ecx
mov eax, dword [esp + 8]
jne 0x5887ba
mov ecx, ebp
xor ecx, esi
neg ecx
xor eax, eax
or ecx, esi
js 0x5887b0
mov eax, dword [edi + ebp*4]
jmp 0x5887b0
xor eax, eax
jmp 0x58907a
add ebx, 0xfffffffe
mov dword [esp], ebx
mov eax, 1
mov ecx, dword [esp]
shl eax, cl
mov dword [esp + 8], eax
mov ecx, dword [esp]
cmp dword [esp + 0x1c], 0
jle 0x58906a
mov eax, dword [esp + 8]
dec eax
and eax, esi
mov dword [esp + 0x20], eax
sar esi, cl
mov edx, esi
xor edx, 0xfffffffc
inc edx
mov ebx, esi
xor ebx, 0xfffffffd
inc ebx
mov eax, esi
xor eax, 0xfffffffe
inc eax
or eax, esi
mov edi, 2
shl edi, cl
mov dword [esp + 0x18], edi
mov edi, 3
shl edi, cl
mov dword [esp + 0x14], edi
or ebx, esi
mov dword [esp + 0x10], ebx
or edx, esi
mov dword [esp + 4], edx
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx]
mov dword [esp + 0x24], ecx
test esi, esi
je 0x5889af
test eax, eax
js 0x588a90
mov eax, dword [esp + 0x14]
lea eax, [eax*4]
add eax, ebp
mov dword [esp + 0x14], eax
shl dword [esp + 0xc], 2
mov eax, dword [esp + 0x18]
lea eax, [eax*4]
add eax, ebp
mov dword [esp + 0x18], eax
mov eax, dword [esp + 8]
lea eax, [eax*4]
add eax, ebp
mov dword [esp], eax
xor ecx, ecx
jmp 0x58894b
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x2c]
mov dword [ecx + esi*4], eax
mov ecx, esi
inc ecx
mov eax, dword [esp + 0xc]
add dword [esp + 0x14], eax
add dword [esp + 0x18], eax
add dword [esp], eax
mov ebp, edx
add ebp, eax
cmp ecx, dword [esp + 0x1c]
je 0x58906a
mov dword [esp + 0x2c], ecx
mov edx, ebp
xor eax, eax
xor edi, edi
jmp 0x58897c
or esi, ecx
or esi, ebx
mov ecx, edi
mov ebx, dword [esp + 0x20]
xor ecx, ebx
neg ecx
or ecx, ebx
cmovs esi, ebp
or eax, esi
inc edi
cmp dword [esp + 8], edi
je 0x588920
xor ebp, ebp
mov ecx, dword [edx + edi*4]
mov ecx, dword [esp]
mov esi, dword [ecx + edi*4]
mov ecx, 0
cmp dword [esp + 0x10], 0
js 0x58899a
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx + edi*4]
mov ebx, 0
cmp dword [esp + 4], 0
js 0x588960
mov ebx, dword [esp + 0x14]
mov ebx, dword [ebx + edi*4]
jmp 0x588960
test eax, eax
js 0x588b61
cmp dword [esp + 0x10], 0
js 0x588c2f
mov eax, dword [esp + 0x14]
lea eax, [eax*4]
add eax, ebp
mov dword [esp + 0x14], eax
shl dword [esp + 0xc], 2
mov eax, dword [esp + 0x18]
lea eax, [eax*4]
add eax, ebp
mov dword [esp], eax
mov eax, dword [esp + 8]
lea eax, [eax*4]
add eax, ebp
mov dword [esp + 0x10], eax
xor ecx, ecx
xor ebx, ebx
mov esi, dword [esp + 0x20]
jmp 0x588a39
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
mov dword [ecx + edx*4], eax
mov ecx, edx
inc ecx
mov eax, dword [esp + 0xc]
add dword [esp + 0x14], eax
add dword [esp], eax
add dword [esp + 0x10], eax
add ebp, eax
cmp ecx, dword [esp + 0x1c]
je 0x58906a
mov dword [esp + 0x18], ecx
xor eax, eax
xor edi, edi
jmp 0x588a68
or ebp, ecx
mov ecx, edi
xor ecx, esi
neg ecx
or ecx, esi
cmovs ebp, ebx
or eax, ebp
inc edi
cmp dword [esp + 8], edi
mov ebp, edx
je 0x588a10
mov edx, ebp
mov ebp, dword [ebp + edi*4]
mov ecx, dword [esp + 0x10]
or ebp, dword [ecx + edi*4]
mov ecx, dword [esp]
or ebp, dword [ecx + edi*4]
mov ecx, 0
cmp dword [esp + 4], 0
js 0x588a50
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + edi*4]
jmp 0x588a50
cmp dword [esp + 0x10], 0
js 0x588cf1
cmp dword [esp + 4], 0
js 0x588db3
mov eax, dword [esp + 0x14]
lea edi, [eax*4]
add edi, ebp
shl dword [esp + 0xc], 2
mov eax, dword [esp + 0x18]
lea ecx, [eax*4]
add ecx, ebp
mov eax, dword [esp + 8]
lea eax, [eax*4]
add eax, ebp
xor esi, esi
nop word cs:[eax + eax]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [esp + 0x10], esi
xor eax, eax
xor ebx, ebx
mov esi, dword [esp + 0x20]
nop word cs:[eax + eax]
mov ecx, ebp
mov ebp, dword [ebp + ebx*4]
mov edx, dword [esp + 4]
mov ebp, dword [edx + ebx*4]
mov edx, dword [esp]
mov ebp, dword [edx + ebx*4]
or ebp, dword [edi + ebx*4]
mov edx, edi
mov edi, ebx
xor edi, esi
neg edi
or edi, esi
mov edi, edx
mov edx, 0
cmovs ebp, edx
or eax, ebp
mov ebp, ecx
inc ebx
cmp dword [esp + 8], ebx
jne 0x588b00
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x10]
mov dword [ecx + esi*4], eax
inc esi
mov eax, dword [esp + 0xc]
add edi, eax
mov ecx, dword [esp]
add ecx, eax
mov edx, dword [esp + 4]
add edx, eax
add ebp, eax
cmp esi, dword [esp + 0x1c]
mov eax, edx
jne 0x588ae0
jmp 0x58906a
cmp dword [esp + 0x10], 0
js 0x588e53
cmp dword [esp + 4], 0
js 0x588f0f
mov eax, dword [esp + 0x14]
lea ecx, [eax*4]
add ecx, ebp
shl dword [esp + 0xc], 2
mov eax, dword [esp + 0x18]
lea edx, [eax*4]
add edx, ebp
mov eax, dword [esp + 8]
lea ebx, [eax*4]
add ebx, ebp
xor esi, esi
nop word cs:[eax + eax]
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 0x10], esi
xor eax, eax
xor edi, edi
mov esi, dword [esp + 0x20]
nop word cs:[eax + eax]
mov ecx, ebp
mov ebp, dword [ebp + edi*4]
mov edx, ebx
mov ebx, dword [ebx + edi*4]
mov ebx, dword [esp + 4]
or ebp, dword [ebx + edi*4]
mov ebx, dword [esp]
or ebp, dword [ebx + edi*4]
mov ebx, edi
xor ebx, esi
neg ebx
or ebx, esi
mov ebx, edx
mov edx, 0
cmovs ebp, edx
or eax, ebp
mov ebp, ecx
inc edi
cmp dword [esp + 8], edi
jne 0x588bd0
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x10]
mov dword [ecx + esi*4], eax
inc esi
mov eax, dword [esp + 0xc]
mov ecx, dword [esp]
add ecx, eax
mov edx, dword [esp + 4]
add edx, eax
add ebx, eax
add ebp, eax
cmp esi, dword [esp + 0x1c]
jne 0x588bb0
jmp 0x58906a
cmp dword [esp + 4], 0
js 0x588fbf
mov eax, dword [esp + 0x14]
lea ecx, [eax*4]
add ecx, ebp
shl dword [esp + 0xc], 2
mov eax, dword [esp + 0x18]
lea ebx, [eax*4]
add ebx, ebp
mov eax, dword [esp + 8]
lea eax, [eax*4]
add eax, ebp
xor esi, esi
nop dword [eax + eax]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [esp + 0x10], esi
xor eax, eax
xor edi, edi
mov esi, dword [esp + 0x20]
nop word cs:[eax + eax]
mov ecx, ebp
mov ebp, dword [ebp + edi*4]
mov edx, dword [esp + 4]
or ebp, dword [edx + edi*4]
mov edx, ebx
mov ebx, dword [ebx + edi*4]
mov ebx, dword [esp]
or ebp, dword [ebx + edi*4]
mov ebx, edi
xor ebx, esi
neg ebx
or ebx, esi
mov ebx, edx
mov edx, 0
cmovs ebp, edx
or eax, ebp
mov ebp, ecx
inc edi
cmp dword [esp + 8], edi
jne 0x588c90
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x10]
mov dword [ecx + esi*4], eax
inc esi
mov eax, dword [esp + 0xc]
mov ecx, dword [esp]
add ecx, eax
add ebx, eax
mov edx, dword [esp + 4]
add edx, eax
add ebp, eax
cmp esi, dword [esp + 0x1c]
mov eax, edx
jne 0x588c70
jmp 0x58906a
cmp dword [esp + 4], 0
js 0x589082
mov eax, dword [esp + 0x14]
lea eax, [eax*4]
add eax, ebp
mov dword [esp], eax
shl dword [esp + 0xc], 2
mov eax, dword [esp + 0x18]
lea eax, [eax*4]
add eax, ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 8]
lea esi, [eax*4]
add esi, ebp
xor ecx, ecx
jmp 0x588d67
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x10]
mov dword [ecx + edx*4], eax
mov ecx, edx
inc ecx
mov eax, dword [esp + 0xc]
add dword [esp], eax
add dword [esp + 4], eax
add esi, eax
add ebp, eax
cmp ecx, dword [esp + 0x1c]
je 0x58906a
mov dword [esp + 0x10], ecx
xor eax, eax
xor ebx, ebx
jmp 0x588d8b
or eax, ebp
inc ebx
cmp dword [esp + 8], ebx
mov ebp, ecx
je 0x588d40
mov ecx, ebp
mov ebp, dword [ebp + ebx*4]
mov ebp, dword [esi + ebx*4]
mov edx, dword [esp + 4]
mov ebp, dword [edx + ebx*4]
mov edi, ebx
mov edx, dword [esp + 0x20]
xor edi, edx
neg edi
xor ebp, ebp
or edi, edx
js 0x588d80
mov edx, dword [esp]
mov ebp, dword [edx + ebx*4]
jmp 0x588d80
mov eax, dword [esp + 0x14]
lea eax, [eax*4]
add eax, ebp
mov dword [esp + 4], eax
shl dword [esp + 0xc], 2
mov eax, dword [esp + 0x18]
lea eax, [eax*4]
add eax, ebp
mov dword [esp], eax
mov eax, dword [esp + 8]
lea esi, [eax*4]
add esi, ebp
xor ecx, ecx
jmp 0x588e15
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov dword [edx + ecx*4], eax
inc ecx
mov eax, dword [esp + 0xc]
add dword [esp + 4], eax
add dword [esp], eax
add esi, eax
add ebp, eax
cmp ecx, dword [esp + 0x1c]
je 0x58906a
mov dword [esp + 0x10], ecx
xor eax, eax
xor ebx, ebx
jmp 0x588e32
or eax, ebp
mov ecx, dword [esp + 4]
mov edi, dword [ecx + ebx*4]
inc ebx
cmp dword [esp + 8], ebx
mov ebp, edx
je 0x588df0
mov edx, ebp
mov ebp, dword [ebp + ebx*4]
mov ebp, dword [esi + ebx*4]
mov edi, ebx
mov ecx, dword [esp + 0x20]
xor edi, ecx
neg edi
xor ebp, ebp
or edi, ecx
js 0x588e20
mov ecx, dword [esp]
mov ebp, dword [ecx + ebx*4]
jmp 0x588e20
cmp dword [esp + 4], 0
js 0x58915d
mov eax, dword [esp + 0x14]
lea ecx, [eax*4]
add ecx, ebp
shl dword [esp + 0xc], 2
mov eax, dword [esp + 0x18]
lea edx, [eax*4]
add edx, ebp
mov eax, dword [esp + 8]
lea ebx, [eax*4]
add ebx, ebp
xor esi, esi
nop dword [eax]
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 0x10], esi
xor eax, eax
xor edi, edi
mov esi, dword [esp + 0x20]
nop word cs:[eax + eax]
mov ecx, ebp
mov ebp, dword [ebp + edi*4]
mov edx, ebx
mov ebx, dword [ebx + edi*4]
mov ebx, dword [esp + 4]
mov ebx, dword [ebx + edi*4]
mov ebx, dword [esp]
or ebp, dword [ebx + edi*4]
mov ebx, edi
xor ebx, esi
neg ebx
or ebx, esi
mov ebx, edx
mov edx, 0
cmovs ebp, edx
or eax, ebp
mov ebp, ecx
inc edi
cmp dword [esp + 8], edi
jne 0x588eb0
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x10]
mov dword [ecx + esi*4], eax
inc esi
mov eax, dword [esp + 0xc]
mov ecx, dword [esp]
add ecx, eax
mov edx, dword [esp + 4]
add edx, eax
add ebx, eax
add ebp, eax
cmp esi, dword [esp + 0x1c]
jne 0x588e90
jmp 0x58906a
mov eax, dword [esp + 0x14]
lea ecx, [eax*4]
add ecx, ebp
shl dword [esp + 0xc], 2
mov eax, dword [esp + 0x18]
lea edx, [eax*4]
add edx, ebp
mov eax, dword [esp + 8]
lea ebx, [eax*4]
add ebx, ebp
xor esi, esi
nop dword [eax]
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 0x10], esi
xor eax, eax
xor edi, edi
mov esi, dword [esp + 0x20]
nop word cs:[eax + eax]
mov ecx, ebp
mov ebp, dword [ebp + edi*4]
mov edx, ebx
mov ebx, dword [ebx + edi*4]
mov ebx, dword [esp + 4]
or ebp, dword [ebx + edi*4]
mov ebx, edi
xor ebx, esi
neg ebx
or ebx, esi
mov ebx, 0
cmovs ebp, ebx
or eax, ebp
mov ebp, ecx
mov ecx, dword [esp]
mov ebx, dword [ecx + edi*4]
mov ebx, edx
inc edi
cmp dword [esp + 8], edi
jne 0x588f60
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x10]
mov dword [ecx + esi*4], eax
inc esi
mov eax, dword [esp + 0xc]
mov ecx, dword [esp]
add ecx, eax
mov edx, dword [esp + 4]
add edx, eax
add ebx, eax
add ebp, eax
cmp esi, dword [esp + 0x1c]
jne 0x588f40
jmp 0x58906a
mov eax, dword [esp + 0x14]
lea ecx, [eax*4]
add ecx, ebp
shl dword [esp + 0xc], 2
mov eax, dword [esp + 0x18]
lea edx, [eax*4]
add edx, ebp
mov eax, dword [esp + 8]
lea edi, [eax*4]
add edi, ebp
xor esi, esi
nop dword [eax]
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 0x10], esi
xor eax, eax
xor ebx, ebx
mov esi, dword [esp + 0x20]
nop word cs:[eax + eax]
mov ecx, ebp
mov ebp, dword [ebp + ebx*4]
or ebp, dword [edi + ebx*4]
mov edx, edi
mov edi, ebx
xor edi, esi
neg edi
or edi, esi
mov edi, dword [esp + 4]
mov edi, dword [edi + ebx*4]
mov edi, 0
cmovs ebp, edi
or eax, ebp
mov ebp, ecx
mov ecx, dword [esp]
mov edi, dword [ecx + ebx*4]
mov edi, edx
inc ebx
cmp dword [esp + 8], ebx
jne 0x589010
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x10]
mov dword [ecx + esi*4], eax
inc esi
mov eax, dword [esp + 0xc]
mov ecx, dword [esp]
add ecx, eax
mov edx, dword [esp + 4]
add edx, eax
add edi, eax
add ebp, eax
cmp esi, dword [esp + 0x1c]
jne 0x588ff0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
mov dword [ecx + 4], eax
mov eax, 1
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esp + 8]
mov ecx, eax
and ecx, 0xfffffffe
shl dword [esp + 0xc], 2
lea edx, [eax*4 + 4]
add edx, ebp
mov eax, dword [esp + 0x18]
lea esi, [eax*4 + 4]
add esi, ebp
mov eax, dword [esp + 0x14]
lea edi, [eax*4 + 4]
add edi, ebp
xor ebx, ebx
mov eax, dword [esp]
jmp 0x5890e1
mov eax, dword [esp + 0x24]
mov dword [eax + ebx*4], 0
inc ebx
mov eax, dword [esp + 0xc]
add ebp, eax
add edx, eax
add esi, eax
add edi, eax
cmp ebx, dword [esp + 0x1c]
mov eax, dword [esp]
je 0x58906a
mov dword [esp + 0x20], ebx
mov ebx, eax
mov eax, 0
test ebx, ebx
je 0x589128
xor eax, eax
nop word cs:[eax + eax]
mov ebx, ebp
mov ebp, dword [ebp + eax*4]
mov ebp, dword [edx + eax*4 - 4]
mov ebp, dword [esi + eax*4 - 4]
mov ebp, dword [edi + eax*4 - 4]
mov ebp, dword [ebx + eax*4 + 4]
mov ebp, dword [edx + eax*4]
mov ebp, dword [esi + eax*4]
mov ebp, dword [edi + eax*4]
mov ebp, ebx
add eax, 2
cmp ecx, eax
jne 0x589100
cmp dword [esp], 0
mov ebx, dword [esp + 0x20]
jne 0x5890c0
mov ebx, ebp
mov ebp, dword [ebp + eax*4]
mov ebp, dword [esp + 8]
add ebp, eax
mov ebp, dword [ebx + ebp*4]
mov ebp, dword [esp + 0x18]
add ebp, eax
mov ebp, dword [ebx + ebp*4]
mov ebp, ebx
mov ebx, dword [esp + 0x20]
add eax, dword [esp + 0x14]
mov eax, dword [ebp + eax*4]
jmp 0x5890c0
mov eax, dword [esp + 0x14]
lea eax, [eax*4]
add eax, ebp
mov dword [esp + 4], eax
shl dword [esp + 0xc], 2
mov eax, dword [esp + 0x18]
lea edx, [eax*4]
add edx, ebp
mov eax, dword [esp + 8]
lea esi, [eax*4]
add esi, ebp
xor ecx, ecx
jmp 0x5891b8
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov dword [edi + ecx*4], eax
inc ecx
mov eax, dword [esp + 0xc]
add dword [esp + 4], eax
add edx, eax
add esi, eax
mov ebp, dword [esp]
add ebp, eax
cmp ecx, dword [esp + 0x1c]
je 0x58906a
mov dword [esp + 0x10], ecx
mov dword [esp], ebp
xor eax, eax
xor ebx, ebx
jmp 0x5891e6
or eax, ebp
mov edi, dword [esi + ebx*4]
mov edi, dword [edx + ebx*4]
mov ecx, dword [esp + 4]
mov edi, dword [ecx + ebx*4]
inc ebx
cmp dword [esp + 8], ebx
je 0x589191
mov edi, ebx
mov ecx, dword [esp + 0x20]
xor edi, ecx
neg edi
xor ebp, ebp
or edi, ecx
js 0x5891d0
mov edi, dword [esp]
mov ebp, dword [edi + ebx*4]
jmp 0x5891d0