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

Disassembly:
push 0xffffffffffffffff
push 0x486f8e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
mov eax, dword [esp + 0x3c]
push ebx
push ebp
xor ebp, ebp
cmp eax, ebp
mov ebx, ecx
mov dword [esp + 8], ebx
jne 0x413fd8
mov eax, dword [0x13a1044]
cmp eax, ebp
je 0x413f66
push eax
call fcn.0047e545
add esp, 4
mov dword [0x13a1044], ebp
mov eax, dword [ebx + 0x4f8]
cmp eax, ebp
je 0x413f7c
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebx + 0x4f8], ebp
mov eax, dword [ebx + 0x4ec]
cmp eax, ebp
je 0x413f92
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov dword [ebx + 0x4ec], ebp
mov eax, dword [ebx + 0x510]
cmp eax, ebp
je 0x413fa8
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebx + 0x510], ebp
mov eax, dword [ebx + 0x4e8]
cmp eax, ebp
je 0x413fbe
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov dword [ebx + 0x4e8], ebp
pop ebp
mov dword [ebx + 0x28], 0x808080
pop ebx
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
add esp, 0x38
ret 4
mov eax, dword [ebx + 0x520]
sub eax, ebp
push esi
push edi
je 0x4144e5
dec eax
je 0x4144d3
dec eax
jne 0x414141
mov eax, dword [0x13a1044]
cmp eax, ebp
je 0x41400e
push eax
call fcn.0047e545
add esp, 4
mov dword [0x13a1044], ebp
push 0x398
call fcn.0047e540
mov ebx, eax
xor eax, eax
mov edi, ebx
mov ecx, 0xe6
rep stosd dword es:[edi], eax
mov edi, ebx
mov ecx, 0xa
mov esi, 0x49eac0
rep movsd dword es:[edi], dword [esi]
lea edi, [ebx + 0x28]
mov ecx, 0xa
mov esi, 0x49eae8
rep movsd dword es:[edi], dword [esi]
lea edi, [ebx + 0x50]
mov ecx, 0xa
mov esi, 0x49eb10
rep movsd dword es:[edi], dword [esi]
lea edi, [ebx + 0x78]
mov ecx, 0xa
mov esi, 0x49eb38
add esp, 4
mov dword [0x13a1044], ebx
rep movsd dword es:[edi], dword [esi]
add ebx, 0xa8
nop
mov dword [ebx - 8], 0x48ad18
lea ecx, [eax + 0x52]
mov dword [ebx - 4], ecx
mov ebp, dword [eax*8 + 0x13a0f90]
mov ecx, dword [0x12e7be8]
mov esi, dword [0x12e7bec]
mov edi, dword [eax*8 + 0x13a0f94]
mov edx, ebp
shr ecx, 1
sub edx, ecx
add ecx, ebp
mov ebp, dword [eax*8 + 0x13a0f94]
shr esi, 1
sub edi, esi
add esi, ebp
mov ebp, ebx
mov dword [ebp], edx
mov dword [ebp + 4], edi
mov dword [ebp + 8], ecx
mov dword [ebp + 0xc], esi
mov edx, dword [0xff06cc]
test edx, edx
jne 0x4140c8
xor ecx, ecx
jmp 0x4140d3
mov ecx, dword [0xff06d0]
sub ecx, edx
sar ecx, 3
cmp eax, ecx
sbb dl, dl
inc dl
mov byte [ebx + 0x18], dl
inc eax
add ebx, 0x28
cmp eax, 0x12
jl 0x414070
mov ebx, dword [esp + 0x10]
mov ebp, dword [0x13a1044]
lea esi, [ebx + 0xc]
mov ecx, esi
call fcn.00410850
xor eax, eax
test ebp, ebp
mov ecx, 0x134
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, 2
mov dword [esi + 0xc], eax
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], 0x808080
je 0x41413f
mov dword [esi], ebp
cmp dword [ebp], 0
mov eax, ebp
je 0x41413f
jmp 0x414130
mov edx, dword [esi + 4]
add eax, 0x28
inc edx
mov dword [esi + 4], edx
cmp dword [eax], 0
jne 0x414130
xor ebp, ebp
mov eax, dword [ebx + 0x4f8]
cmp eax, ebp
lea esi, [ebx + 0x4f8]
je 0x414159
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [esi], ebp
push 1
push esi
push 0x12e7ba0
call fcn.0042ad20
movzx edx, word [0x15b9cc0]
movzx eax, word [0x15ba4bc]
movzx ecx, word [0x15b9cbc]
or edx, eax
or edx, ecx
push edx
mov edx, dword [esi]
push edx
call fcn.0042a0e0
mov eax, dword [ebx + 0x4e8]
lea edi, [ebx + 0x4e8]
add esp, 0x14
cmp eax, ebp
je 0x4141a3
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [edi], ebp
push 1
push edi
push 0x12e716c
call fcn.0042ad20
movzx edx, word [0x15b9cc0]
movzx eax, word [0x15ba4bc]
movzx ecx, word [0x15b9cbc]
or edx, eax
or edx, ecx
push edx
mov edx, dword [edi]
push edx
call fcn.0042a0e0
mov eax, dword [ebx + 0x520]
add esp, 0x14
cmp eax, ebp
jne 0x4144f7
mov edx, dword [esi]
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x14]
push ecx
push edx
call fcn.0042a850
mov ecx, dword [0x12e7ba4]
mov eax, dword [0x12e7ba0]
add esp, 0xc
lea edx, [esp + 0x1c]
mov dword [esp + 0x28], ecx
push edx
mov ecx, 0x12e7b08
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], eax
call fcn.0040fed0
push ebp
push 2
mov ecx, 0x12e7b08
call fcn.0040fea0
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x10]
push eax
push ecx
mov ecx, 0x12e7b08
call fcn.0040fe60
push 0x12
mov ecx, 0x12e7b08
call fcn.0040fe80
push 0x12e7c00
push str.Episode
mov ecx, 0x131c878
call fcn.0040f500
push eax
push str._s:__s
push 0xaf7000
push 0x96
push 0x64
push 0x12e7b08
call fcn.00410520
mov edx, dword [0x1cf9d90]
mov eax, dword [0x1cf9d94]
push edx
push eax
push str.Position:__d__d
push 0xaf7000
push 0xc8
push 0x64
push 0x12e7b08
call fcn.004104d0
mov ecx, dword [0x156ab88]
mov edx, dword [0x12e7cc8]
add esp, 0x38
push ecx
push edx
push str.MapKeys
mov ecx, 0x131c878
call fcn.0040f500
push eax
push 0xaf7000
push 0xfa
push 0x64
push 0x12e7b08
call fcn.00410520
mov eax, dword [0x12e7cc4]
mov ecx, dword [0x12e7cc0]
add esp, 0x1c
push eax
push ecx
push str.MapScore
mov ecx, 0x131c878
call fcn.0040f500
push eax
push 0xaf7000
push 0x12c
push 0x64
push 0x12e7b08
call fcn.00410520
add esp, 0x1c
push str.MapLegendCurrent
mov ecx, 0x131c878
call fcn.0040f500
push eax
push 0xaf7000
push 0x15e
push 0x82
push 0x12e7b08
call fcn.00410520
add esp, 0x14
push str.MapLegendTeleports
mov ecx, 0x131c878
call fcn.0040f500
push eax
push 0xaf7000
push 0x172
push 0x82
push 0x12e7b08
call fcn.00410520
add esp, 0x14
push str.MapLegendKeys
mov ecx, 0x131c878
call fcn.0040f500
push eax
push 0xaf7000
push 0x186
push 0x82
push 0x12e7b08
call fcn.00410520
add esp, 0x14
push str.MapLegendDoor
mov ecx, 0x131c878
call fcn.0040f500
push eax
push 0xaf7000
push 0x19a
push 0x82
push 0x12e7b08
call fcn.00410520
mov edx, dword [esi]
push edx
call fcn.0042a0c0
add esp, 0x18
lea eax, [esp + 0x1c]
push eax
push str.cell_current
mov ecx, 0x12e7b00
call fcn.004064c0
push eax
mov ecx, 0x12e7b00
call fcn.00406480
mov eax, dword [esi]
mov ecx, dword [eax]
push 1
lea edx, [esp + 0x20]
push edx
mov edx, dword [0x12e4728]
push edx
push 0x154
push 0x78
push eax
call dword [ecx + 0x1c]
lea eax, [esp + 0x1c]
push eax
push str.cell_teleport
mov ecx, 0x12e7b00
call fcn.004064c0
push eax
mov ecx, 0x12e7b00
call fcn.00406480
mov eax, dword [esi]
mov ecx, dword [eax]
push 1
lea edx, [esp + 0x20]
push edx
mov edx, dword [0x12e4728]
push edx
push 0x167
push 0x7a
push eax
call dword [ecx + 0x1c]
lea eax, [esp + 0x1c]
push eax
push str.cell_key
mov ecx, 0x12e7b00
call fcn.004064c0
push eax
mov ecx, 0x12e7b00
call fcn.00406480
mov eax, dword [esi]
mov ecx, dword [eax]
push 1
lea edx, [esp + 0x20]
push edx
mov edx, dword [0x12e4728]
push edx
push 0x17e
push 0x76
push eax
call dword [ecx + 0x1c]
lea eax, [esp + 0x1c]
push eax
push str.cell_door
mov ecx, 0x12e7b00
call fcn.004064c0
push eax
mov ecx, 0x12e7b00
call fcn.00406480
mov eax, dword [0x12e4728]
mov esi, dword [esi]
mov ecx, dword [esi]
push 1
lea edx, [esp + 0x20]
push edx
push eax
push 0x190
push 0x78
push esi
call dword [ecx + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
add esp, 0x38
ret 4
push 0x49e9f8
lea ecx, [ebx + 0xc]
call fcn.00410d00
jmp 0x414141
push 0x49e9a8
lea ecx, [ebx + 0xc]
call fcn.00410d00
jmp 0x414141
cmp eax, 1
jne 0x4146ab
test byte [0x13a1040], 1
jne 0x414533
or dword [0x13a1040], 1
mov ecx, 0x13a1028
mov dword [esp + 0x44], ebp
call fcn.004256f0
push 0x488ca0
call fcn.00460929
add esp, 4
mov dword [esp + 0x44], 0xffffffff
mov eax, dword [0x156ab8c]
cmp eax, 1
mov dword [esp + 0x4c], 1
jl 0x414549
mov dword [esp + 0x4c], eax
fild dword [0x12e7ccc]
push ecx
mov ecx, 0x12e7d80
fidiv dword [esp + 0x50]
fstp dword [esp]
push 0x13a1028
push 0x12e7bd0
call fcn.00413360
mov eax, dword [ebx + 0x510]
add ebx, 0x510
cmp eax, ebp
je 0x414583
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebx], ebp
push 1
push ebx
push 0x13a1028
call fcn.0042ad20
movzx edx, word [0x15b9cc0]
movzx eax, word [0x15ba4bc]
movzx ecx, word [0x15b9cbc]
or edx, eax
or edx, ecx
push edx
mov edx, dword [ebx]
push edx
call fcn.0042a0e0
mov edx, dword [esi]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x30]
push ecx
push edx
call fcn.0042a850
mov ecx, dword [0x12e7ba4]
mov eax, dword [0x12e7ba0]
add esp, 0x20
lea edx, [esp + 0x2c]
mov dword [esp + 0x38], ecx
push edx
mov ecx, 0x12e7b08
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], eax
call fcn.0040fed0
push ebp
push 2
mov ecx, 0x12e7b08
call fcn.0040fea0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push eax
push ecx
mov ecx, 0x12e7b08
call fcn.0040fe60
push 0x12
mov ecx, 0x12e7b08
call fcn.0040fe80
cmp dword [0x12e7ce0], ebp
mov ecx, dword [0x156ab8c]
je 0x414649
cmp ecx, 1
jge 0x414636
mov ecx, 1
mov eax, dword [0x12e7ccc]
imul eax, eax, 0x64
cdq
idiv ecx
push eax
push str.ArtefactInfo
jmp 0x414664
cmp ecx, 1
jge 0x414653
mov ecx, 1
mov eax, dword [0x12e7ccc]
imul eax, eax, 0x64
cdq
idiv ecx
push eax
push str.MapInfo
mov ecx, 0x131c878
call fcn.0040f500
push eax
push 0xaf7000
push 0x1c2
push 0x12c
push 0x12e7b08
call fcn.00410520
mov edx, dword [esi]
add esp, 0x18
push edx
call fcn.0042a0c0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
add esp, 0x38
ret 4
cmp eax, 2
jne 0x4146f8
mov edi, 0x13a0f90
jmp 0x4146c0
xor ebp, ebp
lea esp, [esp]
mov edx, dword [ebx + 0x4ec]
mov eax, dword [esi]
mov ecx, dword [eax]
push 1
push ebp
mov ebp, dword [edi + 4]
push edx
mov edx, dword [0x12e7bec]
shr edx, 1
sub ebp, edx
mov edx, dword [0x12e7be8]
push ebp
mov ebp, dword [edi]
shr edx, 1
sub ebp, edx
push ebp
push eax
call dword [ecx + 0x1c]
add edi, 8
cmp edi, 0x13a1020
jl 0x4146b7
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret 4