Function at 0x409440
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4c5c20
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0xa8]
test eax, eax
push edi
je 0x409b6d
push 0x4cc59c
lea ecx, [eax + 0x10]
call fcn.004027d0
test al, al
je 0x409b6d
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push ecx
push eax
mov dword [esi + 0x474], eax
lea eax, [esp + 0x50]
push str.Level__d__d
push eax
mov dword [esi + 0x478], ecx
call fcn.0048025b
add esp, 0x10
push str.Level
lea ecx, [esp + 0x24]
call fcn.0042aa80
mov ecx, dword [esi + 0xa8]
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x78], 0
call fcn.004058f0
or ebx, 0xffffffff
lea ecx, [esp + 0x20]
mov edi, eax
mov dword [esp + 0x74], ebx
call fcn.0042a980
test edi, edi
je 0x409517
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x24]
call fcn.0042aa80
lea ecx, [esp + 0x20]
push ecx
mov ecx, edi
mov dword [esp + 0x78], 1
call fcn.0045c910
lea ecx, [esp + 0x20]
mov dword [esp + 0x74], ebx
call fcn.0042a980
mov al, byte [ebp + 0x10]
test al, al
je 0x40997a
push str.MapStageComplete_S
lea ecx, [esp + 0x1c]
call fcn.0042aa80
push str.StageComplete_S
lea ecx, [esp + 0x24]
mov dword [esp + 0x78], 2
call fcn.0042aa80
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x24]
push eax
mov ecx, esi
mov byte [esp + 0x7c], 3
call fcn.00457140
lea ecx, [esp + 0x20]
mov byte [esp + 0x74], 2
call fcn.0042a980
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], ebx
call fcn.0042a980
push str.MapStageComplete_T
lea ecx, [esp + 0x1c]
call fcn.0042aa80
push str.StageComplete_T
lea ecx, [esp + 0x24]
mov dword [esp + 0x78], 4
call fcn.0042aa80
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
mov ecx, esi
mov byte [esp + 0x7c], 5
call fcn.00457140
lea ecx, [esp + 0x20]
mov byte [esp + 0x74], 4
call fcn.0042a980
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], ebx
call fcn.0042a980
push str.MapStageComplete_A
lea ecx, [esp + 0x1c]
call fcn.0042aa80
push str.StageComplete_A
lea ecx, [esp + 0x24]
mov dword [esp + 0x78], 6
call fcn.0042aa80
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, esi
mov byte [esp + 0x7c], 7
call fcn.00457140
lea ecx, [esp + 0x20]
mov byte [esp + 0x74], 6
call fcn.0042a980
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], ebx
call fcn.0042a980
push str.MapStageComplete_G
lea ecx, [esp + 0x1c]
call fcn.0042aa80
push str.StageComplete_G
lea ecx, [esp + 0x24]
mov dword [esp + 0x78], 8
call fcn.0042aa80
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x24]
mov byte [esp + 0x78], 9
push eax
mov ecx, esi
call fcn.00457140
lea ecx, [esp + 0x20]
mov byte [esp + 0x74], 8
call fcn.0042a980
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], ebx
call fcn.0042a980
push str.MapStageComplete_E
lea ecx, [esp + 0x1c]
call fcn.0042aa80
push str.StageComplete_E
lea ecx, [esp + 0x24]
mov dword [esp + 0x78], 0xa
call fcn.0042aa80
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
mov ecx, esi
mov byte [esp + 0x7c], 0xb
call fcn.00457140
lea ecx, [esp + 0x20]
mov byte [esp + 0x74], 0xa
call fcn.0042a980
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], ebx
call fcn.0042a980
push str.MapStageComplete_C
lea ecx, [esp + 0x1c]
call fcn.0042aa80
push str.StageComplete_C
lea ecx, [esp + 0x24]
mov dword [esp + 0x78], 0xc
call fcn.0042aa80
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, esi
mov byte [esp + 0x7c], 0xd
call fcn.00457140
lea ecx, [esp + 0x20]
mov byte [esp + 0x74], 0xc
call fcn.0042a980
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], ebx
call fcn.0042a980
push str.MapStageComplete_O
lea ecx, [esp + 0x1c]
call fcn.0042aa80
push str.StageComplete_O
lea ecx, [esp + 0x24]
mov dword [esp + 0x78], 0xe
call fcn.0042aa80
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x24]
push eax
mov ecx, esi
mov byte [esp + 0x7c], 0xf
call fcn.00457140
lea ecx, [esp + 0x20]
mov byte [esp + 0x74], 0xe
call fcn.0042a980
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], ebx
call fcn.0042a980
push str.MapStageComplete_M
lea ecx, [esp + 0x1c]
call fcn.0042aa80
push str.StageComplete_M
lea ecx, [esp + 0x24]
mov dword [esp + 0x78], 0x10
call fcn.0042aa80
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
mov ecx, esi
mov byte [esp + 0x7c], 0x11
call fcn.00457140
lea ecx, [esp + 0x20]
mov byte [esp + 0x74], 0x10
call fcn.0042a980
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], ebx
call fcn.0042a980
push str.MapStageComplete_P
lea ecx, [esp + 0x1c]
call fcn.0042aa80
push str.StageComplete_P
lea ecx, [esp + 0x24]
mov dword [esp + 0x78], 0x12
call fcn.0042aa80
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, esi
mov byte [esp + 0x7c], 0x13
call fcn.00457140
lea ecx, [esp + 0x20]
mov byte [esp + 0x74], 0x12
call fcn.0042a980
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], ebx
call fcn.0042a980
push str.MapStageComplete_L
lea ecx, [esp + 0x1c]
call fcn.0042aa80
push str.StageComplete_L
lea ecx, [esp + 0x24]
mov dword [esp + 0x78], 0x14
call fcn.0042aa80
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x24]
push eax
mov ecx, esi
mov byte [esp + 0x7c], 0x15
call fcn.00457140
lea ecx, [esp + 0x20]
mov byte [esp + 0x74], 0x14
call fcn.0042a980
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], ebx
call fcn.0042a980
push str.MapStageComplete_E2
lea ecx, [esp + 0x1c]
call fcn.0042aa80
push str.StageComplete_E2
lea ecx, [esp + 0x24]
mov dword [esp + 0x78], 0x16
call fcn.0042aa80
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
mov ecx, esi
mov byte [esp + 0x7c], 0x17
call fcn.00457140
lea ecx, [esp + 0x20]
mov byte [esp + 0x74], 0x16
call fcn.0042a980
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], ebx
call fcn.0042a980
push str.MapStageComplete_T2
lea ecx, [esp + 0x1c]
call fcn.0042aa80
push str.StageComplete_T2
lea ecx, [esp + 0x24]
mov dword [esp + 0x78], 0x18
call fcn.0042aa80
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, esi
mov byte [esp + 0x7c], 0x19
call fcn.00457140
lea ecx, [esp + 0x20]
mov byte [esp + 0x74], 0x18
call fcn.0042a980
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], ebx
call fcn.0042a980
push str.MapStageComplete_E3
lea ecx, [esp + 0x1c]
call fcn.0042aa80
mov ebx, 0x1a
push str.StageComplete_E3
lea ecx, [esp + 0x24]
mov dword [esp + 0x78], ebx
call fcn.0042aa80
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x24]
push eax
mov ecx, esi
mov byte [esp + 0x7c], 0x1b
call fcn.00457140
lea ecx, [esp + 0x20]
mov byte [esp + 0x74], bl
call fcn.0042a980
lea ecx, [esp + 0x18]
mov dword [esp + 0x74], 0xffffffff
call fcn.0042a980
or ebx, 0xffffffff
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x4c]
push str.Stage_d
push edx
call fcn.0048025b
add esp, 0xc
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x2c]
call fcn.0042aa80
mov eax, dword [esi + 0xa8]
lea ecx, [eax + 0xa0]
cmp dword [ecx], 0
mov dword [esp + 0x74], 0x1c
je 0x4099d8
lea edx, [esp + 0x28]
push edx
call fcn.004045d0
test eax, eax
je 0x4099d8
mov eax, dword [eax]
mov dword [esp + 0x18], eax
mov al, 1
jmp 0x4099da
xor al, al
mov ecx, dword [esp + 0x18]
neg al
mov dword [esp + 0x74], ebx
sbb eax, eax
and eax, ecx
lea ecx, [esp + 0x28]
mov edi, eax
call fcn.0042a980
test edi, edi
je 0x409a0e
mov edx, dword [esi + 0x390]
mov ecx, dword [esp + 0x10]
cmp ecx, edx
setg dl
mov ecx, edi
push edx
call fcn.0045cb80
mov dword [esp + 0x14], 1
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
push ecx
lea edx, [esp + 0x50]
push str.Level_d__d
push edx
call fcn.0048025b
add esp, 0x10
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x34]
call fcn.0042aa80
mov eax, dword [esi + 0xa8]
lea ecx, [eax + 0xa0]
cmp dword [ecx], 0
mov dword [esp + 0x74], 0x1d
je 0x409a71
lea edx, [esp + 0x30]
push edx
call fcn.004045d0
test eax, eax
je 0x409a71
mov eax, dword [eax]
mov dword [esp + 0x20], eax
mov al, 1
jmp 0x409a73
xor al, al
mov ecx, dword [esp + 0x20]
neg al
mov dword [esp + 0x74], ebx
sbb eax, eax
and eax, ecx
lea ecx, [esp + 0x30]
mov edi, eax
call fcn.0042a980
test edi, edi
je 0x409abc
mov eax, dword [esi + 0x474]
mov ecx, dword [esp + 0x10]
cmp ecx, eax
jl 0x409ab0
jne 0x409aac
mov ecx, dword [esp + 0x14]
cmp ecx, dword [esi + 0x478]
jle 0x409ab0
xor al, al
jmp 0x409ab4
xor eax, eax
mov al, 1
push eax
mov ecx, edi
call fcn.0045d190
mov edx, dword [esp + 0x10]
cmp edx, dword [esi + 0x474]
jne 0x409b49
mov eax, dword [esp + 0x14]
cmp eax, dword [esi + 0x478]
jne 0x409b49
mov eax, dword [esi + 0x480]
test eax, eax
je 0x409aee
mov ecx, dword [esi + 0x9c]
push eax
call fcn.004508b0
push str.MapCurrentLevel
lea ecx, [esp + 0x44]
call fcn.0042aa80
lea ecx, [esp + 0x48]
push ecx
lea ecx, [esp + 0x3c]
mov dword [esp + 0x78], 0x1e
call fcn.0042aa80
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x3c]
push eax
mov ecx, esi
mov byte [esp + 0x7c], 0x1f
call fcn.00457140
lea ecx, [esp + 0x38]
mov dword [esi + 0x480], eax
mov byte [esp + 0x74], 0x1e
call fcn.0042a980
lea ecx, [esp + 0x40]
mov dword [esp + 0x74], ebx
call fcn.0042a980
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 0xa
mov dword [esp + 0x14], eax
jle 0x409a16
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 0xf
mov dword [esp + 0x10], eax
jle 0x409982
mov ecx, dword [esp + 0x6c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc