Function at 0x401820
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [ebp - 0x1c], edx
lea esi, [ebp - 0x14]
mov edi, ecx
mov ebx, 4
mov ecx, edi
mov edx, 4
mov al, byte [ecx]
lea ecx, [ecx + 4]
mov byte [esi], al
inc esi
dec edx
jne 0x401847
inc edi
dec ebx
jne 0x401840
mov edx, dword [0x41a138]
lea ecx, [ebp - 0x10]
add edx, 2
lea esi, [ebx + 4]
movzx eax, byte [edx - 2]
lea ecx, [ecx + 1]
xor byte [ecx - 5], al
lea edx, [edx + 4]
movzx eax, byte [edx - 5]
xor byte [ecx - 1], al
movzx eax, byte [edx - 4]
xor byte [ecx + 3], al
movzx eax, byte [edx - 3]
xor byte [ecx + 7], al
dec esi
jne 0x401865
cmp dword [0x41a130], 1
mov bh, 1
jle 0x401969
mov dword [ebp - 0x18], 1
lea edx, [ebp - 0x14]
mov edi, 4
jmp 0x4018b0
mov esi, 4
movzx ecx, byte [edx]
mov eax, ecx
and ecx, 0xf
and eax, 0xfffffff0
mov al, byte [eax + ecx + 0x4166f0]
mov byte [edx], al
inc edx
dec esi
jne 0x4018b5
dec edi
jne 0x4018b0
mov bl, 1
lea edi, [esi + 1]
lea eax, [ebp - 0x10]
test bl, bl
je 0x4018fc
mov esi, edi
mov edi, edi
mov dl, byte [eax]
movzx ecx, byte [eax + 1]
mov byte [eax], cl
movzx ecx, byte [eax + 2]
mov byte [eax + 1], cl
movzx ecx, byte [eax + 3]
mov byte [eax + 2], cl
mov byte [eax + 3], dl
dec esi
jne 0x4018e0
inc bl
inc edi
add eax, 4
cmp bl, 4
jb 0x4018d8
lea ecx, [ebp - 0x14]
call fcn.00401070
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x10]
mov edx, dword [0x41a138]
mov esi, 4
shl eax, 4
add edx, 2
add edx, eax
jmp 0x401930
movzx eax, byte [edx - 2]
lea edx, [edx + 4]
xor byte [ecx - 4], al
lea ecx, [ecx + 1]
movzx eax, byte [edx - 5]
xor byte [ecx - 1], al
movzx eax, byte [edx - 4]
xor byte [ecx + 3], al
movzx eax, byte [edx - 3]
xor byte [ecx + 7], al
dec esi
jne 0x401930
inc bh
movzx eax, bh
mov dword [ebp - 0x18], eax
cmp eax, dword [0x41a130]
jl 0x4018a0
lea edx, [ebp - 0x14]
mov edi, 4
mov esi, 4
movzx ecx, byte [edx]
mov eax, ecx
and ecx, 0xf
and eax, 0xfffffff0
mov al, byte [eax + ecx + 0x4166f0]
mov byte [edx], al
inc edx
dec esi
jne 0x401976
dec edi
jne 0x401971
mov bl, 1
lea edi, [esi + 1]
lea edx, [ebp - 0x10]
lea esp, [esp]
test bl, bl
je 0x4019c2
mov esi, edi
mov cl, byte [edx]
movzx eax, byte [edx + 1]
mov byte [edx], al
movzx eax, byte [edx + 2]
mov byte [edx + 1], al
movzx eax, byte [edx + 3]
mov byte [edx + 2], al
mov byte [edx + 3], cl
dec esi
jne 0x4019a6
inc bl
inc edi
add edx, 4
cmp bl, 4
jb 0x4019a0
mov eax, dword [0x41a130]
lea ecx, [ebp - 0x10]
mov edx, dword [0x41a138]
mov esi, 4
movzx eax, al
add edx, 2
shl eax, 4
add edx, eax
jmp 0x4019f0
movzx eax, byte [edx - 2]
lea edx, [edx + 4]
xor byte [ecx - 4], al
lea ecx, [ecx + 1]
movzx eax, byte [edx - 5]
xor byte [ecx - 1], al
movzx eax, byte [edx - 4]
xor byte [ecx + 3], al
movzx eax, byte [edx - 3]
xor byte [ecx + 7], al
dec esi
jne 0x4019f0
mov ebx, dword [ebp - 0x1c]
lea ecx, [ebp - 0x14]
lea edi, [esi + 4]
mov edi, edi
mov edx, ebx
mov esi, 4
mov al, byte [ecx]
lea edx, [edx + 4]
inc ecx
mov byte [edx - 4], al
dec esi
jne 0x401a27
inc ebx
dec edi
jne 0x401a20
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404cd7
mov esp, ebp
pop ebp
ret