Function at 0x478634
Capabilities:
Get file size

Disassembly:
push 0x6c
mov eax, 0x7277cc
call fcn.0054dc84
cmp byte [edi + 5], 0
push 0
jne 0x4786b4
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
push dword [edi]
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [ebp - 0x24], eax
jne 0x478689
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x478689
push str.file_t::seek
lea ecx, [ebp - 0x5c]
call fcn.0040182d
and dword [ebp - 4], 0
call fcn.00477cbc
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push edi
call fcn.00477ea4
cmp eax, dword [ebp + 0x14]
je 0x478d31
push str.file_t::write_do_not_write_enought_data
lea ecx, [ebp - 0x5c]
call fcn.0040182d
mov dword [ebp - 4], 1
jmp 0x478684
mov eax, dword [edi + 8]
mov esi, dword [ebp + 0x14]
add esi, dword [ebp + 8]
cdq
pop ecx
adc ecx, dword [ebp + 0xc]
mov ebx, eax
push edx
mov eax, esi
add eax, 0xffffffff
mov dword [ebp - 0x18], ecx
push ebx
adc ecx, 0xffffffff
push ecx
push eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x30], edx
call fcn.006cd970
push dword [ebp - 0x30]
mov dword [ebp - 0x24], eax
push ebx
push dword [ebp + 0xc]
mov dword [ebp - 0x20], edx
push dword [ebp + 8]
call fcn.006cd970
cmp eax, dword [ebp - 0x24]
jne 0x4788b9
cmp edx, dword [ebp - 0x20]
jne 0x4788b9
push dword [edi + 8]
mov eax, str.file_t::write__
lea esi, [ebp - 0x34]
call fcn.0045e4ee
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 4], 2
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x24], eax
jne 0x47873c
lea esi, [ebp - 0x24]
call fcn.00477fc3
mov ebx, edx
jmp 0x47873f
mov ebx, dword [ebp - 0x20]
push dword [ebp + 0xc]
mov esi, eax
push dword [ebp + 8]
mov eax, edi
call fcn.0047804b
cmp ebx, edx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
jb 0x478835
ja 0x478766
cmp esi, eax
jbe 0x478835
push dword [ebp + 0xc]
mov eax, edi
push dword [ebp + 8]
call fcn.0047804b
push 0
lea ecx, [ebp - 0x20]
push ecx
push eax
push dword [edi]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edx
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 0x24], eax
jne 0x4787ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4787ac
push str.file_t::seek
lea ecx, [ebp - 0x5c]
call fcn.0040182d
mov byte [ebp - 4], 3
jmp 0x478684
mov eax, dword [edi + 8]
test eax, eax
je 0x4787c2
push eax
push dword [ebp - 0x34]
push edi
call fcn.00477e58
mov dword [ebp - 0x14], eax
jmp 0x4787c6
and dword [ebp - 0x14], 0
mov eax, dword [edi + 8]
cmp dword [ebp - 0x14], eax
je 0x478835
jge 0x478820
lea eax, [ebp - 0x20]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x24], eax
jne 0x4787f4
lea esi, [ebp - 0x24]
call fcn.00477fc3
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], edx
jmp 0x4787fd
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x18], eax
push dword [ebp + 0xc]
mov eax, edi
push dword [ebp + 8]
call fcn.0047804b
mov ecx, eax
mov eax, dword [ebp - 0x14]
mov esi, edx
cdq
add ecx, eax
adc esi, edx
cmp ecx, dword [ebp - 0x1c]
jne 0x478820
cmp esi, dword [ebp - 0x18]
je 0x478835
push 0x7f3ac8
lea eax, [ebp + 0x10]
push eax
mov dword [ebp + 0x10], str.Disk_Write_Error
call fcn.0054d859
push dword [ebp + 0x14]
mov eax, dword [edi + 8]
push dword [ebp + 0x10]
cdq
push edx
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.006cd9e0
add eax, dword [ebp - 0x34]
push eax
call fcn.0054d050
add esp, 0xc
push dword [ebp + 0xc]
mov eax, edi
push dword [ebp + 8]
call fcn.0047804b
push 0
lea ecx, [ebp + 0xc]
push ecx
push eax
push dword [edi]
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], edx
call ebx
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x47889e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x47889e
push str.file_t::seek
lea ecx, [ebp - 0x5c]
call fcn.0040182d
mov byte [ebp - 4], 4
jmp 0x478684
push dword [edi + 8]
push dword [ebp - 0x34]
push edi
call fcn.00477ea4
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x34]
mov ecx, dword [ebp - 0x30]
jmp 0x478d2b
mov eax, dword [edi + 8]
cdq
push edx
mov ebx, eax
push ebx
push dword [ebp + 0xc]
mov dword [ebp - 0x30], edx
push dword [ebp + 8]
call fcn.006cd9e0
push dword [ebp - 0x30]
mov ecx, ebx
sub ecx, eax
mov eax, dword [ebp - 0x30]
push ebx
sbb eax, edx
push eax
push ecx
call fcn.006cd9e0
test eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x14], eax
jle 0x478a9f
push dword [edi + 8]
mov eax, str.file_t::write__
lea esi, [ebp - 0x40]
call fcn.0045e4ee
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 4], 5
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x24], eax
jne 0x47892b
lea esi, [ebp - 0x24]
call fcn.00477fc3
mov esi, edx
jmp 0x47892e
mov esi, dword [ebp - 0x20]
push dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
push dword [ebp + 8]
mov eax, edi
call fcn.0047804b
cmp esi, edx
jb 0x478a17
ja 0x478951
cmp dword [ebp - 0x34], eax
jbe 0x478a17
push dword [ebp + 0xc]
mov eax, edi
push dword [ebp + 8]
call fcn.0047804b
push 0
lea ecx, [ebp - 0x20]
push ecx
push eax
push dword [edi]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edx
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 0x24], eax
jne 0x478997
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x478997
push str.file_t::seek
lea ecx, [ebp - 0x5c]
call fcn.0040182d
mov byte [ebp - 4], 6
jmp 0x478684
mov eax, dword [edi + 8]
test eax, eax
je 0x4789ad
push eax
push dword [ebp - 0x40]
push edi
call fcn.00477e58
mov dword [ebp + 0x14], eax
jmp 0x4789b1
and dword [ebp + 0x14], 0
mov eax, dword [edi + 8]
cmp dword [ebp + 0x14], eax
je 0x478a17
jge 0x478820
lea eax, [ebp - 0x30]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x34], eax
jne 0x4789e3
lea esi, [ebp - 0x34]
call fcn.00477fc3
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edx
jmp 0x4789ec
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x20], eax
push dword [ebp + 0xc]
mov eax, edi
push dword [ebp + 8]
call fcn.0047804b
mov ecx, eax
mov eax, dword [ebp + 0x14]
mov esi, edx
cdq
add ecx, eax
adc esi, edx
cmp ecx, dword [ebp - 0x24]
jne 0x478820
cmp esi, dword [ebp - 0x20]
jne 0x478820
push dword [ebp - 0x14]
mov eax, dword [edi + 8]
push dword [ebp + 0x10]
cdq
push edx
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.006cd9e0
add eax, dword [ebp - 0x40]
push eax
call fcn.0054d050
add esp, 0xc
push dword [ebp + 0xc]
mov eax, edi
push dword [ebp + 8]
call fcn.0047804b
push 0
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [edi]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], edx
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 0x34], eax
jne 0x478a80
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x478a80
push str.file_t::seek
lea ecx, [ebp - 0x5c]
call fcn.0040182d
mov byte [ebp - 4], 7
jmp 0x478684
push dword [edi + 8]
push dword [ebp - 0x40]
push edi
call fcn.00477ea4
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
call fcn.0045e6eb
mov esi, dword [ebp - 0x1c]
pop ecx
push dword [ebp - 0x18]
mov eax, edi
push esi
call fcn.0047804b
sub eax, dword [ebp + 8]
sub eax, dword [ebp - 0x14]
test eax, eax
mov dword [ebp + 0x14], eax
jle 0x478b68
mov eax, dword [ebp - 0x14]
cdq
add eax, dword [ebp + 8]
push 0
adc edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [edi]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], edx
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 0x34], eax
jne 0x478b01
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x478b01
push str.file_t::seek
lea ecx, [ebp - 0x5c]
call fcn.0040182d
mov dword [ebp - 4], 8
jmp 0x478684
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x14]
push dword [ebp + 0x14]
add eax, ecx
mov ecx, dword [edi + 8]
dec ecx
not ecx
and ecx, eax
cmp eax, ecx
mov dword [ebp + 0xc], eax
jne 0x478b24
push eax
push edi
call fcn.00477ea4
jmp 0x478b68
mov eax, str.file_t::write__
lea esi, [ebp - 0x40]
call fcn.0045e4ee
push dword [ebp + 0x14]
mov dword [ebp - 4], 9
push dword [ebp + 0xc]
push dword [ebp - 0x40]
call fcn.0054d050
add esp, 0xc
push dword [ebp + 0x14]
push dword [ebp - 0x40]
push edi
call fcn.00477ea4
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
call fcn.0045e6eb
mov esi, dword [ebp - 0x1c]
pop ecx
mov eax, dword [edi + 8]
cdq
push edx
push eax
push dword [ebp - 0x18]
push esi
call fcn.006cd9e0
test edx, edx
ja 0x478b83
test eax, eax
jbe 0x478d31
push dword [edi + 8]
mov eax, str.file_t::write__
lea esi, [ebp - 0x40]
call fcn.0045e4ee
lea eax, [ebp + 0xc]
push eax
mov dword [ebp - 4], 0xa
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x478bba
lea esi, [ebp + 8]
call fcn.00477fc3
mov esi, edx
jmp 0x478bbd
mov esi, dword [ebp + 0xc]
push dword [ebp - 0x18]
mov dword [ebp - 0x34], eax
push dword [ebp - 0x1c]
mov eax, edi
call fcn.0047804b
cmp esi, edx
jb 0x478ca6
ja 0x478be0
cmp dword [ebp - 0x34], eax
jbe 0x478ca6
push dword [ebp - 0x18]
mov eax, edi
push dword [ebp - 0x1c]
call fcn.0047804b
push 0
lea ecx, [ebp + 0xc]
push ecx
push eax
push dword [edi]
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], edx
call ebx
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x478c26
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x478c26
push str.file_t::seek
lea ecx, [ebp - 0x5c]
call fcn.0040182d
mov byte [ebp - 4], 0xb
jmp 0x478684
mov eax, dword [edi + 8]
test eax, eax
je 0x478c3c
push eax
push dword [ebp - 0x40]
push edi
call fcn.00477e58
mov dword [ebp + 0xc], eax
jmp 0x478c40
and dword [ebp + 0xc], 0
mov eax, dword [edi + 8]
cmp dword [ebp + 0xc], eax
je 0x478ca6
jge 0x478820
lea eax, [ebp - 0x30]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x34], eax
jne 0x478c72
lea esi, [ebp - 0x34]
call fcn.00477fc3
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edx
jmp 0x478c7b
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x20], eax
push dword [ebp - 0x18]
mov eax, edi
push dword [ebp - 0x1c]
call fcn.0047804b
mov ecx, eax
mov eax, dword [ebp + 0xc]
mov esi, edx
cdq
add ecx, eax
adc esi, edx
cmp ecx, dword [ebp - 0x24]
jne 0x478820
cmp esi, dword [ebp - 0x20]
jne 0x478820
mov eax, dword [edi + 8]
cdq
push edx
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call fcn.006cd9e0
mov ecx, dword [ebp - 0x14]
push eax
mov eax, dword [ebp + 0x14]
add eax, ecx
add eax, dword [ebp + 0x10]
push eax
push dword [ebp - 0x40]
call fcn.0054d050
add esp, 0xc
push dword [ebp - 0x18]
mov eax, edi
push dword [ebp - 0x1c]
call fcn.0047804b
push 0
lea ecx, [ebp + 0xc]
push ecx
push eax
push dword [edi]
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], edx
call ebx
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x478d15
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x478d15
push str.file_t::seek
lea ecx, [ebp - 0x78]
call fcn.0040182d
mov byte [ebp - 4], 0xc
jmp 0x478684
push dword [edi + 8]
push dword [ebp - 0x40]
push edi
call fcn.00477ea4
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
call fcn.0045e6eb
pop ecx
mov al, 1
call fcn.0054dd5c
ret 0x10