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

Disassembly:
push 0x2c
mov eax, 0x4a1e5e
call fcn.0048109c
mov edi, ecx
lea eax, [ebp - 0x1c]
push eax
push edi
call fcn.0040bb1d
xor eax, eax
push eax
push 0x80
push 3
push eax
push 1
push Ordinal_1
mov dword [ebp - 4], eax
push dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x10], esi
cmp esi, 0xffffffff
jne 0x40bdaa
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x4d4770]
push eax
push str._ERROR___d___read_download_info__open_file_failed_
call fcn.00414401
pop ecx
pop ecx
jmp 0x40bf19
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x40bdca
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push str._ERROR___d___read_download_info__get_file_size_failed_
jmp 0x40befd
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0xfffffffffffffffc
pop eax
push 2
lea edx, [ebp - 0x30]
push edx
or ecx, 0xffffffff
push ecx
push eax
push esi
call ebx
test eax, eax
jne 0x40bdf6
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push str._ERROR___d___read_download_info__set_base_down_info_pointer_failed_
jmp 0x40befd
and dword [ebp - 0x18], 0
push 0
lea eax, [ebp - 0x18]
push eax
push 4
lea esi, [edi + 0x5c]
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40bef1
cmp dword [ebp - 0x18], 4
jne 0x40bef1
mov esi, dword [esi]
test esi, esi
je 0x40bf0a
cmp esi, 0x3f
ja 0x40bf0a
test esi, esi
jle 0x40be3f
call fcn.0040a26a
jmp 0x40be41
xor eax, eax
test eax, eax
je 0x40bf0a
call fcn.0040aba6
test eax, eax
je 0x40bf0a
mov ecx, dword [edi + 0x50]
imul ecx, ecx, 0x18
push 0xfffffffffffffffc
pop eax
push 2
sub eax, ecx
cdq
lea ecx, [ebp - 0x38]
push ecx
push edx
push eax
push dword [ebp - 0x10]
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
test eax, eax
jne 0x40be8e
call esi
mov ecx, dword [0x4d4770]
push eax
push str._ERROR___d___read_download_info__set_info_pointer_failed_
call fcn.00414401
pop ecx
pop ecx
xor ebx, ebx
push ebx
lea eax, [ebp - 0x14]
push eax
mov eax, dword [edi + 0x50]
imul eax, eax, 0x18
push eax
push dword [edi + 0x60]
mov dword [ebp - 0x14], ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40bec3
mov eax, dword [edi + 0x50]
imul eax, eax, 0x18
cmp dword [ebp - 0x14], eax
jne 0x40bec3
mov dword [ebp - 0x20], 1
jmp 0x40bf0a
push dword [ebp - 0x14]
call esi
mov ecx, dword [0x4d4770]
push eax
push str._ERROR___d___read_download_info__read_info_failed__read_size__d_
call fcn.00414401
mov eax, dword [edi + 0x50]
imul eax, eax, 0x18
add esp, 0xc
push eax
push ebx
push dword [edi + 0x60]
call fcn.004805d0
add esp, 0xc
jmp 0x40bf0a
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push str._ERROR___d___read_download_info__read_base_down_info_failed_
mov ecx, dword [0x4d4770]
call fcn.00414401
pop ecx
pop ecx
cmp dword [ebp - 0x10], 0
je 0x40bf19
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.00402a23
mov eax, dword [ebp - 0x20]
call fcn.00481174
ret