Function at 0x1037790
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 0x10377cd
mov ecx, dword [ebp + 0x18]
cmp dword [ebp - 8], ecx
jbe 0x103784c
cmp dword [ebp - 0x10], 0
jne 0x1037a15
cmp dword [ebp - 0xc], 0
jne 0x1037a15
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], 1
cmp edx, 0x2020
jbe 0x1037a15
cmp edx, dword [ebp + 0x18]
ja 0x1037a15
mov ebx, dword [ebp + 0x14]
mov edi, dword [ebp - 4]
lea ecx, [edx + ebx - 0x400]
mov eax, 0x30
test ecx, ecx
jne 0x1037817
inc edi
sub eax, 1
jne 0x1037812
cmp edi, 0xa
mov dword [ebp - 4], edi
jg 0x1037847
push 0x80
lea edx, [edx + ebx - 0x400]
push edx
call fcn.01036420
fcomp qword [0x100b718]
fnstsw ax
test ah, 5
jp 0x1037a15
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 0x10377cd
push 4
lea ecx, [edi - 4]
push ecx
mov edx, eax
push edx
call fcn.01036630
test eax, eax
je 0x10377cd
xor eax, eax
mov ecx, ebx
lea esp, [esp]
cmp byte [ecx], 0xe8
je 0x1037891
inc eax
inc ecx
cmp eax, 0x40
jb 0x1037880
jmp 0x10377cd
mov eax, dword [ebp + 0x14]
lea ebx, [edi + eax]
push 0x40
push ebx
call fcn.01036420
fcomp qword [0x100b6b8]
fnstsw ax
test ah, 0x41
jne 0x10377cd
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
push esi
push ecx
push edx
call fcn.01036690
test eax, eax
je 0x10378fd
mov eax, dword [ebp + 0x24]
cmp eax, edi
jb 0x10378d2
cmp eax, dword [ebp - 8]
jbe 0x10377cd
mov ecx, dword [esi + 0x28]
mov edx, dword [ebp - 4]
lea eax, [ecx + 0x20]
add ecx, 0x40
cmp eax, ecx
jae 0x10378f4
mov edi, dword [ebp + 0x14]
cmp byte [eax + edi], 0
jne 0x10378ec
inc edx
inc eax
cmp eax, ecx
jb 0x10378e2
mov dword [ebp - 4], edx
cmp edx, 0x10
jg 0x10377cd
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 0x1037959
inc edi
cmp edi, 0x20
jl 0x1037912
lea edi, [ecx + 1]
mov dword [ebp - 0x14], 0x20
cmp dl, byte [edi - 1]
je 0x103792f
inc dword [ebp + 8]
cmp dl, byte [edi]
je 0x1037936
inc dword [ebp + 8]
cmp dl, byte [edi + 1]
je 0x103793e
inc dword [ebp + 8]
cmp dl, byte [edi + 2]
je 0x1037946
inc dword [ebp + 8]
add edi, 4
sub dword [ebp - 0x14], 1
jne 0x1037927
cmp dword [ebp + 8], 8
jl 0x10377cd
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 0x1037960
jmp 0x10377cd
cmp dword [ebp + 0x1c], 0x40
jbe 0x1038030
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 0x1037ba0
mov ecx, dword [ebp + 0xc]
add edx, ecx
mov ecx, dword [ebp + 0x14]
lea edi, [edx + ecx]
push eax
push edi
call fcn.01036420
fst qword [ebp - 0x1c]
fcomp qword [0x100bfa8]
fnstsw ax
test ah, 0x41
jne 0x1037ba0
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.01036420
fadd qword [0x100b718]
fcomp qword [ebp - 0x1c]
fnstsw ax
test ah, 5
jp 0x1037ba0
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 0x1037ae8
inc edi
cmp edi, 8
jl 0x1037aa1
lea edi, [ecx + 1]
mov dword [ebp + 0x10], 8
cmp dl, byte [edi - 1]
je 0x1037abe
inc dword [ebp + 0xc]
cmp dl, byte [edi]
je 0x1037ac5
inc dword [ebp + 0xc]
cmp dl, byte [edi + 1]
je 0x1037acd
inc dword [ebp + 0xc]
cmp dl, byte [edi + 2]
je 0x1037ad5
inc dword [ebp + 0xc]
add edi, 4
sub dword [ebp + 0x10], 1
jne 0x1037ab6
cmp dword [ebp + 0xc], 2
jl 0x1037ba0
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 0x1037af0
mov edx, dword [esi + 0x2c]
mov edi, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x24]
add edx, edi
cmp edx, ecx
jne 0x1037bd4
mov eax, dword [ebp + 0x18]
sub eax, ecx
cmp eax, 0x20
jb 0x1037bbe
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.0102ff60
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 0x1037e00
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.01036420
fcomp qword [0x100b6b8]
fnstsw ax
test ah, 0x41
jne 0x1037e00
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x20]
add eax, ecx
xor edx, edx
cmp eax, dword [ebp + 0x18]
ja 0x1037c46
mov edi, dword [ebp + 0x14]
lea ecx, [edx + 1]
lea eax, [eax + edi - 1]
lea esp, [esp]
cmp byte [eax], 0
je 0x1037c3f
inc edx
cmp edx, 2
je 0x1037e00
inc ecx
dec eax
cmp ecx, 8
jb 0x1037c30
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 0x1037c61
inc edi
jmp 0x1037c6a
cmp al, 0x41
jb 0x1037c6a
cmp al, 0x7a
ja 0x1037c6a
inc ebx
mov al, byte [edx + ecx]
test al, al
jne 0x1037c74
inc edi
jmp 0x1037c7d
cmp al, 0x41
jb 0x1037c7d
cmp al, 0x7a
ja 0x1037c7d
inc ebx
mov al, byte [edx + ecx + 1]
test al, al
jne 0x1037c88
inc edi
jmp 0x1037c91
cmp al, 0x41
jb 0x1037c91
cmp al, 0x7a
ja 0x1037c91
inc ebx
mov al, byte [edx + ecx + 2]
test al, al
jne 0x1037c9c
inc edi
jmp 0x1037ca5
cmp al, 0x41
jb 0x1037ca5
cmp al, 0x7a
ja 0x1037ca5
inc ebx
add ecx, 4
cmp ecx, 0x40
jb 0x1037c56
mov ecx, dword [ebp + 0x18]
add ecx, 0xfffffe80
cmp dword [ebp + 0xc], ecx
jae 0x1037cd4
mov edx, dword [ebp + 0x10]
push 3
push 0x100bfa0
push 0x180
push edx
call fcn.01029710
test eax, eax
jne 0x1037cef
cmp edi, 4
jle 0x1037e00
cmp ebx, 0x14
jge 0x1037e00
cmp edi, 0x20
jge 0x1037e00
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 0x1037d47
inc edi
cmp edi, 8
jl 0x1037d00
lea edi, [ecx + 1]
mov dword [ebp + 0x10], 8
cmp dl, byte [edi - 1]
je 0x1037d1d
inc dword [ebp + 0xc]
cmp dl, byte [edi]
je 0x1037d24
inc dword [ebp + 0xc]
cmp dl, byte [edi + 1]
je 0x1037d2c
inc dword [ebp + 0xc]
cmp dl, byte [edi + 2]
je 0x1037d34
inc dword [ebp + 0xc]
add edi, 4
sub dword [ebp + 0x10], 1
jne 0x1037d15
cmp dword [ebp + 0xc], 2
jl 0x1037e00
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 0x1037d50
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 0x1038030
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.01036420
fcomp qword [0x100b6b8]
fnstsw ax
test ah, 0x41
jne 0x1038030
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 0x1037e6d
lea ecx, [edx + 1]
lea eax, [eax + ebx - 1]
cmp byte [eax], 0
je 0x1037e66
inc edx
cmp edx, 2
je 0x1038030
inc ecx
dec eax
cmp ecx, 6
jb 0x1037e57
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 0x1037e8a
inc edi
jmp 0x1037e93
cmp al, 0x41
jb 0x1037e93
cmp al, 0x7a
ja 0x1037e93
inc ebx
mov al, byte [ecx + 1]
test al, al
jne 0x1037e9d
inc edi
jmp 0x1037ea6
cmp al, 0x41
jb 0x1037ea6
cmp al, 0x7a
ja 0x1037ea6
inc ebx
mov al, byte [ecx]
test al, al
jne 0x1037eaf
inc edi
jmp 0x1037eb8
cmp al, 0x41
jb 0x1037eb8
cmp al, 0x7a
ja 0x1037eb8
inc ebx
mov al, byte [ecx - 1]
test al, al
jne 0x1037ec2
inc edi
jmp 0x1037ecb
cmp al, 0x41
jb 0x1037ecb
cmp al, 0x7a
ja 0x1037ecb
inc ebx
sub ecx, 4
sub edx, 1
jne 0x1037e80
cmp dword [ebp + 0xc], 0x180
jbe 0x1037efa
mov eax, dword [ebp + 0x10]
push 3
push 0x100bfa0
push 0x180
add eax, 0xfffffe80
push eax
call fcn.01029710
test eax, eax
jne 0x1037f15
cmp edi, 4
jle 0x1038030
cmp ebx, 0x14
jge 0x1038030
cmp edi, 0x20
jge 0x1038030
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 0x1037f72
inc edi
cmp edi, 8
jl 0x1037f28
lea edi, [ecx + 1]
mov dword [ebp + 0x18], 8
lea ecx, [ecx]
cmp dl, byte [edi - 1]
je 0x1037f48
inc dword [ebp + 0x14]
cmp dl, byte [edi]
je 0x1037f4f
inc dword [ebp + 0x14]
cmp dl, byte [edi + 1]
je 0x1037f57
inc dword [ebp + 0x14]
cmp dl, byte [edi + 2]
je 0x1037f5f
inc dword [ebp + 0x14]
add edi, 4
sub dword [ebp + 0x18], 1
jne 0x1037f40
cmp dword [ebp + 0x14], 2
jl 0x1038030
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 0x1037f80
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20