Function at 0x402b2f
Capabilities:
Read file on windows

Disassembly:
push 4
mov eax, 0x4085f5
call fcn.004077c4
mov eax, dword [esi + 0x38]
xor ebx, ebx
cmp eax, ebx
je 0x402b4e
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov dword [esi + 0x38], ebx
lea ecx, [esi + 0x3c]
cmp dword [ecx], ebx
je 0x402b5b
call dword [sym.imp.GrooveUtil.DLL_private:_void___thiscall_GCStr::_Release_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 0x402beb
cmp byte [esi], bl
je 0x402bdf
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 0x402bdf
lea ecx, [ebp - 0x10]
call dword [sym.imp.GrooveUtil.DLL_private:_void___thiscall_GCStr::_Release_void_]
mov dword [esi + 8], 5
jmp 0x402d1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
mov dword [ebp - 0x10], eax
je 0x402cff
cmp eax, 0xea
je 0x402ce4
cmp eax, 0x3e5
je 0x402c34
cmp byte [esi], bl
je 0x402c1e
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.00406953
mov dword [esi + 8], 1
jmp 0x402d18
cmp byte [esi], bl
je 0x402c43
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 0x402d32
cmp byte [esi], bl
je 0x402c68
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 0x402c94
cmp byte [esi], bl
je 0x402bdf
push str.Read:_OverlappedResult_says_ReadFile_completed_n
call dword [sym.imp.GrooveUtil.DLL_void___stdcall_GOutputDebugString_wchar_t_const__]
jmp 0x402bdf
cmp byte [esi], bl
je 0x402ca3
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 0x402cbb
cmp byte [esi], bl
je 0x402cf3
push str.Read:_OverlappedResult_says_ReadFiles_buffer_was_too_small_n
jmp 0x402ced
cmp byte [esi], bl
je 0x402cca
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.00406953
mov dword [esi + 8], 1
mov dword [ebp - 0x10], edi
jmp 0x402d18
cmp byte [esi], bl
je 0x402cf3
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.00402d44
mov dword [ebp - 0x10], eax
jmp 0x402d18
cmp byte [esi], bl
je 0x402d0e
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 0x402d32
mov ecx, esi
call fcn.00405378
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x402d32
mov dword [esi + 8], 1
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov eax, dword [ebp - 0x10]
call fcn.0040789c
ret