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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x174
mov eax, dword [0x102cf440]
xor eax, esp
mov dword [esp + 0x170], eax
mov eax, dword [ebp + 0x14]
movaps xmm0, xmmword [0x1022a6f0]
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 0x4c], eax
mov eax, dword [ebp + 0x18]
test eax, eax
mov dword [esp + 0x44], eax
push edi
mov edi, dword [ebp + 0xc]
lea eax, [esi + 0x88]
sete bl
mov dword [esp + 0x40], esi
push eax
mov dword [esp + 0x50], edi
mov dword [esp + 0x48], 0
movups xmmword [esp + 0x6c], xmm0
mov dword [esp + 0x30], ebx
call fcn.10048590
mov dword [esp + 0x24], eax
add esp, 4
mov eax, dword [esi + 4]
test eax, eax
jne 0x100499e8
cmp dword [ebp + 0x10], 1
jne 0x100496db
mov eax, dword [esp + 0x48]
test eax, eax
je 0x1004958e
mov dword [eax], 0
lea eax, [esi + 0x170]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [esp + 0x48]
mov dword [esi + 0x194], 1
push eax
push 0
push 1
push dword [edi]
push esi
call fcn.1004a310
add esp, 0x14
mov dword [esp + 0x40], eax
test eax, eax
jne 0x100496b9
lea eax, [esi + 0x88]
push eax
call fcn.10048590
movsd xmm0, qword [edi + 8]
add esp, 4
movsd xmm1, qword [0x1022a6d0]
movsd xmm2, qword [0x102bc178]
mov dword [esp + 0x44], eax
cmp eax, 1
jne 0x1004962d
addsd xmm0, xmm2
sub esp, 8
movsd qword [esp + 0x28], xmm0
fld qword [esp + 0x28]
fstp qword [esp]
call fcn.101fe2e0
movsd xmm1, qword [0x1022a6d0]
add esp, 8
movsd xmm2, qword [0x102bc178]
fstp qword [esp + 0x20]
cvttsd2si ecx, qword [esp + 0x20]
shl ecx, 8
jmp 0x1004963b
addsd xmm0, xmm1
movsd qword [esp + 0x20], xmm0
mov ecx, dword [esp + 0x20]
mov ebx, dword [esp + 0x48]
movsd xmm0, qword [edi + 0x10]
mov eax, dword [ebx + 0x68]
add eax, ecx
mov dword [esp + 0x58], eax
mov eax, dword [ebx + 0x70]
add eax, ecx
cmp dword [esp + 0x44], 1
mov dword [esp + 0x60], eax
jne 0x10049688
addsd xmm0, xmm2
sub esp, 8
movsd qword [esp + 0x28], xmm0
fld qword [esp + 0x28]
fstp qword [esp]
call fcn.101fe2e0
fstp qword [esp + 0x28]
cvttsd2si ecx, qword [esp + 0x28]
add esp, 8
shl ecx, 8
jmp 0x10049696
addsd xmm0, xmm1
movsd qword [esp + 0x20], xmm0
mov ecx, dword [esp + 0x20]
mov eax, dword [ebx + 0x6c]
push dword [esp + 0x50]
add eax, ecx
mov dword [esp + 0x60], eax
mov eax, dword [ebx + 0x74]
add eax, ecx
mov dword [esp + 0x68], eax
lea eax, [esp + 0x5c]
push eax
call fcn.10056890
add esp, 8
push esi
call fcn.1004a170
mov eax, dword [esp + 0x44]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x170]
xor ecx, esp
call fcn.101eafcd
mov esp, ebp
pop ebp
ret
lea eax, [esi + 0x170]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x100
lea eax, [esp + 0x7c]
mov dword [esi + 0x194], 1
push 0
push eax
call fcn.101ed310
add esp, 0xc
mov dword [esp + 0x54], 0
cmp dword [ebp + 0x10], 0
jle 0x10049925
mov eax, dword [esp + 0x70]
xor ebx, ebx
mov edx, dword [esp + 0x74]
movsd xmm1, qword [0x1022a6d0]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], eax
mov ecx, dword [ebx + edi]
mov edi, ecx
and edi, 0x3f
mov esi, dword [esp + edi*4 + 0x78]
mov dword [esp + 0x58], esi
test esi, esi
je 0x10049765
mov eax, dword [esi]
and eax, 0xffffff
cmp eax, ecx
je 0x100497b8
mov esi, dword [esp + 0x40]
lea eax, [esp + 0x58]
push eax
push 0
push 1
push ecx
push esi
call fcn.1004a310
add esp, 0x14
mov dword [esp + 0x44], eax
test eax, eax
jne 0x10049921
mov ecx, dword [esp + 0x70]
mov esi, dword [esp + 0x58]
mov edx, dword [esp + 0x74]
movsd xmm1, qword [0x1022a6d0]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x68]
mov dword [esp + edi*4 + 0x78], esi
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], ecx
cmp dword [esp + 0x20], 1
mov ecx, dword [esp + 0x4c]
movsd xmm0, qword [ebx + ecx + 8]
jne 0x10049843
addsd xmm0, qword [0x102bc178]
sub esp, 8
movsd qword [esp + 0x60], xmm0
fld qword [esp + 0x60]
fstp qword [esp]
call fcn.101fe2e0
mov edi, dword [esi + 0x68]
mov ebx, dword [esi + 0x70]
mov ecx, dword [esp + 0x54]
fstp qword [esp + 0x60]
cvttsd2si eax, qword [esp + 0x60]
shl eax, 8
add edi, eax
add ebx, eax
mov eax, dword [esp + 0x44]
movsd xmm0, qword [eax + ecx + 0x10]
addsd xmm0, qword [0x102bc178]
movsd qword [esp + 0x60], xmm0
fld qword [esp + 0x60]
fstp qword [esp]
call fcn.101fe2e0
movsd xmm1, qword [0x1022a6d0]
add esp, 8
mov edx, dword [esp + 0x28]
fstp qword [esp + 0x58]
cvttsd2si ecx, qword [esp + 0x58]
shl ecx, 8
jmp 0x10049873
mov eax, dword [esp + 0x3c]
addsd xmm0, xmm1
mov edi, dword [esi + 0x68]
mov ebx, dword [esi + 0x70]
movsd qword [esp + 0x58], xmm0
movsd xmm0, qword [eax + ecx + 0x10]
add edi, dword [esp + 0x58]
addsd xmm0, xmm1
add ebx, dword [esp + 0x58]
movsd qword [esp + 0x58], xmm0
mov ecx, dword [esp + 0x58]
mov eax, dword [esi + 0x6c]
add eax, ecx
mov dword [esp + 0x58], ecx
mov ecx, dword [esi + 0x74]
add ecx, dword [esp + 0x58]
cmp dword [esp + 0x2c], 0
jne 0x100498b8
cmp edi, ebx
je 0x100498b0
cmp eax, ecx
je 0x100498b0
cmp ebx, dword [esp + 0x30]
jle 0x100498b0
cmp edi, dword [esp + 0x34]
jge 0x100498b0
cmp ecx, dword [esp + 0x38]
jle 0x100498b0
mov dword [esp + 0x2c], 1
cmp eax, edx
jl 0x100498b8
mov dword [esp + 0x2c], 0
mov edx, dword [esp + 0x30]
cmp edi, edx
cmovl edx, edi
mov edi, dword [esp + 0x34]
cmp ebx, edi
mov dword [esp + 0x30], edx
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0x28]
cmovg edi, ebx
mov ebx, dword [esp + 0x38]
cmp eax, ebx
mov dword [esp + 0x34], edi
cmovl ebx, eax
mov dword [esp + 0x70], edi
mov eax, dword [esp + 0x54]
cmp ecx, edx
mov edi, dword [esp + 0x4c]
cmovg edx, ecx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x6c], ebx
inc eax
mov ebx, dword [esp + 0x3c]
add ebx, 0x18
mov dword [esp + 0x28], edx
mov dword [esp + 0x74], edx
mov dword [esp + 0x54], eax
mov dword [esp + 0x3c], ebx
cmp eax, dword [ebp + 0x10]
jl 0x10049746
mov esi, dword [esp + 0x40]
mov ebx, dword [esp + 0x2c]
cmp dword [esi + 0x198], 0
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
je 0x1004995d
push 0x102e5e28
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x102e5ae8
call fcn.1005d290
add esp, 4
push 0x102e5e28
call edi
mov dword [esi + 0x198], 0
push esi
call fcn.10049470
add esp, 4
mov dword [esi + 0x194], 0
lea eax, [esi + 0x170]
push eax
call edi
mov eax, dword [esp + 0x44]
test eax, eax
je 0x100499a0
push eax
push esi
call fcn.10048f80
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x170]
xor ecx, esp
call fcn.101eafcd
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x68]
cmp eax, dword [esp + 0x70]
jge 0x100499bd
push dword [esp + 0x50]
lea eax, [esp + 0x6c]
push eax
call fcn.10056890
add esp, 8
jmp 0x100499dc
mov eax, dword [esp + 0x50]
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 0xc], 0
mov dword [eax + 8], 0
mov eax, dword [esp + 0x48]
test eax, eax
je 0x100499e6
mov dword [eax], ebx
xor eax, eax
mov ecx, dword [esp + 0x17c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.101eafcd
mov esp, ebp
pop ebp
ret