Function at 0x10018520
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov edx, dword [0x100524bc]
xor ecx, ecx
push ebx
xor ebx, ebx
mov dword [ebp - 4], ecx
push esi
push edi
mov dword [ebp - 0xc], ebx
cmp byte [edx + 0x40], cl
je 0x10018659
mov eax, dword [edx + 0x44]
add eax, dword [edx + 0x34]
mov edi, dword [eax]
test edi, edi
je 0x10018625
mov esi, dword [edi + 4]
test esi, esi
je 0x1001861b
test ebx, ebx
jne 0x100185d3
mov byte [ebp - 0x14], 0x4d
or ecx, 1
mov byte [ebp - 0x13], 0x57
xor edx, edx
mov byte [ebp - 0x12], 0x44
mov ebx, 0x2e5
mov byte [ebp - 0x11], 0x10
mov byte [ebp - 0x10], 0xd9
mov al, byte [ebp - 0x14]
mov dword [ebp - 4], ecx
mov dword [ebp - 8], 0xfffffff6
nop dword [eax]
mov al, byte [ebp + edx - 0x14]
mov cl, bl
xor cl, byte [ebp - 8]
add ebx, 8
dec dword [ebp - 8]
xor cl, al
xor cl, 0x2e
mov byte [ebp + edx - 0x14], cl
inc edx
cmp ebx, 0x30d
jb 0x10018590
lea eax, [ebp - 0x14]
mov byte [ebp - 0x10], 0
push eax
lea eax, [esi + 0x200]
push eax
call fcn.1002a2c2
mov ecx, dword [ebp - 4]
add esp, 8
test eax, eax
jne 0x100185d3
mov dl, 1
jmp 0x100185d5
xor dl, dl
test cl, 1
je 0x100185ed
and ecx, 0xfffffffe
xor eax, eax
mov dword [ebp - 4], ecx
mov byte [ebp + eax - 0x14], 0
inc eax
cmp eax, 5
jb 0x100185e2
test dl, dl
je 0x100185f8
mov ebx, esi
mov dword [ebp - 0xc], ebx
jmp 0x1001861b
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x1001861b
push dword [0x100524c4]
lea eax, [esi + 0x200]
push eax
call fcn.1002a2c2
add esp, 8
test eax, eax
je 0x1001862e
mov ecx, dword [ebp - 4]
mov edi, dword [edi]
test edi, edi
jne 0x10018552
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x410], 0
mov eax, dword [ebx + 0x404]
mov dword [esi + 0x404], eax
mov eax, dword [ebx + 0x408]
pop edi
mov dword [esi + 0x408], eax
mov al, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edx + 0x34]
mov edi, dword [eax]
test edi, edi
je 0x10018625
mov esi, dword [edi + 4]
test esi, esi
je 0x1001872b
test ebx, ebx
jne 0x100186e3
mov byte [ebp - 0x1c], 0x4d
or ecx, 2
mov byte [ebp - 0x1b], 0x57
xor edx, edx
mov byte [ebp - 0x1a], 0x44
mov ebx, 0x2e5
mov byte [ebp - 0x19], 0x10
mov byte [ebp - 0x18], 0xd9
mov al, byte [ebp - 0x1c]
mov dword [ebp - 4], ecx
mov dword [ebp - 8], 0xfffffff6
nop dword [eax]
mov al, byte [ebp + edx - 0x1c]
mov cl, bl
xor cl, byte [ebp - 8]
add ebx, 8
dec dword [ebp - 8]
xor cl, al
xor cl, 0x2e
mov byte [ebp + edx - 0x1c], cl
inc edx
cmp ebx, 0x30d
jb 0x100186a0
lea eax, [ebp - 0x1c]
mov byte [ebp - 0x18], 0
push eax
lea eax, [esi + 0x100]
push eax
call fcn.1002a2c2
mov ecx, dword [ebp - 4]
add esp, 8
test eax, eax
jne 0x100186e3
mov dl, 1
jmp 0x100186e5
xor dl, dl
test cl, 2
je 0x100186fd
and ecx, 0xfffffffd
xor eax, eax
mov dword [ebp - 4], ecx
mov byte [ebp + eax - 0x1c], 0
inc eax
cmp eax, 5
jb 0x100186f2
test dl, dl
je 0x10018708
mov ebx, esi
mov dword [ebp - 0xc], ebx
jmp 0x1001872b
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x1001872b
push dword [0x100524c4]
lea eax, [esi + 0x100]
push eax
call fcn.1002a2c2
add esp, 8
test eax, eax
je 0x1001873e
mov ecx, dword [ebp - 4]
mov edi, dword [edi]
test edi, edi
jne 0x10018662
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x310], 0
mov eax, dword [ebx + 0x304]
mov dword [esi + 0x304], eax
mov eax, dword [ebx + 0x308]
pop edi
mov dword [esi + 0x308], eax
mov al, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret