Function at 0x402b65
Capabilities:
Read file on windows

Disassembly:
push 4
mov eax, 0x4085eb
call fcn.004077f4
mov eax, dword [esi + 0x38]
xor ebx, ebx
cmp eax, ebx
je 0x402b84
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov dword [esi + 0x38], ebx
lea ecx, [esi + 0x3c]
cmp dword [ecx], ebx
je 0x402b91
call dword [sym.imp.GrooveUtil.DLL_private:_void___thiscall_GCStr::_Release_void_]
lea ecx, [esi + 0x40]
cmp dword [ecx], ebx
je 0x402b9e
call dword [sym.imp.GrooveUtil.DLL_private:_void___thiscall_GCStr::_Release_void_]
lea ecx, [esi + 0x44]
cmp dword [ecx], ebx
je 0x402bab
call dword [sym.imp.GrooveUtil.DLL_private:_void___thiscall_GCStr::_Release_void_]
lea ecx, [esi + 0x48]
call dword [sym.imp.GrooveUtil.DLL_public:_void___thiscall_GCIPtrBase::Empty_void_]
push 0x14
lea eax, [esi + 0xc]
push ebx
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push dword [esi + 0x28]
mov eax, dword [esi + 0x20]
push ebx
push dword [esi + 0x24]
lea edi, [esi + 0x2c]
mov dword [esi + 0x1c], eax
mov dword [edi], ebx
call sub.MSVCR80.dll_memset
mov ecx, dword [esi + 4]
add esp, 0xc
lea eax, [esi + 0xc]
push eax
push edi
push dword [esi + 0x28]
push dword [esi + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
je 0x402c44
cmp byte [esi], bl
je 0x402c38
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
push dword [edi]
lea eax, [ebp - 0x10]
push str.Read:_ReadFile_got_entire_message__Size___d_n
push eax
call dword [sym.imp.GrooveUtil.DLL_public:_long_int___cdecl_GCStr::Format_wchar_t_const__]
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.GrooveUtil.DLL_void___stdcall_GOutputDebugString_wchar_t_const__]
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x10], ebx
je 0x402c38
lea ecx, [ebp - 0x10]
call dword [sym.imp.GrooveUtil.DLL_private:_void___thiscall_GCStr::_Release_void_]
mov dword [esi + 8], 5
jmp 0x402d76
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
mov dword [ebp - 0x10], eax
je 0x402d58
cmp eax, 0xea
je 0x402d3d
cmp eax, 0x3e5
je 0x402c8d
cmp byte [esi], bl
je 0x402c77
push str.Read:_ReadFile_returned_an_unexpected_error_n
call dword [sym.imp.GrooveUtil.DLL_void___stdcall_GOutputDebugString_wchar_t_const__]
mov eax, dword [ebp - 0x10]
push 0x6d
call fcn.0040698f
mov dword [esi + 8], 1
jmp 0x402d71
cmp byte [esi], bl
je 0x402c9c
push str.Read:_ReadFile_returned_IO_PENDING_n
call dword [sym.imp.GrooveUtil.DLL_void___stdcall_GOutputDebugString_wchar_t_const__]
push 0x1388
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x402d8b
cmp byte [esi], bl
je 0x402cc1
push str.Read:_Signaled_before_five_second_timeout_n
call dword [sym.imp.GrooveUtil.DLL_void___stdcall_GOutputDebugString_wchar_t_const__]
mov eax, dword [esi + 4]
push ebx
push edi
lea ecx, [esi + 0xc]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x402ced
cmp byte [esi], bl
je 0x402c38
push str.Read:_OverlappedResult_says_ReadFile_completed_n
call dword [sym.imp.GrooveUtil.DLL_void___stdcall_GOutputDebugString_wchar_t_const__]
jmp 0x402c38
cmp byte [esi], bl
je 0x402cfc
push str.Read:_OverlappedResult_says_ReadFile_didnt_complete_n
call dword [sym.imp.GrooveUtil.DLL_void___stdcall_GOutputDebugString_wchar_t_const__]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x402d14
cmp byte [esi], bl
je 0x402d4c
push str.Read:_OverlappedResult_says_ReadFiles_buffer_was_too_small_n
jmp 0x402d46
cmp byte [esi], bl
je 0x402d23
push str.Read:_OverlappedResult_says_ReadFile_hit_unexpected_error_n
call dword [sym.imp.GrooveUtil.DLL_void___stdcall_GOutputDebugString_wchar_t_const__]
mov edi, 0x102
push 0x6d
mov eax, edi
call fcn.0040698f
mov dword [esi + 8], 1
mov dword [ebp - 0x10], edi
jmp 0x402d71
cmp byte [esi], bl
je 0x402d4c
push str.Read:_ReadFiles_buffer_was_too_small_n
call dword [sym.imp.GrooveUtil.DLL_void___stdcall_GOutputDebugString_wchar_t_const__]
mov ecx, esi
call fcn.00402d9d
mov dword [ebp - 0x10], eax
jmp 0x402d71
cmp byte [esi], bl
je 0x402d67
push str.Read:_ReadFile_returned_EOF_n
call dword [sym.imp.GrooveUtil.DLL_void___stdcall_GOutputDebugString_wchar_t_const__]
mov dword [esi + 8], 5
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x10], ebx
jne 0x402d8b
mov ecx, esi
call fcn.0040538a
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x402d8b
mov dword [esi + 8], 1
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov eax, dword [ebp - 0x10]
call fcn.004078cc
ret