Function at 0x61072470
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 0x610724b9
mov eax, dword [edi]
test eax, eax
jne 0x61072520
test byte [0x6110a820], 1
jne 0x61072671
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 0x610724fe
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov eax, dword [ebp - 0xa0]
test eax, eax
je 0x61072513
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 0x61072630
jbe 0x61072628
cmp esi, 0x80000002
je 0x61072630
mov eax, dword [0x61107154]
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], 0x61107420
call sub.KERNEL32.dll_CreateSemaphoreA
mov dword [ebp - 0x1d8], eax
sub esp, 0x10
test eax, eax
je 0x61072660
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 0x61072716
cmp esi, 7
ja 0x610726b8
cmp esi, 3
jae 0x61072787
dec esi
je 0x61072787
jmp 0x610725e0
mov eax, dword [ebp - 0x1d8]
test eax, eax
je 0x610724e9
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 0x610724e9
cmp esi, 6
jmp 0x6107253b
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x94], eax
jmp 0x61072541
test edi, edi
je 0x61072650
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 0x610725e0
mov dword [esp], 0x6110a820
mov eax, 3
mov edi, 0x611289ad
mov dword [esp + 0x18], eax
mov eax, 0x24e
mov esi, 0x61128810
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 0x610724c6
cmp esi, 0x80000002
jne 0x610725e0
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 0x61072702
cmp dword [ebp - 0x1cc], 8
je 0x61072734
mov edx, 0x296
mov eax, str._ext_build_netrel_src_cygwin_1.5.24_2_winsup_cygwin_pinfo.cc
call sym.__Z8seterrnoPKci_8
jmp 0x61072660
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 0x61072660
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 [0x61105584]
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 0x6107263e
inc edi
add esi, 4
cmp edi, 1
jle 0x61072736
jmp 0x610725e0
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 0x610727c8
cmp dword [ebp - 0x1cc], 4
je 0x610727d2
mov edx, 0x27d
jmp 0x61072707
mov edx, dword [ebp - 0x1d0]
test edx, edx
jne 0x610727e7
mov dword [ebx], 0
jmp 0x610725e0
mov eax, 8
call sym._cmalloc_8
mov dword [ebx], eax
mov esi, eax
mov edx, dword [ebp - 0x1d0]
test edx, edx
je 0x61072840
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 0x6107284c
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 0x610727ff
mov eax, dword [ebx]
sub esi, eax
mov dword [ebx + 4], esi
jmp 0x610725e0
mov eax, dword [ebp - 0x1d0]
test eax, eax
je 0x61072840
mov edx, 0x28a
jmp 0x61072707