Function at 0x403dd0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
test byte [str.P_bX_b], 1
push ebx
push esi
push edi
jne 0x403e14
mov al, byte [0x41f575]
rol al, 4
xor al, 0xaa
mov byte [0x41f575], al
je 0x403e0d
mov ecx, 0x41f575
jmp 0x403e00
mov al, byte [ecx + 1]
inc ecx
rol al, 4
xor al, 0xaa
mov byte [ecx], al
jne 0x403e00
or byte [str.P_bX_b], 1
push 0x1fc
xor edi, edi
lea ecx, [ebp - 0x208]
push edi
push ecx
mov dword [ebp - 0x20c], 0x41f575
call fcn.0040e850
add esp, 0xc
test byte [0x41f4d0], 1
jne 0x403e6b
mov dl, byte [0x41f4d1]
rol dl, 4
xor dl, 0xaa
mov byte [0x41f4d1], dl
je 0x403e64
mov ecx, 0x41f4d1
mov al, byte [ecx + 1]
inc ecx
rol al, 4
xor al, 0xaa
mov byte [ecx], al
jne 0x403e57
or byte [0x41f4d0], 1
test byte [0x4208c8], 1
jne 0x403e9a
or dword [0x4208c8], 1
push 0x418c70
mov dword [0x4208c4], edi
mov dword [0x4208c0], edi
mov dword [0x4208bc], edi
call fcn.004096b5
add esp, 4
test byte [0x41f4c4], 1
jne 0x403ed4
mov al, byte [0x41f4c5]
rol al, 4
xor al, 0xaa
mov byte [0x41f4c5], al
je 0x403ecd
mov ecx, 0x41f4c5
lea esp, [esp]
mov al, byte [ecx + 1]
inc ecx
rol al, 4
xor al, 0xaa
mov byte [ecx], al
jne 0x403ec0
or byte [0x41f4c4], 1
mov eax, 0x41f4c5
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403ee0
sub eax, edx
mov esi, eax
mov eax, dword [ebp + 0x10]
call fcn.00402080
lea esi, [eax + esi + 0x14]
cmp esi, edi
jg 0x403f1c
mov eax, dword [0x4208bc]
cmp eax, edi
je 0x403f0d
push eax
call fcn.00409587
add esp, 4
xor eax, eax
mov dword [0x4208c0], edi
mov dword [0x4208bc], eax
jmp 0x403f75
cmp esi, dword [0x4208c0]
jg 0x403f2f
mov ecx, dword [0x4208bc]
push esi
push edi
push ecx
jmp 0x403f68
mov eax, dword [0x4208bc]
cmp eax, edi
je 0x403f41
push eax
call fcn.00409587
add esp, 4
push esi
mov dword [0x4208c0], edi
mov dword [0x4208bc], edi
call fcn.00409507
add esp, 4
mov dword [0x4208bc], eax
cmp eax, edi
je 0x403f75
push esi
push edi
mov dword [0x4208c0], esi
push eax
call fcn.0040e850
mov eax, dword [0x4208bc]
add esp, 0xc
mov ebx, eax
cmp eax, edi
jne 0x403f86
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp + 0xc]
mov byte [eax], 0x2f
mov eax, dword [ebp + 0x10]
lea edx, [ebp - 0xc]
push edx
lea edi, [ebx + 1]
push eax
dec esi
mov eax, edi
mov dword [ebp - 0xc], esi
call fcn.00401d80
add esp, 8
test eax, eax
je 0x403f7b
test edi, edi
je 0x403fb4
mov ecx, dword [ebp - 0xc]
mov byte [edi + ecx], 0
test byte [0x41f4c4], 1
jne 0x403fea
mov dl, byte [0x41f4c5]
rol dl, 4
xor dl, 0xaa
mov byte [0x41f4c5], dl
je 0x403fe3
mov ecx, 0x41f4c5
mov al, byte [ecx + 1]
inc ecx
rol al, 4
xor al, 0xaa
mov byte [ecx], al
jne 0x403fd6
or byte [0x41f4c4], 1
push 0x41f4c5
push esi
push ebx
call fcn.0040949a
mov edi, dword [ebp + 8]
mov eax, dword [edi + 8]
add esp, 0xc
test eax, eax
je 0x404011
push eax
call dword [0x420708]
mov dword [edi + 8], 0
mov ecx, dword [edi + 4]
push 1
push 0
lea eax, [ebp - 0x20c]
push eax
push 0
push 0
push ebx
push 0x41bce0
push ecx
call dword [0x42070c]
mov dword [edi + 8], eax
test eax, eax
je 0x403f7b
lea eax, [ebp - 5]
mov byte [ebp - 5], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404045
sub eax, edx
mov edx, eax
mov eax, 0x41f4d1
lea ebx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404058
mov ecx, dword [edi + 0x10]
push ecx
push edx
lea edx, [ebp - 5]
sub eax, ebx
push edx
push eax
mov edx, 0x41f4d1
lea eax, [edi + 8]
call fcn.00404b50
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc