Function at 0x4a5dc148
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc0
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
mov ebx, dword [ebp + 8]
xor eax, eax
push ebp
push 0x4a5dc4bc
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x10], eax
xor edx, edx
push ebp
push 0x4a5dc451
push dword fs:[edx]
mov dword fs:[edx], esp
push 0x48
push 0x40
call sub.kernel32.dll_LocalAlloc_1
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_InitializeCriticalSection_1
mov eax, dword [ebp - 0x14]
add eax, 0x1c
call fcn.4a50aaf4
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x20], 1
mov dword [eax + 0x24], 0
mov eax, dword [ebp - 0x14]
add eax, 0x28
mov edx, ebx
call fcn.4a508350
lea eax, [ebp - 8]
call fcn.4a50aaf4
lea eax, [ebp - 0xc]
call fcn.4a50aaf4
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
push ebx
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x4a5dc30c
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push ebx
call sub.kernel32.dll_CreateFileW_1
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
je 0x4a5dc30c
push 0
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_GetFileSize_1
mov edx, eax
lea eax, [ebp - 4]
xor ecx, ecx
call fcn.4a5080ac
cmp dword [ebp - 4], 0
je 0x4a5dc272
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x4a5dc256
sub ebx, 4
mov ebx, dword [ebx]
push 0
lea eax, [ebp - 0x1c]
push eax
push ebx
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_ReadFile_1
cmp eax, 1
sbb eax, eax
inc eax
jmp 0x4a5dc274
xor eax, eax
test al, al
je 0x4a5dc28e
mov eax, dword [ebp - 4]
test eax, eax
je 0x4a5dc284
sub eax, 4
mov eax, dword [eax]
mov edx, dword [ebp - 0x1c]
cmp edx, eax
sete al
jmp 0x4a5dc290
xor eax, eax
test al, al
je 0x4a5dc303
mov edx, dword [ebp - 4]
mov eax, 0x4a5dc4dc
call fcn.4a50fce4
test al, al
je 0x4a5dc303
xor eax, eax
push ebp
push 0x4a5dc2f1
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x34]
push eax
mov ecx, 0x7fffffff
mov edx, 0x11
mov eax, dword [ebp - 4]
call fcn.4a507f90
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 8]
mov dl, 1
call fcn.4a5d96f0
mov eax, dword [ebp - 4]
add eax, 8
mov edx, dword [eax]
mov dword [ebp - 0x28], edx
mov edx, dword [eax + 4]
mov dword [ebp - 0x24], edx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4a5dc303
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_CloseHandle_1
lea eax, [ebp - 4]
call fcn.4a50763c
push eax
mov ecx, 0x4a5dc4e8
mov edx, 0x4a5dc500
mov eax, 0x80000001
call fcn.4a5dc018
test al, al
je 0x4a5dc39c
mov edx, dword [ebp - 4]
mov eax, 0x4a5dc4dc
call fcn.4a50fce4
test al, al
je 0x4a5dc39c
xor eax, eax
push ebp
push 0x4a5dc38a
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x38]
push eax
mov ecx, 0x7fffffff
mov edx, 0x11
mov eax, dword [ebp - 4]
call fcn.4a507f90
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0xc]
mov dl, 1
call fcn.4a5d96f0
mov eax, dword [ebp - 4]
add eax, 8
mov edx, dword [eax]
mov dword [ebp - 0x30], edx
mov edx, dword [eax + 4]
mov dword [ebp - 0x2c], edx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4a5dc39c
cmp dword [ebp - 8], 0
jne 0x4a5dc3a8
cmp dword [ebp - 0xc], 0
je 0x4a5dc3fe
cmp dword [ebp - 0xc], 0
je 0x4a5dc3c2
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp - 0x2c]
jne 0x4a5dc3c0
cmp eax, dword [ebp - 0x30]
jbe 0x4a5dc3e1
jmp 0x4a5dc3c2
jle 0x4a5dc3e1
mov eax, dword [ebp - 0x14]
add eax, 0x1c
mov edx, dword [ebp - 8]
call fcn.4a50ab0c
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
mov dword [eax + 0x20], edx
mov edx, dword [ebp - 0x24]
mov dword [eax + 0x24], edx
jmp 0x4a5dc3fe
mov eax, dword [ebp - 0x14]
add eax, 0x1c
mov edx, dword [ebp - 0xc]
call fcn.4a50ab0c
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x20], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x24], edx
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x1c], 0
jne 0x4a5dc41d
lea eax, [ebp - 0x3c]
call fcn.4a5d8774
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x14]
add eax, 0x1c
call fcn.4a50ab0c
lea ecx, [ebp - 0x40]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp + 0x10]
call fcn.4a5da498
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x14]
add eax, 0x18
call fcn.4a507a74
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x1c]
mov edx, dword [eax]
call dword [edx + 0x6c]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4a5dc476
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a5dc4c3
lea eax, [ebp - 0x40]
call fcn.4a50763c
lea eax, [ebp - 0x3c]
call fcn.4a50aaf4
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.4a5076a8
lea eax, [ebp - 0xc]
mov edx, dword [0x4a5b4fe8]
mov ecx, 2
call fcn.4a508a60
lea eax, [ebp - 4]
call fcn.4a50763c
ret