Function at 0x402d4b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
call fcn.004011d5
mov ebx, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], esi
mov dword [ebp - 4], esi
cmp ebx, 0xffffffff
jne 0x402d91
cmp byte [ebp + 0x14], 0
je 0x402d83
mov edi, dword [ebp + 0xc]
xor ebx, ebx
cmp edi, eax
jbe 0x402d94
jmp 0x403044
cmp dword [ebp + 0xc], eax
ja 0x403044
mov ebx, eax
sub ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 0xc]
cmp byte [ebp + 0x18], 0
je 0x402edb
xor eax, eax
cmp edi, esi
jbe 0x402db3
mov ecx, dword [ebp + 8]
movzx ecx, word [ecx + eax*2]
xor dword [ebp - 0xc], ecx
inc eax
cmp eax, edi
jb 0x402da4
cmp byte [ebp + 0x14], 0
je 0x402e54
lea eax, [edi - 1]
cmp eax, esi
jbe 0x402de1
lea esi, [ebx + ebx]
mov dword [ebp + 0x14], eax
mov ecx, dword [ebp - 8]
call fcn.00401377
movzx eax, word [eax + esi]
xor dword [ebp - 4], eax
add esi, 2
dec dword [ebp + 0x14]
jne 0x402dca
add edi, ebx
cmp edi, dword [ebp - 0x10]
ja 0x403044
mov dword [ebp + 0x14], edi
lea edi, [edi + edi - 2]
mov dword [ebp + 0x18], edi
mov ecx, dword [ebp - 8]
call fcn.00401377
movzx eax, word [eax + edi]
xor dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jne 0x402e24
mov ecx, dword [ebp - 8]
mov edi, dword [ebp + 8]
call fcn.00401377
mov ecx, dword [ebp + 0xc]
lea esi, [eax + ebx*2]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x402e4d
mov ecx, dword [ebp - 8]
call fcn.00401377
movzx eax, word [eax + ebx*2]
xor dword [ebp - 4], eax
mov edi, dword [ebp + 0x18]
inc ebx
inc dword [ebp + 0x14]
mov eax, dword [ebp + 0x14]
add edi, 2
mov dword [ebp + 0x18], edi
cmp eax, dword [ebp - 0x10]
jbe 0x402df6
jmp 0x403044
mov eax, ebx
jmp 0x403047
cmp edi, 1
jbe 0x402e7a
lea eax, [edi - 1]
lea esi, [ebx + ebx + 2]
mov dword [ebp + 0x14], eax
mov ecx, dword [ebp - 8]
call fcn.00401377
movzx eax, word [eax + esi]
xor dword [ebp - 4], eax
add esi, 2
dec dword [ebp + 0x14]
jne 0x402e63
cmp ebx, 0xffffffff
je 0x403044
add edi, ebx
lea eax, [edi + edi - 2]
mov dword [ebp + 0x14], eax
mov ecx, dword [ebp - 8]
call fcn.00401377
movzx eax, word [eax + ebx*2]
xor dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jne 0x402eba
mov ecx, dword [ebp - 8]
mov edi, dword [ebp + 8]
call fcn.00401377
mov ecx, dword [ebp + 0xc]
lea esi, [eax + ebx*2]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x402e4d
mov ecx, dword [ebp - 8]
call fcn.00401377
mov ecx, dword [ebp + 0x14]
movzx eax, word [eax + ecx]
xor dword [ebp - 4], eax
sub dword [ebp + 0x14], 2
dec ebx
cmp ebx, 0xffffffff
jne 0x402e8c
jmp 0x403044
cmp edi, esi
jbe 0x402ef5
mov eax, dword [ebp + 8]
movzx eax, word [eax + esi*2]
push eax
call fcn.0040751b
xor dword [ebp - 0xc], eax
inc esi
pop ecx
cmp esi, edi
jb 0x402edf
cmp byte [ebp + 0x14], 0
je 0x402fa5
lea eax, [edi - 1]
test eax, eax
je 0x402f2a
lea esi, [ebx + ebx]
mov dword [ebp + 0x14], eax
mov ecx, dword [ebp - 8]
call fcn.00401377
movzx eax, word [eax + esi]
push eax
call fcn.0040751b
xor dword [ebp - 4], eax
add esi, 2
dec dword [ebp + 0x14]
pop ecx
jne 0x402f0c
lea eax, [edi + ebx]
cmp eax, dword [ebp - 0x10]
ja 0x403044
mov dword [ebp + 0x14], eax
lea esi, [eax + eax - 2]
mov ecx, dword [ebp - 8]
call fcn.00401377
movzx eax, word [eax + esi]
push eax
call fcn.0040751b
xor dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop ecx
cmp eax, dword [ebp - 0xc]
jne 0x402f7b
mov ecx, dword [ebp - 8]
push edi
push dword [ebp + 8]
call fcn.00401377
lea eax, [eax + ebx*2]
push eax
call fcn.00411ab7
add esp, 0xc
test eax, eax
je 0x402e4d
mov ecx, dword [ebp - 8]
call fcn.00401377
movzx eax, word [eax + ebx*2]
push eax
call fcn.0040751b
xor dword [ebp - 4], eax
inc ebx
inc dword [ebp + 0x14]
mov eax, dword [ebp + 0x14]
add esi, 2
pop ecx
cmp eax, dword [ebp - 0x10]
jbe 0x402f3d
jmp 0x403044
cmp edi, 1
jbe 0x402fd2
lea eax, [edi - 1]
lea esi, [ebx + ebx + 2]
mov dword [ebp + 0x14], eax
mov ecx, dword [ebp - 8]
call fcn.00401377
movzx eax, word [eax + esi]
push eax
call fcn.0040751b
xor dword [ebp - 4], eax
add esi, 2
dec dword [ebp + 0x14]
pop ecx
jne 0x402fb4
cmp ebx, 0xffffffff
je 0x403044
lea eax, [edi + ebx]
lea eax, [eax + eax - 2]
mov dword [ebp + 0x14], eax
mov ecx, dword [ebp - 8]
lea esi, [ebx + ebx]
call fcn.00401377
movzx eax, word [eax + esi]
push eax
call fcn.0040751b
xor dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop ecx
cmp eax, dword [ebp - 0xc]
jne 0x403021
mov ecx, dword [ebp - 8]
push edi
push dword [ebp + 8]
call fcn.00401377
add eax, esi
push eax
call fcn.00411ab7
add esp, 0xc
test eax, eax
je 0x402e4d
mov ecx, dword [ebp - 8]
call fcn.00401377
mov ecx, dword [ebp + 0x14]
movzx eax, word [eax + ecx]
push eax
call fcn.0040751b
xor dword [ebp - 4], eax
sub dword [ebp + 0x14], 2
dec ebx
pop ecx
cmp ebx, 0xffffffff
jne 0x402fe1
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret 0x14