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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x461f55
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x47a0bc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
lea esi, [ebx + 0x80]
push esi
mov dword [ebp - 0x48], esi
call sub.MSVCP140.dll__Mtx_lock
add esp, 4
test eax, eax
jne 0x40d562
mov edi, dword [ebx]
mov dword [ebp - 4], eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x38]
push eax
mov dword [ebp - 0x30], edi
call fcn.00404470
mov eax, dword [ebp - 0x38]
add esp, 4
sub eax, dword [ebx + 0x78]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x34]
sbb eax, dword [ebx + 0x7c]
mov dword [ebp - 0x40], eax
mov eax, dword [ebx + 0x6c]
cmp eax, 8
je 0x40d1f5
push eax
push edi
call fcn.004052b0
add esp, 8
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
mov dword [ebp - 0x2c], eax
cmp eax, ecx
je 0x40d263
mov esi, ecx
mov ecx, dword [eax]
cmp ecx, 7
ja case.default.0x40d20b
jmp dword [ecx*4 + 0x40d568]
push 0x4032e0
jmp 0x40d248
push 0x4032e0
jmp 0x40d248
push 0x4032e0
jmp 0x40d248
push 0x4054c0
jmp 0x40d248
push 0x4032e0
jmp 0x40d248
push 0x4032e0
jmp 0x40d248
push 0x4032e0
jmp 0x40d248
push 0x4032e0
mov ecx, edi
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov eax, dword [ebp - 0x2c]
add eax, 4
mov dword [ebp - 0x2c], eax
cmp eax, esi
jne 0x40d204
lea esi, [ebx + 0x80]
cmp dword [ebx + 0x68], 0x10
lea eax, [ebx + 0x54]
mov ecx, dword [eax + 0x10]
jb 0x40d271
mov eax, dword [eax]
push ecx
push eax
push edi
call fcn.00401f10
add esp, 0xc
cmp byte [ebx + 0x2c], 0
je 0x40d2c2
mov edi, dword [ebx + 0x14]
mov eax, 0x2aaaaaab
mov ecx, dword [ebx + 0x18]
sub ecx, edi
imul ecx
mov eax, dword [ebx + 0x74]
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
xor edx, edx
div ecx
lea eax, [edx + edx*2]
cmp dword [edi + eax*8 + 0x14], 0x10
lea eax, [edi + eax*8]
mov ecx, dword [eax + 0x10]
jb 0x40d2b4
mov eax, dword [eax]
mov edi, dword [ebp - 0x30]
push ecx
push eax
push edi
call fcn.00401f10
add esp, 0xc
cmp byte [ebx + 0x38], 0
je 0x40d32e
push 0x463b50
push edi
call fcn.00401ca0
mov ecx, dword [ebx + 0x70]
mov edi, eax
mov eax, dword [ebp - 0x44]
add esp, 8
movd xmm0, ecx
movd xmm1, eax
cvtdq2pd xmm0, xmm0
shr ecx, 0x1f
shr eax, 0x1f
cvtdq2pd xmm1, xmm1
addsd xmm0, qword [ecx*8 + 0x463c30]
addsd xmm1, qword [eax*8 + 0x463c30]
divsd xmm0, xmm1
mulsd xmm0, qword [0x463c20]
call fcn.00460380
push 0x463bac
push eax
mov ecx, edi
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
push eax
call fcn.00401ca0
add esp, 8
cmp byte [ebx + 0x34], 0
mov edi, dword [ebp - 0x30]
je 0x40d351
push 0x463bb0
push edi
call fcn.00401ca0
push dword [ebp - 0x40]
push dword [ebp - 0x3c]
push edi
call fcn.00405ad0
add esp, 0x14
cmp byte [ebx + 0x30], 0
mov cl, byte [ebx + 0x34]
je 0x40d44c
test cl, cl
mov edx, 0x463bbc
mov eax, 0x463bb0
cmovne eax, edx
push eax
push edi
call fcn.00401ca0
add esp, 8
cmp dword [ebx + 0x70], 0
jbe 0x40d401
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
call fcn.00460430
mov eax, dword [ebp - 0x44]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
sub esp, 8
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x463c30]
mov eax, dword [ebx + 0x70]
cvtpd2ps xmm0, xmm0
mulss xmm1, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x463c30]
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
movss dword [ebp - 0x34], xmm1
fld dword [ebp - 0x34]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceil
add esp, 8
fstp dword [ebp - 0x34]
movss xmm0, dword [ebp - 0x34]
call fcn.00460310
mov dword [ebp - 0x34], eax
mov eax, edx
mov dword [ebp - 0x30], edx
mov edx, dword [ebp - 0x34]
jmp 0x40d412
xorps xmm0, xmm0
movlpd qword [ebp - 0x38], xmm0
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x40]
cmp ecx, eax
mov eax, dword [ebp - 0x3c]
jg 0x40d42b
jl 0x40d422
cmp eax, edx
jae 0x40d42b
sub edx, eax
mov eax, dword [ebp - 0x30]
sbb eax, ecx
jmp 0x40d434
sub eax, edx
mov edx, eax
sbb ecx, dword [ebp - 0x30]
mov eax, ecx
push eax
push edx
push edi
call fcn.00405ad0
push 0x463bc0
push edi
call fcn.00401ca0
add esp, 0x14
jmp 0x40d45e
test cl, cl
je 0x40d45e
push 0x463bc0
push edi
call fcn.00401ca0
add esp, 8
cmp dword [ebx + 0x20], 0
jne 0x40d46b
mov dword [ebx + 0x20], 0xa
push 0x463b50
push edi
call fcn.00401ca0
mov edx, dword [ebx + 0x4c]
lea ecx, [ebx + 0x3c]
add esp, 8
cmp dword [ecx + 0x14], 0x10
jb 0x40d487
mov ecx, dword [ecx]
push edx
push ecx
push eax
call fcn.00401f10
add esp, 0xc
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x28]
push 0x20
push dword [ebx + 0x20]
call fcn.004021d0
cmp dword [eax + 0x14], 0x10
mov ecx, dword [eax + 0x10]
mov byte [ebp - 4], 1
jb 0x40d4b1
mov eax, dword [eax]
push 0x463bc4
push ecx
push eax
push dword [ebp - 0x34]
call fcn.00401f10
add esp, 0xc
push eax
call fcn.00401ca0
mov ecx, dword [ebp - 0x14]
add esp, 8
mov byte [ebp - 4], 0
cmp ecx, 0x10
jb 0x40d506
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40d4fc
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40d4fc
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0045fabc
add esp, 8
mov ecx, edi
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::flush_void_]
inc dword [ebx + 0x74]
mov eax, dword [ebp - 0x44]
cmp dword [ebx + 0x70], eax
jbe 0x40d51d
mov byte [ebx + 0x24], 1
cmp byte [ebx + 0x24], 0
je 0x40d53d
push 0x404ea0
mov ecx, edi
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push 0x4020b0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push esi
call sub.MSVCP140.dll__Mtx_unlock
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045faca
mov esp, ebp
pop ebp
ret
push eax
call sub.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_
adc dl, dl
inc eax
add byte [ecx], bl
rol byte [eax], cl
and dl, dl
inc eax
add byte [edi], ah
rol byte [eax], cl
rol byte cs:[eax], cl
xor eax, 1006649554
rol byte [eax], cl
inc ebx
rol byte [eax], cl
int3