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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x509845
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x567e00]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x38], ecx
cmp dword [eax + 0x14], 8
jb 0x48d5bc
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x3c], esi
mov dword [ebp - 4], 0
test esi, esi
je 0x48d77b
cmp esi, 0xffffffff
je 0x48d77b
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0x100000
jae 0x48d759
test ebx, ebx
je 0x48d759
lea edi, [ebx + 0x400]
push edi
call fcn.004c6f7d
add esp, 4
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x48d638
push edi
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x2c]
add esp, 0xc
jmp 0x48d63d
xor eax, eax
mov dword [ebp - 0x2c], eax
mov ecx, 0x400
cmp ebx, ecx
cmovb ecx, ebx
xor edi, edi
mov dword [ebp - 0x34], ecx
test ebx, ebx
je 0x48d67d
push 0
lea edx, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push edx
push ecx
add eax, edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x48d706
add edi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
cmp edi, ebx
jb 0x48d650
mov ebx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
lea edx, [ebx + 2]
mov word [ebp - 0x28], ax
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x48d6a3
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00403a70
push dword [ebp - 0x38]
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push 0x517688
push eax
call fcn.00451ca0
mov edx, dword [ebp - 0x14]
add esp, 0xc
cmp edx, 8
jb 0x48d74c
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x48d742
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x48d742
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x48d71b
movzx edi, di
or edi, 0x80070000
push edi
push str.Failed_read_file:_0x_08x.
push str.kupdate::KDiffVerify::_LoadItemsFromFile
push 0x40
push str.D:_rc_bug_mas_v12_2408Coding_supportwpsupdateUpdateClient_srcprotocolKProcedureImpl.cpp
push 0
call fcn.00412230
mov ebx, dword [ebp - 0x2c]
push ebx
call fcn.004c6f86
add esp, 0x1c
jmp 0x48d7ac
push edx
push ecx
call fcn.004c6f6f
add esp, 8
push ebx
call fcn.004c6f86
add esp, 4
xor edi, edi
jmp 0x48d7b5
push str.File_size_too_long.
push str.kupdate::KDiffVerify::_LoadItemsFromFile
push 0x36
push str.D:_rc_bug_mas_v12_2408Coding_supportwpsupdateUpdateClient_srcprotocolKProcedureImpl.cpp
push 0
call fcn.00412230
add esp, 0x14
mov edi, 0x80004005
jmp 0x48d7ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x48d790
movzx edi, di
or edi, 0x80070000
push edi
push 0x529ca8
push str.kupdate::KDiffVerify::_LoadItemsFromFile
push 0x2f
push str.D:_rc_bug_mas_v12_2408Coding_supportwpsupdateUpdateClient_srcprotocolKProcedureImpl.cpp
push 0
call fcn.00412230
add esp, 0x18
test esi, esi
je 0x48d7bc
cmp esi, 0xffffffff
je 0x48d7bc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004c6f8b
mov esp, ebp
pop ebp
ret