Function at 0x6862f5b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call sym.libglib_2.0_0.dll_g_io_channel_ref
mov ecx, dword [ebx + 0x48]
test ecx, ecx
jne 0x6862f9d0
mov dword [ebx + 0x68], 0
lea esi, [ebx + 0x50]
mov dword [esp], 0x1000
call sym.libglib_2.0_0.dll_g_malloc
xor edx, edx
mov dword [ebx + 0x84], edx
mov dword [ebx + 0x6c], 1
mov dword [ebx + 0x80], eax
xor eax, eax
mov dword [ebx + 0x88], eax
mov eax, dword [ebx + 0x8c]
mov dword [esp], eax
call sym._SetEvent_4
sub esp, 4
mov dword [esp], esi
call sym._EnterCriticalSection_4
mov edi, dword [ebx + 0x6c]
sub esp, 4
test edi, edi
jne 0x6862f689
jmp 0x6862f9c0
mov word [ebx + 0x7c], 0x11
mov eax, dword [ebx + 0x48]
xor ecx, ecx
test eax, eax
jne 0x6862f770
test edi, edi
jle 0x6862f7b0
mov edx, dword [ebx + 0x84]
mov eax, edi
add eax, edx
cdq
shr edx, 0x14
add eax, edx
and eax, 0xfff
sub eax, edx
test ecx, ecx
mov dword [ebx + 0x84], eax
jne 0x6862f910
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call sym._SetEvent_4
mov eax, dword [ebx + 0x6c]
sub esp, 4
test eax, eax
je 0x6862f9c0
mov ecx, dword [ebx + 0x48]
mov dword [ebp - 0x1c], 0
test ecx, ecx
jne 0x6862f833
mov ecx, dword [ebx + 0x84]
mov edi, dword [ebx + 0x88]
lea eax, [ecx + 1]
cdq
shr edx, 0x14
add eax, edx
and eax, 0xfff
sub eax, edx
cmp eax, edi
je 0x6862f865
mov eax, dword [ebx + 0x80]
add edi, 0xfff
mov edx, 0x1000
sub edi, ecx
sub edx, ecx
add eax, ecx
mov dword [ebp - 0x20], eax
mov eax, edi
sar eax, 0x1f
shr eax, 0x14
add edi, eax
and edi, 0xfff
sub edi, eax
cmp edi, edx
jle 0x6862f6f1
mov edi, edx
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x6862f70f
mov dword [esp + 8], edi
mov eax, dword [ebx + 0x74]
mov dword [esp], str.read_thread__x:_calling_read___for__d_bytes_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
mov dword [esp], esi
call sym._LeaveCriticalSection_4
mov ecx, dword [ebp - 0x20]
sub esp, 4
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov eax, dword [ebx + 0x40]
mov dword [esp], eax
call sym._read
mov dword [esp], esi
mov edi, eax
call sym._EnterCriticalSection_4
mov word [ebx + 0x7c], 1
sub esp, 4
cmp edi, 0
je 0x6862f630
jge 0x6862f636
mov eax, dword [ebx + 0x48]
xor ecx, ecx
mov word [ebx + 0x7c], 9
test eax, eax
je 0x6862f643
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ebx + 0x84]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x88]
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x74]
mov dword [esp], str.read_thread__x:_read___returned__d__rdp_d__wrp_d_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
test edi, edi
mov ecx, dword [ebx + 0x48]
jg 0x6862f64b
lea esi, [esi]
lea edi, [edi]
mov edi, dword [ebx + 0x70]
mov dword [ebx + 0x6c], 0
test edi, edi
je 0x6862f7db
test ecx, ecx
jne 0x6862fa00
mov eax, dword [ebx + 0x40]
mov dword [esp], eax
call sym._close
mov ecx, dword [ebx + 0x48]
mov dword [ebx + 0x40], 0xffffffff
test ecx, ecx
je 0x6862f806
mov eax, dword [ebx + 0x84]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x88]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x74]
mov dword [esp], str.read_thread__x:_EOF__rdp_d__wrp_d__setting_data_avail_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call sym._SetEvent_4
sub esp, 4
mov dword [esp], esi
call sym._LeaveCriticalSection_4
sub esp, 4
mov dword [esp], ebx
call sym.libglib_2.0_0.dll_g_io_channel_unref
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov eax, dword [ebx + 0x84]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x88]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x74]
mov dword [esp], str.read_thread__x:_rdp_d__wrp_d_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
mov eax, dword [ebx + 0x48]
mov dword [ebp - 0x1c], eax
jmp 0x6862f69b
mov edx, dword [ebp - 0x1c]
test edx, edx
jne 0x6862f9a0
mov eax, dword [ebx + 0x8c]
mov dword [esp], eax
call sym._ResetEvent_4
mov eax, dword [ebx + 0x48]
sub esp, 4
test eax, eax
jne 0x6862f980
mov dword [esp], esi
mov edi, 0xffffffff
call sym._LeaveCriticalSection_4
sub esp, 4
mov dword [esp + 4], edi
mov eax, dword [ebx + 0x8c]
mov dword [esp], eax
call sym._WaitForSingleObject_8
sub esp, 8
mov dword [esp], esi
call sym._EnterCriticalSection_4
mov ecx, dword [ebx + 0x48]
sub esp, 4
test ecx, ecx
jne 0x6862f940
mov edi, dword [ebx + 0x88]
mov ecx, 0x1000
mov edx, dword [ebx + 0x84]
mov eax, dword [ebx + 0x80]
add edi, 0xfff
sub edi, edx
sub ecx, edx
add eax, edx
mov dword [ebp - 0x20], eax
mov eax, edi
sar eax, 0x1f
shr eax, 0x14
add edi, eax
and edi, 0xfff
sub edi, eax
cmp edi, ecx
jle 0x6862f70f
mov edi, ecx
jmp 0x6862f70f
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x88]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x74]
mov dword [esp], str.read_thread__x:_rdp_d__wrp_d__setting_data_avail_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
jmp 0x6862f670
mov eax, dword [ebx + 0x84]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x88]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x74]
mov dword [esp], str.read_thread__x:_rdp_d__wrp_d_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
mov eax, dword [ebx + 0x48]
mov ecx, dword [ebx + 0x84]
mov edi, dword [ebx + 0x88]
mov dword [ebp - 0x1c], eax
jmp 0x6862f6bf
mov eax, dword [ebx + 0x74]
mov dword [esp], str.read_thread__x:_waiting_for_space_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
jmp 0x6862f88c
mov eax, dword [ebx + 0x74]
mov dword [esp], str.read_thread__x:_resetting_space_avail_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
jmp 0x6862f870
mov ecx, dword [ebx + 0x48]
jmp 0x6862f7b0
mov eax, dword [ebx + 0x8c]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x78]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x40]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x74]
mov dword [esp], str.read_thread__x:_start_fd_d__data_avail_p_space_avail_p_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
jmp 0x6862f5cf
mov eax, dword [ebx + 0x40]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x74]
mov dword [esp], str.read_thread__x:_channel_fd__d_needs_closing_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
jmp 0x6862f7c6