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

Disassembly:
push 0xffffffffffffffff
push 0x4f7d9b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push edi
mov edi, dword [esp + 0x28]
mov eax, dword [edi + 0x84]
xor edx, edx
cmp eax, edx
mov dword [esp + 8], ecx
jne 0x4c0013
mov dword [esp + 0xc], edx
jmp 0x4c0022
mov ecx, dword [edi + 0x88]
sub ecx, eax
sar ecx, 2
mov dword [esp + 0xc], ecx
cmp dword [esp + 0xc], edx
mov dword [esp + 0x10], edx
jbe 0x4c01c0
push ebx
push ebp
push esi
mov ecx, dword [edi + 0x84]
test ecx, ecx
je 0x4c0077
mov eax, dword [edi + 0x88]
sub eax, ecx
sar eax, 2
cmp edx, eax
jae 0x4c0077
mov eax, ecx
lea esi, [edx*4]
mov ecx, dword [esi + eax]
test ecx, ecx
je 0x4c0068
mov eax, ecx
add eax, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [edi + 0x84]
mov ebx, dword [esi + eax]
mov dword [esp + 0x10], ebx
jmp 0x4c0083
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x10]
cmp dword [ebx + 0x48], 8
jb 0x4c008e
mov eax, dword [ebx + 0x34]
jmp 0x4c0091
lea eax, [ebx + 0x34]
mov ebp, dword [sym.imp.MSVCR71.dll_wcscmp]
push str.Command
push eax
call ebp
add esp, 8
test eax, eax
jne 0x4c018e
mov ecx, dword [ebx + 0x78]
test ecx, ecx
je 0x4c018e
push 0x51ba30
call fcn.004bc810
mov esi, eax
test esi, esi
je 0x4c018e
push 0x58
call sub.MFC71U.DLL_CWordArray::CWordArray
add esp, 4
mov dword [esp + 0x20], eax
xor edi, edi
cmp eax, edi
mov dword [esp + 0x2c], edi
je 0x4c00ea
mov ecx, eax
call fcn.004bf2a0
mov edi, eax
mov eax, dword [esp + 0x14]
add eax, 4
lea ecx, [edi + 0x3c]
push eax
mov dword [esp + 0x30], 0xffffffff
mov dword [esp + 0x24], edi
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__]
push esi
mov ecx, edi
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 [ebx + 0x78]
test ecx, ecx
jne 0x4c011b
xor esi, esi
jmp 0x4c0127
push str.type
call fcn.004bc810
mov esi, eax
xor eax, eax
cmp esi, eax
mov dword [edi + 0x1c], eax
je 0x4c01d4
push str.luaChunk
push esi
call ebp
add esp, 8
test eax, eax
jne 0x4c016b
mov dword [edi + 0x1c], 1
mov ecx, dword [ebx + 0x78]
test ecx, ecx
je 0x4c017a
push str.chunk
call fcn.004bc810
test eax, eax
je 0x4c017a
push eax
lea ecx, [edi + 0x20]
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__]
jmp 0x4c01d7
push str.autoDispatch
push esi
call ebp
add esp, 8
test eax, eax
je 0x4c01d7
mov ecx, edi
call fcn.0040de38
push edi
call sub.MFC71U.DLL_CNoTrackObject::operator_new
add esp, 4
mov edi, dword [esp + 0x34]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x4c01a8
test ebx, ebx
je 0x4c01a8
mov edx, dword [ebx]
push 1
mov ecx, ebx
call dword [edx]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
inc edx
cmp edx, eax
mov dword [esp + 0x1c], edx
jb 0x4c0033
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x18]
mov al, 1
pop edi
mov dword fs:[0], ecx
add esp, 0x20
ret 4
mov dword [edi + 0x1c], eax
mov edx, dword [esp + 0x14]
xor bl, bl
xor ebp, ebp
lea esi, [edx + 0xbc]
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x4c021c
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp ebp, eax
jae 0x4c021c
mov eax, dword [edx + 0xc0]
mov ecx, dword [eax + ebp*4]
lea eax, [eax + ebp*4]
push edi
push ecx
call dword [sym.imp.MSVCP71.dll_bool___cdecl_std::operator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
add esp, 8
test al, al
je 0x4c0215
mov bl, 1
mov edx, dword [esp + 0x14]
inc ebp
jmp 0x4c01e5
test bl, bl
jne 0x4c027f
lea eax, [edx + 4]
push eax
lea ecx, [edi + 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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov ecx, dword [esi + 4]
test ecx, ecx
jne 0x4c0238
xor edx, edx
jmp 0x4c0240
mov edx, dword [esi + 8]
sub edx, ecx
sar edx, 2
test ecx, ecx
je 0x4c0264
mov eax, dword [esi + 0xc]
sub eax, ecx
sar eax, 2
cmp edx, eax
jae 0x4c0264
mov eax, dword [esi + 8]
mov ebx, dword [esp + 0x10]
mov dword [eax], edi
add eax, 4
mov dword [esi + 8], eax
jmp 0x4c018a
mov eax, dword [esi + 8]
lea edx, [esp + 0x20]
push edx
push 1
push eax
mov ecx, esi
call fcn.004bf400
mov ebx, dword [esp + 0x10]
jmp 0x4c018a
mov ecx, edi
call fcn.0040de38
push edi
call sub.MFC71U.DLL_CNoTrackObject::operator_new
mov ebx, dword [esp + 0x14]
jmp 0x4c0187