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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4efb50
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x52a6ec]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push esi
push edi
mov eax, dword [0x52a6ec]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0x2c], eax
cmp esi, ebx
je 0x4bf968
cmp byte [esi], bl
je 0x4bf968
cmp eax, ebx
je 0x4bf968
cmp dword [eax + 0x14], 0x10
mov dword [eax + 0x10], ebx
jb 0x4bf7a5
mov eax, dword [eax]
mov byte [eax], bl
xor eax, eax
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], ebx
mov word [esp + 0x34], ax
mov eax, esi
mov dword [esp + 0x60], ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4bf7c3
lea ecx, [esp + 0x34]
push ecx
sub eax, edx
mov ecx, esi
call fcn.004ba980
mov eax, dword [esp + 0x38]
add esp, 4
cmp dword [esp + 0x48], 8
jae 0x4bf7ea
lea eax, [esp + 0x34]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4bf957
lea edx, [esp + 0x24]
push edx
push edi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4bf861
mov dword [esp + 0x10], 2
mov dword [esp + 0x14], str.p:p_agentshpam2.eem_recipes499894881_base_branchesgoopy2_release_branchgoogleclientimegoopy_third_partygoogle_gadgets_for_linuxggadget_system_utils.cc
mov dword [esp + 0x18], 0x11d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Error_when_getting_file_size__s:__d
lea esi, [esp + 0x1c]
call fcn.004b97d0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4bf957
mov eax, dword [esp + 0x24]
cmp dword [esp + 0x28], ebx
jl 0x4bf899
jg 0x4bf874
cmp eax, 0x1400000
jbe 0x4bf899
push esi
push 0x1400000
mov dword [esp + 0x18], 2
mov dword [esp + 0x1c], str.p:p_agentshpam2.eem_recipes499894881_base_branchesgoopy2_release_branchgoogleclientimegoopy_third_partygoogle_gadgets_for_linuxggadget_system_utils.cc
mov dword [esp + 0x20], 0x122
push str.File_is_too_big____d__:__s
jmp 0x4bf849
push eax
mov dword [esp + 0x20], eax
call fcn.004c83da
mov ebx, eax
add esp, 4
mov dword [esp + 0x30], ebx
mov ecx, dword [esp + 0x1c]
push 0
lea eax, [esp + 0x24]
push eax
push ecx
push ebx
mov byte [esp + 0x70], 1
push edi
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4bf911
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x1c]
jne 0x4bf911
mov ecx, dword [esp + 0x2c]
push eax
mov eax, ebx
call fcn.00408960
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
mov byte [esp + 0x64], 0
call fcn.004c9b0b
add esp, 4
lea esi, [esp + 0x34]
mov dword [esp + 0x60], 0xffffffff
call fcn.00438d50
mov al, 1
jmp 0x4bf96a
mov dword [esp + 0x10], 2
mov dword [esp + 0x14], str.p:p_agentshpam2.eem_recipes499894881_base_branchesgoopy2_release_branchgoogleclientimegoopy_third_partygoogle_gadgets_for_linuxggadget_system_utils.cc
mov dword [esp + 0x18], 0x12b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Error_when_loading_file__s:__d
lea esi, [esp + 0x1c]
call fcn.004b97d0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
mov byte [esp + 0x64], 0
call fcn.004c9b0b
add esp, 4
lea esi, [esp + 0x34]
mov dword [esp + 0x60], 0xffffffff
call fcn.00438d50
xor al, al
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.004c9392
mov esp, ebp
pop ebp
ret