Function at 0x61042260
Capabilities:
Inspect section memory permissions
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
push esi
push ebx
sub esp, 0x3c
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
test edx, edx
mov dword [ebp - 0x18], eax
mov eax, 0x57
je 0x61042419
mov dword [esp], ebx
call sub.KERNEL32.dll_GetTapeStatus
mov dword [ebp - 0x1c], eax
sub esp, 4
cmp eax, 0x458
je 0x610425d7
mov ecx, dword [ebp + 0x10]
mov eax, 0x48
xor esi, esi
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], ecx
call sym.cygwin1.dll__memset
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp - 0x18]
mov dword [eax], 1
test dword [edx + 0x30], 0x80000010
jne 0x61042421
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x10]
add edx, 0x18
mov dword [ebp - 0x20], edx
mov eax, dword [edx + 4]
and eax, 0xffffff
mov dword [ecx + 8], eax
mov eax, dword [0x611630ec]
test byte [eax + 0x15], 1
jne 0x61042450
test edi, edi
je 0x61042595
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebx + 0xc]
or esi, 0x40000
mov dword [ebx + 0xc], esi
mov eax, dword [ebp - 0x18]
test byte [eax + 0x6c], 1
jne 0x61042570
cmp dword [ebp - 0x1c], 0x48d
je 0x610426e0
mov edx, dword [ebp - 0x20]
cmp byte [edx + 3], 0
jne 0x61042554
mov ecx, dword [ebp - 0x20]
cmp byte [ecx + 2], 0
je 0x61042548
mov ebx, dword [ebp + 0x10]
or esi, 0x100000
mov eax, dword [ebp - 0x18]
mov dword [ebx + 0xc], esi
cmp byte [eax + 0x18], 0
jne 0x61042530
mov edx, dword [ebp - 0x20]
cmp byte [edx + 1], 0
je 0x61042520
mov ecx, dword [ebp + 0x10]
or esi, 0x20000
mov ebx, dword [ebp - 0x18]
mov dword [ecx + 0xc], esi
movzx eax, byte [ebx + 0x6c]
test al, 4
je 0x61042391
mov ecx, dword [ebp + 0x10]
or esi, 0x80
mov ebx, dword [ebp - 0x18]
mov dword [ecx + 0xc], esi
movzx eax, byte [ebx + 0x6c]
test al, 8
je 0x610423a5
mov eax, dword [ebp + 0x10]
or esi, 0x40
mov edx, dword [ebp - 0x18]
mov dword [eax + 0xc], esi
movzx eax, byte [edx + 0x6c]
test al, 0x10
je 0x610423b9
mov eax, dword [ebp + 0x10]
or esi, 0x20
mov edx, dword [ebp - 0x18]
mov dword [eax + 0xc], esi
movzx eax, byte [edx + 0x6c]
test al, 0x20
je 0x610423cd
mov ecx, dword [ebp + 0x10]
or esi, 0x10
mov ebx, dword [ebp - 0x18]
mov dword [ecx + 0xc], esi
movzx eax, byte [ebx + 0x6c]
test al, 0x40
jne 0x61042508
test al, 2
je 0x61042500
mov eax, dword [ebp + 0x10]
or esi, 4
mov dword [eax + 0xc], esi
mov dword [eax + 0x10], 0
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0xc]
mov dword [ecx + 0x30], eax
mov eax, dword [edx + 8]
mov dword [ecx + 0x34], eax
mov eax, dword [edx + 4]
mov dword [ecx + 0x38], eax
mov eax, dword [edx + 0x14]
mov dword [ecx + 0x3c], eax
mov eax, dword [edx + 0x18]
mov dword [ecx + 0x40], eax
mov eax, dword [edx + 0x1c]
mov dword [ecx + 0x44], eax
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [edx + 0x48]
mov ecx, dword [ebp + 0x10]
and eax, 0xffffff
mov dword [ecx + 8], eax
lea eax, [edx + 0x18]
mov dword [ebp - 0x20], eax
mov eax, dword [0x611630ec]
test byte [eax + 0x15], 1
je 0x610422f6
lea esi, [esi]
lea edi, [edi]
mov dword [ebp - 0x14], 0x168
mov eax, 0x180
call sym.cygwin1.dll__alloca
mov dword [esp], ebx
lea eax, [ebp - 0x14]
xor ecx, ecx
mov dword [esp + 0x18], eax
xor eax, eax
lea esi, [esp + 0x2f]
mov dword [esp + 0xc], eax
xor eax, eax
and esi, 0xfffffff0
mov dword [esp + 8], eax
mov edx, 0x168
mov eax, 0x2d0c04
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], esi
mov dword [esp + 4], eax
call sub.KERNEL32.dll_DeviceIoControl
sub esp, 0x20
test eax, eax
je 0x610426f4
mov eax, dword [esi + 4]
xor ecx, ecx
test eax, eax
je 0x610422f6
mov edx, esi
jmp 0x610424cd
inc ecx
add edx, 0x20
cmp dword [esi + 4], ecx
jbe 0x610422f6
mov eax, dword [edx + 8]
mov ebx, dword [ebp + 0x10]
mov dword [ebx], eax
mov eax, dword [edx + 0xc]
test eax, eax
jns 0x610424c0
mov eax, dword [edx + 8]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
cmp dword [edx + 0x14], 1
jne 0x610422f6
movzx eax, byte [edx + 0x19]
shl eax, 0x18
or dword [ecx + 8], eax
jmp 0x610422f6
mov eax, dword [ebp + 0x10]
jmp 0x610423e6
mov ecx, dword [ebp + 0x10]
or esi, 8
mov ebx, dword [ebp - 0x18]
mov dword [ecx + 0xc], esi
test byte [ebx + 0x6c], 2
jmp 0x610423d7
mov edx, dword [ebp - 0x18]
movzx eax, byte [edx + 0x6c]
jmp 0x6104237a
mov ecx, dword [ebp + 0x10]
or esi, 0x80000
mov ebx, dword [ebp - 0x20]
mov dword [ecx + 0xc], esi
cmp byte [ebx + 1], 0
jmp 0x61042361
mov edx, dword [ebp - 0x18]
cmp byte [edx + 0x18], 0
jmp 0x61042354
mov ebx, dword [ebp + 0x10]
or esi, 0x2000000
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0xc], esi
cmp byte [eax + 2], 0
jmp 0x6104233b
or esi, 0x10000
cmp dword [ebp - 0x1c], 0x48d
mov edx, dword [ebp + 0x10]
mov dword [edx + 0xc], esi
je 0x610426e0
mov ecx, dword [ebp - 0x20]
cmp byte [ecx + 3], 0
jmp 0x6104232e
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 8]
mov ebx, edx
mov dword [ecx + 4], eax
mov eax, dword [edx + 8]
lea eax, [eax + eax*4]
mov edx, dword [edx + eax*4 + 0x74]
mov dword [ecx + 0x14], edx
mov eax, dword [ebx + 8]
lea eax, [eax + eax*4]
mov eax, dword [ebx + eax*4 + 0x78]
test eax, eax
mov dword [ecx + 0x18], eax
jne 0x61042604
test edx, edx
jne 0x610426c6
mov esi, dword [ecx + 0xc]
or esi, 0x40000000
mov dword [ecx + 0xc], esi
jmp 0x6104260a
mov eax, 0x48
mov edi, 1
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sym.cygwin1.dll__memset
mov edx, dword [ebp + 0x10]
mov dword [edx], 1
jmp 0x610422d0
mov eax, dword [ebp + 0x10]
mov esi, dword [eax + 0xc]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
mov edx, dword [eax + 8]
lea eax, [edx + edx*4]
cmp dword [ecx + eax*4 + 0x80], 2
jle 0x6104262f
mov ebx, dword [ebp + 0x10]
or esi, 0x8000000
mov dword [ebx + 0xc], esi
mov edx, dword [ecx + 8]
mov ecx, dword [ebp - 0x18]
lea eax, [edx + edx*4]
cmp dword [ecx + eax*4 + 0x80], 4
jle 0x6104264e
mov ebx, dword [ebp + 0x10]
or esi, 0x20000000
mov dword [ebx + 0xc], esi
mov edx, dword [ecx + 8]
lea eax, [edx + edx*4]
mov edx, dword [ebp - 0x18]
cmp byte [edx + eax*4 + 0x7c], 0
je 0x61042661
or esi, 0x10000000
mov ecx, dword [ebp + 0x10]
mov eax, esi
or esi, 0x1000000
mov edi, dword [ebp - 0x18]
mov dword [ecx + 0xc], esi
add edi, 0x38
cmp byte [edi + 0x18], 0
je 0x61042686
mov esi, eax
or esi, 0x5000000
mov dword [ecx + 0xc], esi
mov ebx, dword [ebp - 0x18]
mov eax, dword [edi + 4]
mov ecx, dword [ebx + 0x38]
mov edx, eax
xor eax, eax
xor ebx, ebx
mov dword [ebp - 0x28], ecx
or eax, ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x24], ebx
or edx, ebx
xor ebx, ebx
mov dword [ecx + 0x24], edx
mov dword [ecx + 0x20], eax
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 8]
mov edx, eax
or edx, ebx
mov ebx, dword [ebp + 0x10]
xor eax, eax
or eax, ecx
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x2c], edx
jmp 0x6104230d
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebx + 0xc]
or esi, 0x80000000
mov dword [ebx + 0xc], esi
jmp 0x6104260a
mov eax, esi
mov edx, dword [ebp + 0x10]
or eax, 0x8000
mov esi, eax
mov dword [edx + 0xc], eax
jmp 0x61042589
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xea
jne 0x610422f6
jmp 0x610424aa