Function at 0x478072
Capabilities:
Get file size

Disassembly:
push 0x4c
mov eax, 0x727837
call fcn.0054dc84
mov ebx, dword [ebp + 8]
cmp byte [ebx + 5], 0
jne 0x4780fe
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x28], ecx
xor esi, esi
push esi
lea ecx, [ebp - 0x28]
push ecx
push eax
push dword [ebx]
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [ebp - 0x2c], eax
jne 0x4780ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4780ca
push str.file_t::seek
lea ecx, [ebp - 0x58]
call fcn.0040182d
mov dword [ebp - 4], esi
call fcn.00477cbc
cmp dword [ebp + 0x18], esi
je 0x4780dd
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push ebx
call fcn.00477e58
jmp 0x4780df
xor eax, eax
cmp eax, dword [ebp + 0x18]
je 0x47862a
push str.file_t::read_do_not_read_enought_data
lea ecx, [ebp - 0x58]
call fcn.0040182d
mov dword [ebp - 4], 1
jmp 0x4780c5
mov eax, dword [ebx + 8]
mov esi, dword [ebp + 0x18]
mov edi, dword [ebp + 0xc]
push 0
cdq
pop ecx
add esi, edi
adc ecx, dword [ebp + 0x10]
mov dword [ebp - 0x2c], eax
push edx
push dword [ebp - 0x2c]
mov eax, esi
add eax, 0xffffffff
mov dword [ebp - 0x18], ecx
adc ecx, 0xffffffff
push ecx
push eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x28], edx
call fcn.006cd970
push dword [ebp - 0x28]
mov dword [ebp - 0x3c], eax
push dword [ebp - 0x2c]
mov dword [ebp - 0x38], edx
push dword [ebp + 0x10]
push edi
call fcn.006cd970
cmp eax, dword [ebp - 0x3c]
jne 0x478297
cmp edx, dword [ebp - 0x38]
jne 0x478297
push dword [ebx + 8]
mov eax, str.file_t::read__
lea esi, [ebp - 0x2c]
call fcn.0045e4ee
mov dword [ebp - 4], 2
push dword [ebp + 0x10]
mov eax, ebx
push edi
call fcn.0047804b
push 0
lea ecx, [ebp - 0x38]
push ecx
push eax
push dword [ebx]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [ebp - 0x3c], eax
jne 0x4781b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4781b5
push str.file_t::seek
lea ecx, [ebp - 0x58]
call fcn.0040182d
mov byte [ebp - 4], 3
jmp 0x4780c5
mov eax, dword [ebx + 8]
test eax, eax
je 0x4781cb
push eax
push dword [ebp - 0x2c]
push ebx
call fcn.00477e58
mov dword [ebp + 8], eax
jmp 0x4781cf
and dword [ebp + 8], 0
mov eax, dword [ebx + 8]
cmp dword [ebp + 8], eax
je 0x47823c
jge 0x478227
lea eax, [ebp - 0x38]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x3c], eax
jne 0x4781fd
lea esi, [ebp - 0x3c]
call fcn.00477fc3
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], edx
jmp 0x478206
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x18], eax
push dword [ebp + 0x10]
mov eax, ebx
push edi
call fcn.0047804b
mov ecx, eax
mov eax, dword [ebp + 8]
mov esi, edx
cdq
add ecx, eax
adc esi, edx
cmp ecx, dword [ebp - 0x1c]
jne 0x478227
cmp esi, dword [ebp - 0x18]
je 0x47823c
mov dword [ebp + 0x1c], str.Disk_Read_Error
push 0x7f3ac8
lea eax, [ebp + 0x1c]
push eax
call fcn.0054d859
cmp byte [ebp + 0x1c], 0
mov eax, dword [ebx + 8]
cdq
je 0x47827d
push edx
push eax
push dword [ebp + 0x10]
push edi
call fcn.006cd9e0
mov esi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
mov edi, eax
add edi, dword [ebp - 0x2c]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x47861a
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
call fcn.0045e6eb
pop ecx
xor al, al
jmp 0x47862c
push dword [ebp + 0x18]
push edx
push eax
push dword [ebp + 0x10]
push edi
call fcn.006cd9e0
add eax, dword [ebp - 0x2c]
push eax
push dword [ebp + 0x14]
jmp 0x478612
mov eax, dword [ebx + 8]
cdq
push edx
push eax
push dword [ebp + 0x10]
mov dword [ebp - 0x2c], eax
push edi
mov dword [ebp - 0x28], edx
call fcn.006cd9e0
push dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
push dword [ebp - 0x2c]
sub ecx, eax
mov eax, dword [ebp - 0x28]
sbb eax, edx
push eax
push ecx
call fcn.006cd9e0
test eax, eax
mov dword [ebp + 0x18], eax
jle 0x478390
push dword [ebx + 8]
mov eax, str.file_t::read__
lea esi, [ebp - 0x2c]
call fcn.0045e4ee
mov dword [ebp - 4], 4
push dword [ebp + 0x10]
mov eax, ebx
push edi
call fcn.0047804b
push 0
lea ecx, [ebp - 0x38]
push ecx
push eax
push dword [ebx]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [ebp - 0x3c], eax
jne 0x47832d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x47832d
push str.file_t::seek
lea ecx, [ebp - 0x58]
call fcn.0040182d
mov byte [ebp - 4], 5
jmp 0x4780c5
mov eax, dword [ebx + 8]
test eax, eax
je 0x478340
push eax
push dword [ebp - 0x2c]
push ebx
call fcn.00477e58
jmp 0x478342
xor eax, eax
mov ecx, dword [ebx + 8]
cmp eax, ecx
jne 0x478227
cmp byte [ebp + 0x1c], 0
mov eax, ecx
cdq
je 0x4783f4
push edx
push eax
push dword [ebp + 0x10]
push edi
call fcn.006cd9e0
mov esi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
mov edi, eax
add edi, dword [ebp - 0x2c]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x478266
mov edi, dword [ebp + 0xc]
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
call fcn.0045e6eb
mov esi, dword [ebp - 0x1c]
pop ecx
push dword [ebp - 0x18]
mov eax, ebx
push esi
call fcn.0047804b
sub eax, edi
sub eax, dword [ebp + 0x18]
test eax, eax
mov dword [ebp + 8], eax
jle 0x4784d4
mov eax, dword [ebp + 0x18]
cdq
push 0
add eax, edi
adc edx, dword [ebp + 0x10]
lea ecx, [ebp - 0x38]
push ecx
push eax
push dword [ebx]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [ebp - 0x3c], eax
jne 0x478416
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x478416
push str.file_t::seek
lea ecx, [ebp - 0x58]
call fcn.0040182d
mov dword [ebp - 4], 6
jmp 0x4780c5
push dword [ebp + 0x18]
push edx
push eax
push dword [ebp + 0x10]
push edi
call fcn.006cd9e0
add eax, dword [ebp - 0x2c]
push eax
push dword [ebp + 0x14]
call fcn.0054d050
add esp, 0xc
jmp 0x47837d
cmp byte [ebp + 0x1c], 0
jne 0x478452
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x18]
add eax, ecx
mov ecx, dword [ebx + 8]
dec ecx
not ecx
and ecx, eax
cmp eax, ecx
jne 0x478452
cmp dword [ebp + 8], 0
je 0x478442
push dword [ebp + 8]
push eax
push ebx
call fcn.00477e58
jmp 0x478444
xor eax, eax
cmp eax, dword [ebp + 8]
je 0x4784d4
jmp 0x478227
push dword [ebp + 8]
mov eax, str.file_t::read__
lea esi, [ebp - 0x3c]
call fcn.0045e4ee
mov esi, dword [ebp + 8]
test esi, esi
mov dword [ebp - 4], 7
je 0x47847c
push esi
push dword [ebp - 0x3c]
push ebx
call fcn.00477e58
jmp 0x47847e
xor eax, eax
cmp eax, esi
jne 0x478227
cmp byte [ebp + 0x1c], 0
mov eax, dword [ebp + 0x18]
je 0x4784af
mov edx, dword [ebp + 0x14]
mov edi, dword [ebp - 0x3c]
mov ecx, esi
lea esi, [eax + edx]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4784c1
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x38]
jmp 0x478270
mov ecx, dword [ebp + 0x14]
push esi
push dword [ebp - 0x3c]
add eax, ecx
push eax
call fcn.0054d050
add esp, 0xc
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x38]
call fcn.0045e6eb
mov esi, dword [ebp - 0x1c]
pop ecx
mov edi, dword [ebx + 8]
mov eax, edi
cdq
push edx
push eax
push dword [ebp - 0x18]
push esi
call fcn.006cd9e0
test edx, edx
ja 0x4784f1
test eax, eax
jbe 0x47862a
push edi
mov eax, str.file_t::read__
lea esi, [ebp - 0x2c]
call fcn.0045e4ee
push dword [ebp - 0x18]
mov eax, ebx
push dword [ebp - 0x1c]
mov dword [ebp - 4], 8
call fcn.0047804b
push 0
lea ecx, [ebp + 0x10]
push ecx
push eax
push dword [ebx]
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
jne 0x478550
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x478550
push str.file_t::seek
lea ecx, [ebp - 0x58]
call fcn.0040182d
mov byte [ebp - 4], 9
jmp 0x4780c5
mov eax, dword [ebx + 8]
test eax, eax
je 0x478566
push eax
push dword [ebp - 0x2c]
push ebx
call fcn.00477e58
mov dword [ebp + 0x10], eax
jmp 0x47856a
and dword [ebp + 0x10], 0
mov eax, dword [ebx + 8]
cmp dword [ebp + 0x10], eax
je 0x4785d5
jge 0x4785c1
lea eax, [ebp - 0x38]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x3c], eax
jne 0x478597
lea esi, [ebp - 0x3c]
call fcn.00477fc3
mov edi, eax
mov dword [ebp - 0x38], edx
jmp 0x47859f
mov edi, eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x38], eax
push dword [ebp - 0x18]
mov eax, ebx
push dword [ebp - 0x1c]
call fcn.0047804b
mov ecx, eax
mov eax, dword [ebp + 0x10]
mov esi, edx
cdq
add ecx, eax
adc esi, edx
cmp ecx, edi
jne 0x4785c1
cmp esi, dword [ebp - 0x38]
je 0x4785d5
mov dword [ebp + 0x14], str.Disk_Read_Error
push 0x7f3ac8
lea eax, [ebp + 0x14]
jmp 0x478236
mov eax, dword [ebx + 8]
cdq
push edx
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call fcn.006cd9e0
cmp byte [ebp + 0x1c], 0
je 0x478602
mov edx, dword [ebp + 0x18]
mov edi, dword [ebp - 0x2c]
mov ecx, eax
mov eax, dword [ebp + 8]
lea esi, [eax + edx]
add esi, dword [ebp + 0x14]
jmp 0x47825c
mov ecx, dword [ebp + 0x18]
push eax
mov eax, dword [ebp + 8]
push dword [ebp - 0x2c]
add eax, ecx
add eax, dword [ebp + 0x14]
push eax
call fcn.0054d050
add esp, 0xc
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
call fcn.0045e6eb
pop ecx
mov al, 1
call fcn.0054dd5c
ret 0x18