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

Disassembly:
push 0xffffffffffffffff
push 0x4f7d5c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xcc
mov eax, dword [0x54f4a0]
xor eax, esp
push ebx
push esi
push edi
mov edi, dword [esp + 0xe8]
mov esi, ecx
mov ecx, dword [edi + 0x78]
xor ebx, ebx
cmp ecx, ebx
mov dword [esp + 0xd4], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x28], edi
jne 0x4bf9bc
mov dword [esp + 0x18], ebx
jmp 0x4bf9d8
push str.startup
call fcn.004bc810
cmp eax, ebx
mov dword [esp + 0x18], eax
je 0x4bf9d8
push eax
lea ecx, [esi + 0x3c]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
mov ecx, dword [edi + 0x78]
cmp ecx, ebx
jne 0x4bf9e5
mov dword [esp + 0x24], ebx
jmp 0x4bfa03
push str.install
call fcn.004bc810
cmp eax, ebx
mov dword [esp + 0x24], eax
je 0x4bfa03
mov ecx, eax
push ecx
lea ecx, [esi + 0x58]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
mov eax, dword [edi + 0x84]
cmp eax, ebx
mov byte [esp + 0xe], 0
mov byte [esp + 0xf], 0
jne 0x4bfa1d
mov dword [esp + 0x1c], ebx
jmp 0x4bfa2c
mov ecx, dword [edi + 0x88]
sub ecx, eax
sar ecx, 2
mov dword [esp + 0x1c], ecx
cmp dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
jbe 0x4bfe91
push ebp
jmp 0x4bfa40
mov ecx, dword [edi + 0x84]
test ecx, ecx
je 0x4bfa79
mov eax, dword [edi + 0x88]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jae 0x4bfa79
mov eax, ecx
mov ecx, dword [eax + ebx*4]
test ecx, ecx
je 0x4bfa6e
mov eax, ecx
add eax, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [edi + 0x84]
mov esi, dword [eax + ebx*4]
jmp 0x4bfa7b
xor esi, esi
cmp dword [esi + 0x48], 8
jb 0x4bfa86
mov eax, dword [esi + 0x34]
jmp 0x4bfa89
lea eax, [esi + 0x34]
mov ebp, dword [sym.imp.MSVCR71.dll_wcscmp]
push str.Chunk
push eax
call ebp
add esp, 8
test eax, eax
jne 0x4bfe7f
mov ecx, dword [esi + 0x78]
test ecx, ecx
je 0x4bfe7f
push str.name
call fcn.004bc810
mov ebx, eax
test ebx, ebx
je 0x4bfe7b
lea ecx, [esp + 0x68]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov edx, dword [esp + 0x18]
push ebx
add edx, 4
push edx
lea eax, [esp + 0x54]
push eax
mov dword [esp + 0xf0], 0
call fcn.00402dc0
add esp, 0xc
push eax
lea ecx, [esp + 0x6c]
mov byte [esp + 0xe8], 1
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
lea ecx, [esp + 0x4c]
mov byte [esp + 0xe4], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ecx, dword [esi + 0x78]
test ecx, ecx
mov dword [esp + 0x14], 0
je 0x4bfc14
push str.type
call fcn.004bc810
test eax, eax
je 0x4bfc14
push str.file
push eax
call ebp
add esp, 8
test eax, eax
jne 0x4bfd3c
mov ecx, dword [esi + 0x78]
test ecx, ecx
je 0x4bfd3c
push 0x51b9a8
call fcn.004bc810
mov esi, eax
test esi, esi
je 0x4bfd3c
lea ecx, [esp + 0xa0]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov ecx, dword [esp + 0x18]
push esi
add ecx, 0xcc
push ecx
lea edx, [esp + 0x38]
push edx
mov byte [esp + 0xf0], 2
call fcn.00402dc0
add esp, 0xc
push eax
lea ecx, [esp + 0xa4]
mov byte [esp + 0xe8], 3
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
lea ecx, [esp + 0x30]
mov byte [esp + 0xe4], 2
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ecx, dword [esp + 0xb8]
mov eax, 8
cmp ecx, eax
mov ecx, dword [esp + 0xa4]
jae 0x4bfbdc
lea ecx, [esp + 0xa4]
cmp dword [esp + 0x80], eax
mov eax, dword [esp + 0x6c]
jae 0x4bfbed
lea eax, [esp + 0x6c]
lea edx, [esp + 0x14]
push edx
push ecx
push eax
call dword [sym.imp.XLLuaRuntime.dll__XLLRT_CreateCodeChunkFromFile_12]
lea ecx, [esp + 0xa0]
mov byte [esp + 0xe4], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
jmp 0x4bfd3c
mov al, byte [esi + 0x10]
test al, al
jne 0x4bfc2b
cmp dword [esi + 0x2c], 8
jb 0x4bfc26
mov esi, dword [esi + 0x18]
jmp 0x4bfc47
add esi, 0x18
jmp 0x4bfc47
mov al, byte [esi + 0x11]
test al, al
jne 0x4bfc39
mov ecx, esi
call fcn.004bc670
cmp dword [esi + 0x64], 8
jb 0x4bfc44
mov esi, dword [esi + 0x50]
jmp 0x4bfc47
add esi, 0x50
test esi, esi
je 0x4bfd3c
push esi
lea ecx, [esp + 0xc0]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
lea ecx, [esp + 0x84]
mov byte [esp + 0xe4], 4
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
cmp dword [esp + 0x80], 8
mov eax, dword [esp + 0x6c]
mov byte [esp + 0xe4], 5
jae 0x4bfc8c
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.XLLuaRuntime.dll__XLLRT_CreateCodeChunk_4]
mov esi, dword [esp + 0xd0]
mov dword [esp + 0x14], eax
lea eax, [esi + esi*2 + 1]
push eax
call sub.MFC71U.DLL_SerializeElements
mov ebp, eax
lea ecx, [esi + esi*2 + 1]
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
add esp, 4
rep stosb byte es:[edi], al
push ebp
lea ecx, [esp + 0x88]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
push ebp
call sub.MFC71U.DLL_operator_new
mov eax, dword [esp + 0xa0]
add esp, 4
cmp eax, 0x10
mov eax, dword [esp + 0x88]
jae 0x4bfcf4
lea eax, [esp + 0x88]
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0x14]
push ecx
push eax
push edx
call dword [sym.imp.XLLuaRuntime.dll__XLLRT_AppendChunkCode_12]
lea ecx, [esp + 0x84]
mov byte [esp + 0xe4], 4
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0xbc]
mov byte [esp + 0xe4], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ebp, dword [sym.imp.MSVCR71.dll_wcscmp]
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4bfe66
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4bfd7a
mov cl, byte [esp + 0x12]
test cl, cl
jne 0x4bfd7a
push eax
push ebx
call ebp
add esp, 8
test eax, eax
jne 0x4bfd7a
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push eax
mov byte [esp + 0x16], 1
mov dword [ecx + 0x74], eax
call dword [sym.imp.XLLuaRuntime.dll__XLLRT_AddRefChunk_4]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4bfdac
mov cl, byte [esp + 0x13]
test cl, cl
jne 0x4bfdac
push eax
push ebx
call ebp
add esp, 8
test eax, eax
jne 0x4bfdac
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
push eax
mov byte [esp + 0x17], 1
mov dword [edx + 0x78], eax
call dword [sym.imp.XLLuaRuntime.dll__XLLRT_AddRefChunk_4]
mov esi, dword [esp + 0x18]
xor bl, bl
xor edi, edi
add esi, 0x7c
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x4bfe02
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp edi, eax
jae 0x4bfe02
cmp dword [esp + 0x80], 8
mov ecx, dword [esp + 0x6c]
jae 0x4bfddc
lea ecx, [esp + 0x6c]
mov eax, dword [esp + 0x18]
mov edx, dword [eax + 0x80]
lea eax, [edx + edi*4]
mov eax, dword [eax]
push ecx
push eax
call dword [sym.imp.XLLuaRuntime.dll__XLLRT_GetChunkID_4]
push eax
call ebp
add esp, 8
test eax, eax
jne 0x4bfdff
mov bl, 1
inc edi
jmp 0x4bfdb7
test bl, bl
jne 0x4bfe57
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.XLLuaRuntime.dll__XLLRT_AddRefChunk_4]
mov ecx, dword [esi + 4]
test ecx, ecx
jne 0x4bfe1c
xor edx, edx
jmp 0x4bfe24
mov edx, dword [esi + 8]
sub edx, ecx
sar edx, 2
test ecx, ecx
je 0x4bfe45
mov eax, dword [esi + 0xc]
sub eax, ecx
sar eax, 2
cmp edx, eax
jae 0x4bfe45
mov eax, dword [esi + 8]
mov edx, dword [esp + 0x14]
mov dword [eax], edx
add eax, 4
mov dword [esi + 8], eax
jmp 0x4bfe57
mov eax, dword [esi + 8]
lea ecx, [esp + 0x14]
push ecx
push 1
push eax
mov ecx, esi
call fcn.004a42a0
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.XLLuaRuntime.dll__XLLRT_ReleaseChunk_4]
mov edi, dword [esp + 0x2c]
lea ecx, [esp + 0x68]
mov dword [esp + 0xe4], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
inc ebx
cmp ebx, eax
mov dword [esp + 0x24], ebx
jb 0x4bfa40
pop ebp
mov eax, dword [esp + 0x18]
test eax, eax
pop edi
pop esi
pop ebx
je 0x4bfea8
mov al, byte [esp + 2]
test al, al
jne 0x4bfea8
xor al, al
jmp 0x4bfeaa
mov al, 1
mov ecx, dword [esp + 0xcc]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.004e6c56
add esp, 0xd8
ret 4