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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43017c
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 0x414e91
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x44], str.HECI_not_connected
call fcn.0041adc2
push 0x43a660
lea edx, [ebp - 0x6c]
push edx
mov dword [ebp - 0x6c], vtable.std::logic_error.0
call fcn.0041b280
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 0x414eed
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x414eed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x433108
lea ecx, [ebp - 0x40]
call fcn.00407c90
push 0x4396ac
lea eax, [ebp - 0x40]
push eax
call fcn.0041b280
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 0x414f2a
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x44], str.HECI_send_timeout
call fcn.0041adc2
push 0x4386b8
lea ecx, [ebp - 0x6c]
push ecx
mov dword [ebp - 0x6c], vtable.std::runtime_error.0
call fcn.0041b280
test eax, eax
je 0x414f50
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WaitForSingleObject_after_WriteFile
lea ecx, [ebp - 0x40]
call fcn.00407c90
push 0x4396ac
lea edx, [ebp - 0x40]
push edx
call fcn.0041b280
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 0x414f79
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetOverlappedResult_from_WriteFile
jmp 0x414ed7
push 1
lea ecx, [ebp - 0x11c]
call fcn.00406160
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.00404180
add esp, 8
mov ecx, eax
call fcn.004049c0
push eax
call fcn.004055a0
add esp, 4
lea ecx, [ebp - 0xb4]
mov dword [ebp - 4], 0xffffffff
call fcn.0040c2c0
lea edx, [ebp - 0xb4]
push edx
mov dword [ebp - 0xb4], vtable.std::ios_base.0
call fcn.0041a580
add esp, 4
push 1
lea ecx, [ebp - 0x11c]
call fcn.00406160
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.0040b6b0
or edi, 0xffffffff
add esp, 0xc
lea ecx, [ebp - 0xb4]
mov dword [ebp - 4], edi
call fcn.0040c2c0
lea edx, [ebp - 0xb4]
push edx
mov dword [ebp - 0xb4], vtable.std::ios_base.0
call fcn.0041a580
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 0x4151cd
cmp dword [ebp - 0x44], 0
je 0x4151cd
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 0x4150b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x4150b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x433078
lea ecx, [ebp - 0x40]
call fcn.00407c90
push 0x4396ac
lea ecx, [ebp - 0x40]
push ecx
jmp 0x414ee8
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 0x4150f1
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x44], str.HECI_recv_timeout
call fcn.0041adc2
push 0x4386b8
lea edx, [ebp - 0x6c]
mov dword [ebp - 0x6c], vtable.std::runtime_error.0
push edx
jmp 0x414ee8
test eax, eax
je 0x415106
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WaitForSingleObject_after_ReadFile
jmp 0x414ed7
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 0x415140
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetOverlappedResult_from_ReadFile
lea ecx, [ebp - 0x40]
call fcn.00407c90
push 0x4396ac
lea ecx, [ebp - 0x40]
push ecx
jmp 0x414ee8
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x44]
push 1
lea ecx, [ebp - 0x11c]
mov dword [eax], edx
call fcn.00406160
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.00404180
add esp, 8
mov ecx, eax
call fcn.004049c0
push eax
call fcn.004055a0
add esp, 4
lea ecx, [ebp - 0x11c]
mov dword [ebp - 4], edi
call fcn.00401a40
push 1
lea ecx, [ebp - 0x1cc]
call fcn.00406160
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.0040b6b0
add esp, 0xc
lea ecx, [ebp - 0x1cc]
mov dword [ebp - 4], edi
call fcn.00401a40
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.0041b271
mov esp, ebp
pop ebp
ret 0x18