Function at 0x10012f50
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
cmp dword [0x100beed4], 0
push ebx
push esi
push edi
jne 0x10012f66
xor eax, eax
jmp 0x10012f79
lea eax, [ebp - 4]
push eax
push 3
push str.LoadFileRangeIntoBuffer_Internal
call fcn.100275b0
add esp, 0xc
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x20]
push eax
push eax
call fcn.10017a40
push dword [ebp + 0x24]
mov byte [ebp - 0x24], 0
push ecx
mov esi, esp
mov dword [ebp - 0x50], 0xffffffff
push 0
push dword [ebp + 8]
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0x1005d200
mov dword [ebp - 0x10], 0
call fcn.10012d10
mov edi, dword [ebp - 0x14]
lea ecx, [ebp - 0x50]
mov dword [esi], edi
call fcn.10011ea0
test al, al
mov dword [ebp - 0x18], 0x1005d200
mov eax, dword [ebp - 0x10]
sete bl
test eax, eax
je 0x1001302b
push eax
call fcn.100324a7
add esp, 4
mov dword [ebp - 0x10], 0
test edi, edi
je 0x1001303f
push edi
call fcn.100324a7
add esp, 4
mov dword [ebp - 0x14], 0
test bl, bl
jne 0x1001324c
lea eax, [ebp - 0xc]
xor ebx, ebx
push eax
push dword [ebp - 0x50]
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1001306b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x10013071
mov dword [ebp - 8], ebx
jmp 0x10013074
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov dword [ebp - 8], esi
mov edi, dword [ebp + 0x10]
test edi, edi
ja 0x1001324c
mov esi, dword [ebp + 0xc]
jb 0x1001308c
cmp esi, ebx
ja 0x1001324c
mov eax, esi
or eax, edi
je 0x10013159
cmp dword [ebp - 0x50], 0xffffffff
jne 0x100130ab
push str.BIsOpen__
push 0x147f
jmp 0x1001323a
cmp byte [ebp - 0x24], 0
je 0x100130d5
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x100130d5
push 0
push eax
push edi
push esi
call fcn.10032eb0
or eax, edx
je 0x100130d5
push str.Seeking_to_a_position_which_is_not_sector_aligned_will_break_unbuffered_io
push 0x1487
jmp 0x1001323a
cmp dword [ebp - 0x28], 0
je 0x10013115
mov edx, dword [ebp - 0x34]
cmp edi, edx
jb 0x10013107
mov eax, dword [ebp - 0x38]
ja 0x100130eb
cmp esi, eax
jb 0x10013107
mov ecx, dword [ebp - 0x30]
add ecx, eax
mov eax, dword [ebp - 0x2c]
adc eax, edx
cmp edi, eax
ja 0x10013107
jb 0x100130ff
cmp esi, ecx
jae 0x10013107
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], edi
jmp 0x10013159
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
push 0
lea eax, [ebp + 0x24]
mov dword [ebp + 0x24], edi
push eax
push esi
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jne 0x1001314a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1001314a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1001324c
jmp 0x10013159
mov eax, dword [ebp + 0x24]
xor ecx, ecx
or ecx, dword [ebp - 8]
cdq
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0x18]
sub ebx, esi
mov ecx, 0
sbb ecx, edi
cmp eax, ecx
ja 0x10013172
mov edi, dword [ebp + 0x14]
jb 0x10013176
cmp edi, ebx
jb 0x10013176
mov edi, ebx
mov eax, ecx
test eax, eax
ja 0x1001324c
jb 0x10013230
cmp edi, 0x7ffffffe
ja 0x1001324c
test eax, eax
jne 0x10013230
cmp edi, 0x40000000
ja 0x10013230
mov ebx, dword [ebp + 0x1c]
mov ecx, ebx
call fcn.10012520
mov eax, dword [ebp + 0x20]
mov ecx, ebx
movzx esi, al
xor esi, 1
add esi, edi
push esi
call fcn.10017010
test esi, esi
je 0x1001322c
push esi
mov ecx, ebx
mov dword [ebp + 0x24], 0
call fcn.10016e30
test al, al
je 0x1001324c
mov eax, dword [ebp + 0x1c]
mov ebx, dword [ebx + 0x10]
add ebx, dword [eax]
je 0x1001324c
lea eax, [ebp + 0x24]
push eax
push edi
push ebx
lea ecx, [ebp - 0x50]
call fcn.100133c0
test al, al
je 0x1001324c
cmp byte [ebp + 0x20], 0
mov edi, dword [ebp + 0x24]
jne 0x10013221
cmp edi, esi
jb 0x1001321d
push str.cbActual____uint32_nBufSizeWithTerminator
push 0x970
push str.c:_buildslave_steam_rel_client_hotfix_win32_build_src_tier1_fileio.cpp
call fcn.10024040
add esp, 0xc
test al, al
jne 0x1001321d
int3
mov byte [ebx + edi], 0
mov ecx, dword [ebp + 0x1c]
push edi
push 0
call fcn.10017950
mov bl, 1
jmp 0x1001324e
push str.cbToRead___1024__1024__1024
push 0x950
push str.c:_buildslave_steam_rel_client_hotfix_win32_build_src_tier1_fileio.cpp
call fcn.10024040
add esp, 0xc
test al, al
jne 0x1001324c
int3
xor bl, bl
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x20], 0
cmp eax, 0xffffffff
je 0x10013275
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x1001326e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x50], 0xffffffff
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
test eax, eax
je 0x100132b6
push eax
call fcn.100324a7
add esp, 4
mov dword [ebp - 0x28], 0
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x100132c6
push ecx
call fcn.10027570
add esp, 4
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret