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

Disassembly:
sub esp, 0x220
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.004ae250
push 0x7d
call fcn.004efd10
add esp, 4
push 0x20
call fcn.004d8630
mov ebx, eax
xor edi, edi
add esp, 4
cmp ebx, edi
je 0x5123fd
push edi
mov ecx, ebx
call fcn.0048a300
mov dword [ebx], vtable.RoomCabinScript.0
jmp 0x5123ff
xor ebx, ebx
push ebx
mov ecx, esi
call fcn.00454360
cmp dword [esi + 0xd50], edi
jne 0x51242e
push 0x6c
call fcn.004d8630
add esp, 4
cmp eax, edi
je 0x512426
mov ecx, eax
call fcn.004b5b50
jmp 0x512428
xor eax, eax
mov dword [esi + 0xd50], eax
mov eax, dword [esi + 0xd60]
mov ecx, dword [esi + 0xd50]
push eax
call fcn.004b5da0
mov ecx, dword [esi + 0xd50]
push 4
mov edx, dword [ecx]
call dword [edx + 0x10]
mov ecx, dword [esi + 0xd50]
push edi
push edi
mov eax, dword [ecx]
call dword [eax + 0x28]
mov ecx, dword [esi + 0xd50]
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [esi + 0xd50]
mov eax, dword [ecx]
call dword [eax + 0x14]
cmp dword [esi + 0xd54], edi
jne 0x512497
push 0x78
call fcn.004d8630
add esp, 4
cmp eax, edi
je 0x51248f
mov ecx, eax
call fcn.0044a060
jmp 0x512491
xor eax, eax
mov dword [esi + 0xd54], eax
mov ecx, dword [esi + 0xd70]
push ecx
mov ecx, dword [esi + 0xd54]
call fcn.004b5da0
mov ecx, dword [esi + 0xd54]
push 3
mov edx, dword [ecx]
call dword [edx + 0x10]
mov eax, dword [esi + 0x8f8]
mov ecx, dword [esi + 0xd54]
cmp eax, 2
jne 0x5124d4
mov eax, dword [ecx]
push edi
push 0x156
call dword [eax + 0x28]
jmp 0x5124df
mov edx, dword [ecx]
push edi
push 0x12e
call dword [edx + 0x28]
mov ecx, dword [esi + 0xd54]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esi + 0xd54]
mov edx, dword [ecx]
call dword [edx + 0x14]
cmp dword [esi + 0xd58], edi
jne 0x51251c
push 0x78
call fcn.004d8630
add esp, 4
cmp eax, edi
je 0x512514
mov ecx, eax
call fcn.0044a060
jmp 0x512516
xor eax, eax
mov dword [esi + 0xd58], eax
mov eax, dword [esi + 0xd78]
mov ecx, dword [esi + 0xd58]
push eax
call fcn.004b5da0
mov ecx, dword [esi + 0xd58]
push 5
mov edx, dword [ecx]
call dword [edx + 0x10]
mov ecx, dword [esi + 0xd58]
push 0x110
push 0x2e
mov eax, dword [ecx]
call dword [eax + 0x28]
mov ecx, dword [esi + 0xd58]
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [esi + 0xd58]
mov eax, dword [ecx]
call dword [eax + 0x14]
mov ecx, dword [esi + 0xd58]
mov dword [ecx + 0x6c], edi
mov eax, dword [esi + 0xd5c]
cmp eax, edi
jne 0x512595
push 0x6c
call fcn.004d8630
add esp, 4
cmp eax, edi
je 0x51258d
mov ecx, eax
call fcn.004b5b50
jmp 0x51258f
xor eax, eax
mov dword [esi + 0xd5c], eax
mov ecx, dword [esi + 0xd5c]
push 0xbe0
call fcn.004b5da0
mov ecx, dword [esi + 0xd5c]
mov ebx, 0x64
push ebx
mov edx, dword [ecx]
call dword [edx + 0x10]
mov ecx, dword [esi + 0xd5c]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esi + 0xd5c]
mov edx, dword [ecx]
call dword [edx + 0x14]
mov ecx, dword [0x5a32b8]
mov eax, dword [esi + 0xd80]
push eax
mov ecx, dword [ecx + 8]
call fcn.00476930
cmp dword [esi + 0x8f8], edi
jne 0x51260e
mov ecx, dword [esi + 0x90c]
push 0xffffffffffffffff
call fcn.004b8b90
mov ecx, dword [esi + 0x90c]
push 0x4000
push edi
push 0xffffffffffffffff
push 0xdb3
call fcn.004b8aa0
cmp dword [0x59ffec], edi
jne 0x512678
mov ecx, dword [0x5a32bc]
call fcn.004f3a60
cmp al, 0xff
jne 0x512678
push 0x1440
call fcn.004d8630
add esp, 4
cmp eax, edi
je 0x512642
push 1
push edi
mov ecx, eax
call fcn.00405860
jmp 0x512644
xor eax, eax
push 0x62a0
mov ecx, eax
mov dword [0x59ffec], eax
call fcn.00449270
mov ecx, dword [0x59ffec]
push 0xffffffffffffffff
call fcn.00405c80
mov ecx, dword [0x59ffec]
call fcn.004d7ca0
mov ecx, dword [0x59ffec]
call fcn.00405ed0
mov ecx, 0x21b
mov eax, 0x27f
mov edx, 0x1df
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], edx
mov dword [esp + 0x68], edi
mov dword [esp + 0x6c], edx
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], 0x5a
mov dword [esp + 0x34], 0x9e
mov dword [esp + 0x38], 0x104
mov dword [esp + 0x3c], 0xb6
mov dword [esp + 0x40], 0x103
mov dword [esp + 0x44], 0x179
mov dword [esp + 0x48], 0x58
mov dword [esp + 0x4c], 0x195
lea ecx, [esi + 0x91c]
xor eax, eax
mov edi, dword [esp + eax + 0x50]
add eax, 8
mov dword [ecx - 4], edi
mov edi, dword [esp + eax + 0x4c]
mov dword [ecx], edi
mov edi, dword [esp + eax + 8]
mov dword [ecx + 0x3c], edi
mov edi, dword [esp + eax + 0xc]
mov dword [ecx + 0x40], edi
mov edi, dword [esp + eax + 0x28]
mov dword [ecx + 0x7c], edi
mov edi, dword [esp + eax + 0x2c]
mov dword [ecx + 0x80], edi
add ecx, 0x10
cmp eax, 0x20
jl 0x51270f
mov eax, 0xac
mov ebx, 0x239
mov dword [esp + 0x74], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x90], edx
mov dword [esp + 0xa8], edx
mov dword [esp + 0xe0], ebx
mov dword [esp + 0xe8], ebx
mov eax, 0x108
mov edx, 0x13a
mov ebx, 0xc5
mov dword [esp + 0x84], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0xb0], edx
mov dword [esp + 0xc0], edx
mov dword [esp + 0xf8], ebx
mov dword [esp + 0x100], ebx
mov edi, 0xaa
mov eax, 0x21f
mov edx, 0x1b0
mov ebx, 0x13d
mov dword [esp + 0x70], edi
mov dword [esp + 0x88], edi
mov dword [esp + 0x98], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xcc], edx
mov dword [esp + 0x104], edx
mov dword [esp + 0x10c], edx
mov dword [esp + 0x114], ebx
mov dword [esp + 0x11c], ebx
mov ecx, 0x13b
mov ebp, 0x192
mov edi, 0x1b6
mov eax, 0x1da
mov edx, 0x166
mov ebx, 0x148
mov dword [esp + 0x78], ecx
mov dword [esp + 0x80], ecx
mov dword [esp + 0x94], ebp
mov dword [esp + 0x9c], ebp
mov dword [esp + 0xa4], edi
mov dword [esp + 0xac], edi
mov dword [esp + 0xb4], 0x16c
mov dword [esp + 0xb8], eax
mov dword [esp + 0xbc], 0x17d
mov dword [esp + 0xc4], 0x1af
mov dword [esp + 0xc8], eax
mov dword [esp + 0xd0], 0x1db
mov dword [esp + 0xd4], 0x140
mov dword [esp + 0xd8], eax
mov dword [esp + 0xdc], 0x1a5
mov dword [esp + 0xe4], 0x1a6
mov dword [esp + 0xec], 0x13f
mov dword [esp + 0xf0], 0x69
mov dword [esp + 0xf4], 0x179
mov dword [esp + 0xfc], 0x179
mov dword [esp + 0x108], 0x69
mov dword [esp + 0x110], edx
mov dword [esp + 0x118], eax
mov dword [esp + 0x120], edx
mov dword [esp + 0x124], 0x170
mov dword [esp + 0x128], eax
mov dword [esp + 0x12c], 0x17d
mov dword [esp + 0x130], ebx
mov dword [esp + 0x134], 0xd7
mov dword [esp + 0x138], 0x1d3
mov dword [esp + 0x13c], 0xd7
mov dword [esp + 0x140], 0x1d2
mov dword [esp + 0x144], 0x105
mov dword [esp + 0x148], ebx
mov dword [esp + 0x14c], 0x105
mov dword [esp + 0x150], 0x14b
mov dword [esp + 0x154], 0x190
mov dword [esp + 0x158], 0x189
mov dword [esp + 0x15c], 0x179
mov dword [esp + 0x160], 0x197
mov dword [esp + 0x164], ebp
mov dword [esp + 0x168], 0x177
mov dword [esp + 0x16c], 0x1b5
mov dword [esp + 0x170], 0xa4
mov dword [esp + 0x174], 0x10a
mov dword [esp + 0x184], edx
mov dword [esp + 0x18c], edx
mov edx, 0x13c
mov dword [esp + 0x198], ecx
mov dword [esp + 0x194], edx
mov dword [esp + 0x19c], edx
mov edx, 0x167
mov dword [esp + 0x1a0], ecx
mov dword [esp + 0x1a4], edx
mov dword [esp + 0x1ac], edx
mov edx, 0x14f
mov dword [esp + 0x1d8], ecx
mov dword [esp + 0x1e0], ecx
mov dword [esp + 0x1b0], ebx
mov dword [esp + 0x1b4], edx
mov dword [esp + 0x1bc], edx
mov ecx, 0x229
mov edx, 0x16e
mov ebx, 0xcc
mov dword [esp + 0x1e4], edi
mov dword [esp + 0x1ec], edi
mov dword [esp + 0x1f8], ecx
mov dword [esp + 0x200], ecx
mov dword [esp + 0x218], eax
mov dword [esp + 0x220], eax
mov dword [esp + 0x1c4], edx
mov dword [esp + 0x1cc], edx
mov dword [esp + 0x1d0], ebx
mov dword [esp + 0x1e8], ebx
mov edi, 0xb2
mov ecx, 0x106
mov eax, 0x1b2
mov ebp, 0xf1
mov edx, 0x191
mov ebx, 0x1d4
mov dword [esp + 0x1f4], edi
mov dword [esp + 0x1fc], edi
mov dword [esp + 0x204], ecx
mov dword [esp + 0x20c], ecx
mov dword [esp + 0x224], eax
mov dword [esp + 0x22c], eax
mov dword [esp + 0x178], ebp
mov dword [esp + 0x17c], 0x10a
mov dword [esp + 0x180], ebp
mov dword [esp + 0x188], 0xa4
mov dword [esp + 0x190], 0x114
mov dword [esp + 0x1a8], 0xf7
mov dword [esp + 0x1b8], 0x16f
mov dword [esp + 0x1c0], 0x17f
mov dword [esp + 0x1c8], 0x150
mov dword [esp + 0x1d4], edx
mov dword [esp + 0x1dc], edx
mov dword [esp + 0x1f0], ebx
mov dword [esp + 0x208], ebx
mov dword [esp + 0x210], edx
mov dword [esp + 0x214], 0x19d
mov dword [esp + 0x21c], 0x181
mov dword [esp + 0x228], edx
lea eax, [esp + 0x74]
lea ecx, [esi + 0x9dc]
mov edi, 0xe
mov edx, 4
mov ebx, dword [eax - 4]
add eax, 8
mov dword [ecx - 4], ebx
mov ebx, dword [eax - 8]
mov dword [ecx], ebx
add ecx, 0x10
dec edx
jne 0x512b7d
dec edi
jne 0x512b78
mov ecx, esi
call fcn.00513150
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x220
ret