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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100b12a8
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x38], eax
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov dword [esp + 0x18], ecx
mov edi, dword [ebp + 0xc]
lea esi, [ecx + 0xec4]
push esi
mov dword [esp + 0x30], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x58], 0
xor ebx, ebx
mov dx, word [ebp + 0xa]
mov eax, dword [ebp + 8]
test dx, dx
movzx ecx, al
cmove ecx, ebx
movzx eax, al
mov byte [esp + 0x14], cl
lea ebx, [edi + 0x10]
movzx ecx, dl
cmove ecx, eax
cmp dword [ebx + 0x14], 0x10
mov byte [esp + 0x10], cl
jb 0x10022915
mov ebx, dword [ebx]
push esi
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push ebx
push dword [esp + 0x14]
mov ebx, dword [esp + 0x20]
push dword [esp + 0x1c]
mov byte [esp + 0x64], 1
lea ecx, [ebx + 0x18]
call fcn.10064830
push esi
mov byte [esp + 0x5c], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [edi + 0x70], 0
je 0x10022aa8
movsd xmm2, qword [edi + 0x80]
xorps xmm0, xmm0
ucomisd xmm2, xmm0
movsd qword [esp + 0x1c], xmm2
lahf
test ah, 0x44
jp 0x100229a4
mov eax, dword [ebx + 0xf24]
mov edx, dword [ebx + 0xf28]
cmp eax, edx
cmovl edx, eax
mov eax, 0x91a2b3c5
mov ecx, edx
shl ecx, 4
sub ecx, edx
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
movd xmm1, eax
cvtdq2pd xmm1, xmm1
movsd qword [esp + 0x1c], xmm1
movsd xmm1, qword [edi + 0x78]
ucomisd xmm1, xmm0
movsd qword [esp + 0x24], xmm1
lahf
test ah, 0x44
jp 0x100229f2
mov ecx, dword [ebx + 0xf24]
mov eax, 0x91a2b3c5
mov edx, dword [ebx + 0xf28]
cmp ecx, edx
cmovl edx, ecx
mov ecx, edx
shl ecx, 4
sub ecx, edx
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
movsd qword [esp + 0x24], xmm0
mov ecx, dword [ebx + 0xc]
lea edx, [esp + 0x30]
push dword [ebp + 8]
push edx
mov eax, dword [ecx]
call dword [eax + 0x30]
mov edx, eax
lea eax, [edi + 0x58]
mov byte [esp + 0x58], 2
cmp dword [eax + 0x14], 8
mov dword [esp + 0x18], eax
jb 0x10022a1c
mov eax, dword [eax]
mov dword [esp + 0x18], eax
cmp dword [edi + 0x3c], 8
lea ecx, [edi + 0x28]
jb 0x10022a27
mov ecx, dword [ecx]
cmp dword [edx + 0x14], 8
jb 0x10022a2f
mov edx, dword [edx]
cmp word [ebp + 0xa], 0
mov eax, dword [ebp + 8]
movzx eax, ax
jne 0x10022a46
mov dword [esp + 0x14], 0
jmp 0x10022a4e
mov dword [esp + 0x14], eax
movzx eax, word [ebp + 0xa]
push dword [esp + 0x18]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
push ecx
movzx ecx, ax
mov eax, dword [esp + 0x18]
movzx eax, ax
push 0
shl ecx, 0x10
add ecx, eax
cvttsd2si eax, qword [esp + 0x28]
push 0
push edx
push ecx
lea ecx, [ebx + 0xf34]
push eax
cvttsd2si eax, qword [esp + 0x40]
push eax
cvttsd2si eax, qword [edi + 8]
push eax
cvttsd2si eax, qword [edi]
push eax
call fcn.1003de10
cmp dword [esp + 0x44], 8
jb 0x10022aa8
push dword [esp + 0x30]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.100ad688
mov esp, ebp
pop ebp
ret 8