Function at 0x4181c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x38
mov ebp, dword [esp + 0x68]
mov eax, dword [esp + 0x4c]
test ebp, ebp
jle 0x418578
mov dword [esp], eax
lea esi, [esp + 0x50]
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 + 4], ecx
jge 0x41835a
mov esi, dword [ecx]
sub ebx, esi
sar ebx, 2
imul ecx, ebx, 0xaaaaaaab
add ecx, ebp
cmp ecx, 0x15555556
jae 0x418582
sub eax, esi
sar eax, 2
imul eax, eax, 0xaaaaaaab
lea edx, [eax + eax]
cmp edx, ecx
cmova ecx, edx
cmp eax, 0xaaaaaaa
mov ebx, 0x15555555
cmovb ebx, ecx
xor edi, edi
mov eax, 0
test ebx, ebx
je 0x418262
cmp ebx, 0x15555556
jae 0x41858b
lea eax, [ebx*4]
lea eax, [eax + eax*2]
push eax
call sub.libc.dll_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x30], ebx
mov ecx, dword [esp]
sub ecx, esi
sar ecx, 2
imul ecx, ecx, 0xaaaaaaab
lea ecx, [ecx + ecx*2]
mov dword [esp + 0x34], eax
lea esi, [eax + ecx*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 ebp, 2
lea ebp, [ebp + ebp*2]
lea eax, [esi + ebp]
mov dword [esp + 0x20], eax
lea ebx, [esp + 8]
nop word cs:[eax + 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 0x4182b0
mov eax, dword [esp + 0x30]
lea eax, [eax + eax*2]
mov ecx, dword [esp + 4]
mov ecx, dword [ecx]
mov edi, esi
cmp ecx, dword [esp]
je 0x41830e
mov edx, esi
mov ebx, dword [esp]
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 0x4182f0
mov ecx, dword [esp + 0x34]
lea ebx, [ecx + eax*4]
mov ecx, dword [esp + 4]
mov ebp, dword [ecx + 4]
mov eax, dword [esp]
sub ebp, eax
mov edx, dword [esp + 0x20]
je 0x41833a
push ebp
push eax
push edx
call sub.msvcrt.dll_memmove
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
add esp, 0xc
add edx, ebp
mov eax, dword [ecx]
mov dword [ecx], edi
mov dword [ecx + 4], edx
mov dword [ecx + 8], ebx
test eax, eax
je 0x418353
push eax
call sub.libc.dll_operator_delete_void_
add esp, 4
mov eax, esi
jmp 0x418578
mov eax, dword [esi + 8]
mov dword [esp + 0x10], eax
movsd xmm0, qword [esi]
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 0x418380
mov eax, dword [esp + 0x10]
mov dword [esp + 0x2c], eax
movsd xmm0, qword [esp + 8]
movsd qword [esp + 0x24], xmm0
mov eax, dword [esp + 4]
mov esi, dword [eax + 4]
mov edx, esi
mov ecx, dword [esp]
sub edx, ecx
mov eax, edx
sar eax, 2
imul edi, eax, 0xaaaaaaab
cmp edi, ebp
jge 0x41849a
lea ecx, [esp + 0x50]
mov eax, dword [ecx + 8]
mov dword [esp + 0x2c], eax
movsd xmm0, qword [ecx]
movsd qword [esp + 0x24], xmm0
mov dword [esp + 0x20], edx
test edx, edx
jle 0x41840a
inc edi
lea esi, [esp + 0x24]
nop word [eax + eax]
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx]
push esi
call dword [eax + 0x94]
dec edi
cmp edi, 1
ja 0x4183f0
mov eax, dword [esp + 4]
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 0x418485
lea edi, [esp + 0x14]
nop dword [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 0x418450
mov eax, dword [esp + 4]
mov dword [eax + 4], esi
cmp dword [esp + 0x20], 0
jle 0x418575
mov ecx, dword [esp]
shl ebp, 2
lea edx, [ebp*2]
add edx, ebp
lea eax, [ecx + edx]
mov ecx, esi
sub ecx, edx
mov edx, esi
cmp ecx, ebx
jae 0x4184d8
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 0x4184c0
mov ecx, dword [esp + 4]
mov dword [ecx + 4], edx
cmp esi, eax
je 0x4184f7
mov ecx, esi
sub ecx, eax
sub esi, ecx
push ecx
push dword [esp + 4]
push esi
call sub.msvcrt.dll_memmove
add esp, 0xc
lea ecx, [esp + 0x50]
mov eax, dword [ecx + 8]
mov dword [esp + 0x1c], eax
movsd xmm0, qword [ecx]
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 0x418575
lea esi, [esp + 0x14]
mov edi, dword [esp]
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 0x418540
mov eax, dword [esp]
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret 0x20
mov ecx, dword [esp + 4]
call 0x418590
call fcn.004077b0
push 0x553238
call fcn.004077a0
int3