Function at 0x4b1970
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
sub esp, 0x220
push ebp
mov ebp, dword [esp + 0x234]
push esi
xor esi, esi
cmp ebp, esi
mov dword [esp + 0xc], 0x80004005
jne 0x4b199d
pop esi
mov eax, 0x80070057
pop ebp
add esp, 0x220
ret 0x10
push ebx
mov ebx, dword [ebp]
push edi
push 1
push 0x1a
lea eax, [esp + 0x30]
push eax
push esi
mov dword [esp + 0x30], ebx
mov word [esp + 0x38], si
mov dword [esp + 0x28], esi
xor edi, edi
call sym.vidcap60.exe_int___stdcall_SfWtsGetSpecialFolderPath_struct_HWND_____unsigned_short_int___unsigned_long_int__int_
test eax, eax
je 0x4b1a4e
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4b1a4e
test al, 0x10
je 0x4b1a4e
push 0x104
lea edx, [esp + 0x2c]
push edx
call sym.vidcap60.exe__SfAddSlashToPathName_8
push 0x104
push str.Sony_
lea eax, [esp + 0x30]
push eax
call fcn.00482350
mov eax, dword [esp + 0x23c]
test eax, eax
je 0x4b1a2e
cmp word [eax], di
je 0x4b1a2e
push 0x104
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.00482350
push 0x104
lea edx, [esp + 0x2c]
push edx
call sym.vidcap60.exe__SfAddSlashToPathName_8
push 0
lea eax, [esp + 0x2c]
push eax
call sym.vidcap60.exe__SfCreateDirectory_8
push 0x104
push 0x5e9f68
lea ecx, [esp + 0x30]
push ecx
call fcn.00482350
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea edx, [esp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x4b1c56
xor ebp, ebp
push ebp
lea ecx, [esp + 0x28]
push ecx
push 2
lea edx, [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x28], ebp
mov byte [esp + 0x24], 0xff
mov byte [esp + 0x25], 0xfe
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp ebx, ebp
mov dword [esp + 0x10], ebp
jle 0x4b1c1a
jmp 0x4b1ab0
mov eax, dword [esp + 0x240]
mov ecx, dword [eax + 8]
mov edx, dword [esp + 0x10]
mov ebx, dword [ecx + edx*4]
movzx eax, word [ebx]
movzx ebp, word [ebx + 2]
add ebp, eax
mov eax, dword [esp + 0x18]
lea ebp, [ebp + ebp + 8]
cmp eax, ebp
jae 0x4b1b2c
test esi, esi
je 0x4b1af4
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
add ebp, ebp
cmp ebp, 0x828
mov dword [esp + 0x18], ebp
jae 0x4b1b0e
mov dword [esp + 0x18], 0x828
mov ebp, dword [esp + 0x18]
push ebp
mov edi, ebp
push 0x42
shr edi, 1
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
test esi, esi
je 0x4b1c08
test edi, edi
jle 0x4b1b46
push edi
lea ecx, [ebx + 4]
push ecx
push esi
call dword [0x5d2618]
add esp, 0xc
mov word [esi + edi*2 - 2], 0
test esi, esi
jne 0x4b1b4e
xor eax, eax
jmp 0x4b1b58
push esi
call dword [0x5d2620]
add esp, 4
cmp edi, eax
mov ebp, dword [0x5d2598]
jle 0x4b1b73
mov edx, edi
sub edx, eax
dec edx
push edx
push 0x5d9018
push esi
call ebp
add esp, 0xc
test esi, esi
movzx eax, word [ebx]
lea ebx, [ebx + eax*2 + 4]
jne 0x4b1b82
xor eax, eax
jmp 0x4b1b8c
push esi
call dword [0x5d2620]
add esp, 4
cmp edi, eax
jle 0x4b1b9d
mov ecx, edi
sub ecx, eax
dec ecx
push ecx
push ebx
push esi
call ebp
add esp, 0xc
test esi, esi
jne 0x4b1ba5
xor eax, eax
jmp 0x4b1baf
push esi
call dword [0x5d2620]
add esp, 4
cmp edi, eax
jle 0x4b1bc4
mov edx, edi
sub edx, eax
dec edx
push edx
push 0x5e6af8
push esi
call ebp
add esp, 0xc
test esi, esi
jne 0x4b1bcc
xor eax, eax
jmp 0x4b1bd6
push esi
call dword [0x5d2620]
add esp, 4
push 0
lea ecx, [esp + 0x28]
push ecx
lea edx, [eax + eax]
mov eax, dword [esp + 0x24]
push edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4b1c12
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x4b1ab0
jmp 0x4b1c1a
mov dword [esp + 0x14], 0x8007000e
jmp 0x4b1c1a
mov dword [esp + 0x14], 0x8004e009
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x4b1c43
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x14]
test eax, eax
jge 0x4b1d5b
mov ebp, dword [esp + 0x240]
push 0x800
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
jne 0x4b1c8a
pop edi
pop ebx
pop esi
mov eax, 0x8007000e
pop ebp
add esp, 0x220
ret 0x10
mov eax, dword [ebp]
xor ebp, ebp
xor edi, edi
test eax, eax
mov dword [esp + 0x20], eax
jle 0x4b1d22
lea ecx, [ecx]
mov edx, dword [esp + 0x240]
mov eax, dword [edx + 8]
mov eax, dword [eax + ebp*4]
movzx ecx, word [eax]
movzx edx, word [eax + 2]
shl ecx, 1
shl edx, 1
lea esi, [edx + ecx]
add esi, edi
cmp esi, 0x800
jg 0x4b1d1a
mov edi, dword [esp + 0x18]
mov ebx, ecx
shr ecx, 2
mov dword [esp + 0x10], esi
lea esi, [eax + 4]
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movzx esi, word [eax]
mov ecx, dword [esp + 0x18]
lea ebx, [ecx + esi*2]
lea esi, [eax + esi*2 + 4]
mov ecx, edx
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movzx eax, word [eax + 2]
mov edi, dword [esp + 0x10]
lea ecx, [ebx + eax*2]
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
inc ebp
cmp ebp, eax
mov dword [esp + 0x18], ecx
jl 0x4b1ca0
jmp 0x4b1d22
mov dword [esp + 0x14], 1
mov edx, dword [esp + 0x238]
mov eax, dword [esp + 0x234]
push edi
push ebx
push edx
push eax
call sym.vidcap60.exe__SfSetMetricBinary_16
test eax, eax
jge 0x4b1d41
mov dword [esp + 0x14], eax
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x14]
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x220
ret 0x10