Function at 0x409010
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41ea28
mov eax, dword fs:[0]
push eax
sub esp, 0x294
mov eax, dword [section..data]
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 ebx, dword [ebp + 8]
lea esi, [ebp + 0x10]
mov ecx, 0x96
mov dword [ebp - 0x29c], ebx
lea edi, [ebp - 0x290]
mov byte [ebp - 0x291], 0
rep movsd dword es:[edi], dword [esi]
or edi, 0xffffffff
test ebx, ebx
jne 0x40907a
push str.Cant_write_to_disk_no_protocol_passed_in._n
call fcn.0040b76b
add esp, 4
lea eax, [ebx + 0x57]
jmp 0x40927f
mov ecx, str.ZERO
lea eax, [ebp - 0x240]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4090ab
test dx, dx
je 0x4090a7
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4090ab
add eax, 4
add ecx, 4
test dx, dx
jne 0x409085
xor eax, eax
jmp 0x4090b0
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4090c6
push str.Zeroing_out_area_n
call fcn.0040b76b
add esp, 4
jmp 0x40920b
mov byte [ebp - 0x14], 0
lea eax, [ebp - 0x240]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x34]
call fcn.0040adb0
test eax, eax
jne 0x409117
push dword [ebp - 0x284]
mov eax, dword [ebx + 0x22c]
push dword [ebp - 0x288]
cdq
push edx
push eax
mov byte [ebp - 0x291], 1
call fcn.004159e0
push edx
push eax
push ebx
lea ecx, [ebp - 0x34]
call fcn.0040ae40
mov esi, eax
jmp 0x4091e8
push str._nSparse_image_not_detected____loading_binary_n
call fcn.0040b76b
add esp, 4
lea eax, [ebp - 0x240]
push 0
push 0x80
push 3
push 0
push 7
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x2a0], edi
cmp edi, 0xffffffff
jne 0x40915d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4091e8
lea eax, [ebp - 0x298]
mov dword [ebp - 0x298], 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [ebx + 0x22c]
mov ecx, eax
mov esi, dword [ebp - 0x298]
xor ebx, ebx
mov eax, edi
cdq
add ebx, eax
lea eax, [edi - 1]
not eax
adc esi, edx
add ebx, ecx
cdq
adc esi, 0
sub ebx, 1
sbb esi, 0
and ebx, eax
and esi, edx
mov eax, edi
cdq
push edx
push eax
push esi
push ebx
call fcn.0041d6e0
cmp edx, dword [ebp - 0x274]
jg 0x4091cd
jl 0x4091bf
cmp eax, dword [ebp - 0x278]
ja 0x4091cd
mov dword [ebp - 0x278], eax
mov dword [ebp - 0x274], edx
jmp 0x4091da
push str._nFileSize_is___partition_size__truncating_file_n
call fcn.0040b76b
add esp, 4
mov ebx, dword [ebp - 0x29c]
xor esi, esi
mov edi, dword [ebp - 0x2a0]
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x14], 0
je 0x4091fe
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x40927d
cmp byte [ebp - 0x291], 0
jne 0x40927d
push dword [ebp - 0x274]
push dword [ebp - 0x278]
push dword [ebp - 0x284]
push dword [ebp - 0x288]
push dword [ebp - 0x27c]
push dword [ebp - 0x280]
push str.In_offset:__I64d_out_offset:__I64d_sectors:__I64d_n
call fcn.0040b76b
add esp, 0x1c
mov eax, dword [ebx]
mov ecx, ebx
push dword [ebp - 0x270]
push dword [ebp - 0x274]
push dword [ebp - 0x278]
push dword [ebp - 0x284]
push dword [ebp - 0x288]
push dword [ebx + 0x218]
push dword [ebp - 0x27c]
push dword [ebp - 0x280]
push edi
call dword [eax + 0xc]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
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.0040b4d0
mov esp, ebp
pop ebp
ret 0x260