Function at 0x543c30
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5dd7e0
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
mov eax, dword [0x671330]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xb0], esi
cmp dword [edi + 0x64], 0
mov dword [ebp - 4], 0
je 0x543cd5
lea eax, [ebp - 0xb8]
mov dword [ebp - 0xbc], vtable.std::exception.0
push eax
lea eax, [ebp - 0xac]
mov dword [ebp - 0xac], str.stream_already_open
xorps xmm0, xmm0
mov byte [ebp - 0xa8], 1
push eax
movq qword [ebp - 0xb8], xmm0
call dword [sym.imp.VCRUNTIME140.dll___std_exception_copy]
add esp, 8
mov dword [ebp - 0xbc], vtable.std::invalid_argument.0
lea eax, [ebp - 0xbc]
push 0x638098
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
cmp dword [ebx + 0x10], 0
jne 0x543d33
lea eax, [ebp - 0xc4]
mov dword [ebp - 0xc8], vtable.std::exception.0
push eax
lea eax, [ebp - 0xac]
mov dword [ebp - 0xac], str.empty_file_path
xorps xmm0, xmm0
mov byte [ebp - 0xa8], 1
push eax
movq qword [ebp - 0xc4], xmm0
call dword [sym.imp.VCRUNTIME140.dll___std_exception_copy]
add esp, 8
mov dword [ebp - 0xc8], vtable.std::invalid_argument.0
lea eax, [ebp - 0xc8]
push 0x638098
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, dword [ebp + 0x18]
mov dword [ebp - 0xa8], eax
cmp dword [ebx + 0x14], 8
jb 0x543d4c
mov eax, dword [ebx]
jmp 0x543d4e
mov eax, ebx
push dword [ebp + 0x14]
lea ecx, [edi + 0x18]
push dword [ebp + 0x10]
push eax
call fcn.0041eb20
test eax, eax
mov eax, dword [edi]
push 0
mov ecx, dword [eax + 4]
jne 0x543d74
push 2
add ecx, edi
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
jmp 0x543d7e
push 0
add ecx, edi
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool_]
mov eax, dword [edi]
mov ecx, dword [eax + 4]
add ecx, edi
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::ios_base::operator_bool_void_const]
test al, al
je 0x543da8
cmp dword [esi + 0x14], 0x10
mov dword [esi + 0x10], 0
jb 0x543d9e
mov esi, dword [esi]
mov byte [esi], 0
mov al, 1
jmp 0x543e5b
lea eax, [ebp - 0xd0]
mov dword [ebp - 0xd0], 0x64
push eax
lea eax, [ebp - 0xe4]
mov dword [ebp - 0xcc], 0
push eax
call fcn.0053f720
movups xmm0, xmmword [eax]
lea eax, [ebp - 0xa4]
push eax
movups xmmword [ebp - 0xa4], xmm0
call dword [sym.imp.MSVCP140.dll__Thrd_sleep]
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebp - 0xa8], eax
jae 0x543d42
push 0x80
lea eax, [ebp - 0x94]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
lea eax, [ebp - 0x94]
push 0x80
push eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror_s]
add esp, 0x18
cmp byte [ebp - 0x94], 0
jne 0x543e38
xor ecx, ecx
jmp 0x543e4a
lea ecx, [ebp - 0x94]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x543e41
sub ecx, edx
push ecx
lea eax, [ebp - 0x94]
mov ecx, esi
push eax
call fcn.0040bcb0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00544286
mov esp, ebp
pop ebp
ret