Function at 0x414f00
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43062c
mov eax, dword fs:[0]
push eax
sub esp, 0x1c0
mov eax, dword [0x43dfc0]
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 eax, dword [ebp + 0x14]
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov esi, ecx
mov ecx, dword [esi + 4]
mov dword [ebp - 0x44], eax
xor eax, eax
mov dword [ebp - 0x4c], eax
cmp ecx, 0xffffffff
jne 0x414f71
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x44], str.HECI_not_connected
call fcn.0041b272
push 0x43a770
lea edx, [ebp - 0x6c]
push edx
mov dword [ebp - 0x6c], vtable.std::logic_error.0
call fcn.0041b730
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov eax, dword [esi + 0x10]
lea edx, [ebp - 0x60]
push edx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x4c]
push eax
push edx
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x414fcd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x414fcd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x433108
lea ecx, [ebp - 0x40]
call fcn.00407a80
push 0x439790
lea eax, [ebp - 0x40]
push eax
call fcn.0041b730
mov ecx, dword [ebp + 0x18]
mov edx, dword [esi + 0x10]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x41500a
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x44], str.HECI_send_timeout
call fcn.0041b272
push 0x4387c8
lea ecx, [ebp - 0x6c]
push ecx
mov dword [ebp - 0x6c], vtable.std::runtime_error.0
call fcn.0041b730
test eax, eax
je 0x415030
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WaitForSingleObject_after_WriteFile
lea ecx, [ebp - 0x40]
call fcn.00407a80
push 0x439790
lea edx, [ebp - 0x40]
push edx
call fcn.0041b730
mov edx, dword [esi + 4]
push 1
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x60]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x415059
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetOverlappedResult_from_WriteFile
jmp 0x414fb7
push 1
lea ecx, [ebp - 0x11c]
call fcn.00405fb0
mov dword [eax + 0x60], 0x64
mov ecx, dword [ebp - 0x4c]
push ecx
add eax, 0x10
push str.Heci::SendMsg_WriteFile_bytesWritten
push eax
mov dword [ebp - 4], 0
call fcn.004041c0
add esp, 8
mov ecx, eax
call fcn.0040ad60
push eax
call fcn.004053f0
add esp, 4
lea ecx, [ebp - 0xb4]
mov dword [ebp - 4], 0xffffffff
call fcn.0040c2e0
lea edx, [ebp - 0xb4]
push edx
mov dword [ebp - 0xb4], vtable.std::ios_base.0
call fcn.0041aa30
add esp, 4
push 1
lea ecx, [ebp - 0x11c]
call fcn.00405fb0
mov ecx, dword [ebp + 0xc]
push ecx
mov dword [eax + 0x60], 0x64
add eax, 0x10
push edi
push eax
mov dword [ebp - 4], 1
call fcn.0040b6d0
or edi, 0xffffffff
add esp, 0xc
lea ecx, [ebp - 0xb4]
mov dword [ebp - 4], edi
call fcn.0040c2e0
lea edx, [ebp - 0xb4]
push edx
mov dword [ebp - 0xb4], vtable.std::ios_base.0
call fcn.0041aa30
xor eax, eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov eax, dword [esi + 0x10]
add esp, 4
mov dword [ebp - 0x50], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x48], 0
test ebx, ebx
je 0x4152ad
cmp dword [ebp - 0x44], 0
je 0x4152ad
lea ecx, [ebp - 0x60]
push ecx
lea edx, [ebp - 0x48]
push edx
push eax
mov eax, dword [esi + 4]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x415194
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x415194
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x433078
lea ecx, [ebp - 0x40]
call fcn.00407a80
push 0x439790
lea ecx, [ebp - 0x40]
push ecx
jmp 0x414fc8
mov edx, dword [ebp + 0x1c]
mov eax, dword [esi + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4151d1
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x44], str.HECI_recv_timeout
call fcn.0041b272
push 0x4387c8
lea edx, [ebp - 0x6c]
mov dword [ebp - 0x6c], vtable.std::runtime_error.0
push edx
jmp 0x414fc8
test eax, eax
je 0x4151e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WaitForSingleObject_after_ReadFile
jmp 0x414fb7
mov eax, dword [esi + 4]
push 1
lea ecx, [ebp - 0x48]
push ecx
lea edx, [ebp - 0x60]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x415220
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetOverlappedResult_from_ReadFile
lea ecx, [ebp - 0x40]
call fcn.00407a80
push 0x439790
lea ecx, [ebp - 0x40]
push ecx
jmp 0x414fc8
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x44]
push 1
lea ecx, [ebp - 0x11c]
mov dword [eax], edx
call fcn.00405fb0
mov esi, 0x64
mov dword [eax + 0x60], esi
mov ecx, dword [ebp - 0x48]
push ecx
add eax, 0x10
push str.Heci::SendMsg_ReadFile_bytesRead
push eax
mov dword [ebp - 4], 2
call fcn.004041c0
add esp, 8
mov ecx, eax
call fcn.0040ad60
push eax
call fcn.004053f0
add esp, 4
lea ecx, [ebp - 0x11c]
mov dword [ebp - 4], edi
call fcn.00401a50
push 1
lea ecx, [ebp - 0x1cc]
call fcn.00405fb0
mov dword [eax + 0x60], esi
mov edx, dword [ebp - 0x48]
push edx
add eax, 0x10
push ebx
push eax
mov dword [ebp - 4], 3
call fcn.0040b6d0
add esp, 0xc
lea ecx, [ebp - 0x1cc]
mov dword [ebp - 4], edi
call fcn.00401a50
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.0041b721
mov esp, ebp
pop ebp
ret 0x18