Function at 0x10036c99
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1fe4
call fcn.10032d90
mov ecx, dword [ebp + 0x18]
test ch, 0xc
push ebx
push esi
push edi
jne 0x10036e64
mov edx, dword [ebp + 0x14]
mov eax, 0x400000
test eax, edx
jne 0x10036df3
test eax, ecx
je 0x10036df3
mov eax, dword [ebp + 0x10]
cdq
sub eax, edx
sar eax, 1
lea eax, [eax + eax*8]
shl eax, 2
cdq
push 0x40
pop ecx
idiv ecx
mov ebx, dword [ebp + 0x1c]
lea ecx, [ebx + ebx*8]
shl ecx, 2
mov dword [ebp + 0x10], eax
cdq
idiv ecx
cmp ebx, 1
jne 0x10036d0d
push ebx
push 0x40
push ecx
push eax
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.1004d1ca
add esp, 0x18
jmp 0x10036ea3
cmp ebx, 2
jne 0x10036d2f
test byte [ebp + 0x1b], 4
jne 0x10036d2f
push 0x40
push ecx
push eax
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.1004d2e8
add esp, 0x14
jmp 0x10036ea3
test ebx, ebx
jle 0x10036ea3
mov eax, dword [ebp + 0x10]
cdq
idiv ebx
mov ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
sub eax, ecx
mov dword [ebp - 0x18], eax
jmp 0x10036d59
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
add eax, ecx
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 4], ecx
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov ecx, 0xfe4
cmp eax, ecx
jle 0x10036d75
mov eax, ecx
cdq
push 0x24
pop ecx
idiv ecx
lea edi, [eax + eax*8]
shl edi, 2
mov eax, edi
cdq
idiv ecx
mov esi, eax
test esi, esi
lea eax, [ebp - 0x1fe4]
jle 0x10036db7
lea ecx, [ebx + ebx]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], 0x12
mov edx, dword [ebp + 0x1c]
mov dx, word [edx]
add dword [ebp + 0x1c], ecx
mov word [eax], dx
inc eax
inc eax
dec dword [ebp - 0x10]
jne 0x10036d9f
dec dword [ebp - 0xc]
jne 0x10036d98
push ebx
push 0x40
push 0x24
push esi
push dword [ebp - 4]
lea eax, [ebp - 0x1fe4]
push eax
call fcn.1004d1ca
imul esi, ebx
sub dword [ebp + 0xc], edi
shl esi, 7
add dword [ebp - 4], esi
add esp, 0x18
cmp dword [ebp + 0xc], 0x24
jge 0x10036d67
add dword [ebp - 8], 2
dec dword [ebp - 0x14]
jne 0x10036d53
jmp 0x10036ea3
mov edi, edx
and edi, 0x10
je 0x10036dff
test cl, 8
jne 0x10036e09
test dl, 8
je 0x10036e51
test cl, 0x10
je 0x10036e51
test dl, 8
je 0x10036e2e
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
sar edx, 1
test edx, edx
mov eax, ecx
jle 0x10036e2e
mov esi, edx
xor edx, edx
mov dx, word [ecx]
sar edx, 8
mov byte [eax], dl
inc eax
inc ecx
inc ecx
dec esi
jne 0x10036e1e
test edi, edi
je 0x10036ea3
mov ecx, dword [ebp + 8]
xor eax, eax
cmp dword [ebp + 0x10], eax
jle 0x10036ea3
mov esi, dword [ebp + 8]
xor edx, edx
mov dh, byte [eax + esi]
mov word [ecx], dx
inc ecx
inc ecx
inc eax
cmp eax, dword [ebp + 0x10]
jl 0x10036e3c
jmp 0x10036ea3
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.100224b0
add esp, 0xc
jmp 0x10036ea3
test cl, 8
je 0x10036e83
shr ecx, 0xb
and ecx, 0xffffff01
push ecx
push dword [ebp + 0x10]
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.1004cef0
jmp 0x10036ea0
test cl, 0x10
je 0x10036ea3
shr ecx, 0xb
and ecx, 0xffffff01
push ecx
push dword [ebp + 0x10]
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.1004d032
add esp, 0x10
test byte [ebp + 0x19], 2
je 0x10036eed
xor edx, edx
test byte [ebp + 0x14], 8
je 0x10036eca
mov esi, dword [ebp + 0x10]
test esi, esi
mov ecx, dword [ebp + 8]
jle 0x10036eed
movzx eax, byte [ecx]
add eax, edx
mov byte [ecx], al
inc ecx
dec esi
mov edx, eax
jne 0x10036ebb
jmp 0x10036eed
test byte [ebp + 0x14], 0x10
je 0x10036eed
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
sar eax, 1
test eax, eax
jle 0x10036eed
mov esi, eax
movzx eax, word [ecx]
add eax, edx
mov word [ecx], ax
inc ecx
inc ecx
dec esi
mov edx, eax
jne 0x10036ede
mov edx, dword [ebp + 0x14]
pop edi
mov eax, 0x100
test eax, edx
pop esi
pop ebx
je 0x10036f02
test byte [ebp + 0x18], 0x80
jne 0x10036f0c
test dl, 0x80
je 0x10036f3d
test dword [ebp + 0x18], eax
je 0x10036f3d
test dl, 8
je 0x10036f22
mov ecx, dword [ebp + 0x10]
test ecx, ecx
mov eax, dword [ebp + 8]
jle 0x10036f22
xor byte [eax], 0x80
inc eax
dec ecx
jne 0x10036f1b
test dl, 0x10
je 0x10036f3d
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
sar ecx, 1
test ecx, ecx
jle 0x10036f3d
xor word [eax], 0x8000
inc eax
inc eax
dec ecx
jne 0x10036f33
mov al, 1
leave
ret