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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x74
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, ecx
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x3c], esi
push edi
cmp ecx, eax
jle 0x4b1e7b
mov edi, dword [ebp + 0x18]
mov ebx, dword [ebp + 0x10]
cmp edi, ebx
jle 0x4b1e7b
mov edx, edi
sub ecx, eax
sub edx, ebx
mov dword [esp + 0x30], ecx
cmp byte [esi + 8], 0
mov dword [esp + 0x3c], edx
jne 0x4b12e1
push dword [esi + 0xc]
push edx
push ecx
mov ecx, dword [ebp + 8]
push ebx
push eax
call fcn.004fd431
mov eax, dword [ebp + 0x1c]
test eax, eax
jne 0x4b1702
mov esi, dword [ebp + 0x20]
lea eax, [esi + 0x70]
push eax
mov dword [esp + 0x74], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x18]
lea ebx, [esi + 0x30]
mov cl, byte [esi + 0xb9]
mov edx, dword [esi + 0x5c]
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x20]
mov dword [esp + 0x54], eax
mov eax, dword [esi + 0x24]
mov dword [esp + 0x50], eax
mov eax, dword [esi + 0xbc]
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0xc0]
mov dword [esp + 0x58], eax
mov eax, dword [esi + 0xc4]
mov dword [esp + 0x5c], eax
mov al, byte [esi + 0xb8]
mov byte [esp + 0x2e], al
mov al, byte [esi + 8]
mov dword [esp + 0x4c], edx
mov byte [esp + 0x2d], cl
mov byte [esp + 0x2f], al
test al, al
je 0x4b13ba
mov eax, dword [esi + 0x10]
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0x14]
xor esi, esi
mov dword [esp + 0x34], eax
mov eax, dword [ebx + 0x20]
sub eax, 1
je 0x4b13ba
cmp esi, dword [esp + 0x30]
jae 0x4b13b6
test edx, edx
jns 0x4b138c
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x30]
lea edx, [eax - 1]
mov ecx, dword [ebx + 0x1c]
mov eax, dword [ecx + edx*8]
mov ecx, dword [ecx + edx*8 + 4]
cmp dword [esp + 0x34], ecx
jg 0x4b13ac
jl 0x4b13a4
cmp dword [esp + 0x38], eax
jae 0x4b13ac
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
mov eax, dword [ebx + 0x20]
inc esi
dec eax
dec edx
cmp esi, eax
jb 0x4b1378
mov cl, byte [esp + 0x2d]
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x54]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x34]
sbb eax, dword [esp + 0x50]
cmp byte [ebp + 0x28], 0
mov dword [esp + 0x60], eax
mov eax, dword [edx + 0x10]
mov dword [esp + 0x48], eax
je 0x4b13ea
mov eax, dword [edx + 0x14]
mov dword [esp + 0x48], eax
test cl, cl
je 0x4b1411
mov eax, dword [esp + 0x5c]
movzx ecx, al
mov eax, dword [esp + 0x58]
shl ecx, 8
movzx eax, al
or ecx, eax
mov eax, dword [esp + 0x44]
shl ecx, 8
movzx eax, al
or ecx, eax
mov dword [esp + 0x48], ecx
mov eax, dword [ebx + 0x20]
xor ecx, ecx
mov dword [esp + 0x58], ecx
sub eax, 1
je 0x4b150c
mov eax, dword [ebp + 0x14]
dec eax
mov dword [esp + 0x44], eax
nop dword [eax + eax]
cmp ecx, dword [esp + 0x30]
jae 0x4b150c
mov eax, dword [esp + 0x4c]
sub eax, 1
mov dword [esp + 0x4c], eax
jns 0x4b1453
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x30]
dec eax
mov dword [esp + 0x4c], eax
mov ecx, dword [ebx + 0x1c]
mov edx, dword [ecx + eax*8]
mov esi, edx
mov eax, dword [ecx + eax*8 + 4]
mov ecx, eax
sub esi, dword [esp + 0x54]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x3c]
sbb ecx, dword [esp + 0x50]
mov dword [esp + 0x68], edx
cdq
push edx
push eax
push ecx
push esi
call fcn.005750a0
mov ecx, eax
call fcn.00575470
mov edx, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
movsd qword [esp + 0x78], xmm0
call fcn.00575470
movsd xmm1, qword [esp + 0x78]
divsd xmm1, xmm0
cvttsd2si ecx, xmm1
test ecx, ecx
jne 0x4b14ce
cmp dword [esp + 0x3c], ecx
jle 0x4b14f3
mov eax, dword [esp + 0x50]
cmp dword [esp + 0x5c], eax
jl 0x4b14f3
jg 0x4b14c7
mov eax, dword [esp + 0x54]
cmp dword [esp + 0x68], eax
jbe 0x4b14f3
mov ecx, 1
jmp 0x4b14d0
jle 0x4b14f3
push dword [esp + 0x48]
mov eax, edi
sub eax, ecx
cmp byte [esp + 0x32], 0
je 0x4b14e3
push 5
jmp 0x4b14e4
push ecx
mov ecx, dword [ebp + 8]
push 1
push eax
push dword [esp + 0x54]
call fcn.004fd431
mov ecx, dword [esp + 0x58]
mov eax, dword [ebx + 0x20]
inc ecx
dec dword [esp + 0x44]
dec eax
mov dword [esp + 0x58], ecx
cmp ecx, eax
jb 0x4b1430
push dword [esp + 0x70]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp + 0x24]
test edi, edi
je 0x4b1e7b
lea eax, [edi + 0x70]
push eax
mov dword [esp + 0x64], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [esp + 0x2f], 0
jne 0x4b1544
mov eax, dword [edi + 0x18]
mov dword [esp + 0x38], eax
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0x20]
lea esi, [edi + 0x30]
mov dword [esp + 0x50], eax
mov eax, dword [edi + 0x24]
mov cl, byte [edi + 0xb9]
mov edx, dword [edi + 0xbc]
mov dword [esp + 0x54], eax
mov eax, dword [edi + 0xc0]
mov dword [esp + 0x68], eax
mov eax, dword [edi + 0xc4]
mov dword [esp + 0x70], eax
mov al, byte [edi + 0xb8]
mov edi, dword [edi + 0x5c]
mov byte [esp + 0x2f], al
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x50]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x34]
sbb eax, dword [esp + 0x54]
cmp byte [ebp + 0x28], 0
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x64], esi
mov eax, dword [eax + 0x14]
mov dword [esp + 0x48], eax
je 0x4b15ba
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x48], eax
test cl, cl
je 0x4b15dd
mov eax, dword [esp + 0x70]
movzx ecx, al
mov eax, dword [esp + 0x68]
shl ecx, 8
movzx eax, al
or ecx, eax
movzx eax, dl
shl ecx, 8
or ecx, eax
mov dword [esp + 0x48], ecx
mov eax, dword [esi + 0x20]
xor ecx, ecx
mov dword [esp + 0x4c], ecx
sub eax, 1
je 0x4b16ef
mov eax, dword [ebp + 0x14]
dec eax
mov dword [esp + 0x44], eax
nop word [eax + eax]
cmp ecx, dword [esp + 0x30]
jae 0x4b16ef
test edi, edi
jns 0x4b1618
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x30]
lea edi, [eax - 1]
mov ecx, dword [esi + 0x1c]
mov edx, dword [ecx + edi*8]
mov esi, edx
mov eax, dword [ecx + edi*8 + 4]
mov ecx, eax
sub esi, dword [esp + 0x50]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x3c]
sbb ecx, dword [esp + 0x54]
mov dword [esp + 0x58], edx
cdq
push edx
push eax
push ecx
push esi
call fcn.005750a0
mov ecx, eax
call fcn.00575470
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
movsd qword [esp + 0x78], xmm0
call fcn.00575470
movsd xmm1, qword [esp + 0x78]
divsd xmm1, xmm0
cvttsd2si ecx, xmm1
test ecx, ecx
jne 0x4b16ab
cmp dword [esp + 0x3c], ecx
jle 0x4b16d1
mov ecx, dword [esp + 0x70]
cmp ecx, dword [esp + 0x54]
jl 0x4b16d1
mov edx, dword [esp + 0x58]
jg 0x4b168c
cmp edx, dword [esp + 0x50]
jbe 0x4b16d1
mov eax, dword [ebx + 0x20]
dec eax
cmp edi, eax
jge 0x4b16a4
mov eax, dword [ebx + 0x1c]
cmp ecx, dword [eax + edi*8 + 4]
jl 0x4b16d1
jg 0x4b16a4
cmp edx, dword [eax + edi*8]
jb 0x4b16d1
mov ecx, 1
jmp 0x4b16ad
jle 0x4b16d1
mov eax, dword [ebp + 0x18]
push dword [esp + 0x48]
sub eax, ecx
cmp byte [esp + 0x33], 0
je 0x4b16c1
push 5
jmp 0x4b16c2
push ecx
mov ecx, dword [ebp + 8]
push 1
push eax
push dword [esp + 0x54]
call fcn.004fd431
mov esi, dword [esp + 0x64]
dec edi
mov ecx, dword [esp + 0x4c]
dec dword [esp + 0x44]
inc ecx
mov dword [esp + 0x4c], ecx
mov eax, dword [esi + 0x20]
dec eax
cmp ecx, eax
jb 0x4b1600
push dword [esp + 0x60]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
cmp eax, 1
jne 0x4b1a6e
mov eax, dword [ebp + 0x20]
add eax, 0x70
push eax
mov dword [esp + 0x4c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 0x20]
mov edx, dword [eax + 0x18]
lea esi, [eax + 0x30]
mov ecx, dword [eax + 0x20]
mov edi, dword [eax + 0x5c]
mov dword [esp + 0x34], edx
mov edx, dword [eax + 0x1c]
mov dword [esp + 0x38], edx
mov edx, dword [eax + 0xbc]
mov dword [esp + 0x50], ecx
mov ecx, dword [eax + 0x24]
mov dword [esp + 0x60], edx
mov edx, dword [eax + 0xc0]
mov dword [esp + 0x4c], ecx
mov ch, byte [eax + 8]
mov cl, byte [eax + 0xb9]
mov dword [esp + 0x64], edx
mov edx, dword [eax + 0xc4]
mov dword [esp + 0x68], edx
mov edx, edi
mov dword [esp + 0x70], edi
mov byte [esp + 0x2d], cl
mov byte [esp + 0x2f], ch
test ch, ch
je 0x4b17f1
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0x20]
mov dword [esp + 0x34], ecx
xor ecx, ecx
mov dword [esp + 0x58], ecx
sub eax, 1
je 0x4b17ed
mov ebx, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
nop
cmp ecx, dword [esp + 0x30]
jae 0x4b17de
sub edx, 1
jns 0x4b17b5
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x30]
lea edx, [eax - 1]
mov ecx, dword [esi + 0x1c]
mov eax, dword [ecx + edx*8]
mov ecx, dword [ecx + edx*8 + 4]
cmp edi, ecx
jg 0x4b17cd
jl 0x4b17c9
cmp ebx, eax
jae 0x4b17cd
mov ebx, eax
mov edi, ecx
mov ecx, dword [esp + 0x58]
mov eax, dword [esi + 0x20]
inc ecx
dec eax
mov dword [esp + 0x58], ecx
cmp ecx, eax
jb 0x4b17a0
mov dword [esp + 0x38], edi
mov edi, dword [esp + 0x70]
mov dword [esp + 0x34], ebx
mov ebx, dword [ebp + 0x10]
mov cl, byte [esp + 0x2d]
mov eax, dword [esp + 0x34]
sub eax, dword [esp + 0x50]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x38]
sbb eax, dword [esp + 0x4c]
cmp byte [ebp + 0x28], 0
mov dword [esp + 0x70], eax
mov eax, dword [edx + 0x10]
mov dword [esp + 0x54], eax
je 0x4b1821
mov eax, dword [edx + 0x14]
mov dword [esp + 0x54], eax
test cl, cl
je 0x4b1848
mov eax, dword [esp + 0x68]
movzx edx, al
mov eax, dword [esp + 0x64]
shl edx, 8
movzx eax, al
or edx, eax
mov eax, dword [esp + 0x60]
shl edx, 8
movzx eax, al
or edx, eax
mov dword [esp + 0x54], edx
mov eax, dword [esi + 0x20]
xor ecx, ecx
mov dword [esp + 0x58], ecx
sub eax, 1
je 0x4b18ed
nop word [eax + eax]
cmp ecx, 1
jae 0x4b18ed
test edi, edi
jns 0x4b1877
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x30]
lea edi, [eax - 1]
mov ecx, dword [esi + 0x1c]
push 0
push dword [esp + 0x34]
mov edx, dword [ecx + edi*8]
sub edx, dword [esp + 0x58]
mov ecx, dword [ecx + edi*8 + 4]
sbb ecx, dword [esp + 0x54]
push ecx
push edx
call fcn.005750a0
mov ecx, eax
call fcn.00575470
mov edx, dword [esp + 0x70]
mov ecx, dword [esp + 0x5c]
movsd qword [esp + 0x78], xmm0
call fcn.00575470
movsd xmm1, qword [esp + 0x78]
divsd xmm1, xmm0
cvttsd2si eax, xmm1
test eax, eax
jle 0x4b18d7
push dword [esp + 0x54]
mov ecx, dword [ebp + 8]
push dword [esp + 0x40]
push eax
push ebx
push dword [ebp + 0xc]
call fcn.004fd431
mov ecx, dword [esp + 0x58]
dec edi
mov eax, dword [esi + 0x20]
inc ecx
dec eax
mov dword [esp + 0x58], ecx
cmp ecx, eax
jb 0x4b1860
push dword [esp + 0x48]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp + 0x24]
test esi, esi
je 0x4b1e7b
lea eax, [esi + 0x70]
push eax
mov dword [esp + 0x60], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [esp + 0x2f], 0
jne 0x4b191f
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
jmp 0x4b1927
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov edi, dword [esi + 0x20]
sub eax, edi
mov ecx, dword [esi + 0x24]
mov bl, byte [esi + 0xb9]
mov dword [esp + 0x58], ecx
lea ecx, [esi + 0x30]
sbb edx, dword [esp + 0x58]
cmp byte [ebp + 0x28], 0
mov byte [esp + 0x2f], bl
mov ebx, dword [esi + 0xbc]
mov dword [esp + 0x64], ebx
mov ebx, dword [esi + 0xc0]
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x40]
mov dword [esp + 0x68], ebx
mov ebx, dword [esi + 0xc4]
mov esi, dword [esi + 0x5c]
mov dword [esp + 0x34], eax
mov eax, dword [edx + 0x14]
mov dword [esp + 0x70], ebx
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x60], edi
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], eax
je 0x4b1990
mov eax, dword [edx + 0x10]
mov dword [esp + 0x54], eax
cmp byte [esp + 0x2f], 0
je 0x4b19ba
mov eax, dword [esp + 0x70]
movzx edx, al
mov eax, dword [esp + 0x68]
shl edx, 8
movzx eax, al
or edx, eax
mov eax, dword [esp + 0x64]
shl edx, 8
movzx eax, al
or edx, eax
mov dword [esp + 0x54], edx
mov eax, dword [ecx + 0x20]
xor edi, edi
sub eax, 1
je 0x4b1a5b
nop dword [eax + eax]
cmp edi, 1
jae 0x4b1a5b
test esi, esi
jns 0x4b19e9
mov eax, dword [ecx]
call dword [eax + 0x30]
mov ecx, dword [esp + 0x50]
lea esi, [eax - 1]
mov ecx, dword [ecx + 0x1c]
push 0
push dword [esp + 0x34]
mov edx, dword [ecx + esi*8]
sub edx, dword [esp + 0x68]
mov ecx, dword [ecx + esi*8 + 4]
sbb ecx, dword [esp + 0x60]
push ecx
push edx
call fcn.005750a0
mov ecx, eax
call fcn.00575470
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
movsd qword [esp + 0x78], xmm0
call fcn.00575470
movsd xmm1, qword [esp + 0x78]
divsd xmm1, xmm0
cvttsd2si eax, xmm1
test eax, eax
jle 0x4b1a49
push dword [esp + 0x54]
mov ecx, dword [ebp + 8]
push dword [esp + 0x40]
push eax
push ebx
push dword [ebp + 0xc]
call fcn.004fd431
mov ecx, dword [esp + 0x50]
inc edi
dec esi
mov eax, dword [ecx + 0x20]
dec eax
cmp edi, eax
jb 0x4b19d0
push dword [esp + 0x5c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
cmp eax, 2
jne 0x4b1e7b
mov eax, dword [ebp + 0x20]
add eax, 0x70
push eax
mov dword [esp + 0x7c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 0x20]
mov edx, dword [eax + 0x18]
lea edi, [eax + 0x30]
mov ecx, dword [eax + 0x20]
mov esi, dword [eax + 0x5c]
mov dword [esp + 0x34], edx
mov edx, dword [eax + 0x1c]
mov dword [esp + 0x38], edx
mov dl, byte [eax + 0xb9]
mov dword [esp + 0x50], ecx
mov ecx, dword [eax + 0x24]
mov byte [esp + 0x2f], dl
mov dl, byte [eax + 0xb8]
mov dword [esp + 0x5c], ecx
mov ecx, dword [eax + 0xbc]
mov byte [esp + 0x2e], dl
mov dl, byte [eax + 8]
mov dword [esp + 0x68], ecx
mov ecx, dword [eax + 0xc0]
mov byte [esp + 0x2d], dl
mov edx, esi
cmp byte [esp + 0x2d], 0
mov dword [esp + 0x70], ecx
mov ecx, dword [eax + 0xc4]
mov dword [esp + 0x48], esi
mov dword [esp + 0x54], ecx
je 0x4b1b71
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x38], eax
mov eax, dword [edi + 0x20]
mov dword [esp + 0x34], ecx
xor ecx, ecx
mov dword [esp + 0x58], ecx
sub eax, 1
je 0x4b1b6d
mov ebx, dword [esp + 0x34]
mov esi, dword [esp + 0x38]
nop dword [eax + eax]
cmp ecx, dword [esp + 0x30]
jae 0x4b1b5e
test edx, edx
jns 0x4b1b34
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x30]
lea edx, [eax - 1]
mov ecx, dword [edi + 0x1c]
mov eax, dword [ecx + edx*8]
mov ecx, dword [ecx + edx*8 + 4]
cmp esi, ecx
jg 0x4b1b4c
jl 0x4b1b48
cmp ebx, eax
jae 0x4b1b4c
mov ebx, eax
mov esi, ecx
mov ecx, dword [esp + 0x58]
dec edx
mov eax, dword [edi + 0x20]
inc ecx
dec eax
mov dword [esp + 0x58], ecx
cmp ecx, eax
jb 0x4b1b20
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x48]
mov dword [esp + 0x34], ebx
mov ebx, dword [ebp + 0x10]
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x34]
sub eax, dword [esp + 0x50]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x38]
sbb eax, dword [esp + 0x5c]
cmp byte [esp + 0x2f], 0
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x4c], eax
je 0x4b1bba
mov eax, dword [esp + 0x70]
movzx ecx, cl
shl ecx, 8
movzx eax, al
or ecx, eax
mov eax, dword [esp + 0x68]
shl ecx, 8
movzx eax, al
or ecx, eax
mov dword [esp + 0x4c], ecx
mov eax, dword [edi + 0x20]
xor ecx, ecx
mov dword [esp + 0x58], ecx
sub eax, 1
je 0x4b1cd4
mov eax, dword [ebp + 0x14]
dec eax
mov dword [esp + 0x44], eax
cmp ecx, dword [esp + 0x30]
jae 0x4b1cd4
sub esi, 1
mov dword [esp + 0x48], esi
jns 0x4b1bf5
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x30]
lea esi, [eax - 1]
mov dword [esp + 0x48], esi
mov ecx, dword [edi + 0x1c]
mov eax, dword [esp + 0x48]
mov esi, dword [ecx + esi*8]
mov ecx, dword [ecx + eax*8 + 4]
mov eax, dword [esp + 0x3c]
sub esi, dword [esp + 0x50]
cdq
sbb ecx, dword [esp + 0x5c]
push edx
push eax
push ecx
push esi
call fcn.005750a0
mov ecx, eax
call fcn.00575470
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x60]
movsd qword [esp + 0x70], xmm0
call fcn.00575470
movsd xmm1, qword [esp + 0x70]
sub esp, 8
divsd xmm1, xmm0
movsd qword [esp], xmm1
call fcn.0052b1af
fstp qword [esp + 0x78]
cvttsd2si ecx, qword [esp + 0x78]
add esp, 8
test ecx, ecx
jle 0x4b1cb7
mov eax, dword [ebp + 0x18]
sub eax, ecx
sub eax, ebx
cmp byte [esp + 0x2e], 0
je 0x4b1c9c
mov esi, eax
test esi, esi
jns 0x4b1c72
add esi, 1
sar esi, 1
push dword [esp + 0x4c]
mov ecx, dword [ebp + 8]
lea eax, [esi + ebx]
push 5
push 1
push eax
push dword [esp + 0x54]
call fcn.004fd431
mov eax, dword [ebp + 0x18]
push dword [esp + 0x4c]
sub eax, esi
push 5
sub eax, 5
jmp 0x4b1ca8
push dword [esp + 0x4c]
cdq
sub eax, edx
sar eax, 1
push ecx
add eax, ebx
mov ecx, dword [ebp + 8]
push 1
push eax
push dword [esp + 0x54]
call fcn.004fd431
mov ecx, dword [esp + 0x58]
mov eax, dword [edi + 0x20]
inc ecx
dec dword [esp + 0x44]
dec eax
mov esi, dword [esp + 0x48]
mov dword [esp + 0x58], ecx
cmp ecx, eax
jb 0x4b1bd4
push dword [esp + 0x78]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp + 0x24]
test esi, esi
je 0x4b1e7b
lea eax, [esi + 0x70]
push eax
mov dword [esp + 0x74], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [esp + 0x2d], 0
jne 0x4b1d06
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
jmp 0x4b1d0e
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov eax, dword [esi + 0x24]
mov edi, dword [esi + 0x20]
sub ecx, edi
mov dword [esp + 0x5c], eax
lea eax, [esi + 0x30]
sbb edx, dword [esp + 0x5c]
cmp byte [esi + 0xb9], 0
mov dword [esp + 0x54], eax
mov al, byte [esi + 0xb8]
mov byte [esp + 0x2f], al
mov eax, dword [esp + 0x40]
mov dword [esp + 0x78], edi
mov edi, dword [esi + 0x5c]
mov dword [esp + 0x34], ecx
mov eax, dword [eax + 0x14]
mov dword [esp + 0x38], edx
mov dword [esp + 0x4c], eax
je 0x4b1d75
movzx ecx, byte [esi + 0xc4]
movzx eax, byte [esi + 0xc0]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xbc]
shl ecx, 8
or ecx, eax
mov dword [esp + 0x4c], ecx
mov esi, dword [esp + 0x54]
xor ecx, ecx
mov dword [esp + 0x58], ecx
mov eax, dword [esi + 0x20]
sub eax, 1
je 0x4b1e71
mov eax, dword [ebp + 0x14]
dec eax
mov dword [esp + 0x48], eax
cmp ecx, dword [esp + 0x30]
jae 0x4b1e71
test edi, edi
jns 0x4b1dab
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x30]
lea edi, [eax - 1]
mov ecx, dword [esi + 0x1c]
mov eax, dword [esp + 0x3c]
cdq
push edx
mov esi, dword [ecx + edi*8]
sub esi, dword [esp + 0x7c]
mov ecx, dword [ecx + edi*8 + 4]
sbb ecx, dword [esp + 0x60]
push eax
push ecx
push esi
call fcn.005750a0
mov ecx, eax
call fcn.00575470
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
movsd qword [esp + 0x68], xmm0
call fcn.00575470
movsd xmm1, qword [esp + 0x68]
divsd xmm1, xmm0
cvttsd2si ecx, xmm1
test ecx, ecx
jle 0x4b1e53
mov eax, dword [ebp + 0x18]
sub eax, ecx
sub eax, ebx
cmp byte [esp + 0x2f], 0
je 0x4b1e38
mov esi, eax
test esi, esi
jns 0x4b1e0e
add esi, 1
sar esi, 1
push dword [esp + 0x4c]
mov ecx, dword [ebp + 8]
lea eax, [esi + ebx]
push 5
push 1
push eax
push dword [esp + 0x58]
call fcn.004fd431
mov eax, dword [ebp + 0x18]
push dword [esp + 0x4c]
sub eax, esi
push 5
sub eax, 5
jmp 0x4b1e44
push dword [esp + 0x4c]
cdq
sub eax, edx
sar eax, 1
push ecx
add eax, ebx
mov ecx, dword [ebp + 8]
push 1
push eax
push dword [esp + 0x58]
call fcn.004fd431
mov esi, dword [esp + 0x54]
dec edi
mov ecx, dword [esp + 0x58]
dec dword [esp + 0x48]
inc ecx
mov dword [esp + 0x58], ecx
mov eax, dword [esi + 0x20]
dec eax
cmp ecx, eax
jb 0x4b1d93
push dword [esp + 0x70]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24