Function at 0x487830
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov ebx, dword [ebp + 0x18]
cmp byte [ebx + 0x14], 0
jne 0x48789b
mov ecx, dword [ebx + 8]
mov esi, dword [ebx + 0x10]
cmp ecx, dword [ebx + 0xc]
jne 0x48788a
lea eax, [ecx + ecx*2]
shr eax, 1
test ecx, ecx
mov edi, 0x20
cmovne edi, eax
cmp edi, ecx
jbe 0x487895
cmp edi, 0x3fffffff
ja 0x487895
lea eax, [edi*4]
push eax
push dword [ebx + 4]
call fcn.004a4fb0
add esp, 8
test eax, eax
je 0x487895
mov dword [ebx + 4], eax
mov dword [ebx + 0xc], edi
mov ecx, dword [ebx + 8]
jmp 0x48788d
mov eax, dword [ebx + 4]
mov dword [eax + ecx*4], esi
inc dword [ebx + 8]
jmp 0x48789b
mov word [ebx + 0x14], 0x101
push ebx
call fcn.00480fe0
add esp, 4
mov esi, eax
xor eax, eax
test esi, esi
je 0x487bb4
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
lea eax, [edi + 0x14]
push edi
push ebx
push eax
push dword [ecx + 4]
push dword [ebp + 0x10]
push esi
call fcn.00483780
add esp, 0x18
test eax, eax
je 0x487b97
push ebx
push edi
push edi
push esi
push esi
call fcn.00482dd0
add esp, 0x14
test eax, eax
mov eax, 0
je 0x487bb4
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 8]
mov dword [ebp - 0x14], esi
mov eax, dword [esi + 4]
mov edx, dword [ebx + 4]
xor ecx, ecx
cmp eax, edx
jge 0x487918
mov esi, dword [ebx]
xor ecx, ecx
mov edi, eax
nop dword [eax + eax]
or ecx, dword [esi + edi*4]
inc edi
cmp edx, edi
jne 0x487910
cmp edx, eax
mov dword [ebp - 0x18], eax
jge 0x487938
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
mov eax, dword [ebp - 0x18]
mov edi, edx
nop dword [eax]
or ecx, dword [esi + edi*4]
inc edi
cmp eax, edi
jne 0x487930
cmp eax, edx
cmovl edx, eax
test edx, edx
mov dword [ebp - 0x10], ebx
jle 0x48795d
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
mov edi, dword [ebx]
xor ebx, ebx
nop dword [eax]
mov eax, dword [edi + ebx*4]
xor eax, dword [esi + ebx*4]
or ecx, eax
inc ebx
cmp edx, ebx
jne 0x487950
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x1c], eax
mov esi, dword [eax + 4]
xor edx, edx
mov eax, dword [ebp - 0x18]
cmp eax, esi
jge 0x487998
mov edx, dword [ebp - 0x1c]
mov ebx, dword [edx]
xor edx, edx
mov edi, eax
nop word cs:[eax + eax]
or edx, dword [ebx + edi*4]
inc edi
cmp esi, edi
jne 0x487990
mov edi, dword [ebp - 0x10]
mov edi, dword [edi + 0xc]
xor edi, dword [ebp - 0x20]
cmp esi, eax
mov dword [ebp - 0x10], edi
jge 0x4879c8
mov eax, dword [ebp - 0x14]
mov edi, dword [eax]
mov eax, dword [ebp - 0x18]
mov ebx, esi
nop word cs:[eax + eax]
or edx, dword [edi + ebx*4]
inc ebx
cmp eax, ebx
jne 0x4879c0
mov edi, dword [ebp - 0x10]
or edi, ecx
cmp eax, esi
cmovl esi, eax
test esi, esi
mov dword [ebp - 0x10], edi
jle 0x4879fd
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x1c]
mov ecx, dword [ecx]
xor edi, edi
nop word cs:[eax + eax]
mov ebx, dword [ecx + edi*4]
xor ebx, dword [eax + edi*4]
or edx, ebx
inc edi
cmp esi, edi
jne 0x4879f0
cmp dword [ebp - 0x10], 0
sete al
mov ecx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x1c]
xor ecx, dword [esi + 0xc]
or ecx, edx
sete cl
or cl, al
movzx eax, cl
neg eax
mov dword [ebp - 0x10], eax
mov edi, dword [ebp + 8]
cmp dword [edi + 0x10], 2
jl 0x487ba1
mov edx, 1
mov ebx, dword [ebp + 0x18]
nop word cs:[eax + eax]
mov eax, dword [edi + 0x14]
mov ecx, eax
xor ecx, edx
not eax
dec ecx
test ecx, eax
jns 0x487a58
cmp dword [ebp - 0x10], 0xffffffff
jne 0x487ba4
mov dword [ebp - 0x20], edx
push ebx
push dword [ebp + 0x14]
mov esi, dword [ebp - 0x14]
push esi
push esi
push esi
call fcn.00482dd0
add esp, 0x14
test eax, eax
je 0x487b97
mov ebx, dword [edi + 0xc]
mov eax, dword [esi + 4]
mov ecx, dword [ebx + 4]
xor edi, edi
cmp eax, ecx
jge 0x487a98
mov edx, dword [ebx]
xor edi, edi
mov esi, eax
nop word [eax + eax]
or edi, dword [edx + esi*4]
inc esi
cmp ecx, esi
jne 0x487a90
cmp ecx, eax
mov dword [ebp - 0x1c], eax
jge 0x487ab8
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
mov eax, dword [ebp - 0x1c]
mov esi, ecx
nop dword [eax]
or edi, dword [edx + esi*4]
inc esi
cmp eax, esi
jne 0x487ab0
cmp eax, ecx
cmovl ecx, eax
test ecx, ecx
mov dword [ebp - 0x18], ebx
jle 0x487add
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
mov ebx, dword [ebx]
xor edx, edx
nop dword [eax]
mov eax, dword [ebx + edx*4]
xor eax, dword [esi + edx*4]
or edi, eax
inc edx
cmp ecx, edx
jne 0x487ad0
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0xc]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x18], ecx
xor eax, ecx
or eax, edi
mov eax, dword [ebp - 0x10]
mov ecx, 0xffffffff
cmove eax, ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
mov esi, dword [ecx + 4]
xor edi, edi
mov eax, dword [ebp - 0x1c]
cmp eax, esi
jge 0x487b28
mov edx, dword [ecx]
xor edi, edi
mov ebx, eax
nop word cs:[eax + eax]
or edi, dword [edx + ebx*4]
inc ebx
cmp esi, ebx
jne 0x487b20
cmp esi, eax
jge 0x487b48
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
mov eax, dword [ebp - 0x1c]
mov ebx, esi
nop word cs:[eax + eax]
or edi, dword [edx + ebx*4]
inc ebx
cmp eax, ebx
jne 0x487b40
cmp eax, esi
cmovl esi, eax
test esi, esi
mov dword [ebp - 0x24], ecx
jle 0x487b6d
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov ebx, dword [ecx]
xor edx, edx
nop dword [eax]
mov ecx, dword [ebx + edx*4]
xor ecx, dword [eax + edx*4]
or edi, ecx
inc edx
cmp esi, edx
jne 0x487b60
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x24]
xor ecx, dword [eax + 0xc]
mov eax, dword [ebp - 0x10]
and eax, 1
or eax, edi
or eax, ecx
je 0x487ba1
mov edx, dword [ebp - 0x20]
inc edx
mov edi, dword [ebp + 8]
cmp edx, dword [edi + 0x10]
mov ebx, dword [ebp + 0x18]
jl 0x487a40
jmp 0x487ba4
xor eax, eax
cmp byte [ebx + 0x14], 0
jne 0x487bcd
jmp 0x487bba
mov ebx, dword [ebp + 0x18]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
and ecx, 1
mov dword [eax], ecx
mov eax, 1
cmp byte [ebx + 0x14], 0
jne 0x487bcd
mov esi, dword [ebx + 4]
mov ecx, dword [ebx + 8]
lea edx, [ecx - 1]
mov dword [ebx + 8], edx
mov ecx, dword [esi + ecx*4 - 4]
mov dword [ebx + 0x10], ecx
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret