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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4afcf8
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x4ecba0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x24], ecx
xor edi, edi
mov dword [ebp - 0x14], edi
call fcn.0046d74a
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x45888d
push 0x80004005
call fcn.00402240
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], edi
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], edi
mov byte [ebp - 4], 1
call fcn.004024f0
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x18]
push 0x4b8104
push edx
call fcn.00402d80
mov esi, dword [ebp - 0x18]
add esp, 0xc
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], edi
cmp dword [ebp + 0xc], edi
je 0x458a40
push edi
push ecx
lea eax, [esi - 0x10]
mov dword [ebp - 0x28], esp
mov ebx, esp
push eax
call fcn.00409450
mov ecx, dword [ebp - 0x24]
add eax, 0x10
add esp, 4
mov dword [ebx], eax
call fcn.004583c0
test al, al
je 0x458a40
push edi
push 0x8000000
push 3
push edi
push 3
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x14], edi
cmp edi, 0xffffffff
jne 0x458954
xor bl, bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x3a1
push str.CUSBUtility::vReadFile
push str._s:_d:__INVALID_HANDLE_VALUE_Fail___strReadLogicalAddress__s____dwErrorCode__d
call fcn.0044b650
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x458aa0
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp + 0x10]
lea eax, [ebp - 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x10]
cmp ecx, 0xffffffff
je 0x458a12
test eax, eax
jne 0x458a12
mov eax, dword [ebp - 0x20]
cmp eax, edi
jbe 0x4589a5
push edi
push eax
push esi
push 0x3b5
push str.CUSBUtility::vReadFile
push str._s:_d:_vReadFile:_strReadLogicalAddress__s____dwFileSize__d____dwReadBufferSize__d_
call fcn.0044b650
add esp, 0x18
jmp 0x4589a7
mov edi, ecx
mov eax, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x14]
push 0
lea edx, [ebp - 0x2c]
push edx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp + 0xc]
push 0
lea ecx, [ebp - 0x1c]
push ecx
push edi
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov bl, al
test bl, bl
jne 0x4589f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp - 0x1c]
push eax
push edi
push esi
push 0x3c3
push str.CUSBUtility::vReadFile
push str._s:_d:_vReadFile:_ReadFile_Fail___strReadLogicalAddress__s____dwNumberOfBytesToRead__d____dwRpt__d_s__dwErrorCode__d
call fcn.0044b650
add esp, 0x1c
mov eax, dword [ebp - 0x1c]
cmp eax, edi
je 0x458a2e
push edi
push eax
push esi
push 0x3ca
push str.CUSBUtility::vReadFile
push str._s:_d:_vReadFile:_strReadLogicalAddress__s____dwRpt__d____dwReadBufferSize__d_
jmp 0x458a24
push eax
push ecx
push esi
push 0x3ad
push str.CUSBUtility::vReadFile
push str._s:_d:_vReadFile:_GetFileSize_Fail___strReadLogicalAddress__s____dwGetFileSizeRet__d___dwErrorCode__d
xor bl, bl
call fcn.0044b650
add esp, 0x18
cmp dword [ebp - 0x14], 0
je 0x458aa0
mov edi, dword [ebp - 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x458aa0
mov edx, dword [ebp + 0xc]
push edx
push esi
push 0x398
push str.CUSBUtility::vReadFile
push str._s:_d:__strReadLogicalAddress__s__not_exist_ucpReadBuffer__x__is_NULL
xor bl, bl
call fcn.0044b650
add esp, 0x14
jmp 0x458aa0
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x458ac3
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc