Function at 0x10388c0
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov edx, dword [ebp + 0x10]
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], ecx
mov ecx, dword [ebp + 0xc]
push ebx
add ecx, edx
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, 0x1000
mov dword [ebp - 8], ecx
cmp ecx, 0x1020
jbe 0x10388fd
mov ecx, dword [ebp + 0x18]
cmp dword [ebp - 8], ecx
jbe 0x103897c
cmp dword [ebp - 0x10], 0
jne 0x1038b45
cmp dword [ebp - 0xc], 0
jne 0x1038b45
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], 1
cmp edx, 0x2020
jbe 0x1038b45
cmp edx, dword [ebp + 0x18]
ja 0x1038b45
mov ebx, dword [ebp + 0x14]
mov edi, dword [ebp - 4]
lea ecx, [edx + ebx - 0x400]
mov eax, 0x30
test ecx, ecx
jne 0x1038947
inc edi
sub eax, 1
jne 0x1038942
cmp edi, 0xa
mov dword [ebp - 4], edi
jg 0x1038977
push 0x80
lea edx, [edx + ebx - 0x400]
push edx
call fcn.01037550
fcomp qword [0x100c0b8]
fnstsw ax
test ah, 5
jp 0x1038b45
mov eax, 0x2000
mov edi, dword [ebp - 8]
sub edi, eax
mov eax, dword [ebp + 0x14]
cmp byte [edi + eax + 1], 0
lea ebx, [edi + eax]
je 0x10388fd
push 4
lea ecx, [edi - 4]
push ecx
mov edx, eax
push edx
call fcn.01037760
test eax, eax
je 0x10388fd
xor eax, eax
mov ecx, ebx
lea esp, [esp]
cmp byte [ecx], 0xe8
je 0x10389c1
inc eax
inc ecx
cmp eax, 0x40
jb 0x10389b0
jmp 0x10388fd
mov eax, dword [ebp + 0x14]
lea ebx, [edi + eax]
push 0x40
push ebx
call fcn.01037550
fcomp qword [0x100c058]
fnstsw ax
test ah, 0x41
jne 0x10388fd
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
push esi
push ecx
push edx
call fcn.010377c0
test eax, eax
je 0x1038a2d
mov eax, dword [ebp + 0x24]
cmp eax, edi
jb 0x1038a02
cmp eax, dword [ebp - 8]
jbe 0x10388fd
mov ecx, dword [esi + 0x28]
mov edx, dword [ebp - 4]
lea eax, [ecx + 0x20]
add ecx, 0x40
cmp eax, ecx
jae 0x1038a24
mov edi, dword [ebp + 0x14]
cmp byte [eax + edi], 0
jne 0x1038a1c
inc edx
inc eax
cmp eax, ecx
jb 0x1038a12
mov dword [ebp - 4], edx
cmp edx, 0x10
jg 0x10388fd
mov eax, dword [esi + 0x5c]
mov eax, dword [eax]
mov ecx, ebx
mov dl, byte [ecx]
xor edi, edi
mov dword [ebp - 0x10], 1
mov dword [ebp + 8], edi
cmp dl, byte [edi + ecx]
jne 0x1038a89
inc edi
cmp edi, 0x20
jl 0x1038a42
lea edi, [ecx + 1]
mov dword [ebp - 0x14], 0x20
cmp dl, byte [edi - 1]
je 0x1038a5f
inc dword [ebp + 8]
cmp dl, byte [edi]
je 0x1038a66
inc dword [ebp + 8]
cmp dl, byte [edi + 1]
je 0x1038a6e
inc dword [ebp + 8]
cmp dl, byte [edi + 2]
je 0x1038a76
inc dword [ebp + 8]
add edi, 4
sub dword [ebp - 0x14], 1
jne 0x1038a57
cmp dword [ebp + 8], 8
jl 0x10388fd
mov dword [ebp + 8], 0x20
mov edx, dword [esi + 0xc]
movzx ebx, byte [ecx]
mov edi, dword [esi + 8]
mov dword [ebp - 0x18], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov dword [esi + 0xc], ebx
mov edx, ebx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 1]
mov dword [ebp - 0x18], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x18], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 2]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x18], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 3]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
add ecx, 4
sub dword [ebp + 8], 1
mov dword [esi + 8], edi
mov dword [esi + 0xc], ebx
jne 0x1038a90
jmp 0x10388fd
cmp dword [ebp + 0x1c], 0x40
jbe 0x1039160
mov ecx, dword [ebp + 0x10]
lea edx, [ecx + ecx]
mov eax, 0xaaaaaaab
mul edx
mov eax, ecx
shr edx, 1
shr eax, 2
lea ecx, [eax + edx]
add ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp + 0x18]
jae 0x1038cd0
mov ecx, dword [ebp + 0xc]
add edx, ecx
mov ecx, dword [ebp + 0x14]
lea edi, [edx + ecx]
push eax
push edi
call fcn.01037550
fst qword [ebp - 0x1c]
fcomp qword [0x100c948]
fnstsw ax
test ah, 0x41
jne 0x1038cd0
mov eax, dword [ebp + 0x20]
mov edx, eax
shr eax, 1
add eax, dword [ebp + 0x14]
shr edx, 2
add eax, dword [ebp + 0x1c]
push edx
push eax
call fcn.01037550
fadd qword [0x100c0b8]
fcomp qword [ebp - 0x1c]
fnstsw ax
test ah, 5
jp 0x1038cd0
mov eax, dword [esi + 0x5c]
mov eax, dword [eax]
mov ecx, edi
mov dl, byte [ecx]
xor edi, edi
mov dword [ebp + 0xc], edi
cmp dl, byte [edi + ecx]
jne 0x1038c18
inc edi
cmp edi, 8
jl 0x1038bd1
lea edi, [ecx + 1]
mov dword [ebp + 0x10], 8
cmp dl, byte [edi - 1]
je 0x1038bee
inc dword [ebp + 0xc]
cmp dl, byte [edi]
je 0x1038bf5
inc dword [ebp + 0xc]
cmp dl, byte [edi + 1]
je 0x1038bfd
inc dword [ebp + 0xc]
cmp dl, byte [edi + 2]
je 0x1038c05
inc dword [ebp + 0xc]
add edi, 4
sub dword [ebp + 0x10], 1
jne 0x1038be6
cmp dword [ebp + 0xc], 2
jl 0x1038cd0
mov dword [ebp + 0xc], 8
nop
mov edx, dword [esi + 0xc]
movzx ebx, byte [ecx]
mov edi, dword [esi + 8]
mov dword [ebp - 0x18], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov dword [esi + 0xc], ebx
mov edx, ebx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 1]
mov dword [ebp - 0x18], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x18], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 2]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x18], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 3]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
add ecx, 4
sub dword [ebp + 0xc], 1
mov dword [esi + 8], edi
mov dword [esi + 0xc], ebx
jne 0x1038c20
mov edx, dword [esi + 0x2c]
mov edi, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x24]
add edx, edi
cmp edx, ecx
jne 0x1038d04
mov eax, dword [ebp + 0x18]
sub eax, ecx
cmp eax, 0x20
jb 0x1038cee
mov eax, 0x20
lea edx, [esi + 8]
push edx
push eax
mov eax, dword [ebp + 0x14]
add eax, ecx
mov ecx, dword [esi + 0x5c]
mov edx, dword [ecx]
push eax
push edx
call fcn.01031080
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp + 0x18]
add edi, eax
add ecx, 0xffffffc0
mov dword [ebp + 0xc], edi
cmp edi, ecx
jae 0x1038f30
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1c]
add eax, edx
add eax, ecx
push 0x20
push eax
mov dword [ebp + 0x10], eax
call fcn.01037550
fcomp qword [0x100c058]
fnstsw ax
test ah, 0x41
jne 0x1038f30
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x20]
add eax, ecx
xor edx, edx
cmp eax, dword [ebp + 0x18]
ja 0x1038d76
mov edi, dword [ebp + 0x14]
lea ecx, [edx + 1]
lea eax, [eax + edi - 1]
lea esp, [esp]
cmp byte [eax], 0
je 0x1038d6f
inc edx
cmp edx, 2
je 0x1038f30
inc ecx
dec eax
cmp ecx, 8
jb 0x1038d60
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
xor edi, edi
xor ebx, ebx
xor ecx, ecx
lea edx, [edx + eax + 1]
mov al, byte [edx + ecx - 1]
test al, al
jne 0x1038d91
inc edi
jmp 0x1038d9a
cmp al, 0x41
jb 0x1038d9a
cmp al, 0x7a
ja 0x1038d9a
inc ebx
mov al, byte [edx + ecx]
test al, al
jne 0x1038da4
inc edi
jmp 0x1038dad
cmp al, 0x41
jb 0x1038dad
cmp al, 0x7a
ja 0x1038dad
inc ebx
mov al, byte [edx + ecx + 1]
test al, al
jne 0x1038db8
inc edi
jmp 0x1038dc1
cmp al, 0x41
jb 0x1038dc1
cmp al, 0x7a
ja 0x1038dc1
inc ebx
mov al, byte [edx + ecx + 2]
test al, al
jne 0x1038dcc
inc edi
jmp 0x1038dd5
cmp al, 0x41
jb 0x1038dd5
cmp al, 0x7a
ja 0x1038dd5
inc ebx
add ecx, 4
cmp ecx, 0x40
jb 0x1038d86
mov ecx, dword [ebp + 0x18]
add ecx, 0xfffffe80
cmp dword [ebp + 0xc], ecx
jae 0x1038e04
mov edx, dword [ebp + 0x10]
push 3
push 0x100c940
push 0x180
push edx
call fcn.0102a7f0
test eax, eax
jne 0x1038e1f
cmp edi, 4
jle 0x1038f30
cmp ebx, 0x14
jge 0x1038f30
cmp edi, 0x20
jge 0x1038f30
mov ecx, dword [ebp + 0x10]
mov eax, dword [esi + 0x5c]
mov eax, dword [eax]
mov dl, byte [ecx]
xor edi, edi
mov dword [ebp + 0xc], edi
mov edi, edi
cmp dl, byte [edi + ecx]
jne 0x1038e77
inc edi
cmp edi, 8
jl 0x1038e30
lea edi, [ecx + 1]
mov dword [ebp + 0x10], 8
cmp dl, byte [edi - 1]
je 0x1038e4d
inc dword [ebp + 0xc]
cmp dl, byte [edi]
je 0x1038e54
inc dword [ebp + 0xc]
cmp dl, byte [edi + 1]
je 0x1038e5c
inc dword [ebp + 0xc]
cmp dl, byte [edi + 2]
je 0x1038e64
inc dword [ebp + 0xc]
add edi, 4
sub dword [ebp + 0x10], 1
jne 0x1038e45
cmp dword [ebp + 0xc], 2
jl 0x1038f30
mov dword [ebp + 0xc], 8
mov edi, edi
mov edx, dword [esi + 0xc]
movzx ebx, byte [ecx]
mov edi, dword [esi + 8]
mov dword [ebp - 0x18], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov dword [esi + 0xc], ebx
mov edx, ebx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 1]
mov dword [ebp - 0x18], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x18], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 2]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x18], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 3]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
add ecx, 4
sub dword [ebp + 0xc], 1
mov dword [esi + 8], edi
mov dword [esi + 0xc], ebx
jne 0x1038e80
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x18]
add ecx, eax
mov dword [ebp + 0xc], ecx
cmp ecx, edi
jae 0x1039160
mov ebx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x1c]
add eax, ebx
add eax, edx
mov dword [ebp + 0x10], eax
push 0x20
add eax, 0xffffffc0
push eax
call fcn.01037550
fcomp qword [0x100c058]
fnstsw ax
test ah, 0x41
jne 0x1039160
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x20]
xor edx, edx
add eax, ecx
mov dword [ebp + 0x14], edx
cmp eax, edi
ja 0x1038f9d
lea ecx, [edx + 1]
lea eax, [eax + ebx - 1]
cmp byte [eax], 0
je 0x1038f96
inc edx
cmp edx, 2
je 0x1039160
inc ecx
dec eax
cmp ecx, 6
jb 0x1038f87
mov edx, dword [ebp + 0xc]
lea ecx, [edx + ebx - 0x42]
mov ebx, dword [ebp + 0x14]
mov edx, 0x10
mov edi, ebx
mov edi, edi
mov al, byte [ecx + 2]
test al, al
jne 0x1038fba
inc edi
jmp 0x1038fc3
cmp al, 0x41
jb 0x1038fc3
cmp al, 0x7a
ja 0x1038fc3
inc ebx
mov al, byte [ecx + 1]
test al, al
jne 0x1038fcd
inc edi
jmp 0x1038fd6
cmp al, 0x41
jb 0x1038fd6
cmp al, 0x7a
ja 0x1038fd6
inc ebx
mov al, byte [ecx]
test al, al
jne 0x1038fdf
inc edi
jmp 0x1038fe8
cmp al, 0x41
jb 0x1038fe8
cmp al, 0x7a
ja 0x1038fe8
inc ebx
mov al, byte [ecx - 1]
test al, al
jne 0x1038ff2
inc edi
jmp 0x1038ffb
cmp al, 0x41
jb 0x1038ffb
cmp al, 0x7a
ja 0x1038ffb
inc ebx
sub ecx, 4
sub edx, 1
jne 0x1038fb0
cmp dword [ebp + 0xc], 0x180
jbe 0x103902a
mov eax, dword [ebp + 0x10]
push 3
push 0x100c940
push 0x180
add eax, 0xfffffe80
push eax
call fcn.0102a7f0
test eax, eax
jne 0x1039045
cmp edi, 4
jle 0x1039160
cmp ebx, 0x14
jge 0x1039160
cmp edi, 0x20
jge 0x1039160
mov ecx, dword [ebp + 0x10]
mov edx, dword [esi + 0x5c]
mov eax, dword [edx]
mov dl, byte [ecx - 0x20]
add ecx, 0xffffffe0
xor edi, edi
mov dword [ebp + 0x14], edi
cmp dl, byte [edi + ecx]
jne 0x10390a2
inc edi
cmp edi, 8
jl 0x1039058
lea edi, [ecx + 1]
mov dword [ebp + 0x18], 8
lea ecx, [ecx]
cmp dl, byte [edi - 1]
je 0x1039078
inc dword [ebp + 0x14]
cmp dl, byte [edi]
je 0x103907f
inc dword [ebp + 0x14]
cmp dl, byte [edi + 1]
je 0x1039087
inc dword [ebp + 0x14]
cmp dl, byte [edi + 2]
je 0x103908f
inc dword [ebp + 0x14]
add edi, 4
sub dword [ebp + 0x18], 1
jne 0x1039070
cmp dword [ebp + 0x14], 2
jl 0x1039160
mov dword [ebp + 0x14], 8
lea esp, [esp]
mov edx, dword [esi + 0xc]
movzx ebx, byte [ecx]
mov edi, dword [esi + 8]
mov dword [ebp - 0x18], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov dword [esi + 0xc], ebx
mov edx, ebx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 1]
mov dword [ebp - 0x18], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x18], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 2]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x18], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 3]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x18]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
add ecx, 4
sub dword [ebp + 0x14], 1
mov dword [esi + 8], edi
mov dword [esi + 0xc], ebx
jne 0x10390b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20