Function at 0x437170
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x18
xor edx, edx
push ebx
push ebp
push esi
cmp eax, edx
push edi
mov ebp, ecx
je 0x437187
test al, 7
je 0x437197
mov ecx, eax
and ecx, 7
je 0x437197
mov esi, 8
sub esi, ecx
add eax, esi
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x10], edx
cmp ecx, 1
mov dword [esp + 0x14], edx
jne 0x4372ac
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
cmp eax, 8
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jb 0x4373f8
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
shr eax, 3
lea edi, [ebx + 6]
lea esi, [ecx - 7]
mov dword [esp + 0x30], eax
xor eax, eax
xor ecx, ecx
mov al, byte [ebx]
mov cl, byte [edi - 5]
shl eax, 0x18
shl ecx, 0x10
or eax, ecx
xor ecx, ecx
mov cl, byte [edi - 4]
xor edx, edx
shl ecx, 8
or eax, ecx
mov dl, byte [edi - 1]
xor ecx, ecx
mov cl, byte [edi - 3]
or eax, ecx
xor ecx, ecx
mov cl, byte [edi - 2]
mov dword [esp + 0x10], eax
shl ecx, 0x18
shl edx, 0x10
or ecx, edx
xor edx, edx
mov dh, byte [edi]
mov dword [esp + 0x20], eax
or ecx, edx
xor edx, edx
mov dl, byte [edi + 1]
lea eax, [esp + 0x10]
or ecx, edx
push eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x28], ecx
mov ecx, ebp
call fcn.00436640
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
xor eax, ecx
mov ecx, dword [esp + 0x14]
add esi, 8
xor ecx, edx
mov edx, dword [esp + 0x20]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x1c], edx
mov edx, ecx
shr edx, 8
mov byte [esi + 6], cl
mov byte [esi + 5], dl
mov edx, ecx
add ebx, 8
shr edx, 0x10
shr ecx, 0x18
mov byte [esi + 4], dl
mov byte [esi + 3], cl
mov ecx, eax
mov edx, eax
shr ecx, 8
mov byte [esi + 2], al
mov byte [esi + 1], cl
shr edx, 0x10
shr eax, 0x18
mov byte [esi], dl
mov byte [esi - 1], al
mov eax, dword [esp + 0x30]
add edi, 8
dec eax
mov dword [esp + 0x30], eax
jne 0x4371d8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
cmp ecx, 2
jne 0x4373b5
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
cmp eax, 8
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jb 0x4373f8
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
shr eax, 3
lea edi, [ebx + 6]
lea esi, [ecx - 7]
mov dword [esp + 0x30], eax
xor eax, eax
xor ecx, ecx
mov al, byte [ebx]
mov cl, byte [edi - 5]
shl eax, 0x18
shl ecx, 0x10
or eax, ecx
xor ecx, ecx
mov cl, byte [edi - 4]
xor edx, edx
shl ecx, 8
or eax, ecx
xor ecx, ecx
mov cl, byte [edi - 3]
mov dh, byte [edi]
or eax, ecx
xor ecx, ecx
mov cl, byte [edi - 1]
mov dword [esp + 0x10], eax
xor eax, eax
mov al, byte [edi - 2]
shl eax, 0x18
shl ecx, 0x10
or eax, ecx
xor ecx, ecx
mov cl, byte [edi + 1]
or eax, edx
lea edx, [esp + 0x18]
or eax, ecx
push edx
mov ecx, ebp
mov dword [esp + 0x18], eax
call fcn.004362f0
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x20], eax
xor eax, edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x24], ecx
xor ecx, edx
mov edx, dword [esp + 0x20]
add esi, 8
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x1c], edx
mov edx, ecx
shr edx, 8
mov byte [esi + 6], cl
mov byte [esi + 5], dl
mov edx, ecx
add ebx, 8
shr edx, 0x10
shr ecx, 0x18
mov byte [esi + 4], dl
mov byte [esi + 3], cl
mov ecx, eax
mov edx, eax
shr ecx, 8
mov byte [esi + 2], al
mov byte [esi + 1], cl
shr edx, 0x10
shr eax, 0x18
mov byte [esi], dl
mov byte [esi - 1], al
mov eax, dword [esp + 0x30]
add edi, 8
dec eax
mov dword [esp + 0x30], eax
jne 0x4372e1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
cmp eax, 8
jb 0x4373f8
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x2c]
shr eax, 3
mov ebx, eax
lea eax, [esp + 0x10]
push eax
push edi
call fcn.00436bd0
add esp, 8
lea ecx, [esp + 0x10]
push ecx
mov ecx, ebp
call fcn.00436640
add esi, 8
lea edx, [esp + 0x10]
push esi
push edx
call fcn.00436c50
add esp, 8
add edi, 8
dec ebx
jne 0x4373c7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10