Function at 0x402c10
Capabilities:
Check if file exists
Get file size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43d621
mov eax, dword fs:[0]
push eax
sub esp, 0xae0
mov eax, dword [0x44bfcc]
xor eax, esp
mov dword [esp + 0xad8], eax
push ebx
push esi
push edi
mov eax, dword [0x44bfcc]
xor eax, esp
push eax
lea eax, [esp + 0xaf0]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], eax
xor eax, eax
mov word [esp + 0xcc], ax
mov dword [esp + 0xd6], eax
mov word [esp + 0xda], ax
mov eax, dword [edi + 0x834]
xorps xmm0, xmm0
movq qword [esp + 0xce], xmm0
test eax, eax
je 0x402c91
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea esi, [edi + 0x21c]
mov ecx, esi
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402ca0
sub ecx, edx
sar ecx, 1
je 0x402ce6
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x402ce6
push esi
mov ecx, edi
call fcn.00403110
test al, al
jne 0x402ce6
mov eax, dword [edi + 0x834]
test eax, eax
je 0x402fbf
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x402fbf
mov ecx, esi
lea edx, [ecx + 2]
jmp 0x402cf0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402cf0
lea eax, [edi + 0x424]
sub ecx, edx
sar ecx, 1
push eax
lea eax, [esp + 0xe0]
jne 0x402d1f
push 0x104
push eax
call fcn.0042284e
add esp, 0xc
jmp 0x402d2e
push esi
push str._s_s
push eax
call fcn.00406c60
add esp, 0x10
lea eax, [esp + 0xdc]
push eax
xor bl, bl
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x402da5
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
lea eax, [esp + 0xf4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x402da5
lea eax, [esp + 0xc8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
je 0x402d8b
cmp eax, dword [edi + 0xc]
movzx ebx, bl
mov ecx, 1
cmovg ebx, ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x402da5
lea eax, [esp + 0xdc]
push eax
mov ecx, edi
call fcn.00403250
push 0x445440
push 0
call fcn.00422e5b
add esp, 4
lea ecx, [esp + 0x20]
call fcn.00403060
sub esp, 0xc
lea eax, [esp + 0xe8]
push eax
lea ecx, [esp + 0x2c]
call fcn.004044a0
push 1
push ecx
lea ecx, [esp + 0xd0]
mov dword [esp + 0xb00], 0
call fcn.004012b0
push eax
lea eax, [esp + 0x18]
mov byte [esp + 0xafc], 1
push eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x24]
mov eax, dword [eax + 4]
add ecx, eax
call fcn.004036a0
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x402e24
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x402e24
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
mov byte [esp + 0xaf8], 0
mov ecx, dword [esp + 0xc8]
test ecx, ecx
je 0x402e48
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x402e48
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
push 2
push ecx
lea ecx, [esp + 0x1c]
call fcn.004012b0
push eax
lea eax, [esp + 0xcc]
mov byte [esp + 0xafc], 2
push eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x24]
mov eax, dword [eax + 4]
add ecx, eax
call fcn.004036a0
mov ecx, dword [esp + 0xc8]
test ecx, ecx
je 0x402e93
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x402e93
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
mov byte [esp + 0xaf8], 0
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x402eb4
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x402eb4
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
lea eax, [esp + 0xcc]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push dword [esp + 0x18]
movzx eax, word [esp + 0xde]
push eax
movzx eax, word [esp + 0xe0]
push eax
movzx eax, word [esp + 0xe2]
push eax
movzx eax, word [esp + 0xe4]
push eax
movzx eax, word [esp + 0xe6]
push eax
movzx eax, word [esp + 0xe6]
push eax
movzx eax, word [esp + 0xe8]
push eax
push str._04d__02d__02d__02d:_02d:_02d._03d__s
push 0x3ff
lea eax, [esp + 0x30c]
push 0x400
push eax
call fcn.0042376b
lea edx, [esp + 0x314]
lea ecx, [esp + 0x4c]
call fcn.00406c80
mov esi, eax
add esp, 0x2c
mov ecx, esi
call fcn.00403410
mov ecx, esi
call fcn.004035a0
mov eax, dword [edi + 0x834]
test eax, eax
je 0x402f59
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov dword [esp + 0xaf8], 0xffffffff
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x1c], vtable.std::basic_ofstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x60]
mov dword [esp + ecx + 0x18], eax
lea ecx, [esp + 0x20]
call fcn.004045a0
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x1c], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [esp + ecx + 0x18], eax
lea eax, [esp + 0x7c]
push eax
mov dword [esp + 0x80], vtable.std::ios_base.0
call fcn.0040d04b
add esp, 4
mov ecx, dword [esp + 0xaf0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xad8]
xor ecx, esp
call fcn.0042128d
mov esp, ebp
pop ebp
ret 4