Function at 0x546af0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ddc57
mov eax, dword fs:[0]
push eax
sub esp, 0x104
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 edx, dword [ebp + 8]
xor esi, esi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 4], esi
test edx, edx
jne 0x546bd2
push 0x10
push str.lpBuffer__NULL
lea ecx, [ebp - 0xf4]
mov dword [ebp - 0xb8], 0x57
mov dword [ebp - 0xe0], 0xf
mov dword [ebp - 0xe4], esi
mov byte [ebp - 0xf4], dl
call fcn.0040bcb0
cmp dword [ebp - 0xe0], 0x10
lea eax, [ebp - 0xf4]
xorps xmm0, xmm0
mov byte [ebp - 4], 1
cmovae eax, dword [ebp - 0xf4]
mov dword [ebp - 0xb4], eax
lea eax, [ebp - 0xc0]
push eax
lea eax, [ebp - 0xb4]
mov dword [ebp - 0xc4], vtable.std::exception.0
push eax
movq qword [ebp - 0xc0], xmm0
mov byte [ebp - 0xb0], 1
call dword [sym.imp.VCRUNTIME140.dll___std_exception_copy]
add esp, 8
mov dword [ebp - 0xc4], vtable.std::invalid_argument.0
lea eax, [ebp - 0xc4]
push 0x638098
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x546c53
push str.nNumberOfBytesToWrite__0
lea ecx, [ebp - 0xf4]
mov dword [ebp - 0xb8], 0x57
call fcn.0040bdb0
cmp dword [eax + 0x14], 0x10
mov byte [ebp - 4], 2
jb 0x546bff
mov eax, dword [eax]
mov dword [ebp - 0xb4], eax
xorps xmm0, xmm0
lea eax, [ebp - 0xcc]
mov dword [ebp - 0xd0], vtable.std::exception.0
push eax
lea eax, [ebp - 0xb4]
movq qword [ebp - 0xcc], xmm0
push eax
mov byte [ebp - 0xb0], 1
call dword [sym.imp.VCRUNTIME140.dll___std_exception_copy]
add esp, 8
mov dword [ebp - 0xd0], vtable.std::invalid_argument.0
lea eax, [ebp - 0xd0]
push 0x638098
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
test edi, edi
jne 0x546d9b
push str.lpNumberOfBytesWritten__NULL
lea ecx, [ebp - 0xf4]
mov dword [ebp - 0xb8], 0x57
call fcn.0040bdb0
cmp dword [eax + 0x14], 0x10
mov byte [ebp - 4], 3
jb 0x546c81
mov eax, dword [eax]
mov dword [ebp - 0xb4], eax
xorps xmm0, xmm0
lea eax, [ebp - 0xd8]
mov dword [ebp - 0xdc], vtable.std::exception.0
push eax
lea eax, [ebp - 0xb4]
movq qword [ebp - 0xd8], xmm0
push eax
mov byte [ebp - 0xb0], 1
call dword [sym.imp.VCRUNTIME140.dll___std_exception_copy]
add esp, 8
mov dword [ebp - 0xdc], vtable.std::invalid_argument.0
lea eax, [ebp - 0xdc]
push 0x638098
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push 0x98
lea eax, [ebp - 0xac]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0xac]
push 1
push 2
call fcn.00416190
mov ecx, dword [ebp - 0xf8]
push 0x41a100
mov byte [ebp - 4], 5
mov eax, dword [ecx]
call dword [eax + 4]
push eax
push 0x608f00
push str.deepsoft::CSvcComm::WriteFile
lea eax, [ebp - 0xac]
push 0x5e6750
push eax
call fcn.00414ff0
add esp, 8
push eax
call fcn.00414ff0
add esp, 8
push eax
call fcn.00414ff0
add esp, 8
push eax
call fcn.00414ff0
add esp, 8
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_____]
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0xac]
call fcn.00414da0
cmp dword [eax + 0x14], 0x10
mov byte [ebp - 4], 6
jb 0x546d6e
mov eax, dword [eax]
push eax
call fcn.004822c0
add esp, 4
lea ecx, [ebp - 0x110]
call fcn.0040b3b0
lea ecx, [ebp - 0xac]
call fcn.00415390
mov eax, 0x546d93
ret
push 0
push edi
push eax
push edx
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x546db5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, esi
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 0xc