Function at 0x408381
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 0x4087b7
shr ebp, 4
cmp byte [edi], 0
mov dword [esp + 0x44], ebp
je 0x4083b3
push dword [esp + 0x48]
push ebp
push dword [esp + 0x48]
call fcn.004087bf
jmp 0x4087b7
lea ecx, [edi + 8]
mov dword [esp + 0x18], ecx
push esi
mov esi, ecx
test ebp, ebp
je 0x4087a0
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 0x408403
push ebx
push esi
lea eax, [esp + 0x3c]
push eax
call fcn.0040834f
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
jmp 0x40841d
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 + 0x447938]
mov dword [esp + 0x30], edx
xor ecx, dword [eax*4 + 0x447538]
mov eax, edx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x447d38]
mov eax, dword [esp + 0x14]
movzx eax, al
xor ecx, dword [eax*4 + 0x447138]
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 + 0x447938]
xor ecx, dword [eax*4 + 0x447538]
mov eax, dword [esp + 0x14]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x447d38]
movzx eax, bl
xor ecx, dword [eax*4 + 0x447138]
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 + 0x447938]
xor ecx, dword [eax*4 + 0x447538]
mov eax, ebx
shr eax, 0x18
shr ebx, 0x10
xor ecx, dword [eax*4 + 0x447d38]
mov eax, dword [esp + 0x18]
movzx eax, al
xor ecx, dword [eax*4 + 0x447138]
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 + 0x447538]
xor ecx, dword [eax*4 + 0x447938]
mov eax, dword [esp + 0x18]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x447d38]
movzx eax, dl
xor ecx, dword [eax*4 + 0x447138]
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 0x408667
lea ecx, [edi + 0x28]
mov ebp, ebx
mov dword [esp + 0x14], ecx
push ecx
push esi
lea eax, [esp + 0x2c]
push eax
call fcn.0040834f
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 + 0x447138]
xor ecx, dword [eax*4 + 0x447538]
movzx eax, byte [esp + 0x2e]
xor ecx, dword [eax*4 + 0x447938]
movzx eax, byte [esp + 0x33]
xor ecx, dword [eax*4 + 0x447d38]
movzx eax, byte [esp + 0x27]
mov dword [esi], ecx
movzx ecx, dl
mov edx, dword [eax*4 + 0x447d38]
movzx eax, bh
xor edx, dword [ecx*4 + 0x447138]
movzx ecx, byte [esp + 0x2b]
xor edx, dword [eax*4 + 0x447538]
movzx eax, byte [esp + 0x32]
xor edx, dword [eax*4 + 0x447938]
movzx eax, byte [esp + 0x26]
mov dword [ebp], edx
mov edx, dword [eax*4 + 0x447938]
xor edx, dword [ecx*4 + 0x447d38]
movzx ecx, byte [esp + 0x2a]
movzx eax, bl
mov ebx, dword [esp + 0x30]
xor edx, dword [eax*4 + 0x447138]
movzx eax, bh
xor edx, dword [eax*4 + 0x447538]
mov eax, dword [esp + 0x24]
movzx eax, ah
mov dword [ebp + 4], edx
mov edx, dword [eax*4 + 0x447538]
xor edx, dword [ecx*4 + 0x447938]
movzx eax, byte [esp + 0x2f]
mov ecx, dword [esp + 0x14]
add ecx, 0x10
mov dword [esp + 0x14], ecx
xor edx, dword [eax*4 + 0x447d38]
movzx eax, bl
mov ebx, dword [esp + 0x18]
xor edx, dword [eax*4 + 0x447138]
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 0x408562
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.0040834f
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
movzx eax, dl
mov al, byte [eax*4 + 0x447139]
mov byte [esi], al
movzx eax, ch
mov al, byte [eax*4 + 0x447139]
mov byte [ebx - 3], al
movzx eax, byte [esp + 0x2e]
mov al, byte [eax*4 + 0x447139]
mov byte [ebx - 2], al
movzx eax, byte [esp + 0x33]
mov al, byte [eax*4 + 0x447139]
mov byte [ebx - 1], al
movzx eax, cl
mov ecx, dword [esp + 0x2c]
mov al, byte [eax*4 + 0x447139]
mov byte [ebx], al
movzx eax, ch
mov al, byte [eax*4 + 0x447139]
mov byte [ebx + 1], al
movzx eax, byte [esp + 0x32]
mov al, byte [eax*4 + 0x447139]
mov byte [ebx + 2], al
movzx eax, byte [esp + 0x27]
mov al, byte [eax*4 + 0x447139]
mov byte [ebx + 3], al
movzx eax, cl
mov ecx, dword [esp + 0x30]
mov al, byte [eax*4 + 0x447139]
mov byte [ebx + 4], al
movzx eax, ch
mov al, byte [eax*4 + 0x447139]
mov byte [ebx + 5], al
movzx eax, byte [esp + 0x26]
mov al, byte [eax*4 + 0x447139]
mov byte [ebx + 6], al
movzx eax, byte [esp + 0x2b]
mov al, byte [eax*4 + 0x447139]
mov byte [ebx + 7], al
movzx eax, cl
mov al, byte [eax*4 + 0x447139]
mov byte [ebx + 8], al
movzx eax, dh
mov al, byte [eax*4 + 0x447139]
mov byte [ebx + 9], al
movzx eax, byte [esp + 0x2a]
mov al, byte [eax*4 + 0x447139]
mov byte [ebx + 0xa], al
movzx eax, byte [esp + 0x2f]
mov al, byte [eax*4 + 0x447139]
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.0040834f
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 0x4083dc
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