Function at 0x586b70
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.00588130
add esp, 8
test eax, eax
je 0x586c98
mov esi, dword [esp + 0x48]
mov ebp, dword [esp + 0x44]
cmp ebx, 3
jg 0x586c9f
cmp dword [esp + 0x1c], 0
jle 0x5874aa
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 0x586c16
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 0x5874aa
mov dword [esp + 8], eax
mov edi, ebp
mov ebp, 0
mov ebx, 0
test ecx, ecx
je 0x586c74
xor ebp, ebp
xor ebx, ebx
jmp 0x586c3b
or ebx, eax
or ebx, ecx
add ebp, 2
cmp ebp, edx
je 0x586c70
mov eax, ebp
xor eax, esi
neg eax
or eax, esi
mov eax, 0
js 0x586c4d
mov eax, dword [edi + ebp*4]
lea ecx, [ebp + 1]
xor ecx, esi
neg ecx
or ecx, esi
mov ecx, 0
js 0x586c30
mov ecx, dword [edi + ebp*4 + 4]
jmp 0x586c30
mov ecx, dword [esp + 0x4c]
test ecx, ecx
mov eax, dword [esp + 8]
jne 0x586bfa
mov ecx, ebp
xor ecx, esi
neg ecx
xor eax, eax
or ecx, esi
js 0x586bf0
mov eax, dword [edi + ebp*4]
jmp 0x586bf0
xor eax, eax
jmp 0x5874ba
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 0x5874aa
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 0x586def
test eax, eax
js 0x586ed0
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 0x586d8b
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 0x5874aa
mov dword [esp + 0x2c], ecx
mov edx, ebp
xor eax, eax
xor edi, edi
jmp 0x586dbc
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 0x586d60
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 0x586dda
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx + edi*4]
mov ebx, 0
cmp dword [esp + 4], 0
js 0x586da0
mov ebx, dword [esp + 0x14]
mov ebx, dword [ebx + edi*4]
jmp 0x586da0
test eax, eax
js 0x586fa1
cmp dword [esp + 0x10], 0
js 0x58706f
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 0x586e79
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 0x5874aa
mov dword [esp + 0x18], ecx
xor eax, eax
xor edi, edi
jmp 0x586ea8
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 0x586e50
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 0x586e90
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + edi*4]
jmp 0x586e90
cmp dword [esp + 0x10], 0
js 0x587131
cmp dword [esp + 4], 0
js 0x5871f3
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 0x586f40
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 0x586f20
jmp 0x5874aa
cmp dword [esp + 0x10], 0
js 0x587293
cmp dword [esp + 4], 0
js 0x58734f
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 0x587010
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 0x586ff0
jmp 0x5874aa
cmp dword [esp + 4], 0
js 0x5873ff
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 0x5870d0
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 0x5870b0
jmp 0x5874aa
cmp dword [esp + 4], 0
js 0x5874c2
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 0x5871a7
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 0x5874aa
mov dword [esp + 0x10], ecx
xor eax, eax
xor ebx, ebx
jmp 0x5871cb
or eax, ebp
inc ebx
cmp dword [esp + 8], ebx
mov ebp, ecx
je 0x587180
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 0x5871c0
mov edx, dword [esp]
mov ebp, dword [edx + ebx*4]
jmp 0x5871c0
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 0x587255
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 0x5874aa
mov dword [esp + 0x10], ecx
xor eax, eax
xor ebx, ebx
jmp 0x587272
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 0x587230
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 0x587260
mov ecx, dword [esp]
mov ebp, dword [ecx + ebx*4]
jmp 0x587260
cmp dword [esp + 4], 0
js 0x58759d
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 0x5872f0
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 0x5872d0
jmp 0x5874aa
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 0x5873a0
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 0x587380
jmp 0x5874aa
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 0x587450
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 0x587430
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 0x587521
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 0x5874aa
mov dword [esp + 0x20], ebx
mov ebx, eax
mov eax, 0
test ebx, ebx
je 0x587568
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 0x587540
cmp dword [esp], 0
mov ebx, dword [esp + 0x20]
jne 0x587500
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 0x587500
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 0x5875f8
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 0x5874aa
mov dword [esp + 0x10], ecx
mov dword [esp], ebp
xor eax, eax
xor ebx, ebx
jmp 0x587626
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 0x5875d1
mov edi, ebx
mov ecx, dword [esp + 0x20]
xor edi, ecx
neg edi
xor ebp, ebp
or edi, ecx
js 0x587610
mov edi, dword [esp]
mov ebp, dword [edi + ebx*4]
jmp 0x587610