Function at 0x41a7b0
Capabilities:
Create thread

Disassembly:
mov eax, 0x120f0
call fcn.00454700
mov eax, dword [0x4894c8]
xor eax, esp
mov dword [esp + 0x120ec], eax
push ebx
mov ebx, dword [esp + 0x120f8]
lea eax, [esp + 0x34]
push ebp
push eax
mov dword [esp + 0x18], ebx
call fcn.00402480
mov ebp, dword [0x4772f4]
add esp, 4
cmp dword [esp + 0xd8], 0
jne 0x41a80e
push 0x31
push 0x478bdc
push 0x479028
push 0
call ebp
cmp eax, 2
jne 0x41a80e
xor eax, eax
jmp 0x41b251
push esi
call fcn.00401080
call fcn.004456f0
call fcn.00412530
call fcn.004088d0
call fcn.0042d3b0
call fcn.0041ba40
call fcn.0041f350
call fcn.0041c6c0
call fcn.004440a0
call fcn.004085d0
call fcn.0040deb0
call fcn.0041f2d0
call fcn.004053d0
call fcn.00407b60
call fcn.00445670
call fcn.0044bcb0
push 0x1c47e8
push 0x6e4ff8
call fcn.004015a0
push 0x1c47e8
push 0x51f7f8
call fcn.004015a0
call fcn.0040df30
call fcn.00404810
lea ecx, [esp + 0xc108]
push ecx
push str.E.A.G.L.S_System
push str.WindowTitle
push str.WindowState
call fcn.004010c0
lea edx, [esp + 0x6118]
push edx
push str.SOFTWARETECHARTSEAGLS
push str.GameDataKey
push str.SystemState
call fcn.004010c0
lea eax, [esp + 0x8128]
push eax
push 0x478fcc
push str.CDLavel
push str.SystemState
call fcn.004010c0
add esp, 0x40
lea ecx, [esp + 0xf0f8]
push ecx
push str.WAVEPACK
push str.WaveClassName
push str.SystemState
call fcn.004010c0
lea edx, [esp + 0xd108]
push edx
push str.CGPACK
push str.CGClassName
push str.SystemState
call fcn.004010c0
lea eax, [esp + 0x11118]
push eax
push str.SCPACK
push str.ScriptClassName
push str.SystemState
call fcn.004010c0
lea ecx, [esp + 0x10128]
push ecx
push str.EAGLSWAVE_
push str.CD_WaveFolderName
push str.SystemState
call fcn.004010c0
add esp, 0x40
lea edx, [esp + 0xb0f8]
push edx
push str.EAGLSCG_
push str.CD_CGFolderName
push str.SystemState
call fcn.004010c0
lea eax, [esp + 0xa108]
push eax
push str.WAVE_
push str.HD_WaveFolderName
push str.SystemState
call fcn.004010c0
lea ecx, [esp + 0x5118]
push ecx
push 0x478f20
push str.HD_CGFolderName
push str.SystemState
call fcn.004010c0
lea edx, [esp + 0xe128]
push edx
push str.Script_
push str.HD_ScriptFolderName
push str.SystemState
call fcn.004010c0
add esp, 0x40
push 0
push str.EnableRegister
push str.SystemState
call fcn.004011d0
push str.E.A.G.L.S_System
mov esi, eax
call fcn.0041c5b0
add esp, 0x10
test eax, eax
je 0x41b250
test esi, esi
push edi
je 0x41adb4
lea eax, [esp + 0x10]
push eax
push 1
push 0
lea ecx, [esp + 0x6108]
push ecx
push 0x80000002
mov dword [esp + 0x2c], 0xff
call dword [0x477008]
test eax, eax
je 0x41aa2f
push 0x478ec0
call fcn.004087e0
add esp, 4
jmp 0x41b24a
mov esi, dword [section..rdata]
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x100]
push eax
lea ecx, [esp + 0x28]
push ecx
push 0
push str.InstFolder
push edx
call esi
lea eax, [esp + 0xfc]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41aa60
sub eax, edx
cmp byte [esp + eax + 0xfb], 0x5c
je 0x41aa93
lea edi, [esp + 0xfc]
add edi, 0xffffffff
nop
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x41aa80
mov ax, word [0x4773ec]
mov word [edi], ax
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x7100]
push edx
lea eax, [esp + 0x28]
push eax
push 0
push str.InstMode
push ecx
call esi
lea edx, [esp + 0x70fc]
push edx
call fcn.0045473c
mov esi, eax
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call dword [0x477004]
cmp esi, 2
je 0x41ab5a
lea ecx, [esp + 0x80fc]
push ecx
lea edx, [esp + 0x3100]
push edx
push 0
call fcn.00401c60
add esp, 0xc
cmp eax, 0xff
jne 0x41ab5a
lea ebx, [ebx]
lea eax, [esp + 0xc0fc]
push eax
lea ecx, [esp + 0x9100]
push str._s_Disc
push ecx
call fcn.00454878
add esp, 0xc
push 1
push 0x478e74
lea edx, [esp + 0x9104]
push edx
push 0
call ebp
cmp eax, 2
je 0x41b24a
lea eax, [esp + 0x80fc]
push eax
lea ecx, [esp + 0x3100]
push ecx
push 0
call fcn.00401c60
add esp, 0xc
cmp eax, 0xff
je 0x41ab00
lea edx, [esp + 0xfc]
push edx
call dword [0x4770ac]
mov eax, esi
sub eax, 0
je 0x41acc4
sub eax, 1
je 0x41ac24
sub eax, 1
jne 0x41ad6f
jmp 0x41ab90
mov cl, byte [esp + eax + 0xfc]
mov byte [esp + eax + 0x20fc], cl
add eax, 1
test cl, cl
jne 0x41ab90
lea eax, [esp + 0xa0fc]
mov edx, eax
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41abb0
lea edi, [esp + 0x20fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41abc5
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov cl, byte [esp + eax + 0xfc]
mov byte [esp + eax + 0x10fc], cl
add eax, 1
test cl, cl
jne 0x41abe1
lea eax, [esp + 0x50fc]
mov edx, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41ac00
lea edi, [esp + 0x10fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41ac15
jmp 0x41ad5f
xor eax, eax
jmp 0x41ac30
mov cl, byte [esp + eax + 0x30fc]
mov byte [esp + eax + 0x20fc], cl
add eax, 1
test cl, cl
jne 0x41ac30
lea eax, [esp + 0x100fc]
mov edx, eax
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41ac50
lea edi, [esp + 0x20fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41ac65
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov cl, byte [esp + eax + 0xfc]
mov byte [esp + eax + 0x10fc], cl
add eax, 1
test cl, cl
jne 0x41ac81
lea eax, [esp + 0x50fc]
mov edx, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41aca0
lea edi, [esp + 0x10fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41acb5
jmp 0x41ad5f
xor eax, eax
jmp 0x41acd0
mov cl, byte [esp + eax + 0x30fc]
mov byte [esp + eax + 0x20fc], cl
add eax, 1
test cl, cl
jne 0x41acd0
lea eax, [esp + 0x100fc]
mov edx, eax
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41acf0
lea edi, [esp + 0x20fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41ad05
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov cl, byte [esp + eax + 0x30fc]
mov byte [esp + eax + 0x10fc], cl
add eax, 1
test cl, cl
jne 0x41ad21
lea eax, [esp + 0xb0fc]
mov edx, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41ad40
lea edi, [esp + 0x10fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41ad55
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov cl, byte [esp + eax + 0xfc]
mov byte [esp + eax + 0x40fc], cl
add eax, 1
test cl, cl
jne 0x41ad71
lea eax, [esp + 0xe0fc]
mov edx, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41ad90
lea edi, [esp + 0x40fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41ada5
jmp 0x41aeef
lea eax, [esp + 0xfc]
push eax
push 0xff
call dword [0x4771e8]
lea eax, [esp + 0xfc]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41add1
sub eax, edx
cmp byte [esp + eax + 0xfb], 0x5c
je 0x41ae04
lea edi, [esp + 0xfc]
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x41adf0
mov cx, word [0x4773ec]
mov word [edi], cx
xor eax, eax
jmp 0x41ae10
mov cl, byte [esp + eax + 0xfc]
mov byte [esp + eax + 0x20fc], cl
add eax, 1
test cl, cl
jne 0x41ae10
lea eax, [esp + 0xa0fc]
mov edx, eax
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41ae30
lea edi, [esp + 0x20fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41ae45
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov cl, byte [esp + eax + 0xfc]
mov byte [esp + eax + 0x10fc], cl
add eax, 1
test cl, cl
jne 0x41ae61
lea eax, [esp + 0x50fc]
mov edx, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41ae80
lea edi, [esp + 0x10fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41ae95
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov cl, byte [esp + eax + 0xfc]
mov byte [esp + eax + 0x40fc], cl
add eax, 1
test cl, cl
jne 0x41aeb1
lea eax, [esp + 0xe0fc]
mov edx, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41aed0
lea edi, [esp + 0x40fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41aee5
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea edx, [esp + 0xd0fc]
push edx
lea eax, [esp + 0x1100]
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x12118]
push ecx
push 0x44a6f0
lea edx, [esp + 0xc10c]
push edx
mov eax, edx
push eax
push ebx
call fcn.004460b0
add esp, 0x1c
test eax, eax
mov dword [esp + 0x14], eax
je 0x41b049
call fcn.0041ee40
push 1
xor edi, edi
push edi
push edi
push edi
lea ecx, [esp + 0x34]
push ecx
call dword [0x477294]
mov ebx, dword [0x477298]
lea edx, [esp + 0x24]
push edx
call ebx
lea eax, [esp + 0x24]
push eax
call dword [0x47729c]
mov esi, dword [esp + 0x1c]
push edi
push 0x508cb8
push 0x47cc10
push 0x800
push esi
call fcn.004546c0
test eax, eax
je 0x41af91
mov dword [0x508cb8], edi
jmp 0x41aff0
mov eax, dword [0x508cb8]
cmp eax, edi
je 0x41aff0
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push edi
push 0x508cb4
push 0x47cbf0
push eax
call edx
test eax, eax
je 0x41afb9
mov dword [0x508cb4], edi
jmp 0x41aff0
mov eax, dword [0x508cb4]
cmp eax, edi
je 0x41aff0
mov ecx, dword [eax]
mov edx, dword [ecx + 0x2c]
push 0x47ce0c
push eax
call edx
mov eax, dword [0x508cb4]
mov edx, dword [esp + 0x14]
mov ecx, dword [eax]
push 6
push edx
push eax
mov eax, dword [ecx + 0x34]
call eax
mov eax, dword [0x508cb4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x1c]
push eax
call edx
lea eax, [esp + 0xf0fc]
push eax
lea ecx, [esp + 0x2100]
push ecx
push 1
push esi
call fcn.004452f0
add esp, 0x10
test eax, eax
je 0x41b049
call fcn.0040db20
push 1
call fcn.0044a6c0
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x11100]
push edx
lea eax, [esp + 0x4104]
push eax
push ecx
call fcn.0042c920
add esp, 0x10
test eax, eax
jne 0x41b050
push 0x478e40
call fcn.004087e0
add esp, 4
xor eax, eax
jmp 0x41b24f
push edi
push edi
push 0x41a580
mov byte [0x508cb0], 1
call fcn.004558cf
mov esi, dword [0x4772a0]
mov ebp, dword [0x477080]
add esp, 0xc
push 1
push 0
push 0
push 0
lea edx, [esp + 0x34]
push edx
call dword [0x477294]
test eax, eax
je 0x41b151
cmp dword [esp + 0x28], 0x12
je 0x41b15c
mov eax, dword [0x491af8]
test eax, eax
je 0x41b0ad
lea ecx, [esp + 0x24]
push ecx
push eax
call esi
test eax, eax
jne 0x41b072
mov eax, dword [0x491afc]
test eax, eax
je 0x41b0c2
lea edx, [esp + 0x24]
push edx
push eax
call esi
test eax, eax
jne 0x41b072
mov eax, dword [0x491b00]
test eax, eax
je 0x41b0d7
lea ecx, [esp + 0x24]
push ecx
push eax
call esi
test eax, eax
jne 0x41b072
mov eax, dword [0x491b04]
test eax, eax
je 0x41b0ec
lea edx, [esp + 0x24]
push edx
push eax
call esi
test eax, eax
jne 0x41b072
mov eax, dword [0x491b08]
test eax, eax
je 0x41b105
lea ecx, [esp + 0x24]
push ecx
push eax
call esi
test eax, eax
jne 0x41b072
mov eax, dword [0x492b18]
test eax, eax
je 0x41b11e
lea edx, [esp + 0x24]
push edx
push eax
call esi
test eax, eax
jne 0x41b072
lea eax, [esp + 0x24]
push eax
call ebx
lea ecx, [esp + 0x24]
push ecx
call dword [0x47729c]
add edi, 1
mov edx, edi
and edx, 0x80000003
jns 0x41b142
dec edx
or edx, 0xfffffffc
inc edx
jne 0x41b072
push 0xa
call ebp
jmp 0x41b072
push 0x14
xor edi, edi
call ebp
jmp 0x41b072
mov byte [0x508cb0], 0
mov al, byte [0x508cb0]
test al, al
jne 0x41b17e
lea esp, [esp]
push 0x64
call ebp
mov cl, byte [0x508cb0]
test cl, cl
je 0x41b170
xor esi, esi
push esi
call fcn.0041bfb0
add esi, 1
add esp, 4
cmp esi, 5
jl 0x41b180
call fcn.0041c050
push 0
call fcn.0044a6c0
mov edx, dword [esp + 0x20]
push edx
call fcn.004440e0
mov esi, dword [esp + 0x1c]
push esi
call fcn.0041f390
push esi
call fcn.00447520
add esp, 0x10
call fcn.0041dbc0
call fcn.00404830
push 0x3e8
call ebp
mov eax, dword [0x508cb4]
test eax, eax
je 0x41b1e9
mov ecx, dword [eax]
mov edx, dword [ecx + 0x20]
push eax
call edx
mov eax, dword [0x508cb4]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [0x508cb8]
test eax, eax
je 0x41b1fa
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
call fcn.004010a0
call fcn.00412550
call fcn.004088f0
call fcn.00445710
call fcn.0042d3d0
call fcn.0041ba60
call fcn.0041f370
call fcn.0041c6e0
call fcn.004440c0
call fcn.004085f0
call fcn.0040ded0
call fcn.0041f2f0
call fcn.004053f0
call fcn.00407b80
call fcn.00445690
call fcn.0044bcc0
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0x120f4]
pop ebp
pop ebx
xor ecx, esp
call fcn.004546e4
add esp, 0x120f0
ret 0x10