Function at 0x487000
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
mov eax, dword [esp + 0x28]
push ebp
mov ebp, ecx
mov ecx, dword [esp + 0x20]
push esi
push edi
mov edi, edx
mov dword [esp + 0x18], ebp
mov edx, dword [esp + 0x2c]
lea esi, [eax + ecx*4]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], esi
cmp edx, 1
ja 0x487035
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x18
ret 0x18
mov ecx, dword [esp + 0x30]
push ebx
lea ebx, [eax + 0x40000]
mov eax, 1
shl eax, cl
lea ebx, [ebx + ebp*4]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], eax
cmp edx, eax
ja 0x48722c
cmp edx, dword [esp + 0x40]
ja 0x48722c
mov eax, dword [esp + 0x38]
mov edx, esi
lea edi, [eax + ebp*4]
mov dword [esp + 0x40], 0
mov eax, dword [esi]
add eax, dword [esp + 0x10]
mov esi, dword [esp + 0x10]
mov ecx, eax
sub ecx, ebp
mov dword [esp + 0x1c], edi
cmp eax, ebp
cmovb ecx, eax
mov eax, dword [ebx + ecx*4]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x38], eax
shl eax, cl
lea ecx, [edi + 4]
sub edx, edi
mov dword [edi], eax
mov dword [esp + 0x3c], ecx
mov edi, 1
mov dword [esp + 0x20], edx
nop dword [eax]
mov eax, dword [edx + ecx]
add eax, esi
mov ecx, eax
sub ecx, ebp
cmp eax, ebp
cmovb ecx, eax
mov edx, dword [ebx + ecx*4]
mov eax, edx
mov ecx, dword [esp + 0x34]
xor edx, dword [esp + 0x38]
shl eax, cl
mov ecx, dword [esp + 0x3c]
or eax, edi
inc edi
mov dword [ecx], eax
add ecx, 4
mov eax, dword [esp + 0x40]
or eax, edx
mov dword [esp + 0x3c], ecx
mov edx, dword [esp + 0x20]
mov dword [esp + 0x40], eax
cmp edi, dword [esp + 0x30]
jb 0x4870b0
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
test eax, eax
jne 0x487109
mov ecx, dword [esp + 0x30]
sub ecx, 1
jmp 0x487335
mov edx, dword [esp + 0x30]
mov ecx, edi
call fcn.0049a530
mov ebx, dword [esp + 0x24]
xor eax, eax
mov ecx, dword [esp + 0x34]
dec ebx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x3c], eax
mov eax, dword [edi]
mov edx, eax
and eax, ebx
shr edx, cl
mov dword [esp + 0x40], edx
xor ebp, ebp
mov dword [esp + 0x24], ebx
mov edx, 1
mov eax, dword [esi + eax*4]
mov dword [edi], eax
mov ebx, dword [edi + edx*4]
mov eax, ebx
shr eax, cl
cmp eax, dword [esp + 0x40]
je 0x4871a1
mov dword [esp + 0x40], eax
mov ecx, edx
mov eax, dword [esp + 0x2c]
sub ecx, ebp
add eax, edx
mov dword [esp + 0x3c], eax
sub ecx, 1
je 0x48719d
mov eax, ecx
and eax, 0x3ff
or eax, 0xfffff800
shl eax, 0x14
or eax, dword [edi + ebp*4]
mov dword [edi + ebp*4], eax
cmp ecx, 0x400
jb 0x48719d
and ecx, 0xfffffc00
or eax, 0x40000000
shl ecx, 0xa
mov dword [edi + ebp*4], eax
or dword [edi + ebp*4 + 4], ecx
mov ebp, edx
jmp 0x4871a9
mov dword [esp + 0x38], 1
and ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
mov eax, dword [esi + ebx*4]
mov ebx, dword [esp + 0x3c]
mov dword [edi + edx*4], eax
inc edx
mov dword [ecx + eax*4], ebx
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
cmp edx, eax
jb 0x487147
sub edx, ebp
sub edx, 1
je 0x48720c
mov eax, edx
and eax, 0x3ff
or eax, 0xfffff800
shl eax, 0x14
or eax, dword [edi + ebp*4]
mov dword [edi + ebp*4], eax
cmp edx, 0x400
jb 0x487208
and edx, 0xfffffc00
or eax, 0x40000000
shl edx, 0xa
mov dword [edi + ebp*4], eax
or dword [edi + ebp*4 + 4], edx
mov eax, dword [esp + 0x30]
sub edi, esi
nop
mov ecx, dword [edi + esi]
lea esi, [esi + 4]
mov dword [esi - 4], ecx
sub eax, 1
jne 0x487210
mov eax, dword [esp + 0x38]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x18
ret 0x18
mov eax, dword [esi]
mov edx, 1
add eax, edi
mov ecx, eax
sub ecx, ebp
cmp eax, ebp
cmovb ecx, eax
mov eax, dword [ebx + ecx*4]
mov dword [esp + 0x24], eax
mov eax, dword [esi + edx*4]
add eax, edi
mov ecx, eax
sub ecx, ebp
cmp eax, ebp
cmovb ecx, eax
mov eax, dword [esp + 0x24]
cmp dword [ebx + ecx*4], eax
mov eax, dword [esp + 0x30]
jne 0x487265
inc edx
cmp edx, eax
jb 0x487245
cmp edx, eax
je 0x487330
mov edx, dword [esp + 0x40]
cmp edx, 1
jbe 0x487330
nop word [eax + eax]
mov ebx, dword [esp + 0x3c]
inc edx
shr edx, 1
add ebx, edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x14], ebx
xor edi, edi
mov edx, dword [esi + edi*4]
mov ecx, dword [esp + 0x10]
add ecx, edx
mov dword [esp + 0x24], edx
mov edx, ecx
sub edx, ebp
cmp ecx, ebp
cmovb edx, ecx
mov ecx, dword [esp + 0x18]
cmp dword [ecx + edx*4], ebx
jb 0x4872f4
dec eax
cmp eax, edi
jbe 0x4872f9
mov ecx, dword [esp + 0x10]
mov ebx, dword [esi + eax*4]
add ecx, ebx
mov edx, ecx
sub edx, ebp
cmp ecx, ebp
mov ebp, dword [esp + 0x18]
cmovb edx, ecx
mov ecx, dword [esp + 0x14]
cmp dword [ebp + edx*4], ecx
mov ebp, dword [esp + 0x1c]
jb 0x4872e2
dec eax
cmp eax, edi
ja 0x4872b7
jmp 0x4872fd
mov edx, dword [esp + 0x24]
mov dword [esi + edi*4], ebx
mov dword [esi + eax*4], edx
cmp edi, eax
jae 0x4872fd
mov ebx, dword [esp + 0x14]
inc edi
cmp edi, eax
jb 0x487293
mov ecx, dword [esp + 0x14]
test edi, edi
jne 0x487317
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
sub eax, ecx
add edx, eax
mov dword [esp + 0x3c], ecx
mov eax, dword [esp + 0x30]
jmp 0x487323
mov eax, dword [esp + 0x30]
cmp edi, eax
jne 0x487374
mov edx, dword [esp + 0x20]
mov dword [esp + 0x40], edx
cmp edx, 1
ja 0x487280
lea ecx, [eax - 1]
test ecx, ecx
je 0x487365
mov eax, ecx
and eax, 0x3ff
or eax, 0xfffff800
shl eax, 0x14
or eax, dword [esi]
mov dword [esi], eax
cmp ecx, 0x400
jb 0x487365
and ecx, 0xfffffc00
or eax, 0x40000000
shl ecx, 0xa
or dword [esi + 4], ecx
mov dword [esi], eax
pop ebx
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x18
ret 0x18
mov ebx, dword [esp + 0x2c]
mov ecx, edi
add ebx, edi
cmp edi, eax
jae 0x487395
mov edx, dword [esp + 0x18]
mov ebp, eax
mov eax, dword [esi + ecx*4]
inc ecx
mov dword [edx + eax*4], ebx
cmp ecx, ebp
jb 0x487386
mov ebp, dword [esp + 0x1c]
push dword [esp + 0x20]
mov eax, dword [esp + 0x3c]
mov ecx, ebp
push dword [esp + 0x40]
mov edx, dword [esp + 0x18]
push eax
push dword [esp + 0x40]
push edi
push dword [esp + 0x40]
call fcn.00487000
mov ecx, dword [esp + 0x3c]
mov esi, eax
mov eax, dword [esp + 0x14]
sub ecx, eax
add ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x10]
push ecx
push eax
push dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
mov ecx, ebp
push dword [esp + 0x40]
sub eax, edi
push eax
mov eax, dword [esp + 0x40]
add eax, edi
push eax
call fcn.00487000
pop ebx
pop edi
or eax, esi
pop esi
pop ebp
add esp, 0x18
ret 0x18