Function at 0x40ad82
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
and dword [ebp - 8], 0
push 0xf4
lea eax, [ebp - 0xfc]
push 0
push eax
mov byte [ebp - 0x108], 1
mov byte [ebp - 0x107], 0
mov byte [ebp - 0x106], 0
mov byte [ebp - 0x105], 0
mov byte [ebp - 0x104], 0
mov byte [ebp - 0x103], 0
mov byte [ebp - 0x102], 6
mov byte [ebp - 0x101], 0
mov byte [ebp - 0x100], 0xaa
mov byte [ebp - 0xff], 0
mov byte [ebp - 0xfe], 1
mov byte [ebp - 0xfd], 0x86
call fcn.00497bc6
add esp, 0xc
xor dl, dl
xor al, al
xor ecx, ecx
xor al, byte [ebp + ecx - 0xfe]
inc dl
movzx ecx, dl
cmp ecx, 2
jl 0x40adff
push ebx
push esi
push edi
push 0x4b56f0
mov byte [ebp - 0xfc], al
mov byte [ebp - 0xfb], 0xbb
call fcn.00409709
lea eax, [ebp - 0x108]
push 0xe
push eax
xor eax, eax
inc eax
call fcn.0040efba
mov esi, 0x49ed98
push esi
call fcn.00409709
mov ebx, dword [0x49e33c]
add esp, 0x10
push 0xa
call ebx
mov edi, 0x100
push edi
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 8]
call fcn.00496d28
test al, al
je 0x40b137
push 0xa
call ebx
push edi
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 8]
call fcn.00496d22
test al, al
je 0x40b129
cmp byte [ebp - 0x108], 3
jne 0x40b11a
mov ax, word [ebp - 0x102]
movzx ebx, ax
cmp ax, 6
jb 0x40b10f
lea ecx, [edi - 8]
cmp ax, cx
ja 0x40b10f
push 0x4b56f8
call fcn.00409709
movzx eax, bx
add eax, 8
push eax
lea eax, [ebp - 0x108]
xor edi, edi
push eax
inc edi
mov eax, edi
call fcn.0040efba
push esi
call fcn.00409709
sub bl, 6
add esp, 0x10
cmp byte [ebp - 0x100], 0xaa
mov byte [ebp - 4], bl
jne 0x40b100
movzx eax, byte [ebp - 0xfe]
movzx esi, bl
dec eax
cmp eax, esi
jne 0x40b0ef
lea edx, [esi + 2]
xor bl, bl
xor al, al
test edx, edx
jle 0x40af27
xor ecx, ecx
xor al, byte [ebp + ecx - 0xfe]
inc bl
movzx ecx, bl
cmp ecx, edx
jl 0x40af17
mov cl, byte [ebp + esi - 0xfc]
cmp al, cl
jne 0x40b0e0
mov byte [ebp + esi - 0xfb], 0xbb
movzx ecx, byte [ebp - 0xfd]
cmp ecx, 4
jg 0x40b046
je 0x40b03c
mov eax, ecx
sub eax, 0
je 0x40b068
dec eax
je 0x40af80
dec eax
je 0x40af76
dec eax
jne 0x40b061
mov eax, 0x4b5bd8
jmp 0x40b0d7
mov eax, 0x4b5bc4
jmp 0x40b0d7
cmp byte [ebp - 4], 1
jne 0x40b031
movzx ecx, byte [ebp - 0xfc]
lea eax, [ecx - 0x80]
cmp eax, 0x16
ja case.0x40af9d.134
jmp dword [eax*4 + 0x40b152]
mov eax, 0x4b5700
jmp 0x40b025
mov eax, 0x4b5710
jmp 0x40b025
mov eax, 0x4b5728
jmp 0x40b025
mov eax, 0x4b5754
jmp 0x40b025
mov eax, 0x4b577c
jmp 0x40b025
mov eax, 0x4b57b8
jmp 0x40b025
mov eax, 0x4b5800
jmp 0x40b025
mov eax, 0x4b5830
jmp 0x40b025
mov eax, 0x4b5850
jmp 0x40b025
mov eax, 0x4b5890
jmp 0x40b025
mov eax, 0x4b58c0
jmp 0x40b025
mov eax, 0x4b5900
jmp 0x40b025
mov eax, 0x4b5948
jmp 0x40b025
mov eax, 0x4b5974
jmp 0x40b025
mov eax, 0x4b59b0
jmp 0x40b025
mov eax, 0x4b59dc
jmp 0x40b025
mov eax, 0x4b5a0c
jmp 0x40b025
mov eax, 0x4b5a4c
jmp 0x40b025
mov eax, dword [ebp - 8]
push eax
push ecx
push 0x4b5aa8
jmp 0x40b0f6
push esi
push 0x4b5b18
jmp 0x40b143
mov eax, 0x4b5c04
jmp 0x40b0d7
mov eax, ecx
sub eax, 5
je 0x40b0d2
dec eax
dec eax
je 0x40b0cb
sub eax, 3
je 0x40b0c4
sub eax, 0xf5
je 0x40b068
mov eax, 0x4b5a80
jmp 0x40b0d7
mov dword [ebp - 8], edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x40b14a
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x40b14a
and dword [edi], 0
cmp byte [ebp - 4], 0
mov byte [ebx], 0
je 0x40b14a
push esi
push 0x40
call dword [0x49e32c]
mov dword [edi], eax
test eax, eax
je 0x40b0bb
push esi
lea ecx, [ebp - 0xfc]
push ecx
push eax
call fcn.00497bcc
mov al, byte [ebp - 4]
add esp, 0xc
mov byte [ebx], al
jmp 0x40b14a
and dword [ebp - 8], 0
jmp 0x40b14a
mov eax, 0x4b5c50
jmp 0x40b0d7
mov eax, 0x4b5c40
jmp 0x40b0d7
mov eax, 0x4b5c20
push eax
push ecx
push 0x4b5c90
jmp 0x40b0f6
movzx ecx, cl
movzx eax, al
push ecx
push eax
push 0x4b5d00
jmp 0x40b0f6
push eax
push esi
push 0x4b5d70
call fcn.00409709
add esp, 0xc
jmp 0x40b14a
movzx eax, byte [ebp - 0x100]
push eax
push 0x4b5e00
jmp 0x40b143
movzx eax, ax
push eax
push 0x4b5e68
jmp 0x40b143
movzx eax, byte [ebp - 0x108]
push eax
push 0x4b5ec8
jmp 0x40b143
call dword [0x49e330]
push eax
push 0x4b5f30
jmp 0x40b143
call dword [0x49e330]
push eax
push 0x4b5f98
call fcn.00409709
pop ecx
pop ecx
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret