Function at 0x4034c0
Capabilities:
Check if file exists
Delete file
Get file attributes

Disassembly:
sub esp, 0x128
mov ecx, dword [0x416534]
mov edx, dword [0x416538]
mov eax, dword [str.tempxxxx.jpg]
push ebx
push ebp
mov dword [esp + 0x1c], ecx
push esi
lea ecx, [esp + 0x7c]
push edi
mov dword [esp + 0x28], edx
mov edx, dword [0x417dac]
mov dword [esp + 0x20], eax
mov al, byte [0x41653c]
push ecx
xor ebx, ebx
push 0x18
push edx
mov byte [esp + 0x38], al
mov dword [esp + 0x24], ebx
call dword [sym.imp.GDI32.dll_GetObjectA]
mov esi, dword [esp + 0x13c]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x403524
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
push 0x1001
lea eax, [esp + 0x1c]
push esi
push eax
call sub.AVIFIL32.dll_AVIFileOpenA
test eax, eax
jne 0x40395c
mov ecx, 0x23
lea edi, [esp + 0xac]
rep stosd dword es:[edi], eax
mov ecx, dword [0x418868]
mov eax, dword [esp + 0x84]
xor edx, edx
mov dword [esp + 0xc0], ecx
mov dx, word [0x4184a4]
lea ecx, [eax + eax*2 + 3]
mov dword [esp + 0xcc], edx
mov edx, ecx
mov ecx, dword [esp + 0x88]
and edx, 0xfffc
imul edx, ecx
push ecx
push eax
push ebx
lea eax, [esp + 0xec]
push ebx
push eax
mov dword [esp + 0xc0], 0x73646976
mov dword [esp + 0xd8], 0xf4240
mov dword [esp + 0xe8], edx
mov dword [esp + 0xec], 0xffffffff
call dword [sym.imp.USER32.dll_SetRect]
push esi
lea ecx, [esp + 0xfc]
push str._s_Video_1
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0xac]
lea eax, [esp + 0x10]
push edx
push eax
push ecx
call sub.AVIFIL32.dll_AVIFileCreateStreamA
test eax, eax
jne 0x40395c
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0xd4]
mov ecx, dword [esp + 0x84]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x68], edx
mov eax, 0xf61
lea edx, [esp + 0x54]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x10]
push 0x2c
push edx
push ebx
push eax
mov word [esp + 0x70], 1
mov word [esp + 0x72], 0x18
mov dword [esp + 0x68], ecx
mov dword [esp + 0x64], 0x28
mov dword [esp + 0x74], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
call sub.AVIFIL32.dll_AVIStreamSetFormat
test eax, eax
jne 0x40395c
mov ecx, dword [esp + 0xd4]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push ecx
push 0x40
call edi
mov esi, eax
cmp esi, ebx
je 0x403975
mov edx, dword [esp + 0xd4]
push edx
push 0x40
call edi
mov ebp, eax
cmp ebp, ebx
je 0x403968
mov ebx, dword [0x418434]
xor edi, edi
cmp word [0x4184a4], di
jbe 0x403711
mov eax, dword [0x4184a8]
xor ecx, ecx
lea edx, [esp + 0x20]
mov cx, word [eax + edi*2]
push ecx
push ebx
push edx
call fcn.0040e230
lea eax, [esp + 0x60]
push esi
lea ecx, [esp + 0x30]
push eax
push ecx
call fcn.00402fe0
mov edx, dword [esp + 0xec]
add esp, 0x18
mov eax, dword [esp + 0x10]
push 0
push 0
push 0x10
push edx
push esi
push 1
push edi
push eax
call sub.AVIFIL32.dll_AVIStreamWrite
test eax, eax
jne 0x403966
mov eax, dword [0x4184a8]
xor ecx, ecx
xor edx, edx
mov cx, word [eax + edi*2]
mov dx, word [0x4184a4]
add ebx, ecx
inc edi
cmp edi, edx
jl 0x4036ad
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call edi
push ebp
call edi
mov ecx, dword [esp + 0x10]
push ecx
call sub.AVIFIL32.dll_AVIStreamRelease
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x10000
push 0
push str.wavexxxx.wav
call dword [sym.imp.WINMM.dll_mmioOpenA]
mov ebx, eax
test ebx, ebx
je 0x403a1c
mov ebp, dword [sym.imp.WINMM.dll_mmioDescend]
push 0x20
lea ecx, [esp + 0x9c]
push 0
push ecx
push ebx
mov dword [esp + 0xb0], 0x45564157
call ebp
test eax, eax
jne 0x4039be
lea edx, [esp + 0x98]
push 0x10
lea eax, [esp + 0x44]
push edx
push eax
push ebx
mov dword [esp + 0x50], 0x20746d66
call ebp
test eax, eax
jne 0x4039be
mov eax, dword [esp + 0x44]
mov edi, eax
and eax, 0xffff
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x18], eax
je 0x4039b8
mov ecx, eax
push edi
push ecx
push ebx
call dword [sym.imp.WINMM.dll_mmioRead]
cmp eax, edi
jne 0x4039b8
lea edx, [esp + 0x40]
push 0
push edx
push ebx
call dword [sym.imp.WINMM.dll_mmioAscend]
lea eax, [esp + 0x98]
push 0x10
lea ecx, [esp + 0x44]
push eax
push ecx
push ebx
mov dword [esp + 0x50], 0x61746164
call ebp
test eax, eax
jne 0x4039b8
mov edx, dword [esp + 0x44]
mov ecx, 0x23
lea edi, [esp + 0xac]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0xcc], edx
mov edx, dword [esp + 0x13c]
mov dword [esp + 0xac], 0x73647561
mov dword [esp + 0xc0], 1
mov dword [esp + 0xc4], 0x2b11
mov ecx, dword [eax + 8]
push edx
lea eax, [esp + 0xfc]
push str._s_Audio_1
push eax
mov dword [esp + 0xe0], ecx
mov dword [esp + 0xe4], 0xffffffff
mov dword [esp + 0xe8], 8
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [esp + 0x20]
add esp, 0xc
lea ecx, [esp + 0xac]
lea edx, [esp + 0x10]
push ecx
push edx
push eax
call sub.AVIFIL32.dll_AVIFileCreateStreamA
test eax, eax
jne 0x4039b8
mov eax, dword [esp + 0x18]
push 0x10
mov ecx, dword [eax + 8]
mov dword [esp + 0x3c], ecx
mov dx, word [eax + 0xc]
mov word [esp + 0x40], dx
mov cx, word [eax + 2]
mov word [esp + 0x36], cx
mov edx, dword [eax + 4]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x34]
push eax
push 0
push ecx
mov dword [esp + 0x44], edx
mov word [esp + 0x40], 0x31
mov word [esp + 0x4e], 0
call sub.AVIFIL32.dll_AVIStreamSetFormat
test eax, eax
jne 0x4039b8
mov edx, dword [esp + 0xd4]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
mov eax, dword [esp + 0x44]
xor ebp, ebp
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x403a02
mov eax, dword [esp + 0xd4]
push eax
push esi
push ebx
call dword [sym.imp.WINMM.dll_mmioRead]
mov edi, eax
test edi, edi
je 0x4039b8
mov eax, dword [esp + 0xd4]
mov ecx, dword [esp + 0x10]
push 0
push 0
push 0x10
push eax
push esi
push edi
push ebp
push ecx
call sub.AVIFIL32.dll_AVIStreamWrite
test eax, eax
jne 0x4039b8
mov eax, dword [esp + 0xd4]
mov ecx, dword [esp + 0x1c]
sub ecx, eax
add ebp, edi
test ecx, ecx
mov dword [esp + 0x1c], ecx
jg 0x40390e
jmp 0x403a02
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x1c]
jmp 0x403968
xor ebx, ebx
cmp esi, ebx
je 0x403979
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x403979
mov ebp, dword [esp + 0x1c]
cmp ebp, ebx
je 0x403984
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x403992
push eax
call sub.AVIFIL32.dll_AVIStreamRelease
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x4039a0
push eax
call sub.AVIFIL32.dll_AVIFileRelease
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x128
ret
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
test esi, esi
je 0x4039c5
push esi
call edi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4039d0
push eax
call edi
push 0
push ebx
call dword [sym.imp.WINMM.dll_mmioClose]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4039e7
push eax
call sub.AVIFIL32.dll_AVIStreamRelease
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4039f5
push eax
call sub.AVIFIL32.dll_AVIFileRelease
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x128
ret
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0
push ebx
call dword [sym.imp.WINMM.dll_mmioClose]
mov edx, dword [esp + 0x10]
push edx
call sub.AVIFIL32.dll_AVIStreamRelease
mov eax, dword [esp + 0x14]
push eax
call sub.AVIFIL32.dll_AVIFileRelease
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x128
ret