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

Disassembly:
push 0xffffffffffffffff
push 0x493b5e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xf4
push ebx
push ebp
mov ebp, ecx
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x44], ebp
mov dword [esp + 0x14], ebx
mov dword [ebp], 0x499768
lea ecx, [ebp + 0xa0]
mov dword [esp + 0x10c], ebx
lea esi, [ebp + 0x10]
call fcn.00484093
mov eax, dword [esp + 0x118]
mov ecx, dword [esp + 0x114]
sub esp, 0x10
mov dword [ebp + 0xcc], eax
mov edi, esp
xor eax, eax
xor edx, edx
mov dword [ebp], 0x49a004
mov dword [edi], eax
mov dword [ebp + 0xc4], ebx
mov dword [ebp + 0xc8], ebx
mov dword [ebp + 0x34], ebx
mov dword [ebp + 0x30], ebx
mov dword [ebp + 0x2c], ebx
mov dword [ebp + 0x28], ebx
mov dword [ebp + 0x24], ebx
mov dword [ebp + 4], ecx
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], ebx
mov eax, dword [0x4aa0d0]
mov dword [edi + 4], edx
mov byte [esp + 0x11c], 1
mov dword [edi + 8], eax
mov eax, dword [0x4aa0d4]
mov dword [edi + 0xc], eax
call fcn.00402ee0
mov eax, dword [ebp + 8]
cmp eax, 2
je 0x412843
cmp eax, 3
je 0x412843
cmp eax, 4
jne 0x41284d
mov dword [0x4bb084], 1
cmp dword [ebp + 8], 1
jne 0x4128ee
mov ecx, dword [ebp + 0x38]
lea eax, [esp + 0x84]
mov edx, dword [ebp + ecx*4 + 0x78]
push edx
push 0x4ab544
push eax
call fcn.004655c2
mov edi, dword [ebp + 0x24]
add esp, 0xc
lea ecx, [esp + 0x84]
push ecx
mov ecx, edi
call fcn.0041fe40
lea edx, [esp + 0x34]
push eax
push edx
mov ecx, edi
call fcn.00413020
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x34]
push esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
call dword [0x4994ac]
mov eax, dword [ebp + 4]
push esi
mov eax, dword [eax + 0x1c]
push eax
call dword [0x4994b0]
mov ecx, dword [esp + 0x2c]
mov dword [ebp + 0x20], 0xa
lea eax, [ecx + edi]
cdq
sub eax, edx
mov edx, dword [esp + 0x30]
mov ecx, eax
mov eax, dword [esp + 0x28]
add eax, edx
cdq
sub eax, edx
sar ecx, 1
sar eax, 1
mov dword [ebp + 0x18], ecx
mov dword [ebp + 0x1c], eax
cmp dword [ebp + 8], 4
jne 0x412a28
mov ecx, dword [ebp + 4]
mov edx, dword [ebp + 0xc4]
push edx
mov eax, dword [ecx + 0x1c]
push eax
call fcn.00454d1e
push 0x4ba4a8
mov ecx, ebp
mov dword [ebp + 0xc8], eax
mov byte [ebp + 0x98], 0
call fcn.00413120
mov ecx, ebp
call fcn.004133e0
mov eax, dword [ebp + 0xc4]
test eax, eax
je 0x4129e0
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x48]
push 0x4aaddc
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x9c]
lea eax, [esp + 0x28]
push eax
call fcn.00404930
mov ecx, dword [eax + 4]
mov edi, 0x4ab534
neg ecx
mov dword [esp + 0x48], ecx
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x64]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x5f], 0x80
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [ebp + 0xc4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x48]
push ecx
push edx
call fcn.00454d18
mov eax, dword [ebp + 0xc4]
push 1
push eax
call fcn.00454d12
mov eax, dword [ebp + 0xc4]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x20]
push ecx
push edx
push eax
call fcn.00454d0c
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
mov edx, dword [ebp + 0xc4]
or al, 3
push ecx
push eax
push edx
mov dword [esp + 0x2c], eax
call fcn.00454d06
mov ecx, dword [ebp + 0x2c]
mov eax, dword [ecx + 0x40]
mov edx, dword [ecx + 0x3c]
push eax
lea eax, [esp + 0x38]
push edx
push eax
lea edx, [esp + 0x30]
push 0x4ab10c
push edx
call fcn.00413070
mov ecx, eax
call fcn.00418210
mov edx, dword [eax]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov ecx, ebp
call fcn.004130d0
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push ecx
call fcn.00401730
add esp, 4
lea edx, [esp + 0x14]
push edx
call fcn.00401080
add esp, 8
lea ecx, [esp + 0x10]
call fcn.0048542a
mov eax, dword [ebp + 0xcc]
test eax, eax
jne 0x412b5e
push 0x4c
call fcn.00485977
mov esi, eax
add esp, 4
mov dword [esp + 0x24], esi
test esi, esi
mov byte [esp + 0x10c], 2
je 0x412ac6
mov eax, dword [0x4bb080]
test eax, eax
mov eax, str.syste1mystereet_select.scn
jne 0x412a8b
mov eax, str.syste1mystereet_select1.scn
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push eax
call fcn.00485498
lea eax, [esp + 0x14]
push eax
call fcn.004013c0
mov ebx, 1
add esp, 8
mov dword [esp + 0x14], ebx
mov eax, dword [eax]
mov ecx, dword [ebp + 4]
push eax
push ecx
mov ecx, esi
mov byte [esp + 0x114], 3
call fcn.0041f660
jmp 0x412ac8
xor eax, eax
mov edi, 1
mov dword [ebp + 0x24], eax
test bl, 1
mov dword [esp + 0x10c], edi
je 0x412ae8
lea ecx, [esp + 0x10]
and ebx, 0xfffffffe
call fcn.0048542a
push 0x4c
call fcn.00485977
mov esi, eax
add esp, 4
mov dword [esp + 0x24], esi
test esi, esi
mov byte [esp + 0x10c], 5
je 0x412b41
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str.syste1mystereet_target.scn
call fcn.00485498
lea edx, [esp + 0x14]
push edx
call fcn.004013c0
or ebx, 2
add esp, 8
mov dword [esp + 0x14], ebx
mov eax, dword [eax]
mov ecx, esi
push eax
mov eax, dword [ebp + 4]
push eax
mov byte [esp + 0x114], 6
call fcn.0041f660
jmp 0x412b43
xor eax, eax
test bl, 2
mov dword [ebp + 0x28], eax
mov dword [esp + 0x10c], edi
je 0x412b5e
lea ecx, [esp + 0x10]
and ebx, 0xfffffffd
call fcn.0048542a
xor ecx, ecx
mov eax, 0x4bb110
mov edx, dword [eax + 0x84]
mov edi, 0x80000000
test edi, edx
je 0x412b79
cmp dword [eax], 0xf
je 0x412b88
add eax, 0x88
inc ecx
cmp eax, 0x4bb550
jb 0x412b65
jmp 0x412b8d
cmp ecx, 8
jb 0x412b9b
mov eax, dword [ebp + 0xcc]
test eax, eax
je 0x412f57
call fcn.00454d00
push 0x4c
mov dword [ebp + 0xc4], eax
call fcn.00485977
mov esi, eax
add esp, 4
mov dword [esp + 0x24], esi
test esi, esi
mov byte [esp + 0x10c], 8
je 0x412bff
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str.syste1mqkeyboard0.scn
call fcn.00485498
lea ecx, [esp + 0x14]
push ecx
call fcn.004013c0
or ebx, 4
add esp, 8
mov dword [esp + 0x14], ebx
mov eax, dword [eax]
mov edx, dword [ebp + 4]
push eax
push edx
mov ecx, esi
mov byte [esp + 0x114], 9
call fcn.0041f660
jmp 0x412c01
xor eax, eax
mov edi, 1
mov dword [ebp + 0x2c], eax
test bl, 4
mov dword [esp + 0x10c], edi
je 0x412c21
lea ecx, [esp + 0x10]
and ebx, 0xfffffffb
call fcn.0048542a
push 0x4c
call fcn.00485977
mov esi, eax
add esp, 4
mov dword [esp + 0x24], esi
test esi, esi
mov byte [esp + 0x10c], 0xb
je 0x412c7a
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str.syste1mqkeyboard1.scn
call fcn.00485498
lea eax, [esp + 0x14]
push eax
call fcn.004013c0
or ebx, 8
add esp, 8
mov dword [esp + 0x14], ebx
mov eax, dword [eax]
mov ecx, dword [ebp + 4]
push eax
push ecx
mov ecx, esi
mov byte [esp + 0x114], 0xc
call fcn.0041f660
jmp 0x412c7c
xor eax, eax
test bl, 8
mov dword [ebp + 0x30], eax
mov dword [esp + 0x10c], edi
je 0x412c97
lea ecx, [esp + 0x10]
and ebx, 0xfffffff7
call fcn.0048542a
push 0x4c
call fcn.00485977
mov esi, eax
add esp, 4
mov dword [esp + 0x24], esi
test esi, esi
mov byte [esp + 0x10c], 0xe
je 0x412cf0
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str.syste1mqkeyboard3.scn
call fcn.00485498
lea edx, [esp + 0x14]
push edx
call fcn.004013c0
or ebx, 0x10
add esp, 8
mov dword [esp + 0x14], ebx
mov eax, dword [eax]
mov ecx, esi
push eax
mov eax, dword [ebp + 4]
push eax
mov byte [esp + 0x114], 0xf
call fcn.0041f660
jmp 0x412cf2
xor eax, eax
test bl, 0x10
mov dword [ebp + 0x34], eax
mov dword [esp + 0x10c], edi
je 0x412d0a
lea ecx, [esp + 0x10]
call fcn.0048542a
mov ecx, dword [ebp + 4]
push 0
lea edx, [esp + 0x88]
push 0x4ab484
mov eax, dword [ecx + 0x40]
push edx
mov dword [ebp + 0x9c], eax
mov dword [ebp + 0xbc], 0
call fcn.004655c2
mov ecx, dword [ebp + 0x30]
add esp, 0xc
lea eax, [esp + 0x84]
push eax
call fcn.0041fe40
test eax, eax
jl 0x412d84
mov edx, dword [ebp + 0xbc]
lea ecx, [esp + 0x84]
inc edx
mov eax, edx
mov dword [ebp + 0xbc], edx
push eax
push 0x4ab484
push ecx
call fcn.004655c2
mov ecx, dword [ebp + 0x30]
add esp, 0xc
lea edx, [esp + 0x84]
push edx
call fcn.0041fe40
test eax, eax
jge 0x412d4b
lea edi, [ebp + 0xa0]
push 0xffffffffffffffff
push 0
mov ecx, edi
call fcn.00484126
xor eax, eax
mov dword [ebp + 0xb4], 0xffffffff
mov dword [ebp + 0xb8], eax
mov cl, byte [0x4bb048]
test cl, 4
je 0x412de4
mov eax, dword [0x4bb058]
xor esi, esi
test eax, eax
jle 0x412f48
mov eax, dword [0x4bb054]
mov ecx, dword [edi + 8]
lea eax, [eax + esi*4]
push eax
push ecx
mov ecx, edi
call fcn.0048429b
mov eax, dword [0x4bb058]
inc esi
cmp esi, eax
jl 0x412dc1
jmp 0x412f48
mov ecx, dword [0x4bb070]
mov dword [esp + 0x10], eax
cmp ecx, eax
jle 0x412f48
mov ebx, dword [0x4ab0e4]
cmp dword [ebp + 0xa8], 0x1e
jge 0x412f48
mov ecx, dword [0x4bb06c]
mov esi, dword [0x4bb07c]
mov edi, dword [ecx + eax*4]
mov edx, dword [esi - 8]
lea eax, [ecx + eax*4]
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
mov eax, dword [edi - 8]
cmp eax, edx
jl 0x412f31
xor ecx, ecx
cmp edx, 1
jle 0x412f0e
mov eax, 1
mov dword [esp + 0x14], esi
sub eax, esi
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x14]
mov al, byte [ecx + edi]
mov dl, byte [edx]
cmp al, dl
mov byte [esp + 0x1b], dl
jne 0x412e6a
mov al, byte [ecx + edi + 1]
cmp al, byte [ecx + esi + 1]
je 0x412ef0
mov eax, dword [esp + 0x20]
add eax, 0xfffffffe
cmp ecx, eax
jne 0x412f0e
mov esi, dword [0x4ab0e0]
mov al, byte [esi]
test al, al
je 0x412ee5
cmp dl, al
jne 0x412ed3
mov eax, dword [esp + 0x14]
mov al, byte [eax + 1]
cmp al, byte [esi + 1]
jne 0x412ed3
mov edx, dword [0x4ab0e0]
mov eax, esi
sub eax, edx
mov dl, byte [ecx + edi]
cmp dl, byte [eax + ebx]
jne 0x412eb1
mov dl, byte [ecx + edi + 1]
cmp dl, byte [eax + ebx + 1]
je 0x412ee5
mov ebx, dword [0x4ab0e8]
mov dl, byte [ecx + edi]
cmp dl, byte [eax + ebx]
jne 0x412ec9
mov dl, byte [ecx + edi + 1]
cmp dl, byte [eax + ebx + 1]
je 0x412edf
mov ebx, dword [0x4ab0e4]
mov dl, byte [esp + 0x1b]
mov al, byte [esi + 2]
add esi, 2
test al, al
jne 0x412e85
jmp 0x412ee5
mov ebx, dword [0x4ab0e4]
cmp byte [esi], 0
je 0x412f0e
mov esi, dword [0x4bb07c]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
add eax, 2
add ecx, 2
mov dword [esp + 0x14], eax
add edx, eax
cmp edx, dword [esp + 0x20]
jl 0x412e4b
cmp ecx, dword [esp + 0x20]
jne 0x412f31
mov edx, dword [esp + 0x24]
mov eax, dword [ebp + 0xa8]
lea ecx, [ebp + 0xa0]
push edx
push eax
call fcn.0048429b
mov ebx, dword [0x4ab0e4]
mov eax, dword [esp + 0x10]
mov ecx, dword [0x4bb070]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x412dfc
mov ecx, dword [ebp + 0x30]
push 0
call fcn.004202e0
mov edi, 0x80000000
xor esi, esi
mov eax, 0x4bb194
lea ecx, [ebp + 0x78]
test dword [eax], edi
je 0x412f68
mov dword [ecx], esi
inc esi
add eax, 0x88
add ecx, 4
cmp eax, 0x4bb5d4
jb 0x412f61
push 0x4ab480
lea ecx, [esp + 0x14]
call fcn.00485498
mov ecx, dword [ebp + 4]
lea edx, [esp + 0x10]
add ecx, 0x34
push edx
mov byte [esp + 0x110], 0x11
mov eax, dword [ecx]
call dword [eax]
dec eax
lea ecx, [esp + 0x10]
mov dword [ebp + 0x38], eax
mov byte [esp + 0x10c], 1
call fcn.0048542a
mov eax, dword [ebp + 0x38]
xor ecx, ecx
xor edx, edx
cmp eax, ecx
setle dl
dec edx
and eax, edx
mov edx, eax
mov dword [ebp + 0x38], eax
shl edx, 4
add edx, eax
test dword [edx*8 + 0x4bb194], edi
jne 0x412ff1
cmp esi, ecx
je 0x412ff1
mov eax, dword [ebp + 0x38]
inc eax
and eax, 7
mov edx, eax
mov dword [ebp + 0x38], eax
shl edx, 4
add edx, eax
test dword [edx*8 + 0x4bb194], edi
je 0x412fd3
mov dword [ebp + 0x3c], ecx
mov dword [ebp + 0x20], ecx
mov ecx, dword [esp + 0x104]
pop edi
mov eax, ebp
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x100
ret 8