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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4306a7
mov eax, dword fs:[0]
push eax
sub esp, 0x1c4
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 + 0x10]
mov edi, dword [ebp + 8]
mov esi, ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x44], ecx
mov ecx, dword [esi + 4]
mov dword [ebp - 0x4c], eax
xor eax, eax
mov dword [ebp - 0x50], eax
cmp ecx, 0xffffffff
jne 0x415184
lea edx, [ebp - 0x44]
push edx
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x44], str.HECI_not_connected
call fcn.0041b2c2
push 0x43a7cc
lea eax, [ebp - 0x70]
push eax
mov dword [ebp - 0x70], vtable.std::logic_error.0
call fcn.0041b780
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x54], edx
lea edx, [ebp - 0x50]
push edx
push eax
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4151de
call ebx
cmp eax, 0x3e5
je 0x4151de
call ebx
push eax
push 0x433118
lea ecx, [ebp - 0x40]
call fcn.00407c70
push 0x4397cc
lea ecx, [ebp - 0x40]
push ecx
call fcn.0041b780
mov edx, dword [ebp + 0x18]
mov eax, dword [esi + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x41521b
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x44], str.HECI_send_timeout
call fcn.0041b2c2
push 0x4387d8
lea edx, [ebp - 0x70]
push edx
mov dword [ebp - 0x70], vtable.std::runtime_error.0
call fcn.0041b780
test eax, eax
je 0x41523d
call ebx
push eax
push str.WaitForSingleObject_after_WriteFile
lea ecx, [ebp - 0x40]
call fcn.00407c70
push 0x4397cc
lea eax, [ebp - 0x40]
push eax
call fcn.0041b780
mov eax, dword [esi + 4]
push 1
lea ecx, [ebp - 0x50]
push ecx
lea edx, [ebp - 0x64]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x415262
call ebx
push eax
push str.GetOverlappedResult_from_WriteFile
jmp 0x4151c8
cmp dword [0x43f2d0], 0x3e8
mov ebx, 0x64
jne 0x4152ff
push 1
lea ecx, [ebp - 0x120]
call fcn.00406150
mov dword [eax + 0x60], ebx
mov edx, dword [ebp - 0x50]
push edx
add eax, 0x10
push str.Heci::SendMsg_WriteFile_bytesWritten
push eax
mov dword [ebp - 4], 0
call fcn.00404170
add esp, 8
mov ecx, eax
call fcn.004049b0
push eax
call fcn.00405590
add esp, 4
lea ecx, [ebp - 0x120]
mov dword [ebp - 4], 0xffffffff
call fcn.00401a20
push 1
lea ecx, [ebp - 0x120]
call fcn.00406150
mov ecx, dword [ebp + 0xc]
push ecx
mov dword [eax + 0x60], ebx
add eax, 0x10
push edi
push eax
mov dword [ebp - 4], 1
call fcn.0040b6a0
add esp, 0xc
lea ecx, [ebp - 0x120]
mov dword [ebp - 4], 0xffffffff
call fcn.00401a20
mov edi, dword [ebp - 0x4c]
mov edx, dword [esi + 0x10]
xor eax, eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x48], 0
test edi, edi
je 0x4154df
cmp dword [ebp - 0x44], 0
je 0x4154df
lea ecx, [ebp - 0x64]
push ecx
lea edx, [ebp - 0x48]
push edx
push eax
mov eax, dword [esi + 4]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41536b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x41536b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x433088
jmp 0x4151c8
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 0x4153a8
lea ecx, [ebp - 0x4c]
push ecx
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x4c], str.HECI_recv_timeout
call fcn.0041b2c2
push 0x4387d8
lea edx, [ebp - 0x70]
mov dword [ebp - 0x70], vtable.std::runtime_error.0
push edx
jmp 0x4151d9
test eax, eax
je 0x4153ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WaitForSingleObject_after_ReadFile
lea ecx, [ebp - 0x40]
call fcn.00407c70
push 0x4397cc
lea eax, [ebp - 0x40]
push eax
jmp 0x4151d9
mov eax, dword [esi + 4]
push 1
lea ecx, [ebp - 0x48]
push ecx
lea edx, [ebp - 0x64]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x4153f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetOverlappedResult_from_ReadFile
jmp 0x4151c8
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x44]
mov dword [eax], edx
cmp dword [0x43f2d0], 0x3e8
jne 0x4154df
push 1
lea ecx, [ebp - 0x120]
call fcn.00406150
mov dword [eax + 0x60], ebx
mov ecx, dword [0x43f2d0]
push ecx
add eax, 0x10
push str.Debug_level:
push eax
mov dword [ebp - 4], 2
call fcn.00404170
add esp, 8
mov ecx, eax
call fcn.00414f20
push eax
call fcn.00405590
or esi, 0xffffffff
add esp, 4
lea ecx, [ebp - 0x120]
mov dword [ebp - 4], esi
call fcn.00401a20
push 1
lea ecx, [ebp - 0x120]
call fcn.00406150
mov dword [eax + 0x60], ebx
mov edx, dword [ebp - 0x48]
push edx
add eax, 0x10
push str.Heci::SendMsg_ReadFile_bytesRead
push eax
mov dword [ebp - 4], 3
call fcn.00404170
add esp, 8
mov ecx, eax
call fcn.004049b0
push eax
call fcn.00405590
add esp, 4
lea ecx, [ebp - 0x120]
mov dword [ebp - 4], esi
call fcn.00401a20
push 1
lea ecx, [ebp - 0x1d0]
call fcn.00406150
mov dword [eax + 0x60], ebx
mov ecx, dword [ebp - 0x48]
push ecx
add eax, 0x10
push edi
push eax
mov dword [ebp - 4], 4
call fcn.0040b6a0
add esp, 0xc
lea ecx, [ebp - 0x1d0]
mov dword [ebp - 4], esi
call fcn.00401a20
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.0041b771
mov esp, ebp
pop ebp
ret 0x18