Function at 0x417434
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 0x41748b
test byte [ebx + 0x50], 3
jne 0x41748b
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x417481
test byte [eax + 0x1c], 1
je 0x417481
movzx ecx, word [eax + 0x18]
xor edx, edx
cmp edx, ecx
jae 0x41748b
mov esi, dword [eax + 0x14]
test byte [esi + edx], 1
je 0x417481
inc edx
jmp 0x417471
test byte [ebx + 0x51], 0x40
je 0x417492
and byte [ebx + 0x50], 0xfc
xor ecx, ecx
jmp 0x41769d
test eax, eax
je 0x41748b
cmp dword [0x431558], 0
jne 0x4174c3
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.004120a3
cmp dword [0x431550], 0
jne 0x41767e
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.004013ff
test eax, eax
je 0x417504
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00401599
test eax, eax
jne 0x417682
jmp 0x41767e
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
jne 0x417662
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 0x4174f5
test eax, eax
js 0x417662
mov byte [ebp - 0x49], 0x78
jmp 0x41753e
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
jne 0x417557
lea eax, [ebp - 0x48]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll__fstati64]
cmp eax, 0xffffffff
je 0x417533
test eax, eax
jns 0x417574
mov eax, dword [ebx]
mov dword [esp], str.touch:_fstat:
mov dword [esp + 4], eax
jmp 0x41766f
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
jne 0x417594
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 0x417569
test eax, eax
jns 0x4175b4
mov eax, dword [ebx]
mov dword [esp], str.touch:_read:
mov dword [esp + 4], eax
jmp 0x41766f
inc eax
jne 0x4175d3
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
jne 0x4175d3
xor edx, edx
mov dword [esp], esi
mov dword [esp + 0xc], edx
mov dword [esp + 4], edx
mov dword [esp + 8], edx
call fcn.00421a10
cmp edx, 0xffffffff
je 0x4175a6
test edx, edx
jns 0x4175f0
mov eax, dword [ebx]
mov dword [esp], str.touch:_lseek:
mov dword [esp + 4], eax
jmp 0x41766f
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
jne 0x41760d
mov dword [esp + 8], 1
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.msvcrt.dll__write
cmp eax, 0xffffffff
je 0x4175e5
test eax, eax
jns 0x41761c
mov eax, dword [ebx]
mov dword [esp], str.touch:_write:
mov dword [esp + 4], eax
jmp 0x41766f
cmp dword [ebp - 0x2c], 0
jne 0x417676
cmp dword [ebp - 0x30], 0
jne 0x417676
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 0x417657
test eax, eax
jns 0x417676
jmp 0x417662
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
je 0x417630
mov eax, dword [ebx]
mov dword [esp], str.touch:_open:
mov dword [esp + 4], eax
call fcn.00411e44
jmp 0x417682
mov dword [esp], esi
call sub.msvcrt.dll__close
xor edx, edx
jmp 0x417687
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 0x4176b5
cmp dword [ebx + 0x40], 0
jne 0x4176b5
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 0x4176c1
test byte [ebx + 0x51], 0x40
je 0x4176c5
test ecx, ecx
je 0x417719
mov eax, dword [0x431538]
or eax, dword [0x431550]
or eax, dword [0x431554]
je 0x4176f4
mov edx, dword [ebx + 0x10]
test edx, edx
je 0x4176f4
movzx eax, word [edx + 0x18]
test eax, eax
je 0x417707
mov ecx, dword [edx + 0x14]
test byte [ecx + eax - 1], 1
je 0x417707
dec eax
jmp 0x4176e3
xor eax, eax
xor edx, edx
test byte [ebx + 0x51], 0x10
je 0x417713
cmp dword [ebx + 0x10], 0
sete al
jmp 0x41770c
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 0x417732
mov al, byte [ebx + 0x50]
and eax, 3
cmp byte [ebp - 0x61], 8
jne 0x417857
jmp 0x417793
mov ecx, dword [ebx + 0x3c]
mov edi, dword [ebx + 0x38]
mov dword [ebp - 0x5c], ecx
mov ecx, eax
test byte [ecx + 0x51], 8
je 0x417720
cmp dword [ebp - 0x5c], 0
jne 0x41774d
test edi, edi
je 0x41777a
mov edx, dword [ecx + 0x3c]
mov esi, dword [ecx + 0x38]
mov dword [ebp - 0x60], edx
test edx, edx
jne 0x41775e
test esi, esi
je 0x417772
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 0x417777
mov edi, esi
mov esi, dword [ebp - 0x60]
mov dword [ebp - 0x5c], esi
mov ecx, dword [ecx + 0x1c]
test ecx, ecx
jne 0x41773d
mov ecx, dword [ebp - 0x5c]
mov dword [eax + 0x38], edi
mov dword [eax + 0x3c], ecx
mov eax, dword [eax + 0x1c]
test eax, eax
jne 0x417781
jmp 0x417720
dec al
je 0x41785b
mov esi, dword [ebx + 0x18]
test esi, esi
je 0x4177d5
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 0x4177d1
xor eax, eax
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00416bad
mov esi, dword [esi]
jmp 0x41779e
test byte [ebx + 0x51], 2
je 0x41785f
cmp dword [ebx + 0x18], 0
je 0x41785f
mov eax, dword [ebx + 0x3c]
mov ecx, dword [ebx + 0x38]
test eax, eax
jne 0x4177fe
test ecx, ecx
jne 0x4177fe
mov eax, dword [ebx]
call fcn.00416890
mov ecx, eax
mov eax, edx
mov edx, 2
cmp edx, ecx
mov edx, 0
sbb edx, eax
jae 0x41785f
mov edx, dword [ebx + 0x44]
cmp dword [ebx + 0x40], ecx
sbb edx, eax
jae 0x41785f
mov esi, dword [ebx + 0x18]
test esi, esi
je 0x41785f
mov eax, dword [esi + 8]
cmp dword [eax + 0x3c], 0
jne 0x417853
cmp dword [eax + 0x38], 1
jne 0x417853
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.0041215f
mov esi, dword [esi]
jmp 0x41781b
dec al
jne 0x41785f
and byte [ebx + 0x50], 0xfc
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret