Function at 0x4c7a9090
Capabilities:
Check if file exists
Delete file
Read file on windows
Read file via mapping

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x428
push ebx
push esi
push edi
xor edi, edi
push 0x206
lea eax, [ebp - 0x426]
push edi
push eax
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x14], edi
mov word [ebp - 0x428], di
call sub.msvcrt.dll_memset
push 0x206
lea ecx, [ebp - 0x21e]
push edi
push ecx
mov word [ebp - 0x220], di
call sub.msvcrt.dll_memset
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov eax, dword [ebx + 8]
mov edx, dword [esi]
add esp, 0x18
test al, 2
mov dword [ebp - 0x18], edx
jne 0x4c7a910a
mov ecx, 1
cmp dword [ebx + 0xc], ecx
je 0x4c7a9107
test al, 0x40
jne 0x4c7a9107
cmp dword [ebp + 0x14], edi
jne 0x4c7a910a
mov dword [ebp - 0xc], ecx
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
add dword [esi], 1
mov eax, dword [esi]
mov edx, dword [esi + 8]
cmp eax, edx
ja 0x4c7a9900
cmp byte [eax], 0
je 0x4c7a9130
lea ecx, [ebp - 0x428]
mov dword [ebp + 8], ecx
jmp 0x4c7a9165
mov dword [ebp + 8], 0
jmp 0x4c7a9140
add eax, 1
cmp eax, edx
ja 0x4c7a9925
mov cl, byte [eax]
cmp cl, 0xff
je 0x4c7a915e
cmp byte [eax - 1], 1
jne 0x4c7a9140
test cl, cl
je 0x4c7a9140
jmp 0x4c7a9165
mov dword [ebp + 0x10], 0
cmp byte [eax], 0xff
je 0x4c7a919c
push eax
lea edx, [ebx + 0x234]
push edx
lea eax, [ebp - 0x428]
push eax
call fcn.4c7a3800
test eax, eax
jne 0x4c7a919c
push 0xaed
push 0x4c782a98
call edi
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
mov ecx, dword [esi]
mov al, byte [ecx - 1]
cmp al, 1
jne 0x4c7a978c
cmp dword [ebp + 0x10], 0
je 0x4c7a95dc
push 0
push 0x100
push 3
push 0
push 3
push 0x80000000
lea edx, [ebp - 0x428]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 8], edi
je 0x4c7a992c
push 0
push 0x270
push 0
push 2
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov esi, eax
test esi, esi
mov dword [ebp - 4], esi
je 0x4c7a99cb
push 0
push 0
push 0
push 4
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
je 0x4c7a9962
mov edx, dword [ebp + 0xc]
lea edi, [edx + 0xc]
mov esi, eax
mov ecx, 0x9c
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x4108]
mov dword [edx + 0x10], ecx
lea edi, [edx + 0x14]
lea esi, [ebx + 0x3ef4]
mov ecx, 0x84
rep movsd dword es:[edi], dword [esi]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x4c7a926b
push 0xb0b
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
mov edx, dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
test eax, eax
jne 0x4c7a9299
push 0xb24
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
mov eax, dword [ebp - 8]
push eax
call esi
test eax, eax
jne 0x4c7a92c1
push 0xb36
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
cmp dword [ebp - 0x10], 0
jne 0x4c7a92d7
mov ecx, dword [ebp + 0xc]
test byte [ecx + 0x274], 1
je 0x4c7a95dc
mov edi, dword [ebp + 0xc]
lea esi, [edi + 0x226]
push esi
add edi, 0x3250
push edi
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4c7a9583
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
test eax, eax
jne 0x4c7a9327
push 0xb42
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
push edi
lea edx, [ebx + 0x234]
push edx
lea eax, [ebp - 0x220]
push eax
call fcn.4c7a3800
test eax, eax
jne 0x4c7a935d
push 0xb48
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
push 0
push 0x100
push 3
push 0
push 3
push 0x80000000
lea ecx, [ebp - 0x220]
push ecx
call fcn.4c7a39e0
mov esi, eax
cmp esi, 0xffffffff
je 0x4c7a993e
mov eax, dword [ebp + 0xc]
push 0
lea edx, [ebp - 0x14]
push edx
push 0x2fd4
add eax, 0x27c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x4c7a93c5
push 0xb66
push 0x4c782a98
call edi
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4c7a93ea
push 0xb79
push 0x4c782a98
call edi
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
cmp dword [ebx + 0xc], 1
je 0x4c7a9401
mov eax, dword [ebx + 8]
test al, 0x40
jne 0x4c7a9401
test al, 0x10
je 0x4c7a9401
cmp dword [ebp + 0x14], 0
jne 0x4c7a946a
test byte [ebx + 8], 2
jne 0x4c7a944c
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4c7a944c
call edi
cmp eax, 2
je 0x4c7a946a
push 0xb86
push 0x4c782a98
call edi
push eax
push 0x4c78142c
call fcn.4c7c02b0
lea ecx, [ebp - 0x220]
push ecx
push 0x4c782788
call fcn.4c7c02b0
add esp, 0x18
jmp 0x4c7a946a
push 0xb8e
push 0x4c782a98
lea edx, [ebp - 0x220]
push edx
push 0x4c782760
call fcn.4c7c02b0
add esp, 0x10
mov eax, dword [ebx + 0x440]
test eax, eax
mov esi, dword [ebp + 0xc]
je 0x4c7a94f2
test byte [esi + 0x274], 1
je 0x4c7a94c1
test byte [ebx + 8], 0x10
je 0x4c7a948f
mov word [esi + 0x2c8], 1
mov ecx, dword [ebx + 0x45c]
mov edx, dword [ebx + 0x440]
lea eax, [ebx + 0x80b4]
push eax
push 0
push 0
push ecx
push 0
lea eax, [esi + 0x27c]
push eax
mov eax, dword [ebx + 0x454]
push edx
call eax
mov dword [ebx + 0x440], eax
jmp 0x4c7a94f2
mov ecx, dword [ebx + 0x448]
push eax
call ecx
test eax, eax
jne 0x4c7a94e8
push 0xba3
push 0x4c782a98
call edi
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
mov dword [ebx + 0x440], 0
mov ecx, dword [ebx + 0x440]
test ecx, ecx
je 0x4c7a9583
mov eax, dword [ebx + 8]
test al, 0x20
je 0x4c7a96a0
cmp dword [esi + 0x3294], 0
jne 0x4c7a9521
test byte [esi + 0x274], 1
jne 0x4c7a96ad
test al, 0x10
je 0x4c7a952e
mov word [esi + 0x2c8], 1
test dword [ebx + 8], 0x40000000
je 0x4c7a9543
mov eax, dword [ebx + 0x2078]
mov dword [esi + 0x1e90], eax
mov edx, dword [ebx + 0x45c]
lea ecx, [ebx + 0x80b4]
push ecx
mov ecx, dword [ebx + 0x454]
push 0
push 0
push edx
push 0
lea eax, [esi + 0x27c]
push eax
mov eax, dword [ebx + 0x440]
push eax
call ecx
mov dword [ebx + 0x440], eax
movzx edx, byte [esi + 0x274]
and edx, 1
mov dword [esi + 0x3294], edx
cmp dword [ebx + 0x440], 0
jne 0x4c7a95dc
test byte [ebx + 8], 0x10
mov eax, dword [ebp + 0xc]
je 0x4c7a959e
mov word [eax + 0x2c8], 1
test dword [ebx + 8], 0x40000000
je 0x4c7a95b3
mov ecx, dword [ebx + 0x2078]
mov dword [eax + 0x1e90], ecx
mov edx, dword [ebx + 0x45c]
push 0
push 0
push edx
add eax, 0x27c
push 0
push eax
mov eax, dword [ebx + 0x444]
call eax
test eax, eax
mov dword [ebx + 0x440], eax
je 0x4c7a9950
mov ecx, dword [ebp + 8]
xor edi, edi
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push ecx
push edi
push edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push eax
push 0x40
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
mov dword [ebp - 4], esi
je 0x4c7a99dd
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 8]
push edi
push edi
push edx
push esi
push 0xffffffffffffffff
push eax
push edi
push edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x4c7a99f2
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x3290]
mov dword [ebx + 0x80a8], ecx
mov edx, dword [eax + 0x278]
mov eax, dword [ebx + 0x88e0]
test eax, eax
mov dword [ebp + 8], edx
jne 0x4c7a96e3
mov dword [ebp + 8], eax
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [ebp + 8]
push edi
push ecx
mov ecx, dword [ebp - 0xc]
lea edx, [ebx + 0x80b4]
push edx
mov edx, dword [ebp - 4]
lea eax, [ebx + 0x70f8]
push eax
mov eax, dword [ebx + 0x440]
push 0
push ecx
mov ecx, dword [ebx + 0x450]
push edx
push eax
call ecx
test eax, eax
je 0x4c7a9a22
mov edx, dword [ebp - 4]
push edx
call esi
push edi
call esi
mov esi, dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4c7a986d
test byte [esi + 0x274], 1
jne 0x4c7a9521
mov edx, dword [ebx + 0x448]
push ecx
call edx
test eax, eax
jne 0x4c7a96d4
push 0xbc3
push 0x4c782a98
call edi
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
mov dword [ebx + 0x440], 0
jmp 0x4c7a9573
add eax, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebx + 0x88e0]
lea eax, [ebp + 8]
push eax
add ecx, 0xc
call fcn.4c7a8110
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x4c7a970a
xor esi, esi
jmp 0x4c7a970f
mov esi, dword [eax + 8]
sub esi, ecx
mov ecx, dword [ebx + 0x88e0]
add ecx, 0x18
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
mov dword [ebp + 8], esi
jbe 0x4c7a964f
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
je 0x4c7a964f
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x278]
push esi
push edi
push eax
push ebx
call fcn.4c7a82a0
test eax, eax
jne 0x4c7a964f
push 0xc18
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
add esp, 0x10
push edi
mov dword [ebp + 8], 0
call esi
xor edi, edi
jmp 0x4c7a9655
cmp al, 0xfc
jne 0x4c7a986d
cmp dword [ebx + 0xc], 1
je 0x4c7a97aa
test byte [ebx + 8], 0x40
jne 0x4c7a97aa
cmp dword [ebp + 0x14], 0
jne 0x4c7a9859
cmp word [esi + 0x3250], 0
lea eax, [esi + 0x3250]
je 0x4c7a9859
push eax
lea eax, [ebx + 0x234]
push eax
lea ecx, [ebp - 0x220]
push ecx
call fcn.4c7a3800
test eax, eax
jne 0x4c7a97f0
push 0xc3b
push 0x4c782a98
call edi
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
test byte [ebx + 8], 2
jne 0x4c7a983b
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4c7a983b
call edi
cmp eax, 2
je 0x4c7a9859
push 0xc43
push 0x4c782a98
call edi
push eax
push 0x4c78142c
call fcn.4c7c02b0
lea eax, [ebp - 0x220]
push eax
push 0x4c782788
call fcn.4c7c02b0
add esp, 0x18
jmp 0x4c7a9859
push 0xc4b
push 0x4c782a98
lea ecx, [ebp - 0x220]
push ecx
push 0x4c782760
call fcn.4c7c02b0
add esp, 0x10
mov edx, dword [esi]
push 0
push edx
push esi
push ebx
call fcn.4c7ab450
test eax, eax
je 0x4c7a9a57
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax + eax + 2]
add dword [esi], ecx
mov eax, dword [esi]
cmp byte [eax], 0xff
jne 0x4c7a9110
mov eax, dword [ebp - 0x18]
add dword [ebx + 0x14], 1
cmp byte [eax], 3
jne 0x4c7a9a7f
cmp dword [ebx + 0xc], 2
je 0x4c7a98a7
cmp dword [ebp + 0x14], 0
jne 0x4c7a9a7f
lea ecx, [ebp - 0x428]
push ecx
push ebx
call fcn.4c7a3ad0
test eax, eax
jne 0x4c7a9a61
call edi
cmp eax, 2
je 0x4c7a9a7f
push 0xc6a
push 0x4c782a98
call edi
push eax
push 0x4c78142c
call fcn.4c7c02b0
lea edx, [ebp - 0x428]
push edx
push 0x4c782788
call fcn.4c7c02b0
add esp, 0x18
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0xacb
push 0x4c782a98
call edi
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0xadc
jmp 0x4c7a9905
push 0xafa
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4c7a990c
push 0xb5f
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4c7a990c
push 0xbef
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4c7a990c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
test eax, eax
jne 0x4c7a998d
push 0xb13
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
push edi
call esi
test eax, eax
jne 0x4c7a99b2
push 0xb19
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
push 0x36b0
push ebx
call fcn.4c7a38a0
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4c7a99b2
push 0xb2c
jmp 0x4c7a9999
push 0xc03
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4c7a990c
push 0xc0a
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0xc24
push 0x4c782a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
mov edx, dword [ebp - 4]
add esp, 0x10
push edx
call esi
push edi
call esi
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0xc54
jmp 0x4c7a9905
push 0xc72
push 0x4c782a98
lea eax, [ebp - 0x428]
push eax
push 0x4c782760
call fcn.4c7c02b0
add esp, 0x10
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x10