Function at 0x68630530
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 edi, dword [ebp + 0xc]
mov edx, dword [ebx + 0x48]
test edx, edx
jne 0x686306c0
mov eax, dword [ebx + 0x74]
test eax, eax
jne 0x68630592
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x40]
mov dword [esp], eax
call sym._read
mov edx, dword [ebx + 0x48]
test edx, edx
jne 0x686306f0
cmp eax, 0
jl 0x6863070f
mov edx, dword [ebp + 0x14]
cmp eax, 1
mov dword [edx], eax
sbb eax, eax
not eax
add eax, 2
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [ebx + 0x50]
mov dword [ebp - 0x20], edx
mov dword [esp], edx
call sym._EnterCriticalSection_4
mov esi, dword [ebx + 0x48]
sub esp, 4
test esi, esi
jne 0x686307b0
mov eax, dword [ebx + 0x84]
mov edx, dword [ebx + 0x88]
cmp eax, edx
je 0x68630852
cmp edx, eax
jge 0x686306e0
mov esi, eax
sub esi, edx
mov edx, dword [ebp - 0x20]
mov dword [esp], edx
call sym._LeaveCriticalSection_4
mov eax, esi
sub esp, 4
cmp esi, dword [ebp + 0x10]
jbe 0x686305e6
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebx + 0x48]
test ecx, ecx
jne 0x68630830
mov esi, dword [ebx + 0x80]
mov edx, dword [ebx + 0x88]
mov dword [ebp - 0x1c], eax
add esi, edx
cmp eax, 8
jae 0x68630772
xor edx, edx
test byte [ebp - 0x1c], 4
je 0x6863061c
mov edx, dword [esi]
mov dword [edi], edx
mov edx, 4
test byte [ebp - 0x1c], 2
je 0x6863062d
movzx ecx, word [esi + edx]
mov word [edi + edx], cx
add edx, 2
test byte [ebp - 0x1c], 1
je 0x6863063a
movzx ecx, byte [esi + edx]
mov byte [edi + edx], cl
mov edx, dword [ebp - 0x20]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x24], eax
mov dword [esp], edx
sub esi, eax
call sym._EnterCriticalSection_4
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebx + 0x88]
mov edx, dword [ebx + 0x48]
add eax, ecx
and eax, 0xfff
sub esp, 4
test edx, edx
mov dword [ebx + 0x88], eax
jne 0x68630810
mov eax, dword [ebx + 0x8c]
mov dword [esp], eax
call sym._SetEvent_4
mov eax, dword [ebx + 0x48]
sub esp, 4
test eax, eax
jne 0x686307e3
mov edi, dword [ebx + 0x6c]
test edi, edi
je 0x686306a6
mov eax, dword [ebx + 0x88]
cmp dword [ebx + 0x84], eax
je 0x686308f0
mov edx, dword [ebp - 0x20]
mov dword [esp], edx
call sym._LeaveCriticalSection_4
mov eax, dword [ebp + 0x10]
sub eax, esi
sub esp, 4
jmp 0x6863057b
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x40]
mov dword [esp], str.g_io_win32_fd_read:_fd_d_count_u_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
jmp 0x6863054a
mov esi, 0x1000
sub esi, edx
jmp 0x686305ce
mov dword [esp + 4], eax
mov dword [ebp - 0x24], eax
mov dword [esp], str.g_io_win32_fd_read:_read______d_n
call sym.libglib_2.0_0.dll_g_print
mov eax, dword [ebp - 0x24]
cmp eax, 0
jge 0x6863057b
mov edx, dword [ebp + 0x14]
mov dword [edx], 0
call sym.__errno
mov edx, eax
mov eax, 3
cmp dword [edx], 0xb
je 0x6863058a
call sym.__errno
mov eax, dword [eax]
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_strerror
mov esi, eax
call sym.__errno
mov eax, dword [eax]
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_io_channel_error_from_errno
mov ebx, eax
call sym.libglib_2.0_0.dll_g_io_channel_error_quark
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x18]
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_set_error_literal
xor eax, eax
jmp 0x6863058a
test edi, 1
jne 0x68630995
test edi, 2
jne 0x68630980
test edi, 4
jne 0x68630965
mov ecx, dword [ebp - 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
and dword [ebp - 0x1c], 3
jmp 0x6863060b
mov eax, dword [ebx + 0x84]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x88]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x74]
mov dword [esp], str.reading_from_thread__x__u_bytes__rdp_d__wrp_d_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
jmp 0x686305ae
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.for_thread__x:_rdp_d__wrp_d_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
jmp 0x6863068d
mov eax, dword [ebx + 0x74]
mov dword [esp], str.setting_space_avail_for_thread__x_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
jmp 0x68630671
mov edx, dword [ebx + 0x74]
mov dword [esp + 4], eax
mov dword [ebp - 0x24], eax
mov dword [esp], str.moving__d_bytes_from_thread__x_n
mov dword [esp + 8], edx
call sym.libglib_2.0_0.dll_g_print
mov eax, dword [ebp - 0x24]
jmp 0x686305f1
mov edx, dword [ebp - 0x20]
mov dword [esp], edx
call sym._LeaveCriticalSection_4
mov ecx, dword [ebx + 0x48]
sub esp, 4
test ecx, ecx
jne 0x68630930
mov edx, 0xffffffff
mov dword [esp + 4], edx
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call sym._WaitForSingleObject_8
mov eax, dword [ebx + 0x48]
sub esp, 8
test eax, eax
jne 0x68630910
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._EnterCriticalSection_4
mov eax, dword [ebx + 0x84]
mov edx, dword [ebx + 0x88]
sub esp, 4
cmp eax, edx
jne 0x686305c2
mov esi, dword [ebx + 0x6c]
test esi, esi
jne 0x686306e0
mov ebx, dword [ebx + 0x48]
test ebx, ebx
je 0x686308cd
mov dword [esp], str.wrprdp___running_n
call sym.libglib_2.0_0.dll_g_print
mov edx, dword [ebp - 0x20]
mov dword [esp], edx
call sym._LeaveCriticalSection_4
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
mov eax, 2
sub esp, 4
jmp 0x6863058a
mov ecx, dword [ebx + 0x48]
test ecx, ecx
jne 0x68630950
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call sym._ResetEvent_4
sub esp, 4
jmp 0x686306a6
mov eax, dword [ebx + 0x74]
mov dword [esp], str.done_waiting_for_data_from_thread__x_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
jmp 0x6863088d
mov eax, dword [ebx + 0x74]
mov dword [esp], str.waiting_for_data_from_thread__x_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
jmp 0x6863086b
mov eax, dword [ebx + 0x74]
mov dword [esp], str.resetting_data_avail_of_thread__x_n
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_print
jmp 0x686308f7
mov edx, dword [esi]
add esi, 4
mov dword [edi], edx
add edi, 4
sub dword [ebp - 0x1c], 4
jmp 0x68630796
movzx edx, word [esi]
add esi, 2
mov word [edi], dx
add edi, 2
sub dword [ebp - 0x1c], 2
jmp 0x6863078a
movzx edx, byte [esi]
inc esi
mov byte [edi], dl
lea edx, [eax - 1]
inc edi
mov dword [ebp - 0x1c], edx
jmp 0x6863077e