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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42fdec
mov eax, dword fs:[0]
push eax
sub esp, 0x1c0
mov eax, dword [0x43dfbc]
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 0x414d81
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x44], str.HECI_not_connected
call fcn.0041aaa2
push 0x43a510
lea edx, [ebp - 0x6c]
push edx
mov dword [ebp - 0x6c], vtable.std::logic_error.0
call fcn.0041abfb
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 0x414ddd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x414ddd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x432fe8
lea ecx, [ebp - 0x40]
call fcn.004067a0
push 0x43946c
lea eax, [ebp - 0x40]
push eax
call fcn.0041abfb
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 0x414e1a
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x44], str.HECI_send_timeout
call fcn.0041aaa2
push 0x438560
lea ecx, [ebp - 0x6c]
push ecx
mov dword [ebp - 0x6c], vtable.std::runtime_error.0
call fcn.0041abfb
test eax, eax
je 0x414e40
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WaitForSingleObject_after_WriteFile
lea ecx, [ebp - 0x40]
call fcn.004067a0
push 0x43946c
lea edx, [ebp - 0x40]
push edx
call fcn.0041abfb
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 0x414e69
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetOverlappedResult_from_WriteFile
jmp 0x414dc7
push 1
lea ecx, [ebp - 0x11c]
call fcn.004103e0
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.004032b0
add esp, 8
mov ecx, eax
call fcn.0040a7e0
push eax
call fcn.0040b100
add esp, 4
lea ecx, [ebp - 0xb4]
mov dword [ebp - 4], 0xffffffff
call fcn.0040bf50
lea edx, [ebp - 0xb4]
push edx
mov dword [ebp - 0xb4], vtable.std::ios_base.0
call fcn.0041a6e6
add esp, 4
push 1
lea ecx, [ebp - 0x11c]
call fcn.004103e0
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.0040b340
or edi, 0xffffffff
add esp, 0xc
lea ecx, [ebp - 0xb4]
mov dword [ebp - 4], edi
call fcn.0040bf50
lea edx, [ebp - 0xb4]
push edx
mov dword [ebp - 0xb4], vtable.std::ios_base.0
call fcn.0041a6e6
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 0x4150bd
cmp dword [ebp - 0x44], 0
je 0x4150bd
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 0x414fa4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x414fa4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x432f58
lea ecx, [ebp - 0x40]
call fcn.004067a0
push 0x43946c
lea ecx, [ebp - 0x40]
push ecx
jmp 0x414dd8
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 0x414fe1
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x44], str.HECI_recv_timeout
call fcn.0041aaa2
push 0x438560
lea edx, [ebp - 0x6c]
mov dword [ebp - 0x6c], vtable.std::runtime_error.0
push edx
jmp 0x414dd8
test eax, eax
je 0x414ff6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WaitForSingleObject_after_ReadFile
jmp 0x414dc7
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 0x415030
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetOverlappedResult_from_ReadFile
lea ecx, [ebp - 0x40]
call fcn.004067a0
push 0x43946c
lea ecx, [ebp - 0x40]
push ecx
jmp 0x414dd8
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x44]
push 1
lea ecx, [ebp - 0x11c]
mov dword [eax], edx
call fcn.004103e0
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.004032b0
add esp, 8
mov ecx, eax
call fcn.0040a7e0
push eax
call fcn.0040b100
add esp, 4
lea ecx, [ebp - 0x11c]
mov dword [ebp - 4], edi
call fcn.0040c490
push 1
lea ecx, [ebp - 0x1cc]
call fcn.004103e0
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.0040b340
add esp, 0xc
lea ecx, [ebp - 0x1cc]
mov dword [ebp - 4], edi
call fcn.0040c490
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.0041abec
mov esp, ebp
pop ebp
ret 0x18