Function at 0x1035399
Capabilities:
Copy file
Delete file
Get common file path
Move file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x1046190]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 8]
test esi, esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x41c], esi
mov dword [ebp - 0x418], edi
mov dword [ebp - 0x424], eax
jne 0x10353d9
mov eax, 0x80004003
jmp 0x10357a5
test edi, edi
jne 0x10353e8
test eax, eax
jne 0x10353e8
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
call fcn.010326f3
test eax, eax
jne 0x1035402
mov eax, edi
neg eax
sbb eax, eax
and eax, 0x80070002
jmp 0x10357a5
test edi, edi
push ebx
mov ebx, 0x208
je 0x103551c
cmp dword [ebp + 0x14], 0
je 0x1035428
lea eax, [ebp - 0x420]
push eax
push edi
call fcn.01032720
call fcn.01032fa9
cmp dword [ebp + 0x10], 0
je 0x103551c
push ebx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov edi, eax
test edi, edi
pop ecx
jne 0x1035449
mov eax, 0x8007000e
jmp 0x10357a4
mov esi, 0x104
push esi
push edi
push dword [ebp - 0x418]
call fcn.01033c4f
push edi
call fcn.01032458
cmp dword [ebp - 0x424], 0
je 0x1035488
push dword [ebp - 0x424]
lea eax, [ebp - 0x20c]
push edi
push 0x100307c
push esi
push eax
call fcn.01028b64
add esp, 0x14
jmp 0x10354ba
push dword [0x1048be0]
lea eax, [ebp - 0x20c]
push edi
push 0x1006e70
push esi
push eax
call fcn.01028b64
add esp, 0x14
inc dword [0x1048be0]
lea eax, [ebp - 0x20c]
push eax
call fcn.010326f3
test eax, eax
jne 0x1035488
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
push 1
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x1035531
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10354e9
push 0x57
pop eax
test eax, eax
jle 0x10354f5
and eax, 0xffff
or eax, 0x80070000
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x41c]
push 0x1007398
push 0
call fcn.01036b8b
add esp, 0x14
mov eax, 0x80004005
jmp 0x10357a4
push esi
mov esi, 0x104
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01028a67
jmp 0x1035537
mov edi, dword [ebp - 0x418]
push ebx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
test eax, eax
pop ecx
mov dword [ebp - 0x420], eax
mov ebx, 0x1048ac0
je 0x10356ec
and dword [ebp - 0x41c], 0
push eax
push esi
mov edi, 0x80004005
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x10356ca
push dword [ebp - 0x420]
call fcn.01033f4d
push dword [ebp - 0x420]
call fcn.01032458
and dword [0x1048be0], 0
cmp dword [ebp - 0x424], 0
je 0x10355b6
push dword [ebp - 0x424]
lea eax, [ebp - 0x414]
push dword [ebp - 0x420]
push 0x100307c
push esi
push eax
call fcn.01028b64
add esp, 0x14
jmp 0x10355ed
push dword [0x1048be0]
lea eax, [ebp - 0x414]
push dword [ebp - 0x420]
push 0x1006e70
push esi
push eax
call fcn.01028b64
add esp, 0x14
inc dword [0x1048be0]
lea eax, [ebp - 0x414]
push eax
call fcn.010326f3
test eax, eax
jne 0x10355b6
xor esi, esi
cmp dword [ebp - 0x418], esi
lea eax, [ebp - 0x414]
push eax
je 0x103566b
push dword [ebp - 0x418]
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileW]
call esi
test eax, eax
je 0x10356ca
push dword [ebp - 0x418]
call fcn.010326f3
test eax, eax
je 0x1035638
push dword [ebp - 0x418]
push 0x1007350
push 1
call fcn.01036b8b
add esp, 0xc
push dword [ebp - 0x418]
lea eax, [ebp - 0x20c]
push eax
call esi
push 0
mov dword [ebp - 0x41c], eax
push 0
lea eax, [ebp - 0x414]
push eax
call fcn.01034b27
mov edi, eax
cmp edi, 0xd2af9
jne 0x10356ca
push 0
jmp 0x10356b5
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x10356ca
lea eax, [ebp - 0x20c]
push eax
push 0x100730c
push 4
call fcn.01036b8b
add esp, 0xc
push esi
push esi
lea eax, [ebp - 0x414]
push eax
mov dword [ebp - 0x41c], 1
call fcn.01034b27
mov edi, eax
cmp edi, 0xd2af9
jne 0x10356ca
push esi
lea eax, [ebp - 0x414]
push eax
push 2
mov ecx, ebx
mov edi, 0xd2af8
call fcn.01034266
push dword [ebp - 0x420]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
cmp dword [ebp - 0x41c], 0
pop ecx
je 0x10356e6
mov eax, edi
jmp 0x10357a4
mov edi, dword [ebp - 0x418]
push 5
push edi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x1035765
test edi, edi
je 0x1035720
push 0x5c
push edi
call fcn.010324b0
test eax, eax
je 0x1035720
push edi
push 0x10072e8
push 2
call fcn.01036b8b
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push 0x10072b8
push 2
call fcn.01036b8b
add esp, 0xc
cmp dword [ebp + 0x1c], 0
lea eax, [ebp - 0x20c]
mov ecx, ebx
je 0x1035754
push edi
push eax
push 8
call fcn.01034266
mov eax, 0xd2af9
jmp 0x10357a4
push 0
push eax
push 2
call fcn.01034266
mov eax, 0xd2af8
jmp 0x10357a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1035774
push 0x57
pop eax
test eax, eax
jle 0x1035780
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x103578b
mov esi, 0x80004005
push esi
lea eax, [ebp - 0x20c]
push eax
push 0x100727c
push 2
call fcn.01036b8b
add esp, 0x10
mov eax, esi
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.01031a01
leave
ret 0x18