Function at 0x417670
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x58d4
call fcn.00477910
mov eax, dword [0x4ed214]
xor eax, esp
mov dword [esp + 0x58d0], eax
push ebx
mov ebx, ecx
xor al, al
push esi
push edi
mov dword [esp + 0x24], ebx
lea ecx, [ebx + 0xc7fc0]
mov byte [esp + 0x13], al
call fcn.0046aae0
push eax
call dword [0x4bb23c]
push str.SystemC.ini
push ecx
lea ecx, [ebx + 0xc7fa8]
call fcn.0046aae0
add esp, 4
lea ecx, [esp + 0x2c]
mov edx, eax
call fcn.0046be80
add esp, 4
mov dword [esp + 0x18], str.true
lea eax, [esp + 0x28]
mov dword [esp + 0x1c], str.false
mov ecx, 4
push eax
xor eax, eax
cmp byte [ebx + 0xc7f60], al
cmove eax, ecx
push dword [esp + eax + 0x1c]
push str.window
push str.general
call dword [0x4bb1f0]
lea ecx, [ebx + 0xc7fc0]
call fcn.0046aae0
mov esi, eax
lea ecx, [esp + 0x5638]
push str.system.dat
mov edx, esi
mov dword [esp + 0x1c], esi
call fcn.0046be80
add esp, 4
lea eax, [esp + 0x5530]
push 9
push str.system.da_d
push eax
call dword [0x4bb308]
add esp, 0xc
lea eax, [esp + 0x5530]
mov edx, esi
lea ecx, [esp + 0x5428]
push eax
call fcn.0046be80
add esp, 4
lea eax, [esp + 0x5428]
push 0x80
push eax
call dword [0x4bb228]
lea eax, [esp + 0x5428]
push eax
call dword [0x4bb230]
mov edi, dword [0x4bb248]
mov esi, 8
mov ebx, dword [esp + 0x18]
push esi
lea eax, [esp + 0x5534]
push str.system.da_d
push eax
call dword [0x4bb308]
add esp, 0xc
lea eax, [esp + 0x5530]
mov edx, ebx
lea ecx, [esp + 0x28]
push eax
call fcn.0046be80
add esp, 4
lea eax, [esp + 0x5428]
push eax
lea eax, [esp + 0x2c]
push eax
call edi
xor eax, eax
mov cl, byte [esp + eax + 0x28]
lea eax, [eax + 1]
mov byte [esp + eax + 0x5427], cl
test cl, cl
jne 0x4177d0
sub esi, 1
jns 0x417792
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x563c]
push eax
call edi
mov ebx, dword [esp + 0x24]
lea eax, [esp + 0x2c]
push 0x53fc
mov ecx, 0xa8
lea edi, [esp + 0x563c]
push 0
lea esi, [ebx + 0xc80c4]
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.00479010
add esp, 0xc
mov dword [esp + 0x28], 0x5400
xor esi, esi
lea edi, [ebx + 0x3ee4c]
mov ecx, edi
call fcn.0046ba60
mov byte [esp + esi + 0x2c], al
add edi, 0xc
inc esi
cmp esi, 0x2710
jl 0x417832
xor esi, esi
lea edi, [ebx + 0x5c30c]
mov ecx, edi
call fcn.0046ba60
mov byte [esp + esi + 0x273c], al
add edi, 0xc
inc esi
cmp esi, 0x3e8
jl 0x417851
xor esi, esi
lea edi, [ebx + 0x5f2dc]
mov ecx, edi
call fcn.0046ba60
mov word [esp + esi*2 + 0x2b38], ax
add edi, 0xc
inc esi
cmp esi, 0x1388
jl 0x417873
xor esi, esi
lea edi, [ebx + 0x6e1ec]
mov ecx, edi
call fcn.0046ba60
mov dword [esp + esi*4 + 0x53d8], eax
add edi, 0xc
inc esi
cmp esi, 0x14
jl 0x417896
xor esi, esi
lea edi, [ebx + 0x6dd3c]
mov ecx, edi
call fcn.0046ba60
mov dword [esp + esi*4 + 0x5248], eax
add edi, 0xc
inc esi
cmp esi, 0x64
jl 0x4178b5
mov esi, dword [0x4bb42c]
call esi
mov ecx, eax
mov dword [esp + 0x5638], 0x2a0
sub ecx, dword [ebx + 0xc8364]
mov eax, 0x10624dd3
mul ecx
shr edx, 6
add dword [esp + 0x58c8], edx
call esi
mov ecx, eax
call fcn.0046be50
call fcn.0046be30
movzx edx, ax
shl edx, 0x10
call fcn.0046be30
movzx eax, ax
or eax, edx
push 0x56a0
mov dword [esp + 0x24], eax
call fcn.004770bf
add esp, 4
mov dword [esp + 0x18], eax
mov edi, eax
lea esi, [esp + 0x5638]
mov ecx, 0xa8
add eax, 0x2a0
rep movsd dword es:[edi], dword [esi]
push 0x5400
lea ecx, [esp + 0x2c]
push ecx
push eax
call fcn.00478a90
mov ecx, dword [esp + 0x2c]
add esp, 0xc
call fcn.0046be50
mov edi, dword [esp + 0x18]
mov edx, 0x2b50
mov ecx, edi
call fcn.0046be30
movzx eax, ax
lea ecx, [ecx + 2]
xor word [ecx - 2], ax
sub edx, 1
jne 0x417967
push edx
push 0x80
push 2
push edx
push 1
push 0x40000000
push str.system.dat
call dword [0x4bb234]
mov esi, eax
cmp esi, 0xffffffff
je 0x4179f2
push 0
lea eax, [esp + 0x18]
push eax
push 0x56a0
push edi
mov edi, dword [0x4bb244]
push esi
call edi
test eax, eax
je 0x4179eb
cmp dword [esp + 0x14], 0x56a0
jne 0x4179eb
push 0
lea eax, [esp + 0x18]
push eax
push 4
lea eax, [esp + 0x2c]
push eax
push esi
call edi
test eax, eax
je 0x4179eb
cmp dword [esp + 0x14], 4
jne 0x4179eb
push esi
call dword [0x4bb22c]
mov byte [esp + 0x13], 1
jmp 0x4179f2
push esi
call dword [0x4bb22c]
push dword [esp + 0x18]
call fcn.004770ba
add esp, 4
lea ecx, [ebx + 0xc7fa8]
call fcn.0046aae0
push eax
call dword [0x4bb23c]
mov al, byte [esp + 0x13]
test al, al
jne 0x417a59
mov edx, dword [ebx + 0x218]
lea ecx, [ebx + 0x218]
call dword [edx + 0x14]
push 0x10010
push 0x4d9c24
push 0x4d76dc
test eax, eax
jne 0x417a43
push eax
call dword [0x4bb31c]
jmp 0x417a55
mov eax, dword [ebx + 0x218]
lea ecx, [ebx + 0x218]
call dword [eax + 0xb8]
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x58dc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00476c36
mov esp, ebp
pop ebp
ret 4