Function at 0x1038e840
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
mov ebx, ecx
push edi
push 0xc0
push 0
lea eax, [ebx + 0x3c58]
mov dword [ebp - 0x14], ebx
push eax
mov dword [ebp - 0x20], eax
call fcn.10425c00
push 0x80
lea eax, [ebx + 0x3d18]
push 0
push eax
mov dword [ebp - 0x24], eax
call fcn.10425c00
push 0xc0
lea eax, [ebx + 0x3d98]
push 0
push eax
call fcn.10425c00
push 0x2000
lea esi, [ebx + 0x3e58]
push 0
push esi
mov dword [ebp - 4], esi
call fcn.10425c00
mov eax, dword [ebp + 8]
add esp, 0x30
cmp dword [ebx + 0x731c], 0
mov dword [ebp - 0xc], 0
jle 0x1038ecac
cmp eax, 3
lea edi, [ebx + 0x6518]
mov edx, eax
mov dword [ebp - 0x10], edi
mov ecx, 2
cmove edx, ecx
mov dword [ebp - 0x1c], edx
mov eax, dword [edi + 8]
xor eax, dword [esi]
and eax, 0x7ffff
xor eax, dword [esi]
mov dword [esi], eax
cmp dword [edi], 0
je 0x1038e8ee
mov ecx, dword [edi + 4]
jmp 0x1038e8f6
movsx ecx, byte [edx + ebx + 0x641d]
shl ecx, 0x13
xor edi, edi
xor ecx, eax
and ecx, 0x7f80000
xor ecx, eax
mov dword [esi], ecx
movzx eax, byte [edx + ebx + 0x6420]
mov byte [esi + 9], al
movzx eax, byte [edx + ebx + 0x6423]
mov byte [esi + 0xa], al
mov eax, dword [esi + 0xc]
xor eax, dword [ebx + 0x2560]
and eax, 1
xor eax, dword [esi + 0xc]
mov dword [esi + 0xc], eax
mov ecx, dword [ebx + 0x2564]
add ecx, ecx
xor ecx, eax
and ecx, 0x3e
xor ecx, eax
mov dword [esi + 0xc], ecx
and ecx, 0xff83f
mov eax, dword [ebx + 0x2568]
and dword [esi + 0x10], 0xe1ffffff
and eax, 0x1f
shl eax, 6
or eax, ecx
lea ecx, [esi + 0x10]
mov dword [esi + 0xc], eax
mov eax, dword [ebx + 0x2570]
shl eax, 0xd
xor eax, dword [esi + 0x18]
and eax, 0x2000
mov dword [ebp - 0x18], ecx
xor eax, dword [esi + 0x18]
mov dword [esi + 0x18], eax
mov ecx, dword [ebx + 0x256c]
shl ecx, 0xc
xor ecx, eax
and ecx, 0x1000
xor ecx, eax
mov dword [esi + 0x18], ecx
mov eax, dword [ebx + 0x26b8]
shl eax, 8
xor eax, ecx
and eax, 0xf00
xor eax, ecx
mov dword [esi + 0x18], eax
mov ecx, dword [ebx + 0x26c8]
xor ecx, eax
and ecx, 0xf
xor ecx, eax
mov dword [esi + 0x18], ecx
mov eax, dword [ebx + 0x26cc]
shl eax, 4
xor eax, ecx
and eax, 0xf0
xor eax, ecx
mov dword [esi + 0x18], eax
cmp dword [ebx + 0x26b8], edi
jl 0x1038ea4a
mov edx, dword [ebp - 4]
lea esi, [ebx + 0x257c]
add edx, 0x5c
mov eax, dword [esi - 4]
lea edx, [edx + 4]
xor eax, dword [edx - 4]
lea esi, [esi + 0x14]
and eax, 7
inc edi
xor dword [edx - 4], eax
mov ecx, dword [esi - 0x14]
shl ecx, 3
xor ecx, dword [edx - 4]
and ecx, 0xffff8
xor ecx, dword [edx - 4]
mov dword [edx - 4], ecx
mov eax, dword [esi - 0x10]
shl eax, 0x14
xor eax, ecx
and eax, 0x700000
xor eax, ecx
mov dword [edx - 4], eax
mov ecx, dword [esi - 0xc]
shl ecx, 0x17
xor ecx, eax
and ecx, 0x3800000
xor ecx, eax
mov dword [edx - 4], ecx
mov eax, dword [esi - 8]
shl eax, 0x1a
xor eax, ecx
and eax, 0x3c000000
xor eax, ecx
mov dword [edx - 4], eax
cmp edi, dword [ebx + 0x26b8]
jle 0x1038e9e0
mov esi, dword [ebp - 4]
cmp dword [ebx + 0x26c8], 0
mov dword [ebp - 8], 0
jbe 0x1038eabe
lea edi, [ebx + 0x26d8]
add esi, 0x1c
mov eax, dword [edi - 8]
lea esi, [esi + 4]
xor eax, dword [esi - 4]
lea edi, [edi + 0x14]
and eax, 7
xor dword [esi - 4], eax
mov ecx, dword [edi - 0x14]
shl ecx, 3
xor ecx, dword [esi - 4]
and ecx, 0xffff8
xor ecx, dword [esi - 4]
mov dword [esi - 4], ecx
mov edx, dword [edi - 0xc]
shl edx, 0x18
xor edx, ecx
and edx, 0xf000000
xor edx, ecx
mov dword [esi - 4], edx
mov eax, dword [edi - 0x10]
shl eax, 0x14
xor eax, edx
and eax, 0xf00000
xor eax, edx
mov dword [esi - 4], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
cmp eax, dword [ebx + 0x26c8]
jb 0x1038ea63
cmp dword [ebx + 0x26cc], 0
mov dword [ebp - 8], 0
jbe 0x1038eb3b
mov esi, dword [ebp - 4]
lea edi, [ebx + 0x2958]
add esi, 0x3c
nop word [eax + eax]
mov eax, dword [edi - 8]
lea esi, [esi + 4]
xor eax, dword [esi - 4]
lea edi, [edi + 0x14]
and eax, 7
xor dword [esi - 4], eax
mov ecx, dword [edi - 0x14]
shl ecx, 3
xor ecx, dword [esi - 4]
and ecx, 0xffff8
xor ecx, dword [esi - 4]
mov dword [esi - 4], ecx
mov edx, dword [edi - 0xc]
shl edx, 0x18
xor edx, ecx
and edx, 0xf000000
xor edx, ecx
mov dword [esi - 4], edx
mov eax, dword [edi - 0x10]
shl eax, 0x14
xor eax, edx
and eax, 0xf00000
xor eax, edx
mov dword [esi - 4], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
cmp eax, dword [ebx + 0x26cc]
jb 0x1038eae0
mov edi, dword [ebp - 0x10]
mov esi, dword [ebp - 4]
mov eax, dword [edi - 0x10]
shl eax, 0x1b
xor eax, dword [esi + 8]
and eax, 0x18000000
xor eax, dword [esi + 8]
mov dword [esi + 8], eax
mov ecx, dword [edi - 8]
xor ecx, eax
and ecx, 0xf
xor ecx, eax
mov dword [esi + 8], ecx
mov edx, dword [edi - 4]
shl edx, 4
xor edx, ecx
and edx, 0xf0
xor edx, ecx
mov dword [esi + 8], edx
mov eax, dword [edi - 0xc]
shl eax, 0x19
xor eax, edx
and eax, 0x6000000
xor eax, edx
mov edx, dword [ebp - 0x18]
mov dword [esi + 8], eax
mov eax, dword [edi + 0x14]
add eax, eax
xor eax, dword [edx]
and eax, 2
xor dword [edx], eax
mov ecx, dword [edi + 0x10]
xor ecx, dword [edx]
and ecx, 1
xor ecx, dword [edx]
mov dword [edx], ecx
mov eax, dword [edi + 0x18]
shl eax, 2
xor eax, ecx
and eax, 4
xor eax, ecx
mov dword [edx], eax
mov ecx, dword [edi + 0x1c]
shl ecx, 3
xor ecx, eax
and ecx, 8
xor ecx, eax
mov dword [edx], ecx
mov eax, dword [ebx + 4]
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x1c]
mov esi, dword [eax + 0x50]
mov dword [ebp - 0x18], esi
mov esi, dword [eax + 0x4c]
mov dword [ebp - 8], esi
mov esi, dword [eax + 0x48]
mov eax, dword [eax + 0x44]
mov dword [ebp - 0x10], esi
mov esi, dword [ebp - 4]
test al, 8
jne 0x1038ec14
test eax, 0x400
jne 0x1038ec14
cmp dword [ebp - 8], 0
jl 0x1038ec14
test dword [ebp - 0x18], 0x20000000
jne 0x1038ec14
test eax, 0x8000000
jne 0x1038ec14
test dword [ebp - 8], 0x100
jne 0x1038ec14
test dword [ebp - 0x10], 0x800000
je 0x1038ec22
cmp dword [ebx + 0x338], 0
je 0x1038ec22
and ecx, 0xfffffff0
mov dword [edx], ecx
mov eax, dword [edi + 0xc]
mov ecx, dword [edx]
shl eax, 0x18
xor eax, dword [esi + 8]
and eax, 0x1000000
xor dword [esi + 8], eax
cmp byte [ebx + 0x9f2], 1
jne 0x1038ec80
or ecx, 0x10
mov dword [edx], ecx
movzx eax, byte [ebx + 0x9e8]
mov byte [esi + 0x14], al
movzx eax, byte [ebx + 0x9ea]
mov byte [esi + 0x15], al
movzx eax, byte [ebx + 0x9ec]
mov byte [esi + 0x16], al
movzx eax, byte [ebx + 0x9ee]
mov byte [esi + 0x17], al
movsx eax, word [ebx + 0x9f0]
shl eax, 0x11
xor eax, ecx
and eax, 0x1fe0000
xor eax, ecx
jmp 0x1038ec85
mov eax, ecx
and eax, 0xffffffef
mov ecx, dword [ebp - 0xc]
add edi, 0x38
inc ecx
mov dword [edx], eax
mov edx, dword [ebp - 0x1c]
sub esi, 0xffffff80
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], esi
cmp ecx, dword [ebx + 0x731c]
jl 0x1038e8d6
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x18]
mov esi, dword [ebp + 0x14]
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x14]
push edi
push esi
push ebx
push eax
push dword [ebp - 0x20]
call fcn.10396130
push edi
mov edi, dword [ebp + 8]
push esi
push dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp - 0x14]
mov ecx, ebx
push edi
push dword [ebp - 0x24]
call fcn.10395a50
lea edx, [ebx + 0x3d98]
lea esi, [ebx + 0x5e4]
test edx, edx
je 0x1038ed0d
test esi, esi
je 0x1038ecfd
mov ecx, 0x30
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 8]
jmp 0x1038ed23
push 0xc0
push 0
push edx
call fcn.10425c00
add esp, 0xc
call fcn.1043a2d6
mov dword [eax], 0x16
call fcn.1043a1d8
lea edx, [ebx + 0x3d98]
cmp dword [ebx + 0x9b8], 0
je 0x1038ed47
cmp dword [ebx + 0x86c], 0
jne 0x1038ed47
and dword [edx + 8], 0xfcffffff
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebx + 0x5ec]
and eax, 0x3000000
cmp eax, 0x2000000
jne 0x1038ee0e
cmp dword [ebx + 0x88c], 0x12
jge 0x1038ede8
cmp dword [ebx + 0x8a8], 0xffffffff
jne 0x1038ede8
cmp edi, 2
jae 0x1038ede8
test byte [ebx + 0x86c], 1
jne 0x1038edaa
movd xmm0, dword [ebx + 0x8b4]
cvtdq2ps xmm0, xmm0
mov eax, dword [ebx + 0x34]
mulss xmm0, dword [0x1122d280]
cvtps2pd xmm0, xmm0
divsd xmm0, qword [ebx + 0x8f8]
cvttsd2si ecx, xmm0
cmp dword [eax], ecx
jle 0x1038ede8
movd xmm0, dword [ebx + 0x8b4]
cvtdq2ps xmm0, xmm0
mov eax, dword [ebx + 0x34]
mulss xmm0, dword [0x1122d3e8]
cvtps2pd xmm0, xmm0
divsd xmm0, qword [ebx + 0x8f8]
cvttsd2si ecx, xmm0
cmp dword [eax], ecx
jge 0x1038ede8
pop edi
pop esi
mov word [edx + 8], 0x403
xor eax, eax
mov byte [edx + 0xa], 3
pop ebx
mov esp, ebp
pop ebp
ret 0x14
cmp dword [ebx + 0x86c], 0
jne 0x1038ee0e
cmp edi, 2
jae 0x1038ee0e
mov eax, dword [ebx + 0x874]
cmp eax, dword [ebx + 0x87c]
jg 0x1038ee0e
mov word [edx + 8], 0x504
mov byte [edx + 0xa], 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x14