Function at 0x405007
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x34
push ebp
mov ebp, dword [esp + 0x40]
push edi
mov edi, ecx
test ebp, ebp
je 0x40543d
shr ebp, 4
cmp byte [edi], 0
mov dword [esp + 0x44], ebp
je 0x405039
push dword [esp + 0x48]
push ebp
push dword [esp + 0x48]
call fcn.00405445
jmp 0x40543d
lea ecx, [edi + 8]
mov dword [esp + 0x18], ecx
push esi
mov esi, ecx
test ebp, ebp
je 0x405426
mov eax, dword [esp + 0x4c]
add eax, 4
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x44]
add eax, 8
mov dword [esp + 0x18], eax
push ebx
cmp byte [edi + 1], 0
lea ebx, [eax - 8]
je 0x405089
push ebx
push esi
lea eax, [esp + 0x3c]
push eax
call fcn.00404fd5
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
jmp 0x4050a3
mov ebx, dword [ebx]
mov esi, dword [eax - 4]
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], ecx
mov eax, dword [edi + 0x18]
xor eax, ebx
mov ebx, dword [edi + 0x1c]
mov dword [esp + 0x14], eax
xor ebx, esi
mov dword [esp + 0x24], eax
mov eax, dword [edi + 0x20]
xor eax, edx
mov esi, dword [esp + 0x10]
mov edx, dword [edi + 0x24]
add esi, 0xfffffffc
mov dword [esp + 0x18], eax
xor edx, ecx
mov dword [esp + 0x2c], eax
shr eax, 0x10
movzx ecx, al
mov eax, ebx
shr eax, 8
movzx eax, al
mov dword [esp + 0x28], ebx
mov ecx, dword [ecx*4 + 0x43a7b8]
mov dword [esp + 0x30], edx
xor ecx, dword [eax*4 + 0x43a3b8]
mov eax, edx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x43abb8]
mov eax, dword [esp + 0x14]
movzx eax, al
xor ecx, dword [eax*4 + 0x439fb8]
mov eax, edx
shr eax, 0x10
mov dword [esi], ecx
movzx ecx, al
mov eax, dword [esp + 0x18]
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x43a7b8]
xor ecx, dword [eax*4 + 0x43a3b8]
mov eax, dword [esp + 0x14]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x43abb8]
movzx eax, bl
xor ecx, dword [eax*4 + 0x439fb8]
mov eax, dword [esp + 0x10]
mov dword [eax], ecx
mov eax, dword [esp + 0x14]
shr eax, 0x10
movzx ecx, al
mov eax, edx
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x43a7b8]
xor ecx, dword [eax*4 + 0x43a3b8]
mov eax, ebx
shr eax, 0x18
shr ebx, 0x10
xor ecx, dword [eax*4 + 0x43abb8]
mov eax, dword [esp + 0x18]
movzx eax, al
xor ecx, dword [eax*4 + 0x439fb8]
mov eax, dword [esp + 0x10]
mov dword [eax + 4], ecx
mov eax, dword [esp + 0x14]
shr eax, 8
movzx ecx, al
movzx eax, bl
mov ebx, dword [esp + 0x10]
mov ecx, dword [ecx*4 + 0x43a3b8]
xor ecx, dword [eax*4 + 0x43a7b8]
mov eax, dword [esp + 0x18]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x43abb8]
movzx eax, dl
xor ecx, dword [eax*4 + 0x439fb8]
mov dword [ebx + 8], ecx
xor ecx, ecx
mov edx, dword [edi + 4]
inc ecx
mov dword [esp + 0x18], ecx
lea eax, [edx - 1]
cmp eax, ecx
jle 0x4052ed
lea ecx, [edi + 0x28]
mov ebp, ebx
mov dword [esp + 0x14], ecx
push ecx
push esi
lea eax, [esp + 0x2c]
push eax
call fcn.00404fd5
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
movzx ecx, al
movzx eax, dh
mov ebx, dword [esp + 0x2c]
mov ecx, dword [ecx*4 + 0x439fb8]
xor ecx, dword [eax*4 + 0x43a3b8]
movzx eax, byte [esp + 0x2e]
xor ecx, dword [eax*4 + 0x43a7b8]
movzx eax, byte [esp + 0x33]
xor ecx, dword [eax*4 + 0x43abb8]
movzx eax, byte [esp + 0x27]
mov dword [esi], ecx
movzx ecx, dl
mov edx, dword [eax*4 + 0x43abb8]
movzx eax, bh
xor edx, dword [ecx*4 + 0x439fb8]
movzx ecx, byte [esp + 0x2b]
xor edx, dword [eax*4 + 0x43a3b8]
movzx eax, byte [esp + 0x32]
xor edx, dword [eax*4 + 0x43a7b8]
movzx eax, byte [esp + 0x26]
mov dword [ebp], edx
mov edx, dword [eax*4 + 0x43a7b8]
xor edx, dword [ecx*4 + 0x43abb8]
movzx ecx, byte [esp + 0x2a]
movzx eax, bl
mov ebx, dword [esp + 0x30]
xor edx, dword [eax*4 + 0x439fb8]
movzx eax, bh
xor edx, dword [eax*4 + 0x43a3b8]
mov eax, dword [esp + 0x24]
movzx eax, ah
mov dword [ebp + 4], edx
mov edx, dword [eax*4 + 0x43a3b8]
xor edx, dword [ecx*4 + 0x43a7b8]
movzx eax, byte [esp + 0x2f]
mov ecx, dword [esp + 0x14]
add ecx, 0x10
mov dword [esp + 0x14], ecx
xor edx, dword [eax*4 + 0x43abb8]
movzx eax, bl
mov ebx, dword [esp + 0x18]
xor edx, dword [eax*4 + 0x439fb8]
inc ebx
mov dword [ebp + 8], edx
mov edx, dword [edi + 4]
mov dword [esp + 0x18], ebx
lea eax, [edx - 1]
cmp ebx, eax
jl 0x4051e8
mov ebp, dword [esp + 0x4c]
mov ebx, dword [esp + 0x10]
shl edx, 4
lea eax, [edi + 8]
add eax, edx
push eax
push esi
lea eax, [esp + 0x2c]
push eax
call fcn.00404fd5
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
movzx eax, dl
mov al, byte [eax*4 + 0x439fb9]
mov byte [esi], al
movzx eax, ch
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx - 3], al
movzx eax, byte [esp + 0x2e]
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx - 2], al
movzx eax, byte [esp + 0x33]
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx - 1], al
movzx eax, cl
mov ecx, dword [esp + 0x2c]
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx], al
movzx eax, ch
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx + 1], al
movzx eax, byte [esp + 0x32]
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx + 2], al
movzx eax, byte [esp + 0x27]
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx + 3], al
movzx eax, cl
mov ecx, dword [esp + 0x30]
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx + 4], al
movzx eax, ch
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx + 5], al
movzx eax, byte [esp + 0x26]
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx + 6], al
movzx eax, byte [esp + 0x2b]
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx + 7], al
movzx eax, cl
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx + 8], al
movzx eax, dh
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx + 9], al
movzx eax, byte [esp + 0x2a]
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx + 0xa], al
movzx eax, byte [esp + 0x2f]
mov al, byte [eax*4 + 0x439fb9]
mov byte [ebx + 0xb], al
mov eax, dword [edi + 4]
shl eax, 4
add eax, 0x18
add eax, edi
push eax
push esi
push esi
call fcn.00404fd5
mov eax, dword [esp + 0x1c]
add ebx, 0x10
add eax, 0x10
mov dword [esp + 0x10], ebx
sub ebp, 1
mov dword [esp + 0x1c], eax
mov dword [esp + 0x4c], ebp
jne 0x405062
mov ecx, dword [esp + 0x20]
pop ebx
mov eax, dword [esi]
mov dword [ecx], eax
mov eax, dword [esi + 4]
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0xc]
mov dword [ecx + 0xc], eax
pop esi
pop edi
pop ebp
add esp, 0x34
ret 0xc