Function at 0x4031ed
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
and dword [ebp - 0x10], 0
push ebx
push esi
push edi
mov dword [ebp - 0x1c], ecx
mov esi, edx
push ecx
lea ecx, [ebp - 0x10]
call fcn.0040345f
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 8]
mov dword [ebp - 4], edx
mov ebx, dword [ebp - 4]
lea eax, [ecx + esi]
mov dword [ebp - 8], ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
add eax, edx
movzx edx, byte [ecx]
mov dword [ebp - 0x18], eax
movzx eax, byte [ecx + 1]
shl edx, 8
add edx, eax
mov eax, dword [ebp - 0x10]
xor esi, esi
mov dword [ebp - 0xc], edx
mov dword [ebp + 0xc], esi
mov ecx, esi
lea edi, [eax + 0xc]
test eax, eax
je 0x40324a
mov edx, dword [eax + 4]
jmp 0x40324c
mov edx, esi
cmp ecx, edx
jge 0x403258
mov dword [edi], esi
inc ecx
add edi, 4
jmp 0x403241
mov edi, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
lea eax, [edi + 2]
shl edx, 8
mov dword [ebp - 0x20], eax
movzx eax, byte [eax]
add edx, eax
mov ecx, edx
imul eax, edx, 3
shr ecx, 4
xor ecx, edx
mov dword [ebp - 0xc], edx
shr ecx, 5
add ecx, eax
and ecx, 0x7fff
push ecx
lea ecx, [ebp - 0x10]
call fcn.00403433
mov ecx, dword [eax]
mov dword [eax], edi
mov eax, edi
sub eax, ecx
dec eax
mov dword [ebp - 0x24], eax
cmp eax, 0x2000
jae 0x4033bc
lea eax, [edi + 4]
cmp eax, dword [ebp - 0x14]
jae 0x4033bc
cmp ecx, dword [ebp - 0x1c]
jbe 0x4033bc
mov al, byte [ecx]
cmp al, byte [edi]
jne 0x4033bc
mov al, byte [ecx + 1]
lea edx, [edi + 1]
mov dword [ebp - 0x28], edx
cmp al, byte [edx]
jne 0x4033bc
mov edx, dword [ebp - 0x20]
mov al, byte [ecx + 2]
cmp al, byte [edx]
jne 0x4033bc
mov ebx, dword [ebp - 0x14]
mov eax, 0x108
sub ebx, edi
push 2
pop edx
sub ebx, edx
cmp ebx, eax
cmova ebx, eax
sub ecx, edi
mov edi, dword [ebp - 0x20]
inc edx
inc edi
cmp edx, ebx
jae 0x403308
mov al, byte [ecx + edi]
cmp al, byte [edi]
je 0x4032fb
mov ebx, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
mov edi, dword [ebp - 8]
lea eax, [ebx + 4]
add eax, ecx
cmp eax, dword [ebp - 0x18]
jae 0x403424
test ecx, ecx
je 0x403339
lea eax, [ecx - 1]
mov byte [ebx], al
inc ebx
neg ecx
mov al, byte [ecx + edi]
mov byte [ebx], al
inc ebx
add ecx, 1
jne 0x40332b
mov dword [ebp + 0xc], ecx
mov ecx, dword [ebp - 0x24]
lea eax, [ebx + 1]
mov edi, dword [ebp - 0x28]
sub edx, 2
shr ecx, 8
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x28], eax
cmp edx, 7
jae 0x403361
mov al, dl
shl al, 5
add al, cl
mov byte [ebx], al
mov ebx, dword [ebp - 0x28]
jmp 0x40336e
sub cl, 0x20
mov byte [ebx], cl
mov ebx, eax
lea eax, [edx - 7]
mov byte [ebx], al
inc ebx
mov eax, dword [ebp - 0x24]
mov byte [ebx], al
inc ebx
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 0x20]
mov edx, dword [ebp - 0xc]
movzx eax, byte [edi + 2]
shl edx, 8
add edx, eax
mov ecx, edx
imul eax, edx, 3
shr ecx, 4
xor ecx, edx
mov dword [ebp - 0xc], edx
shr ecx, 5
add ecx, eax
and ecx, 0x7fff
push ecx
lea ecx, [ebp - 0x10]
call fcn.00403433
mov dword [eax], edi
inc edi
mov eax, ebx
dec ebx
test eax, eax
jne 0x40337a
mov ebx, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], edi
jmp 0x4033f2
mov ecx, dword [ebp + 0xc]
inc ecx
inc edi
mov dword [ebp + 0xc], ecx
mov dword [ebp - 8], edi
cmp ecx, 0x20
jne 0x4033f2
lea eax, [ebx + 0x21]
cmp eax, dword [ebp - 0x18]
jae 0x403424
lea esi, [edi - 0x20]
mov byte [ebx], 0x1f
push 8
lea edi, [ebx + 1]
add ebx, 0x21
pop ecx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 8]
xor esi, esi
mov ecx, esi
mov dword [ebp - 4], ebx
mov dword [ebp + 0xc], ecx
mov edx, dword [ebp - 0xc]
cmp edi, dword [ebp - 0x14]
jb 0x40325e
test ecx, ecx
je 0x40341f
lea eax, [ebx + 1]
add eax, ecx
cmp eax, dword [ebp - 0x18]
jae 0x403424
lea eax, [ecx - 1]
mov byte [ebx], al
inc ebx
neg ecx
mov al, byte [ecx + edi]
mov byte [ebx], al
inc ebx
add ecx, 1
jne 0x403414
mov esi, ebx
sub esi, dword [ebp + 8]
lea ecx, [ebp - 0x10]
call fcn.00402a59
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret