Function at 0x41b540
Capabilities:
Create thread

Disassembly:
mov eax, 0x120f0
call fcn.0045a570
mov eax, dword [0x48f4c8]
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 [0x47d30c]
add esp, 4
cmp dword [esp + 0xd8], 0
jne 0x41b59e
push 0x31
push 0x47ec34
push 0x47f088
push 0
call ebp
cmp eax, 2
jne 0x41b59e
xor eax, eax
jmp 0x41c032
push esi
call fcn.00401080
call fcn.0044a8e0
call fcn.00412fe0
call fcn.00408da0
call fcn.0042f280
call fcn.0041c8c0
call fcn.00420720
call fcn.0041d5a0
call fcn.00449190
call fcn.00408aa0
call fcn.0040e7e0
call fcn.004206a0
call fcn.00405570
call fcn.00407d90
call fcn.0044a860
call fcn.00451b20
push 0x157628
push 0x6a9fd8
call fcn.004015a0
push 0x157628
push 0x551998
call fcn.004015a0
call fcn.0040e860
call fcn.004049b0
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 0x47f02c
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 0x47ef80
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.0041d490
add esp, 0x10
test eax, eax
je 0x41c031
push edi
push 0x1000
push 0
push 0x5398e8
call fcn.0045a5c0
add esp, 0xc
test esi, esi
je 0x41bb74
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 [0x47d008]
test eax, eax
je 0x41b7d3
push 0x47ef20
call fcn.00408cb0
add esp, 4
jmp 0x41c02b
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]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41b803
sub eax, edx
cmp byte [esp + eax + 0xfb], 0x5c
je 0x41b835
lea edi, [esp + 0xfc]
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x41b822
mov ax, word [0x47d3fc]
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.0045a5ac
mov esi, eax
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call dword [0x47d004]
cmp esi, 2
je 0x41b8fa
lea ecx, [esp + 0x80fc]
push ecx
lea edx, [esp + 0x3100]
push edx
push 0
call fcn.00401c60
add esp, 0xc
cmp eax, 0xff
jne 0x41b8fa
lea esp, [esp]
lea eax, [esp + 0xc0fc]
push eax
lea ecx, [esp + 0x9100]
push str._s_Disc
push ecx
call fcn.0045a6e7
add esp, 0xc
push 1
push 0x47eed4
lea edx, [esp + 0x9104]
push edx
push 0
call ebp
cmp eax, 2
je 0x41c02b
lea eax, [esp + 0x80fc]
push eax
lea ecx, [esp + 0x3100]
push ecx
push 0
call fcn.00401c60
add esp, 0xc
cmp eax, 0xff
je 0x41b8a0
lea edx, [esp + 0xfc]
push edx
call dword [0x47d0ac]
xor eax, eax
lea ebx, [ebx]
mov cl, byte [esp + eax + 0xfc]
mov byte [eax + 0x5398e8], cl
add eax, 1
test cl, cl
jne 0x41b910
mov eax, esi
sub eax, 0
je 0x41ba74
sub eax, 1
je 0x41b9d4
sub eax, 1
jne 0x41bb1f
mov cl, byte [esp + eax + 0xfc]
mov byte [esp + eax + 0x20fc], cl
add eax, 1
test cl, cl
jne 0x41b941
lea eax, [esp + 0xa0fc]
mov edx, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41b960
lea edi, [esp + 0x20fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41b975
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 0x41b991
lea eax, [esp + 0x50fc]
mov edx, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41b9b0
lea edi, [esp + 0x10fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41b9c5
jmp 0x41bb0f
xor eax, eax
jmp 0x41b9e0
mov cl, byte [esp + eax + 0x30fc]
mov byte [esp + eax + 0x20fc], cl
add eax, 1
test cl, cl
jne 0x41b9e0
lea eax, [esp + 0x100fc]
mov edx, eax
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41ba00
lea edi, [esp + 0x20fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41ba15
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 0x41ba31
lea eax, [esp + 0x50fc]
mov edx, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41ba50
lea edi, [esp + 0x10fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41ba65
jmp 0x41bb0f
xor eax, eax
jmp 0x41ba80
mov cl, byte [esp + eax + 0x30fc]
mov byte [esp + eax + 0x20fc], cl
add eax, 1
test cl, cl
jne 0x41ba80
lea eax, [esp + 0x100fc]
mov edx, eax
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41baa0
lea edi, [esp + 0x20fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41bab5
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 0x41bad1
lea eax, [esp + 0xb0fc]
mov edx, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41baf0
lea edi, [esp + 0x10fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41bb05
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 0x41bb21
lea eax, [esp + 0xe0fc]
mov edx, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41bb40
lea edi, [esp + 0x40fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41bb55
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]
jmp 0x41bce4
lea eax, [esp + 0xfc]
push eax
push 0xff
call dword [0x47d200]
lea eax, [esp + 0xfc]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41bb91
sub eax, edx
cmp byte [esp + eax + 0xfb], 0x5c
je 0x41bbc4
lea edi, [esp + 0xfc]
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x41bbb0
mov cx, word [0x47d3fc]
mov word [edi], cx
xor eax, eax
jmp 0x41bbd0
mov cl, byte [esp + eax + 0xfc]
mov byte [esp + eax + 0x20fc], cl
add eax, 1
test cl, cl
jne 0x41bbd0
lea eax, [esp + 0xa0fc]
mov edx, eax
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41bbf0
lea edi, [esp + 0x20fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41bc05
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 0x41bc21
lea eax, [esp + 0x50fc]
mov edx, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41bc40
lea edi, [esp + 0x10fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41bc55
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 0x41bc71
lea eax, [esp + 0xe0fc]
mov edx, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41bc90
lea edi, [esp + 0x40fc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x41bca5
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
jmp 0x41bcd0
mov cl, byte [esp + eax + 0xfc]
mov byte [eax + 0x5398e8], cl
add eax, 1
test cl, cl
jne 0x41bcd0
mov ecx, dword [esp + 0x12110]
lea edx, [esp + 0xd0fc]
push edx
lea eax, [esp + 0x1100]
push eax
push ecx
push 0x450560
lea edx, [esp + 0xc10c]
push edx
mov eax, edx
push eax
push ebx
call fcn.0044bdf0
add esp, 0x1c
test eax, eax
mov dword [esp + 0x14], eax
je 0x41be2e
call fcn.004201f0
push 1
xor edi, edi
push edi
push edi
push edi
lea ecx, [esp + 0x34]
push ecx
call dword [0x47d368]
mov ebx, dword [0x47d2ac]
lea edx, [esp + 0x24]
push edx
call ebx
lea eax, [esp + 0x24]
push eax
call dword [0x47d2b0]
mov esi, dword [esp + 0x1c]
push edi
push 0x53acf4
push 0x482c18
push 0x800
push esi
call fcn.0045a530
test eax, eax
je 0x41bd76
mov dword [0x53acf4], edi
jmp 0x41bdd5
mov eax, dword [0x53acf4]
cmp eax, edi
je 0x41bdd5
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push edi
push 0x53acf0
push 0x482bf8
push eax
call edx
test eax, eax
je 0x41bd9e
mov dword [0x53acf0], edi
jmp 0x41bdd5
mov eax, dword [0x53acf0]
cmp eax, edi
je 0x41bdd5
mov ecx, dword [eax]
mov edx, dword [ecx + 0x2c]
push 0x482e14
push eax
call edx
mov eax, dword [0x53acf0]
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 [0x53acf0]
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.0044a4e0
add esp, 0x10
test eax, eax
je 0x41be2e
call fcn.0040e3f0
push 1
call fcn.00450530
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x11100]
push edx
lea eax, [esp + 0x4104]
push eax
push ecx
call fcn.0042e760
add esp, 0x10
test eax, eax
jne 0x41be35
push 0x47eea0
call fcn.00408cb0
add esp, 4
xor eax, eax
jmp 0x41c030
push edi
push edi
push 0x41b310
mov byte [0x53a8e8], 1
call fcn.0045b73f
mov esi, dword [0x47d2b4]
mov ebp, dword [0x47d080]
add esp, 0xc
push 1
push 0
push 0
push 0
lea edx, [esp + 0x34]
push edx
call dword [0x47d368]
test eax, eax
je 0x41bf36
cmp dword [esp + 0x28], 0x12
je 0x41bf41
mov eax, dword [0x497af8]
test eax, eax
je 0x41be92
lea ecx, [esp + 0x24]
push ecx
push eax
call esi
test eax, eax
jne 0x41be57
mov eax, dword [0x497afc]
test eax, eax
je 0x41bea7
lea edx, [esp + 0x24]
push edx
push eax
call esi
test eax, eax
jne 0x41be57
mov eax, dword [0x497b00]
test eax, eax
je 0x41bebc
lea ecx, [esp + 0x24]
push ecx
push eax
call esi
test eax, eax
jne 0x41be57
mov eax, dword [0x497b04]
test eax, eax
je 0x41bed1
lea edx, [esp + 0x24]
push edx
push eax
call esi
test eax, eax
jne 0x41be57
mov eax, dword [0x497b08]
test eax, eax
je 0x41beea
lea ecx, [esp + 0x24]
push ecx
push eax
call esi
test eax, eax
jne 0x41be57
mov eax, dword [0x498b18]
test eax, eax
je 0x41bf03
lea edx, [esp + 0x24]
push edx
push eax
call esi
test eax, eax
jne 0x41be57
lea eax, [esp + 0x24]
push eax
call ebx
lea ecx, [esp + 0x24]
push ecx
call dword [0x47d2b0]
add edi, 1
mov edx, edi
and edx, 0x80000003
jns 0x41bf27
dec edx
or edx, 0xfffffffc
inc edx
jne 0x41be57
push 0xa
call ebp
jmp 0x41be57
push 0x14
xor edi, edi
call ebp
jmp 0x41be57
mov byte [0x53a8e8], 0
mov al, byte [0x53a8e8]
test al, al
jne 0x41bf5f
push 0x64
call ebp
mov cl, byte [0x53a8e8]
test cl, cl
je 0x41bf51
xor esi, esi
push esi
call fcn.0041ce30
add esi, 1
add esp, 4
cmp esi, 6
jl 0x41bf61
call fcn.0041ced0
push 0
call fcn.00450530
mov edx, dword [esp + 0x20]
push edx
call fcn.004491d0
mov esi, dword [esp + 0x1c]
push esi
call fcn.00420760
push esi
call fcn.0044d440
add esp, 0x10
call fcn.0041ec40
call fcn.004049d0
push 0x3e8
call ebp
mov eax, dword [0x53acf0]
test eax, eax
je 0x41bfca
mov ecx, dword [eax]
mov edx, dword [ecx + 0x20]
push eax
call edx
mov eax, dword [0x53acf0]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [0x53acf4]
test eax, eax
je 0x41bfdb
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
call fcn.004010a0
call fcn.00413000
call fcn.00408dc0
call fcn.0044a900
call fcn.0042f2a0
call fcn.0041c8e0
call fcn.00420740
call fcn.0041d5c0
call fcn.004491b0
call fcn.00408ac0
call fcn.0040e800
call fcn.004206c0
call fcn.00405590
call fcn.00407db0
call fcn.0044a880
call fcn.00451b30
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0x120f4]
pop ebp
pop ebx
xor ecx, esp
call fcn.0045a554
add esp, 0x120f0
ret 0x10