Function at 0x436340
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x48]
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
add eax, edi
sub eax, esi
mov dword [ebp + 8], 0
mov dword [ebp + 4], 0
mov dword [ebp], 0
mov dword [esp + 0x20], eax
cmp eax, edi
jbe 0x4366a9
mov ebx, dword [esp + 0x4c]
xor ecx, ecx
mov dword [esp + 4], 0
mov dword [esp + 8], 0
jmp 0x4363cd
mov ecx, dword [esp + 0xc]
mov edx, ecx
mov eax, dword [esp + 4]
sub edx, eax
cmp ecx, dword [esp + 8]
je 0x4364e9
mov dword [eax + edx], edi
add ecx, 4
mov dword [ebp + 4], ecx
add edi, esi
dec edi
inc edi
cmp edi, dword [esp + 0x20]
jae 0x4366a9
mov dword [esp + 0xc], ecx
test ebx, ebx
je 0x436461
mov dword [esp + 0x18], edi
movzx eax, byte [ebx]
mov byte [esp], al
mov byte [esp + 0x10], 0x4b
lea eax, [esp + 0x11]
mov dword [eax + 3], 0
mov dword [eax], 0
xor edi, edi
nop
nop
nop
nop
nop
movzx eax, byte [esp + edi + 0x10]
mov ebx, edi
and ebx, 6
mov edx, edi
or edx, 0x6ed62b3e
add edx, ebx
mov ebx, edx
and ebx, eax
mov ecx, ebx
and ecx, 0x7d
mov esi, ebx
and esi, 2
mov ebp, ebx
or ebp, 0xfd
inc ebp
imul ebp, ecx
or ebx, 2
imul ebx, esi
sub ebp, ebx
add edx, eax
add edx, ebp
add dl, 0xca
mov byte [esp + edi + 0x10], dl
inc edi
cmp edi, 8
jne 0x436400
movzx eax, byte [esp]
cmp al, byte [esp + 0x10]
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x48]
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x4c]
je 0x43646c
movzx eax, byte [edi]
mov ecx, dword [esp + 0x44]
cmp al, byte [ecx]
jne 0x4364e0
cmp esi, 2
jb 0x4363a0
mov ecx, 1
jmp 0x43649a
movzx eax, byte [edi + ecx]
mov edx, dword [esp + 0x44]
cmp al, byte [edx + ecx]
jne 0x43660f
inc ecx
cmp ecx, esi
je 0x4363a0
test ebx, ebx
je 0x436480
movzx eax, byte [ebx + ecx]
mov byte [esp + 0x10], 0x6f
mov dword [esp + 0x11], 0
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ah, dl
add ah, 0x38
xor ah, byte [esp + edx + 0x10]
add ah, 0xe8
mov byte [esp + edx + 0x10], ah
inc edx
cmp edx, 5
jne 0x4364c0
cmp al, byte [esp + 0x10]
jne 0x436480
jmp 0x436491
mov ecx, dword [esp + 0xc]
jmp 0x4363c2
mov dword [esp], edx
mov ecx, edx
sar ecx, 2
lea eax, [ecx + 1]
mov edx, ecx
shr edx, 1
mov ebx, edx
and ebx, ecx
xor edx, ecx
lea edx, [edx + ebx*2]
cmp edx, eax
ja 0x436507
mov edx, eax
mov eax, edx
and eax, 0xfffffffb
mov ecx, edx
and ecx, 4
mov ebx, edx
mov dword [esp + 8], edx
or edx, 4
imul edx, ecx
xor ecx, 4
imul ecx, eax
add edx, ecx
push edx
call fcn.00408160
add esp, 4
mov ebp, eax
mov eax, dword [esp + 4]
test eax, eax
mov ebx, dword [esp + 0x4c]
je 0x43666d
mov dword [esp + 0x18], edi
cmp ebp, eax
mov ebx, eax
mov eax, dword [esp + 0xc]
mov edx, dword [esp]
mov dword [esp + 0x1c], ebp
jbe 0x43661b
cmp eax, ebp
jbe 0x43661b
test edx, edx
je 0x436655
mov edi, dword [esp + 4]
mov edx, dword [esp]
lea eax, [edi + edx]
dec eax
mov ecx, dword [esp + 0x1c]
add ecx, edx
dec ecx
mov esi, edx
and esi, 7
je 0x4365a7
neg esi
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
dec edx
cmp esi, edx
jne 0x436590
add eax, edx
add ecx, edx
add edx, dword [esp]
mov edi, dword [esp + 4]
mov esi, edi
sub esi, dword [esp + 0xc]
cmp esi, 0xfffffff8
ja 0x436655
neg edx
xor edi, edi
nop
nop
nop
nop
nop
nop
movzx ebx, byte [eax + edi]
mov byte [ecx + edi], bl
movzx ebx, byte [eax + edi - 1]
mov byte [ecx + edi - 1], bl
movzx ebx, byte [eax + edi - 2]
mov byte [ecx + edi - 2], bl
movzx ebx, byte [eax + edi - 3]
mov byte [ecx + edi - 3], bl
movzx ebx, byte [eax + edi - 4]
mov byte [ecx + edi - 4], bl
movzx ebx, byte [eax + edi - 5]
mov byte [ecx + edi - 5], bl
movzx ebx, byte [eax + edi - 6]
mov byte [ecx + edi - 6], bl
movzx ebx, byte [eax + edi - 7]
mov byte [ecx + edi - 7], bl
add edi, 0xfffffff8
cmp edx, edi
jne 0x4365c0
jmp 0x436655
add edi, ecx
dec edi
mov ecx, dword [esp + 0xc]
jmp 0x4363c2
mov ecx, edx
shr ecx, 2
mov eax, ebx
mov edi, ebp
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, edx
and edx, 0xfffffffc
add ebp, edx
add edx, ebx
mov ecx, eax
shr ecx, 1
and ecx, 1
mov esi, edx
mov edi, ebp
xchg esi, esi
rep movsw word es:[edi], word [esi]
xchg esi, esi
test al, 1
je 0x436655
mov ecx, dword [esp]
and ecx, 2
movzx edx, byte [edx + ecx]
mov byte [ebp + ecx], dl
push dword [esp + 4]
call fcn.00408170
add esp, 4
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x4c]
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
mov dword [eax], ebp
mov eax, dword [esp + 8]
lea eax, [eax*4]
add eax, ebp
mov dword [esp + 8], eax
mov ecx, ebp
mov edx, dword [esp]
add ecx, edx
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 8]
mov dword [eax + 8], esi
mov eax, ebp
mov dword [esp + 4], ebp
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x48]
jmp 0x4363b6
mov eax, ebp
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret