Function at 0x412870
Capabilities:
Copy file
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcb4
mov eax, dword [0x499100]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0xa2c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push str.dataobs_pluginswin_capture_
push 0x208
lea eax, [ebp - 0xa2c]
push eax
call fcn.00408e70
mov ecx, 0x104
lea eax, [ebp - 0xa2c]
cmp word [eax], 0
je 0x4128c4
add eax, 2
sub ecx, 1
jne 0x4128b6
push ebx
push esi
push edi
mov edi, 0x104
mov esi, ecx
mov eax, edi
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x41291d
mov edx, edi
lea ecx, [ebp - 0xa2c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x412910
mov ebx, str.obs_vulkan
mov eax, 0x7ffffffe
sub ebx, ecx
test eax, eax
je 0x412910
movzx esi, word [ebx + ecx]
test si, si
je 0x412910
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x4128f7
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, edi
lea eax, [ebp - 0xa2c]
cmp word [eax], 0
je 0x412933
add eax, 2
sub ecx, 1
jne 0x412925
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
mov eax, 0x489174
test ecx, ecx
je 0x412996
cmp byte [ebp + 8], 0
lea ecx, [ebp - 0xa2c]
mov ebx, 0x48916c
lea ecx, [ecx + esi*2]
mov edx, edi
cmove ebx, eax
sub edx, esi
je 0x412989
mov eax, 0x7ffffffe
sub ebx, ecx
nop word [eax + eax]
test eax, eax
je 0x412989
movzx esi, word [ebx + ecx]
test si, si
je 0x412989
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x412970
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, edi
lea eax, [ebp - 0xa2c]
nop
cmp word [eax], 0
je 0x4129ae
add eax, 2
sub ecx, 1
jne 0x4129a0
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x412a06
mov edx, edi
lea ecx, [ebp - 0xa2c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x4129f9
mov ebx, str..json
mov eax, 0x7ffffffe
sub ebx, ecx
nop dword [eax]
test eax, eax
je 0x4129f9
movzx esi, word [ebx + ecx]
test si, si
je 0x4129f9
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x4129e0
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x414]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push str.dataobs_pluginswin_capture_
push 0x208
lea eax, [ebp - 0x414]
push eax
call fcn.00408e70
mov ecx, edi
lea eax, [ebp - 0x414]
cmp word [eax], 0
je 0x412a44
add eax, 2
sub ecx, 1
jne 0x412a36
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x412a96
mov edx, edi
lea ecx, [ebp - 0x414]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x412a89
mov ebx, str.graphics_hook
mov eax, 0x7ffffffe
sub ebx, ecx
nop
test eax, eax
je 0x412a89
movzx esi, word [ebx + ecx]
test si, si
je 0x412a89
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x412a70
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, edi
lea eax, [ebp - 0x414]
nop
cmp word [eax], 0
je 0x412aae
add eax, 2
sub ecx, 1
jne 0x412aa0
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x412b0b
cmp byte [ebp + 8], 0
lea ecx, [ebp - 0x414]
mov ebx, 0x48916c
lea ecx, [ecx + esi*2]
mov eax, 0x489174
mov edx, edi
cmove ebx, eax
sub edx, esi
je 0x412afe
mov eax, 0x7ffffffe
sub ebx, ecx
test eax, eax
je 0x412afe
movzx esi, word [ebx + ecx]
test si, si
je 0x412afe
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x412ae5
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, edi
lea eax, [ebp - 0x414]
cmp word [eax], 0
je 0x412b21
add eax, 2
sub ecx, 1
jne 0x412b13
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x412b76
mov edx, edi
lea ecx, [ebp - 0x414]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x412b69
mov ebx, str..dll
mov eax, 0x7ffffffe
sub ebx, ecx
nop dword [eax]
test eax, eax
je 0x412b69
movzx esi, word [ebx + ecx]
test si, si
je 0x412b69
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x412b50
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x20c]
push eax
push 0
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov ecx, edi
lea eax, [ebp - 0x20c]
cmp word [eax], 0
je 0x412ba1
add eax, 2
sub ecx, 1
jne 0x412b93
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x412bf6
mov edx, edi
lea ecx, [ebp - 0x20c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x412be9
mov ebx, 0x487afc
mov eax, 0x7ffffffe
sub ebx, ecx
nop dword [eax]
test eax, eax
je 0x412be9
movzx esi, word [ecx + ebx]
test si, si
je 0x412be9
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x412bd0
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, edi
lea eax, [ebp - 0x20c]
nop
cmp word [eax], 0
je 0x412c0e
add eax, 2
sub ecx, 1
jne 0x412c00
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x412c66
mov edx, edi
lea ecx, [ebp - 0x20c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x412c59
mov ebx, str.obs_studio_hook_
mov eax, 0x7ffffffe
sub ebx, ecx
nop dword [eax]
test eax, eax
je 0x412c59
movzx esi, word [ecx + ebx]
test si, si
je 0x412c59
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x412c40
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea ecx, [ebp - 0x824]
mov edx, edi
lea esi, [ebp - 0x20c]
mov eax, ecx
sub esi, eax
nop dword [eax + eax]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x412c9e
movzx eax, word [ecx + esi]
test ax, ax
je 0x412c9e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x412c80
test edx, edx
lea eax, [ecx - 2]
lea esi, [ebp - 0x20c]
mov edx, edi
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea ecx, [ebp - 0x61c]
mov eax, ecx
sub esi, eax
nop dword [eax]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x412cde
movzx eax, word [ecx + esi]
test ax, ax
je 0x412cde
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x412cc0
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, edi
lea eax, [ebp - 0x824]
cmp word [eax], 0
je 0x412d01
add eax, 2
sub ecx, 1
jne 0x412cf3
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x412d56
mov edx, edi
lea ecx, [ebp - 0x824]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x412d49
mov ebx, str.obs_vulkan
mov eax, 0x7ffffffe
sub ebx, ecx
nop dword [eax]
test eax, eax
je 0x412d49
movzx esi, word [ebx + ecx]
test si, si
je 0x412d49
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x412d30
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, edi
lea eax, [ebp - 0x824]
nop
cmp word [eax], 0
je 0x412d6e
add eax, 2
sub ecx, 1
jne 0x412d60
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x412dcb
cmp byte [ebp + 8], 0
lea ecx, [ebp - 0x824]
mov ebx, 0x48916c
lea ecx, [ecx + esi*2]
mov eax, 0x489174
mov edx, edi
cmove ebx, eax
sub edx, esi
je 0x412dbe
mov eax, 0x7ffffffe
sub ebx, ecx
test eax, eax
je 0x412dbe
movzx esi, word [ebx + ecx]
test si, si
je 0x412dbe
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x412da5
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, edi
lea eax, [ebp - 0x824]
cmp word [eax], 0
je 0x412de1
add eax, 2
sub ecx, 1
jne 0x412dd3
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x412e36
mov edx, edi
lea ecx, [ebp - 0x824]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x412e29
mov ebx, str..json
mov eax, 0x7ffffffe
sub ebx, ecx
nop dword [eax]
test eax, eax
je 0x412e29
movzx esi, word [ebx + ecx]
test si, si
je 0x412e29
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x412e10
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, edi
lea eax, [ebp - 0x61c]
nop
cmp word [eax], 0
je 0x412e4e
add eax, 2
sub ecx, 1
jne 0x412e40
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x412ea6
mov edx, edi
lea ecx, [ebp - 0x61c]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x412e99
mov ebx, str.graphics_hook
mov eax, 0x7ffffffe
sub ebx, ecx
nop dword [eax]
test eax, eax
je 0x412e99
movzx esi, word [ebx + ecx]
test si, si
je 0x412e99
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x412e80
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, edi
lea eax, [ebp - 0x61c]
nop
cmp word [eax], 0
je 0x412ebe
add eax, 2
sub ecx, 1
jne 0x412eb0
mov eax, edi
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x412f1b
cmp byte [ebp + 8], 0
lea ecx, [ebp - 0x61c]
mov ebx, 0x48916c
lea ecx, [ecx + esi*2]
mov eax, 0x489174
mov edx, edi
cmove ebx, eax
sub edx, esi
je 0x412f0e
mov eax, 0x7ffffffe
sub ebx, ecx
test eax, eax
je 0x412f0e
movzx esi, word [ebx + ecx]
test si, si
je 0x412f0e
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x412ef5
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov ecx, edi
lea eax, [ebp - 0x61c]
cmp word [eax], 0
je 0x412f31
add eax, 2
sub ecx, 1
jne 0x412f23
mov eax, edi
mov edx, ecx
sub eax, ecx
neg edx
sbb edx, edx
and edx, eax
test ecx, ecx
je 0x412f86
lea ecx, [ebp - 0x61c]
lea ecx, [ecx + edx*2]
sub edi, edx
je 0x412f79
mov esi, str..dll
mov eax, 0x7ffffffe
sub esi, ecx
nop word [eax + eax]
test eax, eax
je 0x412f79
movzx edx, word [esi + ecx]
test dx, dx
je 0x412f79
mov word [ecx], dx
dec eax
add ecx, 2
sub edi, 1
jne 0x412f60
test edi, edi
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0xc7c]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
jne 0x412fb2
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046ae1f
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [ebp - 0xc90]
mov dword [ebp - 0xc90], 0
push eax
push 0
lea eax, [ebp - 0xc94]
mov dword [ebp - 0xc88], 0
push eax
push 0
push 0
push 4
push 1
lea eax, [ebp - 0x20c]
mov dword [ebp - 0xc8c], 0
push eax
mov dword [ebp - 0xc80], 0
mov dword [ebp - 0xc84], 0
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
test eax, eax
jne 0x4130f8
mov dword [ebp - 0xc9c], eax
xorps xmm0, xmm0
mov dword [ebp - 0xca0], eax
lea eax, [ebp - 0xc88]
push eax
push str.S_1_15_2_1
movlpd qword [ebp - 0xca8], xmm0
mov dword [ebp - 0xcb4], 0xa0000000
mov dword [ebp - 0xcb0], 1
mov dword [ebp - 0xcac], 3
call sub.ADVAPI32.dll_ConvertStringSidToSidW
mov eax, dword [ebp - 0xc88]
mov esi, dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
mov dword [ebp - 0xc98], eax
lea eax, [ebp - 0xc80]
push eax
push dword [ebp - 0xc94]
lea eax, [ebp - 0xcb4]
push eax
push 1
call esi
test eax, eax
jne 0x4130f8
lea eax, [ebp - 0xc8c]
mov dword [ebp - 0xcb4], 0xe0000000
push eax
push str.S_1_5_32_545
call sub.ADVAPI32.dll_ConvertStringSidToSidW
mov eax, dword [ebp - 0xc8c]
mov dword [ebp - 0xc98], eax
lea eax, [ebp - 0xc84]
push eax
push dword [ebp - 0xc80]
lea eax, [ebp - 0xcb4]
push eax
push 1
call esi
test eax, eax
jne 0x4130f8
push eax
push dword [ebp - 0xc84]
push eax
push eax
push 4
push 1
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov eax, dword [ebp - 0xc90]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
test eax, eax
je 0x41310b
push eax
call esi
mov eax, dword [ebp - 0xc80]
test eax, eax
je 0x413118
push eax
call esi
mov eax, dword [ebp - 0xc84]
test eax, eax
je 0x413125
push eax
call esi
mov eax, dword [ebp - 0xc88]
test eax, eax
je 0x413132
push eax
call esi
mov eax, dword [ebp - 0xc8c]
test eax, eax
je 0x41313f
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [ebp - 0x61c]
push 0
push eax
lea eax, [ebp - 0x414]
push eax
call esi
push 0
lea eax, [ebp - 0x824]
push eax
lea eax, [ebp - 0xa2c]
push eax
call esi
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046ae1f
mov esp, ebp
pop ebp
ret