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

Disassembly:
sub esp, 0x3c
mov ecx, dword [ecx + 0x4f8]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x4c]
mov eax, dword [esi]
push edi
push 1
push 0
push ecx
push 0
push 0
push esi
call dword [eax + 0x1c]
mov eax, dword [0x156ab90]
sub eax, dword [0x156ab98]
lea eax, [eax + eax*8 + 0x320]
cdq
sub eax, edx
sar eax, 1
push str.left
mov ecx, 0x12e7b00
mov dword [esp + 0x24], eax
call fcn.004064c0
mov ebp, eax
lea edx, [ebp + 4]
push str.cell_present
mov ecx, 0x12e7b00
mov dword [esp + 0x1c], edx
call fcn.004064c0
push str.cell_current
mov ecx, 0x12e7b00
mov dword [esp + 0x2c], eax
call fcn.004064c0
push str.cell_key
mov ecx, 0x12e7b00
mov dword [esp + 0x30], eax
call fcn.004064c0
push str.cell_hasbeen
mov ecx, 0x12e7b00
mov dword [esp + 0x34], eax
call fcn.004064c0
push str.cell_teleport
mov ecx, 0x12e7b00
mov dword [esp + 0x28], eax
call fcn.004064c0
push str.cell_door
mov ecx, 0x12e7b00
mov dword [esp + 0x38], eax
call fcn.004064c0
mov edx, dword [0x156ab94]
mov dword [esp + 0x38], eax
mov eax, dword [0x156ab9c]
lea ecx, [eax - 1]
cmp edx, ecx
mov dword [esp + 0x50], edx
jge 0x412e4d
lea edi, [edx + edx*4]
shl edi, 4
mov dword [esp + 0x1c], edi
lea ebx, [edx + edx*8 + 0x78]
lea ecx, [ecx]
mov ecx, dword [0x156ab90]
cmp ecx, dword [0x156ab98]
mov dword [esp + 0x10], ecx
jge 0x412e33
add edi, ecx
lea eax, [edi*4 + 0x1567838]
mov dword [esp + 0x14], eax
mov edi, dword [0x156ab90]
mov eax, ecx
sub eax, edi
mov edi, dword [esp + 0x20]
lea edi, [edi + eax*8]
add edi, eax
mov eax, dword [esp + 0x14]
test byte [eax], 1
je 0x412e0d
push edx
push ecx
call fcn.0042d7d0
add esp, 8
test eax, eax
je 0x412bcd
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x3c]
push ecx
push edx
jmp 0x412bf2
mov eax, dword [0x12e7d28]
test eax, eax
jne 0x412be8
push 1
call fcn.00401610
add esp, 4
test al, al
je 0x412e05
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x3c]
push eax
push ecx
mov ecx, 0x12e7b00
call fcn.00406480
mov ecx, dword [0x12e4728]
mov edx, dword [esi]
push 1
lea eax, [esp + 0x40]
push eax
push ecx
push ebx
push edi
push esi
call dword [edx + 0x1c]
mov edx, dword [esp + 0x10]
cmp edx, dword [0x1cf9d94]
jne 0x412c54
mov eax, dword [esp + 0x50]
cmp eax, dword [0x1cf9d90]
jne 0x412c54
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x3c]
push ecx
push edx
mov ecx, 0x12e7b00
call fcn.00406480
mov edx, dword [0x12e4728]
mov eax, dword [esi]
push 1
lea ecx, [esp + 0x40]
push ecx
push edx
push ebx
push edi
push esi
call dword [eax + 0x1c]
mov eax, dword [0x12e7d2c]
test eax, eax
jne 0x412c6b
push 0
call fcn.00401610
add esp, 4
test al, al
je 0x412caa
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.0042d710
add esp, 8
test eax, eax
je 0x412caa
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x3c]
push edx
push eax
mov ecx, 0x12e7b00
call fcn.00406480
mov eax, dword [0x12e4728]
mov ecx, dword [esi]
push 1
lea edx, [esp + 0x40]
push edx
push eax
push ebx
push edi
push esi
call dword [ecx + 0x1c]
mov eax, dword [0x12e7d30]
test eax, eax
je 0x412cf3
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x10]
push ecx
push edx
call fcn.0042d750
add esp, 8
test eax, eax
je 0x412cf3
mov ecx, dword [esp + 0x34]
lea eax, [esp + 0x3c]
push eax
push ecx
mov ecx, 0x12e7b00
call fcn.00406480
mov ecx, dword [0x12e4728]
mov edx, dword [esi]
push 1
lea eax, [esp + 0x40]
push eax
push ecx
push ebx
push edi
push esi
call dword [edx + 0x1c]
mov edx, dword [0x12e7cc8]
cmp edx, dword [0x156ab88]
jl 0x412d40
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.0042d790
add esp, 8
test eax, eax
je 0x412d40
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x3c]
push edx
push eax
mov ecx, 0x12e7b00
call fcn.00406480
mov eax, dword [0x12e4728]
mov ecx, dword [esi]
push 1
lea edx, [esp + 0x40]
push edx
push eax
push ebx
push edi
push esi
call dword [ecx + 0x1c]
mov ecx, dword [esp + 0x14]
test byte [ecx], 2
jne 0x412d6f
lea edx, [esp + 0x3c]
push edx
push ebp
mov ecx, 0x12e7b00
call fcn.00406480
mov edx, dword [0x12e4728]
mov eax, dword [esi]
push 1
lea ecx, [esp + 0x40]
push ecx
push edx
push ebx
push edi
push esi
call dword [eax + 0x1c]
mov eax, dword [esp + 0x14]
test byte [eax], 4
jne 0x412da1
lea ecx, [esp + 0x3c]
push ecx
lea edx, [ebp + 1]
push edx
mov ecx, 0x12e7b00
call fcn.00406480
mov edx, dword [0x12e4728]
mov eax, dword [esi]
push 1
lea ecx, [esp + 0x40]
push ecx
push edx
push ebx
push edi
push esi
call dword [eax + 0x1c]
mov eax, dword [esp + 0x14]
test byte [eax], 8
jne 0x412dd3
lea ecx, [esp + 0x3c]
push ecx
lea edx, [ebp + 2]
push edx
mov ecx, 0x12e7b00
call fcn.00406480
mov edx, dword [0x12e4728]
mov eax, dword [esi]
push 1
lea ecx, [esp + 0x40]
push ecx
push edx
push ebx
push edi
push esi
call dword [eax + 0x1c]
mov eax, dword [esp + 0x14]
test byte [eax], 0x10
jne 0x412e05
lea ecx, [esp + 0x3c]
push ecx
lea edx, [ebp + 3]
push edx
mov ecx, 0x12e7b00
call fcn.00406480
mov edx, dword [0x12e4728]
mov eax, dword [esi]
push 1
lea ecx, [esp + 0x40]
push ecx
push edx
push ebx
push edi
push esi
call dword [eax + 0x1c]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x50]
mov edi, dword [esp + 0x14]
mov eax, dword [0x156ab98]
inc ecx
add edi, 4
cmp ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edi
jl 0x412b93
mov eax, dword [0x156ab9c]
mov edi, dword [esp + 0x1c]
inc edx
add edi, 0x50
lea ecx, [eax - 1]
add ebx, 9
cmp edx, ecx
mov dword [esp + 0x50], edx
mov dword [esp + 0x1c], edi
jl 0x412b70
mov edi, dword [0x156ab94]
cmp edi, eax
mov dword [esp + 0x50], edi
jge 0x412fdc
lea ecx, [edi + edi*4]
shl ecx, 4
mov dword [esp + 0x10], ecx
lea ebx, [edi + edi*8 + 0x78]
lea ecx, [ecx]
mov ebp, dword [0x156ab90]
cmp ebp, dword [0x156ab98]
mov dword [esp + 0x14], ebp
jge 0x412fc1
mov eax, dword [0x12e7d28]
test eax, eax
jne 0x412eaf
push 1
call fcn.00401610
add esp, 4
test al, al
jne 0x412eaf
push edi
push ebp
call fcn.0042d7d0
add esp, 8
test eax, eax
je 0x412faa
mov edi, dword [0x156ab90]
mov edx, dword [esp + 0x20]
mov eax, ebp
sub eax, edi
lea edi, [edx + eax*8]
add edi, eax
mov eax, dword [esp + 0x10]
add ebp, eax
mov eax, dword [ebp*4 + 0x1567838]
test al, 1
lea ebp, [ebp*4 + 0x1567838]
je 0x412fa2
test al, 2
je 0x412f0c
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x3c]
push ecx
push edx
mov ecx, 0x12e7b00
call fcn.00406480
mov edx, dword [0x12e4728]
mov eax, dword [esi]
push 1
lea ecx, [esp + 0x40]
push ecx
push edx
push ebx
push edi
push esi
call dword [eax + 0x1c]
test byte [ebp], 4
je 0x412f3d
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x3c]
inc ecx
push eax
push ecx
mov ecx, 0x12e7b00
call fcn.00406480
mov ecx, dword [0x12e4728]
mov edx, dword [esi]
push 1
lea eax, [esp + 0x40]
push eax
push ecx
push ebx
push edi
push esi
call dword [edx + 0x1c]
test byte [ebp], 8
je 0x412f6f
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x3c]
push edx
add eax, 2
push eax
mov ecx, 0x12e7b00
call fcn.00406480
mov eax, dword [0x12e4728]
mov ecx, dword [esi]
push 1
lea edx, [esp + 0x40]
push edx
push eax
push ebx
push edi
push esi
call dword [ecx + 0x1c]
test byte [ebp], 0x10
je 0x412fa2
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x3c]
push ecx
add edx, 3
push edx
mov ecx, 0x12e7b00
call fcn.00406480
mov edx, dword [0x12e4728]
mov eax, dword [esi]
push 1
lea ecx, [esp + 0x40]
push ecx
push edx
push ebx
push edi
push esi
call dword [eax + 0x1c]
mov ebp, dword [esp + 0x14]
mov edi, dword [esp + 0x50]
mov eax, dword [0x156ab98]
inc ebp
cmp ebp, eax
mov dword [esp + 0x14], ebp
jl 0x412e86
mov eax, dword [0x156ab9c]
mov edx, dword [esp + 0x10]
inc edi
add edx, 0x50
add ebx, 9
cmp edi, eax
mov dword [esp + 0x50], edi
mov dword [esp + 0x10], edx
jl 0x412e70
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret 4