Function at 0x418730
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x38
mov ebp, dword [esp + 0x68]
mov edi, dword [ecx]
mov eax, dword [esp + 0x4c]
sub eax, edi
mov edx, 0x2aaaaaab
imul edx
mov eax, edx
shr eax, 0x1f
sar edx, 1
add edx, eax
lea esi, [edx + edx*2]
lea eax, [edi + esi*4]
test ebp, ebp
jle 0x418b09
mov dword [esp + 4], eax
mov ebx, dword [ecx + 4]
mov eax, dword [ecx + 8]
mov edx, eax
sub edx, ebx
sar edx, 2
imul edx, edx, 0xaaaaaaab
cmp edx, ebp
mov dword [esp], ecx
jge 0x4188d9
sub ebx, edi
sar ebx, 2
imul edx, ebx, 0xaaaaaaab
add edx, ebp
cmp edx, 0x15555556
jae 0x418b13
mov ebx, ebp
sub eax, edi
sar eax, 2
imul eax, eax, 0xaaaaaaab
lea ecx, [eax + eax]
cmp ecx, edx
cmova edx, ecx
cmp eax, 0xaaaaaaa
mov ebp, 0x15555555
cmovb ebp, edx
xor edi, edi
mov eax, 0
test ebp, ebp
je 0x4187e8
cmp ebp, 0x15555556
jae 0x418b1b
lea eax, [ebp*4]
lea eax, [eax + eax*2]
push eax
call sub.libc.dll_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], eax
lea esi, [eax + esi*4]
lea ecx, [esp + 0x50]
mov eax, dword [ecx + 8]
mov dword [esp + 0x10], eax
movsd xmm0, qword [ecx]
movsd qword [esp + 8], xmm0
shl ebx, 2
lea ebp, [ebx + ebx*2]
lea eax, [esi + ebp]
mov dword [esp + 0x20], eax
lea ebx, [esp + 8]
nop dword [eax]
mov eax, dword [esp + 0x10]
mov dword [esi + edi + 8], eax
movsd xmm0, qword [esp + 8]
movsd qword [esi + edi], xmm0
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
push ebx
call dword [eax + 0x94]
add edi, 0xc
cmp ebp, edi
jne 0x418820
mov eax, dword [esp + 0x30]
lea eax, [eax + eax*2]
mov ecx, dword [esp]
mov ecx, dword [ecx]
mov edi, esi
cmp ecx, dword [esp + 4]
je 0x41888e
mov edx, esi
mov ebx, dword [esp + 4]
nop word cs:[eax + eax]
mov edi, dword [ebx - 4]
mov dword [edx - 4], edi
movsd xmm0, qword [ebx - 0xc]
lea ebp, [ebx - 0xc]
lea edi, [edx - 0xc]
movsd qword [edx - 0xc], xmm0
mov edx, edi
mov ebx, ebp
cmp ebp, ecx
jne 0x418870
mov ecx, dword [esp + 0x34]
lea ebx, [ecx + eax*4]
mov eax, dword [esp]
mov ebp, dword [eax + 4]
mov eax, dword [esp + 4]
sub ebp, eax
mov edx, dword [esp + 0x20]
je 0x4188b6
push ebp
push eax
push edx
call sub.msvcrt.dll_memmove
mov edx, dword [esp + 0x2c]
add esp, 0xc
add edx, ebp
mov ecx, dword [esp]
mov eax, dword [ecx]
mov dword [ecx], edi
mov dword [ecx + 4], edx
mov dword [ecx + 8], ebx
test eax, eax
je 0x4188d2
push eax
call sub.libc.dll_operator_delete_void_
add esp, 4
mov eax, esi
jmp 0x418b09
lea ecx, [esp + 0x50]
mov eax, dword [ecx + 8]
mov dword [esp + 0x10], eax
movsd xmm0, qword [ecx]
movsd qword [esp + 8], xmm0
lea esi, [ebp + 1]
lea edi, [esp + 8]
nop word cs:[eax + eax]
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
push edi
call dword [eax + 0x94]
dec esi
cmp esi, 1
ja 0x418900
mov eax, dword [esp + 0x10]
mov dword [esp + 0x2c], eax
movsd xmm0, qword [esp + 8]
movsd qword [esp + 0x24], xmm0
mov eax, dword [esp]
mov esi, dword [eax + 4]
mov eax, esi
sub eax, dword [esp + 4]
mov ecx, eax
sar ecx, 2
imul ecx, ecx, 0xaaaaaaab
cmp ecx, ebp
jge 0x418a1c
mov dword [esp + 0x20], ecx
lea edx, [esp + 0x50]
mov ecx, dword [edx + 8]
mov dword [esp + 0x2c], ecx
movsd xmm0, qword [edx]
movsd qword [esp + 0x24], xmm0
test eax, eax
jle 0x418989
mov eax, dword [esp + 0x20]
lea esi, [eax + 1]
lea edi, [esp + 0x24]
nop
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx]
push edi
call dword [eax + 0x94]
dec esi
cmp esi, 1
ja 0x418970
mov eax, dword [esp]
mov esi, dword [eax + 4]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
movsd xmm0, qword [esp + 0x24]
movsd qword [esp + 0x14], xmm0
lea eax, [esp + 0x5c]
movsd xmm0, qword [eax]
movsd qword [esp + 8], xmm0
mov eax, dword [eax + 8]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
xor eax, dword [esp + 8]
mov ecx, dword [esp + 0x18]
xor ecx, dword [esp + 0xc]
or ecx, eax
je 0x418a05
lea edi, [esp + 0x14]
nop word [eax + eax]
mov eax, dword [esp + 0x1c]
mov dword [esi + 8], eax
movsd xmm0, qword [esp + 0x14]
movsd qword [esi], xmm0
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
push edi
call dword [eax + 0x94]
add esi, 0xc
mov eax, dword [esp + 0x14]
xor eax, dword [esp + 8]
mov ecx, dword [esp + 0x18]
xor ecx, dword [esp + 0xc]
or ecx, eax
jne 0x4189d0
mov eax, dword [esp]
mov dword [eax + 4], esi
mov eax, dword [esp + 0x20]
test eax, eax
mov eax, dword [esp + 4]
jg 0x418a2a
jmp 0x418b09
mov eax, ebp
test eax, eax
mov eax, dword [esp + 4]
jle 0x418b09
shl ebp, 2
lea edx, [ebp*2]
add edx, ebp
add eax, edx
mov ecx, esi
sub ecx, edx
mov edx, esi
cmp ecx, ebx
jae 0x418a68
mov edx, esi
nop word cs:[eax + eax]
mov edi, dword [ecx + 8]
mov dword [edx + 8], edi
movsd xmm0, qword [ecx]
movsd qword [edx], xmm0
add ecx, 0xc
add edx, 0xc
cmp ecx, ebx
jb 0x418a50
mov ecx, dword [esp]
mov dword [ecx + 4], edx
cmp esi, eax
lea edi, [esp + 0x50]
je 0x418a8a
mov ecx, esi
sub ecx, eax
sub esi, ecx
push ecx
push dword [esp + 8]
push esi
call sub.msvcrt.dll_memmove
add esp, 0xc
mov eax, dword [edi + 8]
mov dword [esp + 0x1c], eax
movsd xmm0, qword [edi]
movsd qword [esp + 0x14], xmm0
movsd xmm0, qword [esp + 0x24]
movsd qword [esp + 8], xmm0
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
xor eax, dword [esp + 8]
mov ecx, dword [esp + 0x18]
xor ecx, dword [esp + 0xc]
or ecx, eax
je 0x418b05
lea esi, [esp + 0x14]
mov edi, dword [esp + 4]
nop dword [eax + eax]
mov eax, dword [esp + 0x1c]
mov dword [edi + 8], eax
movsd xmm0, qword [esp + 0x14]
movsd qword [edi], xmm0
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
push esi
call dword [eax + 0x94]
add edi, 0xc
mov eax, dword [esp + 0x14]
xor eax, dword [esp + 8]
mov ecx, dword [esp + 0x18]
xor ecx, dword [esp + 0xc]
or ecx, eax
jne 0x418ad0
mov eax, dword [esp + 4]
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret 0x20
mov ecx, dword [esp]
call 0x418b20
call fcn.004077b0
push 0x5551b8
call fcn.004077a0
int3