Function at 0x40faa0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [ebp - 4], edi
movzx eax, byte [ebx]
cmp eax, 8
ja case.default.0x40fabd
push esi
jmp dword [eax*4 + 0x410178]
mov eax, dword [ebx + 8]
mov ecx, dword [edi]
cmp dword [eax + 4], 0
mov edx, dword [ecx]
jne 0x40fae4
push 2
push 0x510d78
call dword [edx + 4]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
cmp byte [ebp + 0xc], 0
je 0x40fc82
push 2
push 0x510d7c
call dword [edx + 4]
mov ecx, dword [ebp + 0x18]
add ecx, dword [ebp + 0x14]
mov eax, dword [edi + 0x260]
mov dword [ebp + 0xc], ecx
cmp eax, ecx
jae 0x40fb1b
push 0x20
add eax, eax
lea ecx, [edi + 0x250]
push eax
call fcn.004116b0
mov eax, dword [ebx + 8]
mov dword [ebp + 8], 0
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov esi, dword [esi]
sub eax, 1
je 0x40fbfe
lea eax, [edi + 0x250]
jmp 0x40fb40
cmp dword [eax + 0x14], 0x10
mov edx, eax
mov ecx, dword [edi]
jb 0x40fb4c
mov edx, dword [eax]
push dword [ebp + 0xc]
mov eax, dword [ecx]
push edx
call dword [eax + 4]
mov ecx, dword [edi]
push 0x22
mov eax, dword [ecx]
call dword [eax]
push dword [ebp + 0x10]
lea eax, [esi + 0x10]
mov ecx, edi
push eax
call fcn.004101a0
mov ecx, dword [edi]
push 3
push 0x510d80
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp + 0xc]
lea eax, [esi + 0x28]
mov ecx, edi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 1
push eax
call fcn.0040faa0
mov ecx, dword [edi]
push 2
push 0x510d84
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
inc edx
cmp byte [esi + 0xd], 0
mov dword [ebp + 8], edx
jne 0x40fbe9
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
jne 0x40fbce
mov esi, eax
mov ecx, dword [esi]
cmp byte [ecx + 0xd], 0
jne 0x40fbe9
lea ecx, [ecx]
mov eax, dword [ecx]
mov esi, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x40fbc0
jmp 0x40fbe9
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x40fbe7
cmp esi, dword [eax + 8]
jne 0x40fbe7
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x40fbd7
mov esi, eax
mov eax, dword [ebx + 8]
mov eax, dword [eax + 4]
dec eax
cmp edx, eax
lea eax, [edi + 0x250]
jb 0x40fb40
cmp dword [edi + 0x264], 0x10
lea ebx, [edi + 0x250]
mov ecx, dword [edi]
mov edx, ebx
jb 0x40fc13
mov edx, dword [ebx]
push dword [ebp + 0xc]
mov eax, dword [ecx]
push edx
call dword [eax + 4]
mov ecx, dword [edi]
push 0x22
mov eax, dword [ecx]
call dword [eax]
push dword [ebp + 0x10]
lea eax, [esi + 0x10]
mov ecx, edi
push eax
call fcn.004101a0
mov ecx, dword [edi]
push 3
push 0x510d80
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp + 0xc]
add esi, 0x28
mov ecx, edi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 1
push esi
call fcn.0040faa0
mov ecx, dword [edi]
push 0xa
mov eax, dword [ecx]
call dword [eax]
cmp dword [ebx + 0x14], 0x10
mov ecx, dword [edi]
jb 0x40fc68
mov ebx, dword [ebx]
push dword [ebp + 0x18]
mov eax, dword [ecx]
push ebx
call dword [eax + 4]
mov ecx, dword [edi]
push 0x7d
mov eax, dword [ecx]
call dword [eax]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push 0x7b
call dword [edx]
mov eax, dword [ebx + 8]
mov dword [ebp + 0xc], 0
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov esi, dword [esi]
sub eax, 1
je 0x40fd41
mov ecx, dword [edi]
push 0x22
mov eax, dword [ecx]
call dword [eax]
push dword [ebp + 0x10]
lea eax, [esi + 0x10]
mov ecx, edi
push eax
call fcn.004101a0
mov ecx, dword [edi]
push 2
push 0x510d88
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp + 0x18]
lea eax, [esi + 0x28]
mov ecx, edi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0
push eax
call fcn.0040faa0
mov ecx, dword [edi]
push 0x2c
mov eax, dword [ecx]
call dword [eax]
mov edx, dword [ebp + 0xc]
inc edx
cmp byte [esi + 0xd], 0
mov dword [ebp + 0xc], edx
jne 0x40fd32
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
jne 0x40fd10
mov esi, eax
mov ecx, dword [esi]
cmp byte [ecx + 0xd], 0
jne 0x40fd32
mov eax, dword [ecx]
mov esi, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x40fd02
jmp 0x40fd32
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x40fd30
lea esp, [esp]
cmp esi, dword [eax + 8]
jne 0x40fd30
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x40fd20
mov esi, eax
mov eax, dword [ebx + 8]
mov eax, dword [eax + 4]
dec eax
cmp edx, eax
jb 0x40fca0
mov ecx, dword [edi]
push 0x22
mov eax, dword [ecx]
call dword [eax]
mov ebx, dword [ebp + 0x10]
lea eax, [esi + 0x10]
push ebx
push eax
mov ecx, edi
call fcn.004101a0
mov ecx, dword [edi]
push 2
push 0x510d88
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp + 0x18]
add esi, 0x28
mov ecx, edi
push dword [ebp + 0x14]
push ebx
push 0
push esi
call fcn.0040faa0
mov ecx, dword [edi]
push 0x7d
mov eax, dword [ecx]
call dword [eax]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov edx, dword [ebx + 8]
mov ecx, dword [edi]
mov eax, dword [edx]
mov esi, dword [ecx]
cmp eax, dword [edx + 4]
jne 0x40fdac
push 2
push 0x510d8c
call dword [esi + 4]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
cmp byte [ebp + 0xc], 0
je 0x40feb2
push 2
push 0x510d90
call dword [esi + 4]
mov eax, dword [ebp + 0x14]
add eax, dword [ebp + 0x18]
mov edx, dword [edi + 0x260]
mov dword [ebp + 0xc], eax
cmp edx, eax
jae 0x40fde4
push 0x20
lea eax, [edx + edx]
lea ecx, [edi + 0x250]
push eax
call fcn.004116b0
mov eax, dword [ebx + 8]
mov esi, dword [eax]
mov eax, dword [eax + 4]
sub eax, 0x10
cmp esi, eax
je 0x40fe4c
lea eax, [edi + 0x250]
lea esp, [esp]
cmp dword [eax + 0x14], 0x10
mov edx, eax
mov ecx, dword [edi]
jb 0x40fe0c
mov edx, dword [eax]
push dword [ebp + 0xc]
mov eax, dword [ecx]
push edx
call dword [eax + 4]
push dword [ebp + 0xc]
mov ecx, edi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 1
push esi
call fcn.0040faa0
mov ecx, dword [edi]
push 2
push 0x510d84
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebx + 8]
add esi, 0x10
mov eax, dword [eax + 4]
sub eax, 0x10
cmp esi, eax
lea eax, [edi + 0x250]
jne 0x40fe00
cmp dword [edi + 0x264], 0x10
lea esi, [edi + 0x250]
mov ecx, dword [edi]
mov edx, esi
jb 0x40fe61
mov edx, dword [esi]
push dword [ebp + 0xc]
mov eax, dword [ecx]
push edx
call dword [eax + 4]
push dword [ebp + 0xc]
mov eax, dword [ebx + 8]
mov ecx, edi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
mov eax, dword [eax + 4]
push 1
sub eax, 0x10
push eax
call fcn.0040faa0
mov ecx, dword [edi]
push 0xa
mov eax, dword [ecx]
call dword [eax]
cmp dword [esi + 0x14], 0x10
mov ecx, dword [edi]
jb 0x40fe98
mov esi, dword [esi]
push dword [ebp + 0x18]
mov eax, dword [ecx]
push esi
call dword [eax + 4]
mov ecx, dword [edi]
push 0x5d
mov eax, dword [ecx]
call dword [eax]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push 0x5b
call dword [esi]
mov ecx, dword [ebx + 8]
mov edx, dword [ebp + 0x14]
mov eax, dword [ecx + 4]
mov esi, dword [ecx]
sub eax, 0x10
cmp esi, eax
mov eax, dword [ebp + 0x18]
je 0x40fefd
jmp 0x40fed0
push eax
push edx
push dword [ebp + 0x10]
mov ecx, edi
push 0
push esi
call fcn.0040faa0
mov ecx, dword [edi]
push 0x2c
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebx + 8]
add esi, 0x10
mov edx, dword [ebp + 0x14]
mov eax, dword [ecx + 4]
sub eax, 0x10
cmp esi, eax
mov eax, dword [ebp + 0x18]
jne 0x40fed0
push eax
mov eax, dword [ecx + 4]
mov ecx, edi
push edx
push dword [ebp + 0x10]
sub eax, 0x10
push 0
push eax
call fcn.0040faa0
mov ecx, dword [edi]
push 0x5d
mov eax, dword [ecx]
call dword [eax]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [edi]
push 0x22
mov eax, dword [ecx]
call dword [eax]
push dword [ebp + 0x10]
mov ecx, edi
push dword [ebx + 8]
call fcn.004101a0
mov ecx, dword [edi]
push 0x22
mov eax, dword [ecx]
call dword [eax]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
cmp byte [ebx + 8], 0
mov ecx, dword [edi]
mov eax, dword [ecx]
je 0x40ff66
push 4
push 0x510680
call dword [eax + 4]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push 5
push str.false
call dword [eax + 4]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
mov ebx, eax
or eax, ecx
je 0x41001b
test ecx, ecx
jg 0x40ff99
jl 0x40ff93
test ebx, ebx
jae 0x40ff99
mov byte [ebp + 0xf], 1
jmp 0x40ff9d
mov byte [ebp + 0xf], 0
lea edx, [edi + 8]
xor esi, esi
mov dword [ebp + 0x10], edx
xor edi, edi
push 0
push 0xa
push ecx
push ebx
call fcn.0048c180
mov esi, eax
mov dword [ebp + 0x14], edx
lea ecx, [esi + esi*4]
add ecx, ecx
sub ebx, ecx
mov ecx, dword [ebp + 0x14]
mov eax, ebx
mov ebx, esi
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp + 0x10]
add al, 0x30
mov byte [edi + edx], al
mov eax, ebx
inc edi
or eax, ecx
jne 0x40ffa7
mov dword [ebp + 0x10], edi
mov edi, dword [ebp - 4]
mov esi, dword [ebp + 0x10]
cmp byte [ebp + 0xf], al
je 0x40ffed
mov byte [esi + edi + 8], 0x2d
inc esi
lea eax, [esi + edx]
push eax
push edx
call fcn.0046f3ba
mov ecx, dword [edi]
lea edx, [edi + 8]
add esp, 8
mov eax, dword [ecx]
push esi
push edx
call dword [eax + 4]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
mov ebx, eax
or eax, ecx
jne 0x41002c
mov ecx, dword [edi]
push 0x30
mov eax, dword [ecx]
call dword [eax]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
lea edx, [edi + 8]
xor edi, edi
mov dword [ebp + 0xc], edx
push 0
push 0xa
push ecx
push ebx
call fcn.0048bfd0
mov esi, eax
mov dword [ebp + 0x10], edx
lea ecx, [esi + esi*4]
add ecx, ecx
sub ebx, ecx
mov ecx, dword [ebp + 0x10]
mov eax, ebx
mov ebx, esi
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp + 0xc]
add al, 0x30
mov byte [edi + edx], al
mov eax, ebx
inc edi
or eax, ecx
jne 0x410034
lea eax, [edi + edx]
mov dword [ebp + 0xc], edi
push eax
push edx
call fcn.0046f3ba
mov edi, dword [ebp - 4]
add esp, 8
mov edx, dword [ebp + 0xc]
mov ecx, dword [edi]
push edx
lea edx, [edi + 8]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
fld qword [ebx + 8]
lea eax, [ebp - 0x10]
fst qword [ebp - 8]
push eax
fstp qword [ebp - 0x10]
call fcn.004d13a8
add esp, 4
test ax, ax
jg case.0x40fabd.0
fld qword [ebp - 8]
lea ebx, [edi + 8]
sub esp, 8
mov esi, ebx
fstp qword [esp]
call fcn.004d128a
fld qword [ebp - 8]
add esp, 8
test eax, eax
je 0x4100d4
fchs
mov byte [ebx], 0x2d
lea esi, [ebx + 1]
fldz
fucomp st(1)
fnstsw ax
test ah, 0x44
jp 0x410101
mov word [esi], 0x2e30
lea eax, [esi + 3]
mov byte [esi + 2], 0x30
sub eax, ebx
mov ecx, dword [edi]
fstp st(0)
push eax
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
sub esp, 8
mov dword [ebp + 0x10], 0
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0
fstp qword [esp]
push eax
lea eax, [ebp + 0x10]
push eax
push esi
call fcn.004066a0
push 0xf
push 0xfffffffffffffffc
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push esi
call fcn.004108e0
mov ecx, dword [edi]
add esp, 0x28
sub eax, ebx
mov edx, dword [ecx]
push eax
push ebx
call dword [edx + 4]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [edi]
push 0xb
push str._discarded_
mov eax, dword [ecx]
call dword [eax + 4]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [edi]
push 4
push str.null
mov eax, dword [ecx]
call dword [eax + 4]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14