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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100b1aca
mov eax, dword fs:[0]
push eax
sub esp, 0x98
mov eax, dword [0x100d3020]
xor eax, esp
mov dword [esp + 0x90], eax
push ebx
push esi
push edi
mov eax, dword [0x100d3020]
xor eax, esp
push eax
lea eax, [esp + 0xa8]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor ebx, ebx
mov esi, ecx
mov dword [esp + 0x10], esi
mov byte [esp + 0x17], bl
mov dword [esp + 0x28], ebx
mov dword [esp + 0xb0], ebx
mov dword [esp + 0x24], ebx
mov byte [esp + 0xb0], 1
mov ecx, dword [esi + 0x18]
cmp ecx, ebx
je 0x1004f225
mov eax, dword [ecx]
mov edx, dword [eax + 0x20]
call edx
mov esi, eax
cmp esi, ebx
je 0x1004f221
mov eax, dword [esi]
mov edx, dword [eax]
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
mov ecx, esi
mov dword [esp + 0x28], esi
call edx
mov esi, eax
cmp esi, ebx
je 0x1004f221
mov eax, dword [esi]
mov edx, dword [eax]
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x48]
mov ecx, esi
mov dword [esp + 0x24], esi
call edx
cmp al, 1
sete byte [esp + 0x17]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x10], ebx
cmp byte [ebp + 0x14], bl
mov byte [esp + 0xb0], 2
jne 0x1004f4ba
cmp byte [esp + 0x17], bl
jne 0x1004f4ba
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x1004f4ba
mov ecx, dword [edi + 8]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x1004f4ba
mov ecx, dword [ebp + 0x10]
push ecx
push ebx
lea edx, [esp + 0x20]
push edx
push esi
call fcn.10051000
mov byte [esp + 0xb0], 3
mov eax, dword [eax]
cmp eax, ebx
mov dword [esp + 0x20], eax
je 0x1004f29f
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx]
call eax
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x10], ecx
mov byte [esp + 0xb0], 2
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
je 0x1004f2b6
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x10], ebx
je 0x1004f4ba
mov ecx, dword [esp + 0x10]
push ecx
call fcn.10036580
test al, al
jne 0x1004f4ba
add esi, 0x5c
cmp esi, ebx
mov dword [esp + 0x20], esi
je 0x1004f2ea
mov eax, dword [esi]
cmp eax, ebx
je 0x1004f2ea
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov ecx, edi
mov byte [esp + 0xb0], 5
mov dword [esp + 0x1c], ebx
call fcn.100049f0
test eax, eax
jbe 0x1004f3fd
mov dword [esp + 0x18], ebx
mov eax, 7
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], ebx
mov word [esp + 0x40], bx
mov dword [esp + 0x70], 0xf
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
mov dword [esp + 0x8c], eax
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], bx
mov byte [esp + 0x90], bl
mov byte [esp + 0x91], bl
mov dword [esp + 0x94], ebx
mov byte [esp + 0xb0], 6
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x1004f38c
mov ecx, dword [edi + 8]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x1c], eax
jb 0x1004f392
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [edi + 4]
add eax, dword [esp + 0x18]
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x44]
call fcn.10002570
lea edx, [esp + 0x3c]
push edx
lea esi, [esp + 0x30]
mov byte [esp + 0x94], 1
mov byte [esp + 0x95], bl
mov dword [esp + 0x98], ebx
call fcn.10054ef0
lea esi, [esp + 0x3c]
mov byte [esp + 0xb0], 5
call fcn.100256b0
mov esi, dword [esp + 0x1c]
add dword [esp + 0x18], 0x1c
add esi, 1
mov ecx, edi
mov dword [esp + 0x1c], esi
call fcn.100049f0
cmp esi, eax
jb 0x1004f315
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x14]
mov eax, dword [eax + 0x7c]
add ecx, 0x14
lea edx, [esp + 0x2c]
push edx
call eax
mov edi, dword [esp + 0x30]
neg al
sbb eax, eax
add eax, 1
cmp edi, ebx
mov dword [esp + 0x1c], eax
je 0x1004f451
mov eax, dword [esp + 0x34]
cmp edi, eax
mov dword [esp + 0x18], eax
je 0x1004f448
mov esi, edi
call fcn.100256b0
add edi, 0x5c
cmp edi, dword [esp + 0x18]
jne 0x1004f430
mov edi, dword [esp + 0x30]
mov esi, dword [esp + 0x20]
push edi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp esi, ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
je 0x1004f46e
mov eax, dword [esi]
cmp eax, ebx
je 0x1004f46e
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [esp + 0xb0], 1
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xb0], bl
mov ecx, dword [esp + 0x24]
cmp ecx, ebx
je 0x1004f497
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xb0], 0xffffffff
mov ecx, dword [esp + 0x28]
cmp ecx, ebx
je 0x1004f4b1
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
jmp 0x1004f559
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push ecx
push edx
push edi
mov ecx, esi
call fcn.1004f580
test al, al
mov byte [esp + 0xb0], 1
mov ecx, dword [esp + 0x10]
je 0x1004f519
cmp ecx, ebx
je 0x1004f4e5
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
mov byte [esp + 0xb0], bl
mov ecx, dword [esp + 0x24]
cmp ecx, ebx
je 0x1004f4fb
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
mov dword [esp + 0xb0], 0xffffffff
mov ecx, dword [esp + 0x28]
cmp ecx, ebx
je 0x1004f515
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
xor eax, eax
jmp 0x1004f559
cmp ecx, ebx
je 0x1004f524
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
mov byte [esp + 0xb0], bl
mov ecx, dword [esp + 0x24]
cmp ecx, ebx
je 0x1004f53a
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
mov dword [esp + 0xb0], 0xffffffff
mov ecx, dword [esp + 0x28]
cmp ecx, ebx
je 0x1004f554
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
mov eax, 1
mov ecx, dword [esp + 0xa8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.100a4489
mov esp, ebp
pop ebp
ret 0x10