Function at 0x417443
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov ebx, dword [ebp + 8]
mov al, byte [ebx + 0x50]
or word [ebx + 0x50], 0x80c
and eax, 0xc
cmp dword [0x431554], 0
mov byte [ebp - 0x61], al
je 0x41749a
test byte [ebx + 0x50], 3
jne 0x41749a
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x417490
test byte [eax + 0x1c], 1
je 0x417490
movzx ecx, word [eax + 0x18]
xor edx, edx
cmp edx, ecx
jae 0x41749a
mov esi, dword [eax + 0x14]
test byte [esi + edx], 1
je 0x417490
inc edx
jmp 0x417480
test byte [ebx + 0x51], 0x40
je 0x4174a1
and byte [ebx + 0x50], 0xfc
xor ecx, ecx
jmp 0x4176ac
test eax, eax
je 0x41749a
cmp dword [0x431558], 0
jne 0x4174d2
mov esi, dword [ebx]
mov dword [esp], esi
call sub.msvcrt.dll_strlen
xor ecx, ecx
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.touch__s
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.0041208c
cmp dword [0x431550], 0
jne 0x41768d
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.004013ff
test eax, eax
je 0x417513
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0040159b
test eax, eax
jne 0x417691
jmp 0x41768d
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
jne 0x417671
mov dword [esp + 8], 0x1b6
mov dword [esp + 4], 0x102
mov eax, dword [ebx]
mov dword [esp], eax
call sub.msvcrt.dll__open
mov esi, eax
cmp eax, 0xffffffff
je 0x417504
test eax, eax
js 0x417671
mov byte [ebp - 0x49], 0x78
jmp 0x41754d
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
jne 0x417566
lea eax, [ebp - 0x48]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll__fstati64]
cmp eax, 0xffffffff
je 0x417542
test eax, eax
jns 0x417583
mov eax, dword [ebx]
mov dword [esp], str.touch:_fstat:
mov dword [esp + 4], eax
jmp 0x41767e
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
jne 0x4175a3
lea edi, [ebp - 0x49]
mov dword [esp + 8], 1
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.msvcrt.dll__read
cmp eax, 0xffffffff
je 0x417578
test eax, eax
jns 0x4175c3
mov eax, dword [ebx]
mov dword [esp], str.touch:_read:
mov dword [esp + 4], eax
jmp 0x41767e
inc eax
jne 0x4175e2
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
jne 0x4175e2
xor edx, edx
mov dword [esp], esi
mov dword [esp + 0xc], edx
mov dword [esp + 4], edx
mov dword [esp + 8], edx
call fcn.004219b0
cmp edx, 0xffffffff
je 0x4175b5
test edx, edx
jns 0x4175ff
mov eax, dword [ebx]
mov dword [esp], str.touch:_lseek:
mov dword [esp + 4], eax
jmp 0x41767e
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
jne 0x41761c
mov dword [esp + 8], 1
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.msvcrt.dll__write
cmp eax, 0xffffffff
je 0x4175f4
test eax, eax
jns 0x41762b
mov eax, dword [ebx]
mov dword [esp], str.touch:_write:
mov dword [esp + 4], eax
jmp 0x41767e
cmp dword [ebp - 0x2c], 0
jne 0x417685
cmp dword [ebp - 0x30], 0
jne 0x417685
mov dword [esp], esi
call sub.msvcrt.dll__close
mov dword [esp + 8], 0x1b6
mov dword [esp + 4], 0x202
mov eax, dword [ebx]
mov dword [esp], eax
call sub.msvcrt.dll__open
mov esi, eax
cmp eax, 0xffffffff
je 0x417666
test eax, eax
jns 0x417685
jmp 0x417671
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
je 0x41763f
mov eax, dword [ebx]
mov dword [esp], str.touch:_open:
mov dword [esp + 4], eax
call fcn.00411e30
jmp 0x417691
mov dword [esp], esi
call sub.msvcrt.dll__close
xor edx, edx
jmp 0x417696
mov edx, 3
mov al, byte [ebx + 0x50]
inc dword [0x433a10]
mov ecx, 1
and eax, 0xfffffffc
or eax, edx
mov byte [ebx + 0x50], al
cmp dword [ebx + 0x44], 0
jne 0x4176c4
cmp dword [ebx + 0x40], 0
jne 0x4176c4
mov eax, dword [ebx + 0x38]
mov edx, dword [ebx + 0x3c]
mov dword [ebx + 0x40], eax
mov dword [ebx + 0x44], edx
cmp byte [ebp - 0x61], 8
jne 0x4176d0
test byte [ebx + 0x51], 0x40
je 0x4176d4
test ecx, ecx
je 0x417728
mov eax, dword [0x431538]
or eax, dword [0x431550]
or eax, dword [0x431554]
je 0x417703
mov edx, dword [ebx + 0x10]
test edx, edx
je 0x417703
movzx eax, word [edx + 0x18]
test eax, eax
je 0x417716
mov ecx, dword [edx + 0x14]
test byte [ecx + eax - 1], 1
je 0x417716
dec eax
jmp 0x4176f2
xor eax, eax
xor edx, edx
test byte [ebx + 0x51], 0x10
je 0x417722
cmp dword [ebx + 0x10], 0
sete al
jmp 0x41771b
test eax, eax
setne al
movzx eax, al
neg eax
sbb edx, edx
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], edx
mov eax, dword [ebx + 0x34]
test eax, eax
jne 0x417741
mov al, byte [ebx + 0x50]
and eax, 3
cmp byte [ebp - 0x61], 8
jne 0x417866
jmp 0x4177a2
mov ecx, dword [ebx + 0x3c]
mov edi, dword [ebx + 0x38]
mov dword [ebp - 0x5c], ecx
mov ecx, eax
test byte [ecx + 0x51], 8
je 0x41772f
cmp dword [ebp - 0x5c], 0
jne 0x41775c
test edi, edi
je 0x417789
mov edx, dword [ecx + 0x3c]
mov esi, dword [ecx + 0x38]
mov dword [ebp - 0x60], edx
test edx, edx
jne 0x41776d
test esi, esi
je 0x417781
cmp edi, esi
mov edx, dword [ebp - 0x5c]
sbb edx, dword [ebp - 0x60]
cmovb edi, esi
mov esi, dword [ebp - 0x60]
cmovae esi, dword [ebp - 0x5c]
jmp 0x417786
mov edi, esi
mov esi, dword [ebp - 0x60]
mov dword [ebp - 0x5c], esi
mov ecx, dword [ecx + 0x1c]
test ecx, ecx
jne 0x41774c
mov ecx, dword [ebp - 0x5c]
mov dword [eax + 0x38], edi
mov dword [eax + 0x3c], ecx
mov eax, dword [eax + 0x1c]
test eax, eax
jne 0x417790
jmp 0x41772f
dec al
je 0x41786a
mov esi, dword [ebx + 0x18]
test esi, esi
je 0x4177e4
mov edx, dword [esi + 8]
mov al, byte [ebx + 0x50]
mov ecx, dword [edx + 0x50]
and eax, 3
or ax, 0x80c
and cx, 0xf7f0
or eax, ecx
mov word [edx + 0x50], ax
test byte [edx + 0x51], 0x40
jne 0x4177e0
xor eax, eax
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00416bbb
mov esi, dword [esi]
jmp 0x4177ad
test byte [ebx + 0x51], 2
je 0x41786e
cmp dword [ebx + 0x18], 0
je 0x41786e
mov eax, dword [ebx + 0x3c]
mov ecx, dword [ebx + 0x38]
test eax, eax
jne 0x41780d
test ecx, ecx
jne 0x41780d
mov eax, dword [ebx]
call fcn.0041689c
mov ecx, eax
mov eax, edx
mov edx, 2
cmp edx, ecx
mov edx, 0
sbb edx, eax
jae 0x41786e
mov edx, dword [ebx + 0x44]
cmp dword [ebx + 0x40], ecx
sbb edx, eax
jae 0x41786e
mov esi, dword [ebx + 0x18]
test esi, esi
je 0x41786e
mov eax, dword [esi + 8]
cmp dword [eax + 0x3c], 0
jne 0x417862
cmp dword [eax + 0x38], 1
jne 0x417862
mov edi, dword [eax]
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov dword [esp + 0xc], edi
mov dword [esp + 8], str.warning:_pattern_recipe_did_not_update_peer_target__s.
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x10]
mov dword [esp], eax
call fcn.00412148
mov esi, dword [esi]
jmp 0x41782a
dec al
jne 0x41786e
and byte [ebx + 0x50], 0xfc
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret