Function at 0x610729b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov eax, 0x94
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1ec
mov edi, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [esp + 4], eax
lea eax, [ebp - 0xb8]
mov esi, dword [ebp + 0x10]
mov dword [esp], eax
call sym.cygwin1.dll__memset
mov dword [ebx], 0
test edi, edi
mov dword [ebx + 4], 0
je 0x610729f9
mov eax, dword [edi]
test eax, eax
jne 0x61072a60
test byte [0x6110c854], 1
jne 0x61072bb1
call sym.cygwin1.dll___errno
cld
mov edx, dword [sym.cygwin1.dll__impure_ptr]
mov ecx, 4
mov edi, ebx
mov dword [edx], 3
mov dword [eax], 3
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x98]
test eax, eax
je 0x61072a3e
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov eax, dword [ebp - 0xa0]
test eax, eax
je 0x61072a53
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov dword [ebp - 0xa4], esi
cmp esi, 7
je 0x61072b70
jbe 0x61072b68
cmp esi, 0x80000002
je 0x61072b70
mov eax, dword [0x61109170]
mov edx, str.commune
mov eax, dword [eax]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
lea eax, [ebp - 0x1c8]
mov dword [esp], eax
call sym.__Z11shared_namePcPKci_12
sub esp, 0xc
mov dword [esp + 0xc], eax
mov eax, 0x7fffffff
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp], 0x6110943c
call sub.KERNEL32.dll_CreateSemaphoreA
mov dword [ebp - 0x1d8], eax
sub esp, 0x10
test eax, eax
je 0x61072ba0
mov eax, 0xffffffdc
xor ecx, ecx
lea edx, [ebp - 0xb8]
mov dword [ebp - 0xb8], eax
mov eax, edi
call sym.__Z8sig_sendP6_pinfoR9siginfo_tP7_cygtls_12
test eax, eax
jne 0x61072c56
cmp esi, 7
ja 0x61072bf8
cmp esi, 3
jae 0x61072cc7
dec esi
je 0x61072cc7
jmp 0x61072b20
mov eax, dword [ebp - 0x1d8]
test eax, eax
je 0x61072a29
lea eax, [ebp - 0x1d4]
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1d8]
mov dword [esp], eax
call sub.KERNEL32.dll_ReleaseSemaphore
mov eax, dword [ebp - 0x1d8]
sub esp, 0xc
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x61072a29
cmp esi, 6
jmp 0x61072a7b
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x94], eax
jmp 0x61072a81
test edi, edi
je 0x61072b90
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov dword [ebx + 0xc], 0
mov dword [ebx + 8], 0
mov esi, esi
cld
xor eax, eax
mov ecx, 4
mov edi, ebx
rep stosd dword es:[edi], eax
jmp 0x61072b20
mov dword [esp], 0x6110c854
mov eax, 3
mov edi, 0x6112aaad
mov dword [esp + 0x18], eax
mov eax, 0x24e
mov esi, 0x6112a910
mov dword [esp + 0x14], eax
mov ecx, 0x40
mov eax, str.commune_result__pinfo::commune_request___uint32_t__..._
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x61072a06
cmp esi, 0x80000002
jne 0x61072b20
lea eax, [ebp - 0x1cc]
mov esi, 8
xor edi, edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xa0]
mov dword [esp + 8], esi
lea esi, [ebx + 8]
mov dword [esp + 0x10], edi
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.KERNEL32.dll_ReadFile
sub esp, 0x14
test eax, eax
je 0x61072c42
cmp dword [ebp - 0x1cc], 8
je 0x61072c74
mov edx, 0x296
mov eax, str._ext_build_netrel_src_cygwin_1.5.25_7_winsup_cygwin_pinfo.cc
call sym.__Z8seterrnoPKci_8
jmp 0x61072ba0
mov eax, dword [ebp - 0x1d8]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
xor eax, eax
mov dword [ebp - 0x1d8], eax
jmp 0x61072ba0
xor edi, edi
mov dword [esp + 0xc], esi
mov eax, 2
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
mov eax, dword [0x61107568]
mov dword [esp + 8], eax
mov eax, dword [ebx + edi*4 + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
call sub.KERNEL32.dll_DuplicateHandle
sub esp, 0x1c
test eax, eax
je 0x61072b7e
inc edi
add esi, 4
cmp edi, 1
jle 0x61072c76
jmp 0x61072b20
lea eax, [ebp - 0x1d0]
xor ecx, ecx
mov edx, 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xa0]
lea edi, [ebp - 0x1cc]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edi
mov dword [esp + 8], edx
mov dword [esp], eax
call sub.KERNEL32.dll_ReadFile
sub esp, 0x14
test eax, eax
je 0x61072d08
cmp dword [ebp - 0x1cc], 4
je 0x61072d12
mov edx, 0x27d
jmp 0x61072c47
mov edx, dword [ebp - 0x1d0]
test edx, edx
jne 0x61072d27
mov dword [ebx], 0
jmp 0x61072b20
mov eax, 8
call sym._cmalloc_8
mov dword [ebx], eax
mov esi, eax
mov edx, dword [ebp - 0x1d0]
test edx, edx
je 0x61072d80
mov dword [esp + 0xc], edi
xor eax, eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xa0]
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.KERNEL32.dll_ReadFile
sub esp, 0x14
test eax, eax
je 0x61072d8c
mov eax, dword [ebp - 0x1cc]
mov edx, dword [ebp - 0x1d0]
add esi, eax
sub edx, eax
test edx, edx
mov dword [ebp - 0x1d0], edx
jne 0x61072d3f
mov eax, dword [ebx]
sub esi, eax
mov dword [ebx + 4], esi
jmp 0x61072b20
mov eax, dword [ebp - 0x1d0]
test eax, eax
je 0x61072d80
mov edx, 0x28a
jmp 0x61072c47