Function at 0x406570
Capabilities:
Get file size

Disassembly:
sub esp, 0x5c
xor eax, eax
mov dword [esp + 0x40], eax
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x44], eax
push ebx
xor ebx, ebx
mov dword [esp + 0x4c], eax
mov eax, dword [edi]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x21], edx
push esi
or esi, 0xffffffff
cmp eax, 0x5cd000e
mov dword [esp + 0x3c], ecx
mov word [esp + 0x29], dx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x40], ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x24], bl
mov byte [esp + 0x2b], dl
jne 0x4066fc
cmp dword [edi + 8], 1
jne 0x4066fc
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x6c]
lea ecx, [esp + 0x14]
push ecx
lea edx, [edi + 0xc]
push edx
push 1
push eax
push edi
call fcn.0040cf70
add esp, 0x18
cmp eax, ebx
mov dword [esp + 8], eax
jne 0x4066e1
cmp dword [esp + 0x14], ebx
jle 0x4066e1
mov ecx, dword [esp + 0x10]
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4066b0
push ebx
push esi
mov dword [esp + 0x20], 1
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea edx, [esp + 0x2c]
push edx
push ebx
push ebx
push esi
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
movzx eax, word [esp + 0x54]
cdq
mov ecx, 0x64
idiv ecx
mov cl, byte [esp + 0x5c]
push esi
mov byte [esp + 0x2c], cl
mov byte [esp + 0x2f], bl
mov byte [esp + 0x28], al
mov al, byte [esp + 0x5e]
mov byte [esp + 0x29], dl
mov dl, byte [esp + 0x5a]
mov byte [esp + 0x2a], dl
mov dl, byte [esp + 0x62]
mov byte [esp + 0x2b], al
mov al, byte [esp + 0x64]
mov byte [esp + 0x2d], dl
mov byte [esp + 0x2e], al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 4
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1c]
lea eax, [esp + 0x24]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], eax
mov dword [esp + 0x40], 8
xor esi, esi
jmp 0x4066e9
mov dword [esp + 8], 0x7d0
mov edx, dword [edi + 8]
lea ecx, [esp + 0x10]
push ecx
push edx
call fcn.0040d090
add esp, 8
jmp 0x406704
mov dword [esp + 8], 0x7d0
lea ecx, [esp + 0x20]
push ecx
lea eax, [esp + 0xc]
mov dword [esp + 0x48], eax
lea edx, [esp + 0x10]
push edx
mov edx, dword [edi + 4]
lea eax, [esp + 0x3c]
push eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x50]
push ecx
mov ecx, dword [edi]
push 4
push edx
push eax
push ecx
mov dword [esp + 0x54], 4
call fcn.0040ce20
add esp, 0x20
mov dword [esp + 8], eax
cmp eax, ebx
mov eax, dword [esp + 0xc]
jne 0x406775
cmp eax, ebx
mov ecx, dword [esp + 0x20]
jne 0x406756
cmp ecx, ebx
jg 0x406775
push 3
push ecx
push eax
call fcn.0040c720
add esp, 0xc
mov dword [esp + 8], eax
cmp eax, ebx
mov eax, dword [esp + 0xc]
je 0x40677a
mov esi, 0x7d3
jmp 0x40677a
mov esi, 0x7d2
cmp eax, ebx
je 0x406787
push eax
call fcn.004143d6
add esp, 4
mov eax, esi
pop esi
pop ebx
add esp, 0x5c
ret