Function at 0x10164a51
Capabilities:
Check if file exists
Copy file
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x101dc354]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 0x1c]
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x38], eax
xor eax, eax
push esi
push edi
lea edi, [ebp - 0x14]
mov dword [ebp - 0x30], ecx
stosd dword es:[edi], eax
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
stosd dword es:[edi], eax
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x58], ecx
mov byte [ebp - 0x44], cl
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x48], eax
call fcn.100e6448
mov ecx, dword [0x101dc9c4]
mov dword [ebp - 0x40], ecx
push ecx
mov eax, dword [ecx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x101e07c0]
call esi
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x58]
push eax
call fcn.10165f48
mov eax, dword [ebx]
mov esi, dword [eax + 0x24]
lea eax, [ebp - 0x1c]
push eax
push 5
push ebx
mov ecx, esi
call dword [0x101e07c0]
call esi
mov edi, eax
test edi, edi
jns 0x10164b0e
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x10]
mov eax, dword [ecx + 0x48]
test eax, eax
jne 0x10164af3
mov eax, 0x100082e8
push eax
push 0x1006d648
push 1
push edi
push 0x4000000
call fcn.100ab973
add esp, 0x14
jmp 0x101650ab
lea ecx, [ebp - 0x48]
call fcn.10099234
mov edi, eax
test edi, edi
jns 0x10164b36
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 0x48]
test eax, eax
jne 0x10164b2e
mov eax, 0x100082e8
push eax
push 0x1005a32c
jmp 0x10164af9
mov ecx, dword [ebp - 0x30]
call fcn.10166e71
test al, al
jne 0x10164b5e
mov ecx, dword [ecx + 0xc]
call fcn.1012b052
test al, al
jne 0x10164b5e
mov dword [ebp - 0x4c], 0x101dc340
mov dword [ebp - 0x54], 1
jmp 0x10164b6c
mov dword [ebp - 0x4c], 0x101dc320
mov dword [ebp - 0x54], 4
mov ebx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx]
mov esi, dword [eax + 0xc]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 1
push ecx
mov ecx, esi
call dword [0x101e07c0]
call esi
mov edi, eax
test edi, edi
jne 0x1016507d
cmp dword [ebp - 0x18], eax
jbe 0x1016507d
mov edi, dword [ebp - 0x4c]
xor ecx, ecx
and dword [ebp - 0x50], ecx
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x2c], edi
mov ecx, dword [esi + 0x7c]
xor al, al
mov byte [ebp - 0x25], al
lea eax, [ebp - 0x24]
push eax
push edi
push dword [ecx + 0xc]
xor eax, eax
push dword [ecx + 8]
cmp dword [ecx + 4], eax
push dword [ebp - 0x10]
sete al
push dword [ebp - 8]
push eax
call fcn.1016524a
mov edi, eax
test edi, edi
js 0x10165062
test dword [esi + 0xf8], 0x400
je 0x10164bf9
mov eax, dword [ebp - 0x2c]
cmp dword [eax], 8
je 0x10164e9e
mov edx, dword [esi + 0x7c]
mov ebx, dword [ebp - 0x24]
cmp dword [edx + 4], 0
jne 0x10164d07
push dword [ebx + 0x10]
mov edx, dword [edx + 0xc]
lea ecx, [ebp - 0x20]
call fcn.100a9500
mov edi, eax
test edi, edi
js 0x10164fd1
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10164e9e
mov ecx, dword [ebp - 0x5c]
test ecx, ecx
je 0x10164c94
mov eax, dword [ecx]
push 0
push 0
push dword [ebx + 0x10]
mov esi, dword [eax + 0x14]
push ecx
mov ecx, esi
call dword [0x101e07c0]
call esi
mov esi, dword [ebp - 0x30]
mov edi, eax
cmp edi, 0x800700b7
je 0x10164e9e
test edi, edi
jns 0x10164e9e
mov ecx, esi
call fcn.10166e71
test al, al
jne 0x10164c7d
mov eax, dword [ebp - 0x2c]
cmp dword [eax], 8
je 0x10164c84
mov al, 1
xor edi, edi
mov byte [ebp - 0x25], al
test edi, edi
js 0x10164f6b
mov al, byte [ebp - 0x25]
jmp 0x10164f53
mov ecx, esi
call fcn.10166e71
test al, al
jne 0x10164f51
mov eax, dword [ebp - 0x2c]
cmp dword [eax], 8
jne 0x10164f51
mov eax, dword [esi + 0x14]
test eax, eax
je 0x10164fbd
mov eax, dword [eax + 0x10]
cmp byte [eax + 0x268], 0
je 0x10164fbd
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x10164f85
lea ecx, [ebp - 0x24]
push ecx
mov ecx, eax
call fcn.100f5b66
mov edi, eax
test edi, edi
jns 0x10164e6f
push 0x1006d700
push 1
push edi
push 0x4000000
call fcn.100ab973
mov ebx, dword [ebp - 0x24]
add esp, 0x10
jmp 0x1016507d
cmp dword [ebx + 0x14], 0
je 0x10164d36
push 0
push dword [ebx + 0x14]
push dword [ebx + 0x10]
call dword [sym.imp.api_ms_win_core_kernel32_legacy_l1_1_0.dll_CopyFileW]
test eax, eax
jne 0x10164d49
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x10164d49
movzx edi, di
or edi, 0x80070000
jmp 0x10164d49
push dword [ebx + 0x10]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10164d49
mov edi, 0x80070002
cmp edi, 0x80070002
je 0x10164d5d
cmp edi, 0x80070003
jne 0x10164e29
cmp byte [ebp - 0x44], 0
je 0x10164d6c
call fcn.100edd2d
mov byte [ebp - 0x44], 0
mov ecx, dword [esi + 0xc]
push 0x10064f2c
push dword [ebx + 0xc]
push dword [ebp - 0x2c]
push dword [ebx + 8]
push dword [ebp - 0x10]
call fcn.10113f2d
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x60], eax
call fcn.10099234
mov edi, eax
test edi, edi
js 0x10165048
cmp dword [ebp - 0x60], 0
jl 0x10164e24
mov eax, dword [esi + 0xc]
push dword [eax + 0x188]
lea eax, [ebp - 0x34]
push eax
call fcn.100a7590
mov edi, eax
test edi, edi
js 0x10164fef
mov eax, dword [ebp - 0x2c]
mov dword [ebx], 2
push dword [ebx + 0xc]
cmp dword [eax], 8
jne 0x10164dea
push dword [ebx + 8]
lea eax, [ebx + 0x10]
push dword [ebp - 0x34]
push 0x10049608
push eax
call fcn.100a6b40
add esp, 0x14
jmp 0x10164e04
push dword [eax + 4]
lea eax, [ebx + 0x10]
push dword [ebx + 8]
push dword [ebp - 0x34]
push 0x1006d7e4
push eax
call fcn.100a6b40
add esp, 0x18
mov edi, eax
test edi, edi
jns 0x10164e29
push 0x1006d83c
push 1
push edi
push 0x4000000
call fcn.100ab973
add esp, 0x10
jmp 0x1016507d
mov edi, 0x800f081f
test edi, edi
jns 0x10164e9e
mov ecx, esi
call fcn.10166e71
test al, al
jne 0x10164f51
mov eax, dword [ebp - 0x2c]
cmp dword [eax], 8
jne 0x10164f51
cmp dword [ebp - 0x38], 0
je 0x10164f8a
mov ecx, ebx
call fcn.10165476
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x24]
push eax
call fcn.100f5b66
mov edi, eax
test edi, edi
js 0x10164ff9
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + 0x48]
test ecx, ecx
jne 0x10164e7e
mov ecx, 0x100082e8
mov eax, dword [ebp - 0x24]
push dword [eax + 0x10]
push dword [eax + 0xc]
push ecx
push 0x1006d7a4
push 0
push 0
push 0x4000000
call fcn.100ab973
add esp, 0x1c
lea eax, [ebp - 0x24]
push eax
lea ecx, [esi + 0x38]
call fcn.100f5b66
mov edi, eax
test edi, edi
js 0x10165038
mov edi, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x3c]
or eax, dword [edi]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x20]
xor ebx, ebx
mov dword [ebp - 0x24], ebx
test eax, eax
je 0x10164eda
add eax, 0xfffffffc
push eax
call fcn.100b84f9
xor eax, eax
pop ecx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x50]
add edi, 8
inc eax
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x50], eax
cmp eax, dword [ebp - 0x54]
jb 0x10164bb0
mov ecx, esi
call fcn.10166e71
test al, al
je 0x10164f10
mov ecx, dword [ebp - 0x3c]
mov eax, ecx
and eax, 3
cmp al, 3
je 0x10164f10
test cl, 0xc
je 0x10165003
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x10164f2a
mov eax, dword [ecx]
push ecx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x101e07c0]
call esi
and dword [ebp - 0x10], ebx
cmp dword [ebp - 8], ebx
je 0x10164b6f
mov ecx, dword [ebp - 0x40]
push dword [ebp - 8]
push ecx
mov eax, dword [ecx]
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x101e07c0]
call esi
and dword [ebp - 8], ebx
jmp 0x10164b6f
mov al, 1
test al, al
je 0x10164e9e
push ecx
mov ecx, ebx
call fcn.10164a37
mov edi, dword [ebp - 0x2c]
jmp 0x10164ebf
push dword [ebx + 0x10]
push 0x1006d730
push 1
push edi
push 0x4000000
call fcn.100ab973
jmp 0x1016507a
mov edi, 0x80004005
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x48]
test eax, eax
jne 0x10164f99
mov eax, 0x100082e8
push dword [ebx + 0x14]
push dword [ebx + 0x10]
push dword [ebx + 0xc]
push eax
push 0x1006d758
push 1
push edi
push 0x2000000
call fcn.100ab973
add esp, 0x20
jmp 0x1016507d
push dword [ebx + 0x10]
mov eax, 0x80070002
push 0x1006d7fc
push 1
mov edi, eax
push eax
jmp 0x10164f76
mov esi, dword [ebp - 0x20]
push esi
push 0x1006d688
push 1
push edi
push 0x4000000
call fcn.100ab973
add esp, 0x14
jmp 0x10165080
push 0x10048840
jmp 0x10164e0f
push 0x1006d814
jmp 0x10164cef
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + 0x48]
test ecx, ecx
jne 0x10165012
mov ecx, 0x100082e8
mov eax, dword [esi + 0x7c]
mov edi, 0x800f0988
push dword [eax + 0xc]
push dword [ebp - 8]
push ecx
push 0x1006d85c
push 1
push edi
push 0x2000000
call fcn.100ab973
add esp, 0x1c
jmp 0x1016507d
mov ebx, dword [ebp - 0x24]
push dword [ebx + 0xc]
push 0x1006d89c
jmp 0x10164f73
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x48]
test eax, eax
jne 0x10165057
mov eax, 0x100082e8
push eax
push 0x1005a32c
jmp 0x10164f73
push dword [ebp - 8]
push 0x1006d6cc
push 1
push edi
push 0x4000000
call fcn.100ab973
mov ebx, dword [ebp - 0x24]
add esp, 0x14
mov esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10165091
add eax, 0xfffffffc
push eax
call fcn.100b84f9
pop ecx
test esi, esi
je 0x1016509f
lea eax, [esi - 4]
push eax
call fcn.100b84f9
pop ecx
test ebx, ebx
je 0x101650ab
push ecx
mov ecx, ebx
call fcn.10164a37
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x101650c2
mov eax, dword [ecx]
push ecx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x101e07c0]
call esi
cmp dword [ebp - 8], 0
mov ebx, dword [ebp - 0x40]
je 0x101650de
mov eax, dword [ebx]
push dword [ebp - 8]
push ebx
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x101e07c0]
call esi
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x101650f5
mov eax, dword [ecx]
push ecx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x101e07c0]
call esi
mov eax, dword [ebx]
push ebx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x101e07c0]
call esi
mov ecx, dword [ebp - 0x58]
test ecx, ecx
je 0x10165127
mov eax, dword [ecx + 4]
add ecx, 4
mov eax, dword [eax + 4]
add eax, ecx
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x101e07c0]
call esi
call fcn.100e69c2
cmp byte [ebp - 0x44], 0
je 0x10165137
call fcn.100edd2d
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100b88c0
leave
ret 0x18