Function at 0x3660cc53
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x36635d45
call fcn.3662ab98
sub esp, 0x104
test word [ebp + 0x10], 0xfff0
mov eax, dword [0x3663a11c]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xcc], ecx
je 0x3660cc8b
push 0x80090009
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x3660d1fb
push edi
push 4
pop edi
push edi
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_IsBadWritePtr]
test eax, eax
je 0x3660ccac
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x3660d1fa
push dword [ebp - 0xcc]
push dword [ebp + 0xc]
call fcn.3661634a
test eax, eax
jne 0x3660ccc5
push 0x80090002
jmp 0x3660cc9f
mov eax, dword [ebp + 8]
sub eax, 0x6601
push ebx
push esi
je 0x3660ce43
dec eax
je 0x3660ce15
dec eax
je 0x3660cde0
sub eax, 7
je 0x3660cda4
dec eax
je 0x3660cd74
dec eax
je 0x3660cd40
sub eax, 8
je 0x3660cd08
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x3660d1d7
push 0x28
pop esi
xor ebx, ebx
push 0x84
mov dword [ebp - 0xc4], ebx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0xc8], eax
cmp eax, ebx
mov dword [ebp - 4], 2
je 0x3660ce74
push esi
mov ecx, eax
call fcn.36623c98
jmp 0x3660ce76
mov edi, 0x80
xor ebx, ebx
push 0x58
mov esi, edi
mov dword [ebp - 0xc4], ebx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0xc8], eax
cmp eax, ebx
mov dword [ebp - 4], 1
je 0x3660ce74
push edi
mov ecx, eax
jmp 0x3660ce3c
push 0x40
pop esi
push 0xa0
mov dword [ebp - 0xc4], 8
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0xc8], eax
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 4], edi
je 0x3660ce74
push esi
mov ecx, eax
jmp 0x3660cdd6
push 0x40
pop esi
push 0xa0
mov dword [ebp - 0xc4], 8
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov ecx, eax
mov dword [ebp - 0xc8], ecx
xor ebx, ebx
cmp ecx, ebx
mov dword [ebp - 4], 3
je 0x3660ce74
push esi
call fcn.36623d10
jmp 0x3660ce76
mov edi, 0xc0
xor ebx, ebx
push 0x1c4
mov esi, edi
mov dword [ebp - 0xc4], ebx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0xc8], eax
cmp eax, ebx
mov dword [ebp - 4], 6
je 0x3660ce74
push edi
mov ecx, eax
call fcn.36622a18
jmp 0x3660ce76
push 0x28
pop esi
push 0x58
mov dword [ebp - 0xc4], 1
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov ecx, eax
mov dword [ebp - 0xc8], ecx
xor ebx, ebx
cmp ecx, ebx
mov dword [ebp - 4], ebx
je 0x3660ce74
push esi
call fcn.36623329
jmp 0x3660ce76
push 0x40
pop esi
xor ebx, ebx
push 0xb4
mov dword [ebp - 0xc4], ebx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0xc8], eax
cmp eax, ebx
mov dword [ebp - 4], 5
je 0x3660ce74
push esi
mov ecx, eax
call fcn.366229a4
jmp 0x3660ce76
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov edi, eax
cmp edi, ebx
jne 0x3660ce8a
push 0x8007000e
jmp 0x3660ccfd
push 0x40
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0xc8], eax
cmp eax, ebx
mov dword [ebp - 4], 7
je 0x3660cec4
push edi
push dword [ebp - 0xc4]
mov ecx, eax
push 1
push dword [ebp + 8]
push dword [ebp - 0xcc]
call fcn.3660ca20
mov dword [ebp - 0xcc], eax
jmp 0x3660cecc
mov dword [ebp - 0xcc], ebx
mov eax, ebx
or dword [ebp - 4], 0xffffffff
cmp eax, ebx
jne 0x3660cee4
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax + 8]
push 8
jmp 0x3660ccfd
test byte [ebp + 0x10], 1
je 0x3660ceee
or dword [eax + 0x14], 1
mov ecx, dword [ebp + 0xc]
push ebx
lea eax, [ebp - 0xd0]
push eax
lea eax, [ebp - 0x40]
push eax
push 2
push ebx
mov dword [ebp - 0xd0], 0x28
call fcn.366163b1
test eax, eax
je 0x3660d1d7
shr esi, 3
cmp dword [ebp - 0xd0], esi
mov dword [ebp - 0xc8], esi
jae 0x3660d02e
mov edi, dword [ebp + 0xc]
mov eax, dword [edi + 8]
push ebx
push eax
push ebx
lea ecx, [ebp - 0x110]
call fcn.36616c8d
mov eax, dword [edi + 8]
push ebx
push eax
push ebx
lea ecx, [ebp - 0xf8]
mov dword [ebp - 4], 8
call fcn.36616c8d
push 0x10
pop ecx
mov eax, 0x36363636
lea edi, [ebp - 0xc0]
rep stosd dword es:[edi], eax
push 0x10
mov eax, 0x5c5c5c5c
pop ecx
lea edi, [ebp - 0x80]
rep stosd dword es:[edi], eax
xor eax, eax
cmp dword [ebp - 0xd0], ebx
mov byte [ebp - 4], 9
jbe 0x3660cf9b
mov cl, byte [ebp + eax - 0x40]
xor byte [ebp + eax - 0xc0], cl
xor byte [ebp + eax - 0x80], cl
inc eax
cmp eax, dword [ebp - 0xd0]
jb 0x3660cf83
push ebx
push 0x40
lea eax, [ebp - 0xc0]
push eax
push ebx
lea ecx, [ebp - 0x110]
call fcn.36616516
push ebx
push 0x40
lea eax, [ebp - 0x80]
push eax
push ebx
lea ecx, [ebp - 0xf8]
call fcn.36616516
push 0x14
pop edi
push ebx
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x40]
push eax
push 2
push ebx
lea ecx, [ebp - 0x110]
mov dword [ebp + 0xc], edi
call fcn.366163b1
push ebx
lea eax, [ebp + 0xc]
push eax
mov eax, dword [ebp - 0xd0]
lea eax, [ebp + eax - 0x40]
push eax
push 2
push ebx
lea ecx, [ebp - 0xf8]
mov dword [ebp + 0xc], edi
call fcn.366163b1
mov eax, dword [ebp - 0xd0]
add eax, eax
lea ecx, [ebp - 0xf8]
mov dword [ebp - 0xd0], eax
mov byte [ebp - 4], 8
call fcn.366162ec
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x110]
call fcn.366162ec
cmp dword [ebp + 8], 0x660a
jne 0x3660d10f
mov dword [ebp - 0xf0], ebx
mov dword [ebp - 0xec], ebx
mov dword [ebp - 0xe8], ebx
mov dword [ebp - 0xe4], ebx
test byte [ebp + 0x10], 4
mov dword [ebp - 4], 0xa
je 0x3660d08f
push dword [ebp - 0xc4]
mov ecx, dword [ebp - 0xcc]
xor eax, eax
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea esi, [ebp - 0x40]
lea edi, [ebp - 0x18]
movsw word es:[edi], word [esi]
lea eax, [ebp - 0x18]
push eax
movsb byte es:[edi], byte [esi]
call fcn.3660caa8
cmp eax, ebx
jne 0x3660d0e9
mov esi, dword [ebp - 0xc8]
xor eax, eax
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov ecx, esi
mov eax, ecx
shr ecx, 2
lea esi, [ebp - 0x3d]
lea edi, [ebp - 0x15]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 8
lea eax, [ebp - 0x18]
rep movsb byte es:[edi], byte [esi]
push eax
lea ecx, [ebp - 0xf0]
call fcn.3661b245
mov esi, dword [ebp - 0xcc]
mov ecx, dword [esi + 0x18]
mov eax, dword [ecx]
lea edx, [ebp - 0xf0]
push edx
call dword [eax + 0xc]
cmp eax, ebx
jne 0x3660d0e9
mov ecx, dword [esi + 0x18]
mov eax, dword [ecx]
lea edx, [ebp - 0xf0]
push edx
call dword [eax + 0x18]
cmp eax, ebx
je 0x3660d0fb
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [ebp - 0xf0]
jmp 0x3660d1ce
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.3661aef4
jmp 0x3660d1f0
test byte [ebp + 0x10], 4
je 0x3660d146
mov eax, dword [ebp - 0xd0]
sub eax, esi
cmp dword [ebp - 0xc4], eax
jae 0x3660d12b
mov eax, dword [ebp - 0xc4]
mov ecx, dword [ebp - 0xcc]
push eax
lea eax, [ebp + esi - 0x40]
push eax
call fcn.3660caa8
cmp eax, ebx
je 0x3660d146
push eax
jmp 0x3660ccfd
mov dword [ebp - 0xe0], ebx
mov dword [ebp - 0xdc], ebx
mov dword [ebp - 0xd8], ebx
mov dword [ebp - 0xd4], ebx
push esi
lea ecx, [ebp - 0xe0]
mov dword [ebp - 4], 0xb
call fcn.3661af03
lea ecx, [ebp - 0xe0]
lea esi, [ebp - 0x40]
call fcn.3661afb4
mov ecx, dword [ebp - 0xc8]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0xcc]
mov ecx, dword [esi + 0x18]
mov eax, dword [ecx]
lea edx, [ebp - 0xe0]
push edx
call dword [eax + 0xc]
cmp eax, ebx
jne 0x3660d1c1
mov ecx, dword [esi + 0x18]
mov eax, dword [ecx]
lea edx, [ebp - 0xe0]
push edx
call dword [eax + 0x18]
cmp eax, ebx
je 0x3660d1db
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [ebp - 0xe0]
or dword [ebp - 4], 0xffffffff
call fcn.3661aef4
xor eax, eax
jmp 0x3660d1f8
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xe0]
call fcn.3661aef4
mov esi, dword [ebp - 0xcc]
mov eax, dword [ebp + 0x14]
mov dword [eax], esi
xor eax, eax
inc eax
pop esi
pop ebx
pop edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
call fcn.3662acac
leave
ret 0x10