Function at 0x454a50
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x10], 0
push edi
call fcn.004d8388
mov esi, dword [ebp + 8]
add esp, 4
cmp esi, eax
je 0x454a9a
push esi
call fcn.004e2f9c
add esp, 4
test eax, eax
jne 0x454a9a
mov dword [ebp - 0x14], 1
mov dword [0x607510], edi
mov dword [0x607514], edi
mov dword [0x60743c], edi
jmp 0x454a9d
mov dword [ebp - 0x14], edi
xor eax, eax
cmp dword [0x5e06b4], 0xffffffff
setne al
mov dword [ebp - 4], eax
mov ebx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x18]
cmp dword [ebp - 0x10], 0
mov ecx, dword [ebp + 0x14]
jne 0x454ad9
cmp dword [0x60743c], ecx
jae 0x454ad9
test edx, edx
je 0x454b0d
push esi
push ecx
push ebx
call fcn.00476700
mov edi, eax
add esp, 0xc
mov dword [ebp - 8], edi
jmp 0x454b1f
test eax, eax
jne 0x454af1
cmp dword [0x607510], eax
jne 0x454af1
cmp dword [0x607514], eax
je 0x454eed
cmp dword [0x60743c], ecx
jae 0x454ef6
test edi, edi
je 0x454ef6
test edx, edx
jne 0x454ef6
push esi
push ecx
push 1
push ebx
call fcn.004e259a
add esp, 0x10
mov dword [ebp - 8], eax
mov edi, eax
inc dword [ebp - 0x10]
test edi, edi
jne 0x454b5a
push esi
call fcn.004e1c39
add esp, 4
test eax, eax
je 0x454ed4
push dword [ebp + 0x1c]
push str.pcre2grep:_read_error__filename:__s_n
push 2
call fcn.004d8388
add esp, 4
push eax
call fcn.00456080
mov eax, dword [ebp - 4]
add esp, 0xc
jmp 0x454aaf
cmp dword [ebp - 0x14], 0
je 0x454cb1
xor edx, edx
mov dword [ebp - 0x14], 0
xor esi, esi
mov ebx, edi
cmp edi, 0x400
mov eax, 0x400
cmova ebx, eax
cmp ebx, 1
jbe 0x454bb0
mov ecx, dword [ebp + 0x10]
mov eax, 1
sub eax, ecx
mov edi, eax
xor eax, eax
cmp byte [ecx], al
sete al
add esi, eax
xor eax, eax
cmp byte [ecx + 1], al
sete al
add ecx, 2
add edx, eax
lea eax, [edi + ecx]
cmp eax, ebx
jb 0x454b90
mov edi, dword [ebp - 8]
mov ebx, dword [ebp + 0x10]
mov ah, byte [ebx]
mov cl, ah
cmp edi, 1
jbe 0x454bd6
mov ch, byte [ebx + 1]
mov al, ch
cmp edi, 2
jbe 0x454bde
mov bl, byte [ebx + 2]
cmp edi, 3
jbe 0x454be0
mov edi, dword [ebp + 0x10]
mov bh, byte [edi + 3]
jmp 0x454be2
mov ebx, dword [ebp - 4]
mov al, 0xa
mov dword [ebp - 4], ebx
mov bl, 0xa
mov bh, 0xa
mov edi, dword [ebp - 4]
mov dword [ebp - 0x1c], edi
mov edi, dword [ebp - 8]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0xc], edx
cmp cl, 0xff
jne 0x454c17
cmp al, 0xfe
jne 0x454c2d
test bl, bl
jne 0x454c06
test bh, bh
je 0x454cae
mov dword [0x607510], 1
mov eax, 2
jmp 0x454c86
test cl, cl
jne 0x454c41
test al, al
jne 0x454c2d
cmp bl, 0xfe
jne 0x454c2d
cmp bh, 0xff
je 0x454cae
test esi, esi
je 0x454c9a
test edx, edx
jne 0x454cae
mov dword [0x607514], 1
jmp 0x454cae
cmp cl, 0xfe
jne 0x454c5b
cmp al, 0xff
jne 0x454c2d
mov dword [0x607514], 1
mov eax, 2
jmp 0x454c86
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov dword [ebp - 4], edx
mov edx, dword [ebp - 0xc]
cmp cl, 0xef
jne 0x454c2d
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 4], ecx
cmp al, 0xbb
jne 0x454c2d
mov dword [ebp - 4], ecx
cmp bl, 0xbf
jne 0x454c2d
mov eax, 3
mov dword [ebp - 4], ecx
mov ecx, dword [ebp + 0x10]
sub edi, eax
push edi
add eax, ecx
push eax
push ecx
call fcn.004d6030
add esp, 0xc
jmp 0x454cae
mov eax, dword [0x607510]
test edx, edx
mov ecx, 1
cmovne eax, ecx
mov dword [0x607510], eax
mov ebx, dword [ebp + 0x10]
mov ecx, edi
mov dword [ebp - 0xc], ebx
shr ecx, 1
cmp dword [0x607514], 0
mov dword [ebp - 8], ecx
jne 0x454cd1
cmp dword [0x607510], 0
jne 0x454cd1
xor eax, eax
jmp 0x454cd6
mov eax, 1
cmp dword [ebp - 4], 0
mov dword [ebp - 0x1c], eax
je 0x454dac
test eax, eax
jne 0x454dac
cmp dword [0x607440], eax
jne 0x454d0d
push 0x200000
call fcn.004e0093
add esp, 4
mov dword [0x607440], eax
test eax, eax
je 0x454f3f
push 0
push 0
push edi
push ebx
push 0
push dword [0x5e06b4]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
test esi, esi
jg 0x454d53
test eax, eax
jne 0x454d53
push dword [ebp + 0x1c]
push str.pcre2grep:_codepage_conversion_error__filename:__s_n
push 2
call fcn.004d8388
add esp, 4
push eax
call fcn.00456080
mov eax, dword [ebp - 4]
add esp, 0xc
mov esi, dword [ebp + 8]
xor edi, edi
jmp 0x454aaf
cmp esi, 0x100000
ja 0x454dac
mov ebx, dword [0x5e06b4]
mov eax, dword [0x607440]
push 0
push 0
push edi
push dword [ebp + 0x10]
mov dword [ebp - 0x18], eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x454dac
cmp eax, esi
ja 0x454dac
push eax
push dword [ebp - 0x18]
push edi
push dword [ebp + 0x10]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x454dac
cmp eax, esi
ja 0x454dac
mov dword [ebp - 8], eax
mov eax, dword [0x607440]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 4], eax
cmp dword [0x607514], 0
je 0x454dda
cmp edi, 1
jbe 0x454dda
mov edx, dword [ebp + 0x10]
mov esi, 1
sub esi, edx
mov al, byte [edx + 1]
lea edx, [edx + 2]
mov cl, byte [edx - 2]
mov byte [edx - 2], al
lea eax, [edx + esi]
mov byte [edx - 1], cl
cmp eax, edi
jb 0x454dc4
cmp dword [ebp - 0x1c], 0
jne 0x454df4
mov eax, dword [ebp - 4]
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 0x18]
test eax, eax
je 0x454ab2
cmp dword [0x607438], 0
jne 0x454e17
push 0x800000
call fcn.004e0093
add esp, 4
mov dword [0x607438], eax
test eax, eax
je 0x454f3f
push 0
push 0
push 0
push 0
push dword [ebp - 8]
mov ebx, 0x800000
push dword [ebp - 0xc]
sub ebx, dword [0x60743c]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, eax
test eax, eax
jg 0x454e6f
test ecx, ecx
jne 0x454e6f
push dword [ebp + 0x1c]
push str.pcre2grep:_UTF_16_conversion_error__filename:__s_n
push 2
call fcn.004d8388
add esp, 4
push eax
call fcn.00456080
mov eax, dword [ebp - 4]
add esp, 0xc
mov esi, dword [ebp + 8]
xor edi, edi
jmp 0x454aac
cmp eax, ebx
ja 0x454ed1
mov eax, dword [0x607438]
xor esi, esi
add eax, dword [0x60743c]
push esi
push esi
push esi
push esi
push dword [ebp - 8]
mov dword [ebp - 0x1c], eax
push dword [ebp - 0xc]
push esi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jle 0x454ec2
cmp eax, ebx
ja 0x454ec2
push esi
push esi
push eax
push dword [ebp - 0x1c]
push dword [ebp - 8]
push dword [ebp - 0xc]
push esi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jle 0x454ec2
cmp eax, ebx
cmovbe esi, eax
cmp dword [ebp - 0x1c], 0
jne 0x454ecd
test ebx, ebx
cmove esi, eax
test esi, esi
jne 0x454edc
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 4]
jmp 0x454aac
add dword [0x60743c], esi
mov eax, dword [ebp - 4]
mov esi, dword [ebp + 8]
jmp 0x454aac
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [0x60743c]
xor esi, esi
test edi, edi
je 0x454f36
mov ebx, dword [0x607438]
cmp edi, ecx
mov esi, ecx
cmovbe esi, edi
push esi
push ebx
push dword [ebp + 0x10]
call fcn.004d6030
add esp, 0xc
cmp edi, esi
jbe 0x454f30
sub edi, esi
lea ecx, [ebx + esi]
push edi
push ecx
push ebx
call fcn.004d6030
add esp, 0xc
sub dword [0x60743c], esi
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.pcre2grep:_malloc_failed_n
push 2
call fcn.004d8388
add esp, 4
push eax
call fcn.00456080
add esp, 8
push 2
call fcn.004752d0
int3