Function at 0x404df5
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x30
push ebp
mov ebp, dword [esp + 0x3c]
push esi
mov esi, ecx
test ebp, ebp
je 0x405237
shr ebp, 4
cmp byte [esi], 0
mov dword [esp + 0x40], ebp
je 0x404e27
push dword [esp + 0x44]
push ebp
push dword [esp + 0x44]
call fcn.0040523f
jmp 0x405237
lea ecx, [esi + 8]
mov dword [esp + 0x14], ecx
push edi
mov edi, ecx
test ebp, ebp
je 0x405220
mov eax, dword [esp + 0x48]
add eax, 4
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x40]
add eax, 8
mov dword [esp + 0x10], eax
push ebx
cmp byte [esi + 1], 0
je 0x404e77
add eax, 0xfffffff8
push eax
push edi
lea eax, [esp + 0x38]
push eax
call fcn.00404dc3
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
mov ebx, dword [esp + 0x30]
jmp 0x404e92
mov ebx, dword [eax - 8]
mov edi, dword [eax - 4]
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], ecx
mov eax, dword [esi + 0x18]
xor eax, ebx
mov ebx, dword [esi + 0x20]
mov dword [esp + 0x10], eax
xor ebx, edx
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x1c]
xor eax, edi
mov edx, dword [esi + 0x24]
mov dword [esp + 0x44], eax
xor edx, ecx
mov dword [esp + 0x24], eax
mov ecx, edx
shr ecx, 0x18
mov eax, ebx
shr eax, 0x10
movzx eax, al
mov edi, dword [esp + 0x4c]
mov ecx, dword [ecx*4 + 0x438d40]
add edi, 0xfffffffc
mov dword [esp + 0x18], edx
xor ecx, dword [eax*4 + 0x438940]
mov eax, dword [esp + 0x44]
shr eax, 8
movzx eax, al
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], ebx
xor ecx, dword [eax*4 + 0x438540]
mov eax, dword [esp + 0x10]
movzx eax, al
xor ecx, dword [eax*4 + 0x438140]
mov eax, edx
shr eax, 0x10
mov dword [edi], ecx
movzx ecx, al
mov eax, ebx
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x438940]
xor ecx, dword [eax*4 + 0x438540]
mov eax, dword [esp + 0x10]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x438d40]
mov eax, dword [esp + 0x44]
movzx eax, al
xor ecx, dword [eax*4 + 0x438140]
mov eax, dword [esp + 0x4c]
mov dword [eax], ecx
mov eax, edx
mov ecx, dword [esp + 0x44]
shr eax, 8
movzx eax, al
shr ecx, 0x18
mov edx, dword [eax*4 + 0x438540]
xor edx, dword [ecx*4 + 0x438d40]
mov eax, dword [esp + 0x10]
shr eax, 0x10
movzx eax, al
xor edx, dword [eax*4 + 0x438940]
movzx eax, bl
shr ebx, 0x18
xor edx, dword [eax*4 + 0x438140]
mov eax, dword [esp + 0x4c]
mov dword [eax + 4], edx
mov eax, dword [esp + 0x44]
mov ecx, dword [ebx*4 + 0x438d40]
mov ebx, dword [esp + 0x4c]
shr eax, 0x10
movzx eax, al
xor ecx, dword [eax*4 + 0x438940]
mov eax, dword [esp + 0x10]
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x438540]
mov eax, dword [esp + 0x18]
movzx eax, al
xor ecx, dword [eax*4 + 0x438140]
mov dword [ebx + 8], ecx
xor ecx, ecx
inc ecx
mov dword [esp + 0x44], ecx
mov eax, dword [esi + 4]
dec eax
cmp eax, ecx
jle 0x4050e4
lea ecx, [esi + 0x28]
mov ebp, ebx
mov dword [esp + 0x10], ecx
push ecx
push edi
lea eax, [esp + 0x28]
push eax
call fcn.00404dc3
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
movzx ecx, al
movzx eax, dh
mov ebx, dword [esp + 0x28]
mov ecx, dword [ecx*4 + 0x438140]
xor ecx, dword [eax*4 + 0x438540]
movzx eax, byte [esp + 0x2a]
xor ecx, dword [eax*4 + 0x438940]
movzx eax, byte [esp + 0x2f]
xor ecx, dword [eax*4 + 0x438d40]
movzx eax, byte [esp + 0x23]
mov dword [edi], ecx
movzx ecx, dl
mov edx, dword [eax*4 + 0x438d40]
movzx eax, bh
xor edx, dword [ecx*4 + 0x438140]
movzx ecx, byte [esp + 0x27]
xor edx, dword [eax*4 + 0x438540]
movzx eax, byte [esp + 0x2e]
xor edx, dword [eax*4 + 0x438940]
movzx eax, byte [esp + 0x22]
mov dword [ebp], edx
mov edx, dword [eax*4 + 0x438940]
xor edx, dword [ecx*4 + 0x438d40]
movzx ecx, byte [esp + 0x26]
movzx eax, bl
mov ebx, dword [esp + 0x2c]
xor edx, dword [eax*4 + 0x438140]
movzx eax, bh
xor edx, dword [eax*4 + 0x438540]
mov eax, dword [esp + 0x20]
movzx eax, ah
mov dword [ebp + 4], edx
mov edx, dword [eax*4 + 0x438540]
xor edx, dword [ecx*4 + 0x438940]
movzx eax, byte [esp + 0x2b]
mov ecx, dword [esp + 0x10]
add ecx, 0x10
mov dword [esp + 0x10], ecx
xor edx, dword [eax*4 + 0x438d40]
movzx eax, bl
xor edx, dword [eax*4 + 0x438140]
mov dword [ebp + 8], edx
mov edx, dword [esp + 0x44]
mov eax, dword [esi + 4]
inc edx
dec eax
mov dword [esp + 0x44], edx
cmp edx, eax
jl 0x404fe1
mov ebp, dword [esp + 0x48]
mov ebx, dword [esp + 0x4c]
mov eax, dword [esi + 4]
shl eax, 4
add eax, 8
add eax, esi
push eax
push edi
lea eax, [esp + 0x28]
push eax
call fcn.00404dc3
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
movzx eax, dl
mov al, byte [eax*4 + 0x438141]
mov byte [edi], al
movzx eax, ch
mov al, byte [eax*4 + 0x438141]
mov byte [ebx - 3], al
movzx eax, byte [esp + 0x2a]
mov al, byte [eax*4 + 0x438141]
mov byte [ebx - 2], al
movzx eax, byte [esp + 0x2f]
mov al, byte [eax*4 + 0x438141]
mov byte [ebx - 1], al
movzx eax, cl
mov ecx, dword [esp + 0x28]
mov al, byte [eax*4 + 0x438141]
mov byte [ebx], al
movzx eax, ch
mov al, byte [eax*4 + 0x438141]
mov byte [ebx + 1], al
movzx eax, byte [esp + 0x2e]
mov al, byte [eax*4 + 0x438141]
mov byte [ebx + 2], al
movzx eax, byte [esp + 0x23]
mov al, byte [eax*4 + 0x438141]
mov byte [ebx + 3], al
movzx eax, cl
mov ecx, dword [esp + 0x2c]
mov al, byte [eax*4 + 0x438141]
mov byte [ebx + 4], al
movzx eax, ch
mov al, byte [eax*4 + 0x438141]
mov byte [ebx + 5], al
movzx eax, byte [esp + 0x22]
mov al, byte [eax*4 + 0x438141]
mov byte [ebx + 6], al
movzx eax, byte [esp + 0x27]
mov al, byte [eax*4 + 0x438141]
mov byte [ebx + 7], al
movzx eax, cl
mov al, byte [eax*4 + 0x438141]
mov byte [ebx + 8], al
movzx eax, dh
mov al, byte [eax*4 + 0x438141]
mov byte [ebx + 9], al
movzx eax, byte [esp + 0x26]
mov al, byte [eax*4 + 0x438141]
mov byte [ebx + 0xa], al
movzx eax, byte [esp + 0x2b]
mov al, byte [eax*4 + 0x438141]
mov byte [ebx + 0xb], al
mov eax, dword [esi + 4]
shl eax, 4
add eax, 0x18
add eax, esi
push eax
push edi
push edi
call fcn.00404dc3
mov eax, dword [esp + 0x14]
add ebx, 0x10
add eax, 0x10
mov dword [esp + 0x4c], ebx
sub ebp, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x48], ebp
jne 0x404e50
mov ecx, dword [esp + 0x1c]
pop ebx
mov eax, dword [edi]
mov dword [ecx], eax
mov eax, dword [edi + 4]
mov dword [ecx + 4], eax
mov eax, dword [edi + 8]
mov dword [ecx + 8], eax
mov eax, dword [edi + 0xc]
mov dword [ecx + 0xc], eax
pop edi
pop esi
pop ebp
add esp, 0x30
ret 0xc