Function at 0x40f0e0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp dword [ebp + 0xc], 0
xorps xmm0, xmm0
movq qword [ebp - 0xc], xmm0
jne 0x40f113
push 0x80070057
push 0x2ae
push str.c:_buildagentwork1198dd0165ef29c7projects_third_partydutil_fileutil.cpp
call fcn.0040fa20
mov eax, 0x80070057
mov esp, ebp
pop ebp
ret 0x1c
cmp dword [ebp + 8], 0
jne 0x40f138
push 0x80070057
push 0x2af
push str.c:_buildagentwork1198dd0165ef29c7projects_third_partydutil_fileutil.cpp
call fcn.0040fa20
mov eax, 0x80070057
mov esp, ebp
pop ebp
ret 0x1c
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x40f15e
push 0x80070057
push 0x2b0
push str.c:_buildagentwork1198dd0165ef29c7projects_third_partydutil_fileutil.cpp
call fcn.0040fa20
mov eax, 0x80070057
mov esp, ebp
pop ebp
ret 0x1c
xor ecx, ecx
cmp cx, word [eax]
jne 0x40f184
push 0x80070057
push 0x2b1
push str.c:_buildagentwork1198dd0165ef29c7projects_third_partydutil_fileutil.cpp
call fcn.0040fa20
mov eax, 0x80070057
mov esp, ebp
pop ebp
ret 0x1c
push ebx
push esi
push 0
push 0x8000080
push 3
push 0
push 5
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp + 0x10], esi
cmp esi, 0xffffffff
jne 0x40f202
call ebx
movzx esi, ax
mov ecx, eax
or esi, 0x80070000
test eax, eax
jle 0x40f1c2
mov ecx, esi
cmp ecx, 0x80070002
jne 0x40f1d4
pop esi
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
test eax, eax
je 0x40f1ff
cmovle esi, eax
mov eax, 0x80004005
test esi, esi
cmovns esi, eax
push esi
push 0x2bb
push str.c:_buildagentwork1198dd0165ef29c7projects_third_partydutil_fileutil.cpp
call fcn.0040fa20
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov esi, dword [ebp + 0x10]
lea eax, [ebp - 0xc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x40f241
call ebx
mov esi, eax
test esi, esi
jle 0x40f222
movzx esi, si
or esi, 0x80070000
test esi, esi
mov eax, 0x80004005
cmovns esi, eax
push esi
push 0x2c0
push str.c:_buildagentwork1198dd0165ef29c7projects_third_partydutil_fileutil.cpp
call fcn.0040fa20
jmp 0x40f3f3
cmp dword [ebp + 0x14], 0
push edi
je 0x40f29e
mov edi, dword [ebp + 0x18]
xor eax, eax
cmp eax, dword [ebp - 8]
jl 0x40f263
jg 0x40f259
cmp edi, dword [ebp - 0xc]
jbe 0x40f263
mov esi, 0x80070057
jmp 0x40f3f2
push 1
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40f2a0
call ebx
mov esi, eax
test esi, esi
jle 0x40f287
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x40f2a0
push esi
push 0x2ce
push str.c:_buildagentwork1198dd0165ef29c7projects_third_partydutil_fileutil.cpp
call fcn.0040fa20
jmp 0x40f3f2
xor edi, edi
cmp dword [ebp + 0x20], 0
je 0x40f2ca
mov ebx, dword [ebp + 0x1c]
mov esi, dword [ebp + 8]
mov eax, dword [esi]
test eax, eax
je 0x40f31c
test ebx, ebx
jne 0x40f2f0
push eax
call fcn.0040f710
mov eax, dword [ebp + 0xc]
mov dword [esi], ebx
xor esi, esi
mov dword [eax], ebx
jmp 0x40f3f2
mov ecx, dword [ebp - 0xc]
mov ebx, ecx
mov eax, dword [ebp - 8]
sub ebx, edi
sub ecx, edi
sbb eax, 0
xor edx, edx
cmp edx, eax
jg 0x40f2a9
jl 0x40f2e6
cmp dword [ebp + 0x1c], ecx
jae 0x40f2a9
mov esi, 0x8007007a
jmp 0x40f3f2
push 1
push ebx
push eax
call fcn.0040f750
mov ecx, eax
mov dword [ebp + 0x1c], ecx
test ecx, ecx
jne 0x40f357
mov esi, 0x8007000e
push esi
push 0x2ee
push str.c:_buildagentwork1198dd0165ef29c7projects_third_partydutil_fileutil.cpp
call fcn.0040fa20
jmp 0x40f3f2
test ebx, ebx
jne 0x40f32c
mov eax, dword [ebp + 0xc]
xor esi, esi
mov dword [eax], ebx
jmp 0x40f3f2
push 1
push ebx
call fcn.0040f6e0
mov ecx, eax
mov dword [ebp + 0x1c], eax
test ecx, ecx
jne 0x40f357
mov esi, 0x8007000e
push esi
push 0x2fb
push str.c:_buildagentwork1198dd0165ef29c7projects_third_partydutil_fileutil.cpp
call fcn.0040fa20
jmp 0x40f3f2
xor edi, edi
mov dword [ebp - 4], edi
nop dword [eax]
mov eax, ebx
or edx, 0xffffffff
sub eax, edi
cmp ebx, edi
cmovae edx, eax
sbb esi, esi
and esi, 0x80070216
cmp ebx, edi
jb 0x40f3e5
push 0
lea eax, [ebp - 4]
push eax
push edx
lea eax, [edi + ecx]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f3b6
mov eax, dword [ebp - 4]
add edi, eax
mov ecx, dword [ebp + 0x1c]
test eax, eax
jne 0x40f360
cmp edi, ebx
je 0x40f3a7
mov esi, 0x8000ffff
jmp 0x40f3e5
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x1c]
mov dword [ecx], eax
mov eax, dword [ebp + 0xc]
mov dword [eax], ebx
jmp 0x40f3f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40f3cb
movzx esi, si
or esi, 0x80070000
test esi, esi
mov eax, 0x80004005
cmovns esi, eax
push esi
push 0x308
push str.c:_buildagentwork1198dd0165ef29c7projects_third_partydutil_fileutil.cpp
call fcn.0040fa20
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x40f3f2
push eax
call fcn.0040f710
pop edi
mov eax, dword [ebp + 0x10]
cmp eax, 0xffffffff
je 0x40f402
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c