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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100a0d20
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push esi
push edi
mov eax, dword [0x100c60c8]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x20], edi
lea esi, [edi + 0x18]
xor ebx, ebx
cmp esi, ebx
mov dword [esp + 0x14], esi
je 0x10004dbc
mov eax, dword [esi]
cmp eax, ebx
je 0x10004dbc
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x80], ebx
cmp dword [edi + 0x14], ebx
je 0x10004e15
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov byte [esp + 0x80], 1
mov edi, dword [edi + 0x14]
lea eax, [esp + 0x38]
push eax
add edi, 0x50
push edi
call fcn.10014790
test al, al
jne 0x10004e4c
mov byte [esp + 0x80], bl
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x10004e09
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x80], 0xffffffff
cmp esi, ebx
je 0x10004e35
mov esi, dword [esi]
cmp esi, ebx
je 0x10004e31
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x14], ebx
xor al, al
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor edi, edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], ebx
jmp 0x10004e60
mov esi, dword [esp + 0x3c]
cmp esi, ebx
je 0x10004f4d
mov ecx, dword [esp + 0x40]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jae 0x10004f4d
mov ecx, dword [esp + 0x18]
add esi, ecx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov ecx, 7
lea edi, [esp + 0x48]
mov dword [esp + 0x64], 0xffffffff
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0x48]
mov esi, dword [esp + 0x20]
add esi, 0x1c
lea ebx, [esp + 0x24]
lea eax, [esp + 0x30]
mov dword [esp + 0x24], edx
call fcn.10032360
mov edi, dword [eax]
test edi, edi
mov ebx, dword [eax + 4]
mov eax, dword [esi + 4]
mov dword [esp + 0x2c], eax
je 0x10004ee2
cmp edi, esi
je 0x10004eec
mov esi, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
call esi
jmp 0x10004ef2
mov esi, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebx, dword [esp + 0x2c]
je 0x10004f38
test edi, edi
jne 0x10004efe
call esi
cmp ebx, dword [edi + 4]
jne 0x10004f05
call esi
mov ecx, dword [ebx + 0x10]
mov esi, dword [ecx + 0x100]
push esi
call fcn.10075430
mov dword [esp + 0x6c], eax
mov eax, esi
mov dword [esp + 0x70], edx
call fcn.10075550
mov esi, dword [ebp + 8]
mov dword [esp + 0x68], edx
lea edx, [esp + 0x48]
push edx
mov dword [esp + 0x68], eax
call fcn.10007230
add dword [esp + 0x1c], 1
add dword [esp + 0x18], 0x1c
mov edi, dword [esp + 0x1c]
xor ebx, ebx
jmp 0x10004e60
mov byte [esp + 0x80], bl
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x10004f65
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x80], 0xffffffff
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x10004f95
mov eax, dword [eax]
cmp eax, ebx
je 0x10004f91
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x14], ebx
mov al, 1
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4