Function at 0x40aba0
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
sub esp, 0x150
mov ebx, dword [esp + 0x164]
push 4
call fcn.004496d0
pop ecx
mov edi, eax
test edi, edi
je 0x40abc8
mov ecx, edi
call fcn.0040ab50
mov edi, eax
cmp byte [esp + 0x168], 1
jne 0x40ac00
push 0x40
push 0
push 0
push 2
movzx ebx, bx
push ebx
mov eax, dword [0x4f5eb4]
push eax
call dword [0x4ea8c8]
mov dword [edi], eax
mov eax, edi
add esp, 0x150
pop ebp
pop edi
pop esi
pop ebx
ret
push pe_nt_image_headers32
push 0
lea eax, [esp + 0x58]
push eax
call fcn.0040cf20
add esp, 0xc
push pe_nt_image_headers32
push 0
lea eax, [esp + 0xd8]
push eax
call fcn.0040cf20
add esp, 0xc
lea edx, [esp + 8]
push edx
lea eax, [esp + 8]
push eax
push ebx
call fcn.004980a0
add esp, 0xc
test al, al
je 0x40afb7
push 0
mov ebp, dword [esp + 0xc]
push ebp
mov eax, dword [esp + 0xc]
push eax
call dword [0x4ea73c]
push 0x44
lea esi, [esp + 0x10]
push esi
mov eax, dword [esp + 0xc]
push eax
call dword [0x4ea740]
xor eax, eax
lea eax, [eax]
xor ecx, ecx
mov edx, eax
mov ebp, ecx
imul ebp, ebp, 4
add edx, ebp
mov byte [esp + edx + 0x50], 0
mov ebx, eax
mov esi, ecx
imul esi, esi, 4
add ebx, esi
mov byte [esp + ebx + 0xd0], 0xff
mov edx, eax
mov ebp, ecx
imul ebp, ebp, 4
add edx, ebp
mov byte [esp + edx + 0x54], 0
mov ebx, eax
mov esi, ecx
imul esi, esi, 4
add ebx, esi
mov byte [esp + ebx + 0xd4], 0xff
mov edx, eax
mov ebp, ecx
imul ebp, ebp, 4
add edx, ebp
mov byte [esp + edx + 0x58], 0
mov ebx, eax
mov esi, ecx
imul esi, esi, 4
add ebx, esi
mov byte [esp + ebx + 0xd8], 0xff
mov edx, eax
mov ebp, ecx
imul ebp, ebp, 4
add edx, ebp
mov byte [esp + edx + 0x5c], 0
mov ebx, eax
mov esi, ecx
imul esi, esi, 4
add ebx, esi
mov byte [esp + ebx + 0xdc], 0xff
mov edx, eax
mov ebp, ecx
imul ebp, ebp, 4
add edx, ebp
mov byte [esp + edx + 0x60], 0
mov ebx, eax
mov esi, ecx
imul esi, esi, 4
add ebx, esi
mov byte [esp + ebx + 0xe0], 0xff
mov edx, eax
mov ebp, ecx
imul ebp, ebp, 4
add edx, ebp
mov byte [esp + edx + 0x64], 0
mov ebx, eax
mov esi, ecx
imul esi, esi, 4
add ebx, esi
mov byte [esp + ebx + 0xe4], 0xff
mov edx, eax
mov ebp, ecx
imul ebp, ebp, 4
add edx, ebp
mov byte [esp + edx + 0x68], 0
mov ebx, eax
mov esi, ecx
imul esi, esi, 4
add ebx, esi
mov byte [esp + ebx + 0xe8], 0xff
mov edx, eax
mov ebp, ecx
imul ebp, ebp, 4
add edx, ebp
mov byte [esp + edx + 0x6c], 0
mov ebx, eax
mov esi, ecx
imul esi, esi, 4
add ebx, esi
mov byte [esp + ebx + 0xec], 0xff
add ecx, 8
cmp ecx, 0x20
jl 0x40ac72
inc eax
cmp eax, 4
jl 0x40ac70
xor eax, eax
xor edx, edx
mov ebp, eax
mov ebx, edx
imul ebx, ebx, 2
add ebp, ebx
mov esi, eax
mov ecx, edx
imul ecx, ecx, 2
add esi, ecx
movzx ecx, byte [esp + esi + 0x2c]
mov bl, cl
xor bl, byte [esp + ebp + 0xc]
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
mov byte [esp + ebp + 0x50], bl
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
not cl
mov byte [esp + ebp + 0xd0], cl
mov ebp, eax
mov ebx, edx
imul ebx, ebx, 2
add ebp, ebx
mov esi, eax
mov ecx, edx
imul ecx, ecx, 2
add esi, ecx
movzx ecx, byte [esp + esi + 0x2e]
mov bl, cl
xor bl, byte [esp + ebp + 0xe]
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
mov byte [esp + ebp + 0x54], bl
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
not cl
mov byte [esp + ebp + 0xd4], cl
mov ebp, eax
mov ebx, edx
imul ebx, ebx, 2
add ebp, ebx
mov esi, eax
mov ecx, edx
imul ecx, ecx, 2
add esi, ecx
movzx ecx, byte [esp + esi + 0x30]
mov bl, cl
xor bl, byte [esp + ebp + 0x10]
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
mov byte [esp + ebp + 0x58], bl
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
not cl
mov byte [esp + ebp + 0xd8], cl
mov ebp, eax
mov ebx, edx
imul ebx, ebx, 2
add ebp, ebx
mov esi, eax
mov ecx, edx
imul ecx, ecx, 2
add esi, ecx
movzx ecx, byte [esp + esi + 0x32]
mov bl, cl
xor bl, byte [esp + ebp + 0x12]
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
mov byte [esp + ebp + 0x5c], bl
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
not cl
mov byte [esp + ebp + 0xdc], cl
mov ebp, eax
mov ebx, edx
imul ebx, ebx, 2
add ebp, ebx
mov esi, eax
mov ecx, edx
imul ecx, ecx, 2
add esi, ecx
movzx ecx, byte [esp + esi + 0x34]
mov bl, cl
xor bl, byte [esp + ebp + 0x14]
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
mov byte [esp + ebp + 0x60], bl
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
not cl
mov byte [esp + ebp + 0xe0], cl
mov ebp, eax
mov ebx, edx
imul ebx, ebx, 2
add ebp, ebx
mov esi, eax
mov ecx, edx
imul ecx, ecx, 2
add esi, ecx
movzx ecx, byte [esp + esi + 0x36]
mov bl, cl
xor bl, byte [esp + ebp + 0x16]
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
mov byte [esp + ebp + 0x64], bl
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
not cl
mov byte [esp + ebp + 0xe4], cl
mov ebp, eax
mov ebx, edx
imul ebx, ebx, 2
add ebp, ebx
mov esi, eax
mov ecx, edx
imul ecx, ecx, 2
add esi, ecx
movzx ecx, byte [esp + esi + 0x38]
mov bl, cl
xor bl, byte [esp + ebp + 0x18]
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
mov byte [esp + ebp + 0x68], bl
mov ebp, eax
mov esi, edx
imul esi, esi, 4
add ebp, esi
not cl
mov byte [esp + ebp + 0xe8], cl
mov ebp, eax
mov ebx, edx
imul ebx, ebx, 2
add ebp, ebx
mov esi, eax
mov ecx, edx
imul ecx, ecx, 2
add esi, ecx
movzx ecx, byte [esp + esi + 0x3a]
mov bl, cl
xor bl, byte [esp + ebp + 0x1a]
mov esi, eax
mov ebp, edx
imul ebp, ebp, 4
add esi, ebp
mov byte [esp + esi + 0x6c], bl
mov ebx, eax
mov ebp, edx
imul ebp, ebp, 4
add ebx, ebp
not cl
mov byte [esp + ebx + 0xec], cl
add edx, 8
cmp edx, 0x10
jl 0x40ad84
inc eax
cmp eax, 2
jl 0x40ad82
lea ebp, [esp + 0x50]
push ebp
lea eax, [esp + 0xd4]
push eax
push 0x20
push 0x20
mov eax, dword [esp + 0x5c]
push eax
call fcn.0041ef70
pop ecx
movsx ebx, ax
push ebx
mov eax, dword [esp + 0x62]
push eax
call fcn.0041ef70
pop ecx
movsx ebp, ax
push ebp
mov eax, dword [0x4f5eb4]
push eax
call dword [0x4ea8cc]
mov dword [edi], eax
mov eax, edi
add esp, 0x150
pop ebp
pop edi
pop esi
pop ebx
ret