Function at 0x41f790
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x2090
call fcn.0045c960
mov eax, dword [0x48eb38]
mov ecx, dword [0x47a708]
mov edx, dword [0x47a70c]
mov dword [esp + 0x208c], eax
mov eax, dword [str.EAGLS_SYSTEM]
push ebx
mov dword [esp + 0x10], eax
mov al, byte [0x47a710]
push ebp
mov byte [esp + 0x20], al
mov dword [esp + 0x18], ecx
push esi
push edi
mov dword [esp + 0x24], edx
xor eax, eax
mov ecx, 0x1c
lea edi, [esp + 0x29]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x1c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41f7e7
sub eax, edx
push 0x7c97d0
mov dword [esp + 0x18], eax
call fcn.00401040
add esp, 4
lea ecx, [esp + 0x9c]
push ecx
push 0xff
call dword [0x4791f8]
lea eax, [esp + 0x9c]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41f820
sub eax, edx
cmp byte [esp + eax + 0x9b], 0x5c
je 0x41f852
lea edi, [esp + 0x9c]
dec edi
jmp 0x41f840
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41f840
mov dx, word [0x4793ac]
mov word [edi], dx
lea edi, [esp + 0x9c]
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41f860
mov eax, dword [str.Script_]
mov ebx, dword [esp + 0x20a4]
mov ecx, dword [0x47aed4]
mov dword [edi], eax
mov eax, ebx
mov dword [edi + 4], ecx
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41f883
lea edi, [esp + 0x9c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41f894
mov ecx, eax
shr ecx, 2
push 0
mov esi, edx
rep movsd dword es:[edi], dword [esi]
push 0x8000080
push 3
push 0
push 0
mov ecx, eax
push 0x80000000
lea edx, [esp + 0xb4]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [0x4791ec]
mov esi, eax
cmp esi, 0xffffffff
je 0x41f967
mov ebp, dword [esp + 0x20ac]
mov ebx, dword [0x479074]
mov ecx, ebp
imul ecx, ecx, 0xe10
push 0
lea eax, [esp + 0x14]
push eax
push 0xe10
add ecx, 0xffddd0
push ecx
push esi
call ebx
mov edi, dword [esp + 0x20a8]
push 0
lea edx, [esp + 0x14]
push edx
push 0x7a120
push edi
push esi
call ebx
push esi
call dword [0x4791f0]
mov eax, dword [esp + 0x10]
movsx ecx, byte [eax + edi - 1]
push ecx
call fcn.0045ca2a
mov eax, dword [esp + 0x14]
add esp, 4
xor esi, esi
test eax, eax
jle 0x41fa11
call fcn.0045ca37
cdq
idiv dword [esp + 0x14]
mov bl, byte [esi + edi]
mov eax, dword [esp + 0x10]
add esi, 2
mov dl, byte [esp + edx + 0x1c]
xor bl, dl
cmp esi, eax
mov byte [esi + edi - 2], bl
jl 0x41f940
jmp 0x41fa11
lea eax, [esp + 0x18]
push eax
push 0x970840
push ebx
mov eax, 0x44638
call fcn.0045c960
mov ecx, 0x1118e
mov esi, 0x7c97e8
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call fcn.0041d4e0
mov edi, eax
add esp, 0x44644
cmp edi, 0xffffffff
je 0x41fa70
mov ebp, dword [esp + 0x20ac]
mov ecx, ebp
imul ecx, ecx, 0xe10
push 0xe10
add ecx, 0xffddd0
push 0x970840
push ecx
call fcn.00401450
mov ebx, dword [esp + 0x20b4]
add edi, 0xfffff1f0
push edi
push 0x971650
push ebx
call fcn.00401450
movsx edx, byte [edi + ebx - 1]
push edx
call fcn.0045ca2a
add esp, 0x1c
xor esi, esi
test edi, edi
jle 0x41fa11
call fcn.0045ca37
cdq
idiv dword [esp + 0x14]
add esi, 2
mov al, byte [esp + edx + 0x1c]
mov dl, byte [esi + ebx - 2]
xor dl, al
cmp esi, edi
mov byte [esi + ebx - 2], dl
jl 0x41f9f2
push 0x7c97d0
call fcn.00401060
mov eax, dword [0x1002424]
add esp, 4
cmp eax, 1
jne 0x41fa54
mov ecx, dword [esp + 0x20a4]
push ecx
push ebp
lea edx, [esp + 0x10a4]
push str._nThreadNo__02d_tScriptFile__s_n_n
push edx
call fcn.0045cab0
lea eax, [esp + 0x10ac]
push eax
push ebp
call fcn.00408750
add esp, 0x18
mov eax, 1
mov ecx, dword [esp + 0x209c]
call fcn.0045c945
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2090
ret
push 0x7c97d0
call fcn.00401060
mov ecx, dword [esp + 0x20b0]
push ebx
push ecx
push 0x47b538
push 0x676878
call fcn.0045cab0
push 0x676878
call fcn.00408840
mov ecx, dword [esp + 0x20b4]
add esp, 0x18
xor eax, eax
call fcn.0045c945
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2090
ret