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

Disassembly:
push 0x19c
mov eax, 0x10040d01
call fcn.10021f0e
mov edi, ecx
lea eax, [edi + 0x8c]
push eax
mov dword [ebp - 0x19c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x198], 1
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [edi + 0xa8]
add edi, 0xa4
mov esi, dword [edi]
mov dword [ebp - 0x188], eax
mov dword [ebp - 0x1a0], edi
cmp esi, eax
je 0x10015bfd
mov eax, dword [esi]
mov dword [ebp - 0x180], eax
cmp eax, ebx
je 0x10015bf2
mov ecx, dword [eax + 4]
lea ecx, [ecx - 0x10]
call fcn.10002c37
push dword [ebp - 0x180]
call fcn.1001d730
pop ecx
add esi, 4
cmp esi, dword [ebp - 0x188]
jne 0x10015bcf
mov edx, dword [edi]
mov ecx, dword [edi + 4]
mov dword [ebp - 0x180], edx
cmp edx, ecx
je 0x10015c2a
mov esi, ecx
sub esi, ecx
sar esi, 2
shl esi, 2
push esi
push ecx
push edx
call fcn.1001e7c0
add esp, 0xc
add esi, dword [ebp - 0x180]
mov dword [edi + 4], esi
lea eax, [ebp - 0x17c]
push eax
call fcn.10015ae5
pop ecx
mov byte [ebp - 4], 1
push dword [ebp - 0x17c]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call edi
test eax, eax
je 0x10015eab
mov eax, 0x104
push eax
push eax
lea ecx, [ebp - 0x17c]
call fcn.10002489
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x17c]
call fcn.10002316
push 0x2e
push dword [ebp - 0x17c]
call fcn.1001ef2c
pop ecx
pop ecx
cmp eax, ebx
je 0x10015cce
sub eax, dword [ebp - 0x17c]
sar eax, 1
cmp eax, 0xffffffff
je 0x10015cce
inc eax
push eax
lea eax, [ebp - 0x180]
push eax
lea ecx, [ebp - 0x17c]
call fcn.10002289
push eax
lea ecx, [ebp - 0x17c]
mov byte [ebp - 4], 2
call fcn.100023d5
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x180]
add ecx, 0xfffffff0
call fcn.10002c37
mov esi, str.Cmd.dat
push esi
call fcn.10002867
pop ecx
push eax
push esi
lea ecx, [ebp - 0x17c]
call fcn.1000fa64
push dword [ebp - 0x17c]
call edi
test eax, eax
je 0x10015eab
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x1f01ff
push dword [ebp - 0x17c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x1a8], esi
cmp esi, 0xffffffff
je 0x10015eab
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
mov dword [ebp - 0x180], eax
lea eax, [ebp - 0x184]
push eax
push 4
lea eax, [ebp - 0x194]
push eax
push esi
mov dword [ebp - 0x184], ebx
mov dword [ebp - 0x194], ebx
call edi
push ebx
lea eax, [ebp - 0x184]
push eax
push 4
lea eax, [ebp - 0x194]
push eax
push esi
call edi
push ebx
lea eax, [ebp - 0x184]
push eax
push 4
lea eax, [ebp - 0x1a4]
push eax
push esi
mov dword [ebp - 0x1a4], ebx
call edi
jmp 0x10015e8d
push ebx
lea eax, [ebp - 0x184]
push eax
push 4
lea eax, [ebp - 0x190]
push eax
push esi
mov dword [ebp - 0x190], ebx
call edi
push ebx
lea eax, [ebp - 0x184]
push eax
push 4
lea eax, [ebp - 0x18c]
push eax
push esi
mov dword [ebp - 0x18c], ebx
call edi
push 0x167
lea eax, [ebp - 0x177]
push ebx
push eax
mov byte [ebp - 0x178], bl
call fcn.10024270
add esp, 0xc
cmp dword [ebp - 0x18c], ebx
jbe 0x10015e1b
push ebx
lea eax, [ebp - 0x184]
push eax
push dword [ebp - 0x18c]
lea eax, [ebp - 0x178]
push eax
push esi
mov dword [ebp - 0x184], ebx
call edi
mov edx, dword [ebp - 0x18c]
lea eax, [ebp - 0x178]
push edx
push eax
call fcn.10001aa8
pop ecx
pop ecx
mov byte [ebp + edx - 0x178], bl
cmp dword [ebp - 0x190], ebx
jbe 0x10015e8d
push 8
call fcn.1001ec97
mov esi, eax
pop ecx
cmp esi, ebx
je 0x10015e42
push 0x100581b4
lea ecx, [esi + 4]
call fcn.100023ad
mov eax, esi
jmp 0x10015e44
xor eax, eax
mov ecx, dword [ebp - 0x190]
mov dword [eax], ecx
mov dword [ebp - 0x188], eax
lea esi, [eax + 4]
lea eax, [ebp - 0x178]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x10015e5e
sub eax, ecx
push eax
lea eax, [ebp - 0x178]
push eax
mov ecx, esi
call fcn.100027de
mov esi, dword [ebp - 0x1a0]
lea eax, [ebp - 0x188]
call fcn.10016330
mov esi, dword [ebp - 0x1a8]
push 1
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x180]
jb 0x10015d8a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x17c]
add ecx, 0xfffffff0
call fcn.10002c37
push dword [ebp - 0x19c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.10021f58
ret