Function at 0x4033c0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
mov eax, dword [0x565e78]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
test eax, eax
push edi
mov edi, dword [esp + 0x28]
jne 0x4033ee
mov eax, 0xfffffffc
pop edi
mov ecx, dword [esp + 0x14]
call fcn.004b6cac
add esp, 0x18
ret 0xc
push esi
mov esi, ecx
and esi, 0x80000007
jns 0x4033fe
dec esi
or esi, 0xfffffff8
inc esi
je 0x403414
pop esi
or eax, 0xffffffff
pop edi
mov ecx, dword [esp + 0x14]
call fcn.004b6cac
add esp, 0x18
ret 0xc
test edi, edi
jne 0x40342e
pop esi
mov eax, 0xfffffffe
pop edi
mov ecx, dword [esp + 0x14]
call fcn.004b6cac
add esp, 0x18
ret 0xc
test edx, edx
jne 0x403438
mov dword [esp + 0xc], edx
jmp 0x403441
mov esi, dword [edx]
mov edx, dword [edx + 4]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
add eax, ecx
mov dword [esp + 0x10], edx
push ebx
mov esi, 0x53a610
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
push ebp
mov dword [esp + 0x1c], eax
lea ebx, [esp + 0x14]
lea ebp, [esp + 0x1c]
je 0x40346e
sbb edx, edx
sbb edx, 0xffffffff
test edx, edx
jne 0x4034b5
cmp dword [esp + 0x30], eax
jae 0x4036f9
lea esp, [esp]
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x2c]
call fcn.00403290
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
add eax, 8
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x403480
pop ebp
pop ebx
pop esi
xor eax, eax
pop edi
mov ecx, dword [esp + 0x14]
call fcn.004b6cac
add esp, 0x18
ret 0xc
mov edi, dword [esp + 0x34]
mov esi, 0x53a60c
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4034ce
sbb edx, edx
sbb edx, 0xffffffff
test edx, edx
jne 0x40358a
mov ecx, dword [esp + 0x30]
cmp ecx, eax
jae 0x4036f9
sub eax, ecx
dec eax
shr eax, 3
inc eax
lea edi, [ecx + 2]
mov dword [esp + 0x30], eax
mov eax, dword [edi - 2]
mov ecx, dword [edi + 2]
mov esi, dword [esp + 0x2c]
lea edx, [edi - 2]
mov dword [ebp], eax
mov dword [ebp + 4], ecx
call fcn.00403290
mov al, byte [edi - 2]
mov dl, byte [ebx]
mov cl, byte [edi - 1]
xor al, dl
mov dl, byte [edi]
mov byte [edi - 2], al
mov al, byte [ebx + 1]
xor cl, al
mov al, byte [edi + 1]
mov byte [edi - 1], cl
mov cl, byte [ebx + 2]
xor dl, cl
mov cl, byte [edi + 2]
mov byte [edi], dl
mov dl, byte [ebx + 3]
xor al, dl
mov dl, byte [edi + 3]
mov byte [edi + 1], al
mov al, byte [ebx + 4]
xor cl, al
mov al, byte [edi + 4]
mov byte [edi + 2], cl
mov cl, byte [ebx + 5]
xor dl, cl
mov byte [edi + 3], dl
mov dl, byte [ebx + 6]
xor al, dl
mov dl, byte [edi + 5]
mov byte [edi + 4], al
mov al, byte [ebx + 7]
xor dl, al
mov eax, ebx
mov ebx, ebp
mov ebp, eax
mov eax, dword [esp + 0x30]
mov byte [edi + 5], dl
add edi, 8
dec eax
mov dword [esp + 0x30], eax
jne 0x4034f0
pop ebp
pop ebx
pop esi
xor eax, eax
pop edi
mov ecx, dword [esp + 0x14]
call fcn.004b6cac
add esp, 0x18
ret 0xc
mov edi, dword [esp + 0x34]
mov esi, 0x53a608
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4035a3
sbb edx, edx
sbb edx, 0xffffffff
test edx, edx
jne 0x40365a
mov ecx, dword [esp + 0x30]
cmp ecx, eax
jae 0x4036f9
sub eax, ecx
dec eax
shr eax, 3
inc eax
lea edi, [ecx + 2]
mov dword [esp + 0x30], eax
mov edx, dword [edi + 2]
mov ecx, dword [edi - 2]
mov esi, dword [esp + 0x2c]
mov dword [ebp + 4], edx
mov edx, ebx
mov dword [ebp], ecx
call fcn.00403160
mov al, byte [ebx]
mov cl, byte [edi - 2]
mov dl, byte [edi - 1]
xor cl, al
mov al, byte [edi]
mov byte [edi - 2], cl
mov cl, byte [ebx + 1]
xor dl, cl
mov cl, byte [edi + 1]
mov byte [edi - 1], dl
mov dl, byte [ebx + 2]
xor al, dl
mov dl, byte [edi + 2]
mov byte [edi], al
mov al, byte [ebx + 3]
xor cl, al
mov al, byte [edi + 3]
mov byte [edi + 1], cl
mov cl, byte [ebx + 4]
xor dl, cl
mov cl, byte [edi + 4]
mov byte [edi + 2], dl
mov dl, byte [ebx + 5]
xor al, dl
mov dl, byte [edi + 5]
mov byte [edi + 3], al
mov al, byte [ebx + 6]
xor cl, al
mov byte [edi + 4], cl
mov cl, byte [ebx + 7]
mov eax, ebx
xor dl, cl
mov ebx, ebp
mov ebp, eax
mov eax, dword [esp + 0x30]
mov byte [edi + 5], dl
add edi, 8
dec eax
mov dword [esp + 0x30], eax
jne 0x4035c5
pop ebp
pop ebx
pop esi
xor eax, eax
pop edi
mov ecx, dword [esp + 0x14]
call fcn.004b6cac
add esp, 0x18
ret 0xc
mov edi, dword [esp + 0x34]
mov esi, 0x53a604
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x403673
sbb edx, edx
sbb edx, 0xffffffff
test edx, edx
jne 0x40370e
mov ecx, dword [esp + 0x30]
cmp ecx, eax
jae 0x4036f9
sub eax, ecx
dec eax
shr eax, 3
inc eax
lea edi, [ecx + 2]
mov ebx, eax
mov esi, dword [esp + 0x2c]
lea edx, [esp + 0x14]
call fcn.00403160
mov eax, dword [esp + 0x14]
mov dl, byte [edi - 2]
mov cl, byte [edi - 1]
xor dl, al
mov al, byte [edi]
mov byte [edi - 2], dl
mov dl, byte [esp + 0x16]
xor al, dl
mov dl, byte [edi + 1]
xor cl, ah
mov byte [edi], al
mov al, byte [esp + 0x17]
xor dl, al
mov eax, dword [esp + 0x18]
mov byte [edi - 1], cl
mov cl, byte [edi + 2]
mov byte [edi + 1], dl
mov dl, byte [edi + 3]
xor cl, al
xor dl, ah
mov ax, word [esp + 0x1a]
mov byte [edi + 2], cl
mov cl, byte [edi + 4]
mov byte [edi + 3], dl
mov dl, byte [edi + 5]
xor cl, al
xor dl, ah
mov byte [edi + 4], cl
mov byte [edi + 5], dl
add edi, 8
dec ebx
jne 0x403693
pop ebp
pop ebx
pop esi
xor eax, eax
pop edi
mov ecx, dword [esp + 0x14]
call fcn.004b6cac
add esp, 0x18
ret 0xc
mov ecx, dword [esp + 0x24]
pop ebp
pop ebx
pop esi
mov eax, 0xfffffffd
pop edi
call fcn.004b6cac
add esp, 0x18
ret 0xc