Function at 0x40d340
Capabilities:
Check if file exists
Create directory
Get file attributes
Get file size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4ffd9b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x230
mov eax, dword [0x543fcc]
push ebx
mov dword [esp + 8], ecx
mov ecx, dword [ecx + 0x38]
test ecx, ecx
push esi
mov dword [esp + 0x230], eax
push edi
je 0x40d4b9
push 0
lea eax, [esp + 0x24]
push 0x104
push eax
call fcn.0040e900
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40d3b8
push 0
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x40d4b9
mov ebx, dword [ebp + 8]
xor edi, edi
push edi
push ebx
lea eax, [esp + 0x28]
push eax
push str._s_PerformanceLog__s__05d.log
lea ecx, [esp + 0x138]
push 0x104
push ecx
call fcn.004edc35
add esp, 0x18
push edi
push 0x80
push 3
push edi
push 1
push 0x40000000
lea edx, [esp + 0x140]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40d47d
lea eax, [esp + 0xc]
push eax
push esi
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x40d434
cmp dword [esp + 0x14], 0x3200000
jb 0x40d47d
inc edi
push edi
push ebx
lea ecx, [esp + 0x28]
push ecx
push str._s_PerformanceLog__s__05d.log
lea edx, [esp + 0x138]
push 0x104
push edx
call fcn.004edc35
add esp, 0x18
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
lea eax, [esp + 0x140]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40d403
mov ebx, dword [esp + 0x10]
push ebx
mov dword [esp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [esp + 0x128]
push 0x507acc
push ecx
mov dword [esp + 0x24c], 0
call fcn.004edf80
mov esi, eax
add esp, 8
test esi, esi
jne 0x40d4c0
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
jmp 0x40d5f8
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x40d4cd
push esi
call eax
add esp, 4
push 0x507a18
push esi
call fcn.004ee1db
fld qword [0x5079b0]
mov edi, dword [ebx + 0x34]
fstp qword [esp + 0x20]
mov ecx, dword [edi]
add esp, 8
cmp ecx, edi
mov dword [esp + 0xc], ecx
je 0x40d573
mov edx, dword [ecx + 0x38]
test edx, edx
je 0x40d562
fld qword [ecx + 0x18]
fld qword [0x5079b0]
fucompp
fnstsw ax
test ah, 0x44
jp 0x40d517
fld qword [0x5079b0]
jmp 0x40d52a
mov eax, dword [ecx + 0x34]
fild dword [ecx + 0x34]
test eax, eax
jge 0x40d527
fadd qword [0x507a10]
fdivr qword [ecx + 0x18]
fld qword [esp + 0x18]
push edx
mov edx, dword [ecx + 0x34]
fadd st(1)
push edx
sub esp, 0x20
fstp qword [esp + 0x40]
fld qword [ecx + 0x18]
fstp qword [esp + 0x18]
fld qword [ecx + 0x28]
fstp qword [esp + 0x10]
fld qword [ecx + 0x20]
fstp qword [esp + 8]
fstp qword [esp]
push str.____3.6f______3.6f______3.6f_______8.1f_____10d_____s_n
push esi
call fcn.004ee1db
add esp, 0x30
lea ecx, [esp + 0xc]
call fcn.0040d0e0
mov ecx, dword [esp + 0xc]
cmp ecx, edi
jne 0x40d4f6
fld qword [esp + 0x18]
sub esp, 8
fstp qword [esp]
push str._n_n_Total_AvgTime_:__3.6f_n_n_n
push esi
call fcn.004ee1db
mov eax, dword [ebx + 0x40]
xor edi, edi
add esp, 0x10
cmp eax, edi
je 0x40d59a
push esi
call eax
add esp, 4
push esi
call fcn.004edfdf
mov al, byte [ebp + 0xc]
add esp, 4
test al, al
je 0x40d5ef
mov esi, dword [ebx + 0x34]
mov eax, dword [esi]
cmp eax, esi
mov dword [esp + 0xc], eax
je 0x40d5ef
jmp 0x40d5c0
fld qword [0x5079b0]
lea ecx, [esp + 0xc]
fstp qword [eax + 0x28]
mov dword [eax + 0x34], edi
fld qword [0x5079b0]
fstp qword [eax + 0x20]
fld qword [0x5079b0]
fstp qword [eax + 0x18]
call fcn.0040d0e0
mov eax, dword [esp + 0xc]
cmp eax, esi
jne 0x40d5c0
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
mov ecx, dword [esp + 0x23c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x234]
call fcn.004eee51
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8