Function at 0x4020f0
Capabilities:
Get file size

Disassembly:
push 0xffffffffffffffff
push 0x40aad0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x10], ecx
mov ebx, dword [esp + 0x50]
mov dword [esp + 0x40], 0
test ebx, ebx
je 0x402173
mov eax, dword [0x40f020]
cmp eax, 0xffffffff
jne 0x40225d
call sub.MFC42u.DLL_AfxGetThread
test eax, eax
je 0x402140
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
jmp 0x402142
xor eax, eax
mov ecx, dword [esp + 0x4c]
push 4
push ecx
push 0x40f0c0
mov ecx, eax
call sub.MFC42u.DLL_CWnd::MessageBoxW
cmp eax, 7
jne 0x402169
mov dword [0x40f020], 0
jmp 0x402265
mov dword [0x40f020], 1
mov eax, dword [esp + 0x4c]
push 0
push 0x2000000
push 3
push 0
push 1
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40256f
push 0x220
call sub.MFC42u.DLL_operatornew
mov esi, eax
mov ecx, 0x88
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x50]
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 0xc
lea edx, [esi + 0x210]
lea eax, [esi + 0x208]
mov dword [esi + 0x21c], ebx
push edx
push 0
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileTime]
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebp
mov dword [esi + 0x218], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x50], esi
mov esi, dword [esp + 0x48]
mov edi, dword [esi + 8]
mov eax, dword [esi + 4]
cmp edi, eax
je 0x402222
mov ecx, dword [esp + 0x50]
mov eax, dword [edi - 4]
push ecx
push eax
call fcn.00409ac0
add esp, 8
test eax, eax
jl 0x402222
mov eax, dword [esi + 4]
add edi, 0xfffffffc
cmp edi, eax
jne 0x402203
mov eax, dword [esi + 8]
mov edx, dword [esi + 0xc]
sub edx, eax
sar edx, 2
cmp edx, 1
jae 0x4024e3
mov edx, dword [esi + 4]
test edx, edx
je 0x402249
mov ecx, eax
sub ecx, edx
sar ecx, 2
cmp ecx, 1
ja 0x40224e
mov ecx, 1
test edx, edx
jne 0x402447
xor eax, eax
jmp 0x40244c
test eax, eax
jne 0x402173
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CFileFind::CFileFind
lea edx, [esp + 0x4c]
push 0x40f0b4
lea eax, [esp + 0x54]
push edx
push eax
mov byte [esp + 0x4c], 1
call sub.MFC42u.DLL_operator
mov eax, dword [eax]
push 0
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x48], 2
call sub.MFC42u.DLL_CFileFind::FindFile
test eax, eax
lea ecx, [esp + 0x50]
mov byte [esp + 0x40], 1
sete bl
call fcn.0040a3e8
test bl, bl
jne 0x402434
mov ebp, dword [esp + 0x48]
mov ebx, dword [sym.imp.MSVCRT.dll_wcscpy]
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CFileFind::FindNextFileW
lea ecx, [esp + 0x48]
mov dword [esp + 0x18], eax
push ecx
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CFileFind::GetFileName
mov edx, dword [esp + 0x48]
mov esi, dword [sym.imp.MSVCRT.dll_wcscmp]
push 0x40f0b0
push edx
mov byte [esp + 0x48], 3
call esi
add esp, 8
test eax, eax
je 0x40240b
mov eax, dword [esp + 0x48]
push 0x40f0a8
push eax
call esi
add esp, 8
test eax, eax
je 0x40240b
mov edx, dword [esp + 0x1c]
push 0x10
lea ecx, [esp + 0x20]
call dword [edx + 0x40]
cmp eax, 1
jne 0x402353
mov eax, dword [esp + 0x1c]
push 0x10
lea ecx, [esp + 0x20]
call dword [eax + 0x40]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x58], esp
push ecx
lea ecx, [esp + 0x28]
call sub.MFC42u.DLL_CFileFind::GetFilePath
mov ecx, dword [esp + 0x18]
push ebp
call fcn.004020f0
jmp 0x40240b
push 0x220
call sub.MFC42u.DLL_operatornew
mov esi, eax
mov ecx, 0x88
xor eax, eax
mov edi, esi
add esp, 4
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
push edx
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CFileFind::GetFilePath
mov eax, dword [eax]
push eax
push esi
call ebx
add esp, 8
lea ecx, [esp + 0x14]
call fcn.0040a3e8
mov eax, dword [esp + 0x1c]
push 0x10
lea ecx, [esp + 0x20]
call dword [eax + 0x40]
lea ecx, [esp + 0x1c]
mov dword [esi + 0x21c], eax
call sub.MFC42u.DLL_CFileFind::GetLength
lea ecx, [esi + 0x208]
mov dword [esi + 0x218], eax
push ecx
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CFileFind::GetCreationTime
lea edx, [esi + 0x210]
lea ecx, [esp + 0x1c]
push edx
call sub.MFC42u.DLL_CFileFind::GetLastWriteTime
mov eax, dword [ebp + 4]
mov dword [esp + 0x50], esi
mov esi, dword [ebp + 8]
cmp esi, eax
je 0x4023fc
mov ecx, dword [esp + 0x50]
mov eax, dword [esi - 4]
push ecx
push eax
call fcn.00409ac0
add esp, 8
test eax, eax
jl 0x4023fc
mov eax, dword [ebp + 4]
add esi, 0xfffffffc
cmp esi, eax
jne 0x4023dd
lea edx, [esp + 0x50]
mov ecx, ebp
push edx
push 1
push esi
call fcn.00408670
mov eax, dword [esp + 0x18]
mov byte [esp + 0x40], 1
test eax, eax
lea ecx, [esp + 0x48]
je 0x402426
call fcn.0040a3e8
jmp 0x4022bf
call fcn.0040a3e8
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CFileFind::Close
lea ecx, [esp + 0x1c]
mov byte [esp + 0x40], 0
call fcn.0040a544
jmp 0x40256f
sub eax, edx
sar eax, 2
add eax, ecx
test eax, eax
mov dword [esp + 0x18], eax
jge 0x402458
xor eax, eax
shl eax, 2
push eax
call sub.MFC42u.DLL_operatornew
mov ebx, dword [esi + 4]
add esp, 4
cmp ebx, edi
mov dword [esp + 0x48], eax
mov ebp, eax
je 0x402485
push ebx
push ebp
call fcn.004094e0
add ebx, 4
add esp, 8
add ebp, 4
cmp ebx, edi
jne 0x402471
lea ecx, [esp + 0x50]
push ecx
push 1
push ebp
mov ecx, esi
call fcn.00409010
mov edx, dword [esi + 8]
add ebp, 4
push ebp
push edx
push edi
mov ecx, esi
call fcn.00408fe0
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push eax
push ecx
mov ecx, esi
call fcn.00408880
mov eax, dword [esi + 4]
push eax
call sub.MFC42u.DLL_operatordelete
mov edi, dword [esp + 0x4c]
mov edx, dword [esp + 0x1c]
add esp, 4
mov ecx, esi
lea eax, [edi + edx*4]
mov dword [esi + 0xc], eax
call fcn.00408fc0
lea ecx, [edi + eax*4 + 4]
mov dword [esi + 4], edi
mov dword [esi + 8], ecx
jmp 0x40256f
mov edx, eax
sub edx, edi
sar edx, 2
cmp edx, 1
jae 0x402531
lea ecx, [edi + 4]
push ecx
push eax
push edi
mov ecx, esi
call fcn.00408fe0
mov eax, dword [esi + 8]
lea edx, [esp + 0x50]
mov ecx, eax
push edx
sub ecx, edi
mov edx, 1
sar ecx, 2
sub edx, ecx
mov ecx, esi
push edx
push eax
call fcn.00409010
mov eax, dword [esi + 8]
cmp edi, eax
je 0x40256b
mov ecx, dword [esp + 0x50]
mov dword [edi], ecx
add edi, 4
cmp edi, eax
jne 0x402522
jmp 0x40256b
push eax
push eax
add eax, 0xfffffffc
mov ecx, esi
push eax
call fcn.00408fe0
mov ecx, dword [esi + 8]
lea eax, [ecx - 4]
cmp edi, eax
je 0x402557
mov edx, dword [eax - 4]
sub eax, 4
sub ecx, 4
cmp eax, edi
mov dword [ecx], edx
jne 0x402548
lea eax, [edi + 4]
cmp edi, eax
je 0x40256b
mov ecx, dword [esp + 0x50]
mov dword [edi], ecx
add edi, 4
cmp edi, eax
jne 0x40255e
add dword [esi + 8], 4
lea ecx, [esp + 0x4c]
mov dword [esp + 0x40], 0xffffffff
call fcn.0040a3e8
mov ecx, dword [esp + 0x38]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x34
ret 0xc