Function at 0x587120
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.005886e0
add esp, 8
test eax, eax
je 0x587248
mov esi, dword [esp + 0x48]
mov ebp, dword [esp + 0x44]
cmp ebx, 3
jg 0x58724f
cmp dword [esp + 0x1c], 0
jle 0x587a5a
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 0x5871c6
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 0x587a5a
mov dword [esp + 8], eax
mov edi, ebp
mov ebp, 0
mov ebx, 0
test ecx, ecx
je 0x587224
xor ebp, ebp
xor ebx, ebx
jmp 0x5871eb
or ebx, eax
or ebx, ecx
add ebp, 2
cmp ebp, edx
je 0x587220
mov eax, ebp
xor eax, esi
neg eax
or eax, esi
mov eax, 0
js 0x5871fd
mov eax, dword [edi + ebp*4]
lea ecx, [ebp + 1]
xor ecx, esi
neg ecx
or ecx, esi
mov ecx, 0
js 0x5871e0
mov ecx, dword [edi + ebp*4 + 4]
jmp 0x5871e0
mov ecx, dword [esp + 0x4c]
test ecx, ecx
mov eax, dword [esp + 8]
jne 0x5871aa
mov ecx, ebp
xor ecx, esi
neg ecx
xor eax, eax
or ecx, esi
js 0x5871a0
mov eax, dword [edi + ebp*4]
jmp 0x5871a0
xor eax, eax
jmp 0x587a6a
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 0x587a5a
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 0x58739f
test eax, eax
js 0x587480
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 0x58733b
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 0x587a5a
mov dword [esp + 0x2c], ecx
mov edx, ebp
xor eax, eax
xor edi, edi
jmp 0x58736c
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 0x587310
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 0x58738a
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx + edi*4]
mov ebx, 0
cmp dword [esp + 4], 0
js 0x587350
mov ebx, dword [esp + 0x14]
mov ebx, dword [ebx + edi*4]
jmp 0x587350
test eax, eax
js 0x587551
cmp dword [esp + 0x10], 0
js 0x58761f
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 0x587429
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 0x587a5a
mov dword [esp + 0x18], ecx
xor eax, eax
xor edi, edi
jmp 0x587458
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 0x587400
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 0x587440
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + edi*4]
jmp 0x587440
cmp dword [esp + 0x10], 0
js 0x5876e1
cmp dword [esp + 4], 0
js 0x5877a3
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 0x5874f0
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 0x5874d0
jmp 0x587a5a
cmp dword [esp + 0x10], 0
js 0x587843
cmp dword [esp + 4], 0
js 0x5878ff
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 0x5875c0
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 0x5875a0
jmp 0x587a5a
cmp dword [esp + 4], 0
js 0x5879af
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 0x587680
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 0x587660
jmp 0x587a5a
cmp dword [esp + 4], 0
js 0x587a72
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 0x587757
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 0x587a5a
mov dword [esp + 0x10], ecx
xor eax, eax
xor ebx, ebx
jmp 0x58777b
or eax, ebp
inc ebx
cmp dword [esp + 8], ebx
mov ebp, ecx
je 0x587730
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 0x587770
mov edx, dword [esp]
mov ebp, dword [edx + ebx*4]
jmp 0x587770
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 0x587805
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 0x587a5a
mov dword [esp + 0x10], ecx
xor eax, eax
xor ebx, ebx
jmp 0x587822
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 0x5877e0
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 0x587810
mov ecx, dword [esp]
mov ebp, dword [ecx + ebx*4]
jmp 0x587810
cmp dword [esp + 4], 0
js 0x587b4d
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 0x5878a0
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 0x587880
jmp 0x587a5a
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 0x587950
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 0x587930
jmp 0x587a5a
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 0x587a00
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 0x5879e0
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 0x587ad1
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 0x587a5a
mov dword [esp + 0x20], ebx
mov ebx, eax
mov eax, 0
test ebx, ebx
je 0x587b18
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 0x587af0
cmp dword [esp], 0
mov ebx, dword [esp + 0x20]
jne 0x587ab0
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 0x587ab0
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 0x587ba8
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 0x587a5a
mov dword [esp + 0x10], ecx
mov dword [esp], ebp
xor eax, eax
xor ebx, ebx
jmp 0x587bd6
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 0x587b81
mov edi, ebx
mov ecx, dword [esp + 0x20]
xor edi, ecx
neg edi
xor ebp, ebp
or edi, ecx
js 0x587bc0
mov edi, dword [esp]
mov ebp, dword [edi + ebx*4]
jmp 0x587bc0