Function at 0x476f65
Capabilities:
Copy file
Move file

Disassembly:
push 0x64
mov eax, 0x51f03c
call fcn.004d8af2
mov bl, dl
mov edi, ecx
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x58], edi
and dword [ebp - 4], 0
lea ecx, [ebp - 0x44]
xor edx, edx
call fcn.00428920
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 1
call fcn.004282f6
mov esi, eax
push 0x5444e8
lea edx, [ebp + 8]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x58]
call fcn.00409442
push esi
mov edx, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x3c]
call fcn.0040a037
pop ecx
pop ecx
mov ecx, dword [ebp - 0x58]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x5c]
add ecx, 0xfffffff0
call fcn.00407189
push ecx
mov ecx, dword [ebp - 0x3c]
mov esi, esp
mov dword [ebp - 0x40], esi
lea ecx, [ecx - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x48]
mov dword [esi], eax
call fcn.0042bab1
mov byte [ebp - 4], 7
test bl, bl
je 0x477090
push 1
push dword [ebp - 0x3c]
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x4772e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x21e5
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x54]
call fcn.00406620
lea eax, [ebp - 0x54]
mov byte [ebp - 4], 8
push eax
mov ecx, edi
call fcn.0040121b
mov ecx, dword [ebp - 0x4c]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x48]
call fcn.0042bae8
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
call fcn.00407189
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
jmp 0x477517
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
xor eax, eax
push eax
push eax
push 3
push eax
push 5
push ADsGetObject
push dword [ebp - 0x44]
call ebx
mov esi, eax
mov dword [ebp - 0x58], esi
cmp esi, 0xffffffff
je 0x47749d
test esi, esi
je 0x47749d
xor eax, eax
push eax
push 0x80
push 1
push eax
push eax
push 0xc0000000
push dword [ebp - 0x3c]
call ebx
mov dword [ebp - 0x5c], eax
mov byte [ebp - 4], 0xb
cmp eax, 0xffffffff
je 0x477445
test eax, eax
je 0x477445
xor eax, eax
lea edi, [ebp - 0x38]
stosd dword es:[edi], eax
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0x68]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.0045654a
mov byte [ebp - 4], 0xd
cmp dword [ebp - 0x68], 0
jge 0x4771a3
cmp dword [ebp - 0x64], 0
mov eax, 0x2202
mov edi, dword [ebp - 0x60]
cmovne eax, dword [ebp - 0x64]
push eax
push dword [ebp - 0x68]
push ecx
mov esi, esp
lea ecx, [edi - 0x10]
mov dword [ebp - 0x40], esi
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x54]
mov dword [esi], eax
call fcn.00406620
mov byte [ebp - 4], 0xe
mov ecx, dword [ebp - 0x6c]
lea eax, [ebp - 0x54]
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x4c]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [edi - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x5c]
call fcn.00427477
lea ecx, [ebp - 0x58]
call fcn.00427477
lea ecx, [ebp - 0x48]
call fcn.0042bae8
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x44]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, dword [ebp - 0x6c]
jmp 0x47751e
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x60]
lea ecx, [ecx - 0x10]
call fcn.00407189
xor eax, eax
lea edi, [ebp - 0x24]
stosd dword es:[edi], eax
lea ecx, [ebp - 0x68]
push 0x14
pop ebx
push ebx
stosd dword es:[edi], eax
mov edx, esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x24]
push eax
call fcn.0042a333
pop ecx
pop ecx
jmp 0x477240
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x60]
lea ecx, [ecx - 0x10]
call fcn.00407189
push ebx
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.004da4e8
add esp, 0xc
test eax, eax
je 0x4772c8
mov edx, dword [ebp - 0x5c]
lea eax, [ebp - 0x24]
push ebx
push eax
lea ecx, [ebp - 0x54]
call fcn.0042a260
pop ecx
pop ecx
mov byte [ebp - 4], 0x11
cmp dword [ebp - 0x54], 0
jl 0x477281
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x4c]
lea ecx, [ecx - 0x10]
call fcn.00407189
xor eax, eax
lea edi, [ebp - 0x24]
stosd dword es:[edi], eax
lea ecx, [ebp - 0x68]
push ebx
mov edx, esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x24]
push eax
call fcn.0042a333
pop ecx
pop ecx
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x68]
test ecx, ecx
jns 0x4771d2
cmp dword [ebp - 0x64], 0
mov eax, 0x2207
mov edi, dword [ebp - 0x60]
cmovne eax, dword [ebp - 0x64]
push eax
push ecx
push ecx
mov esi, esp
lea ecx, [edi - 0x10]
mov dword [ebp - 0x40], esi
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x54]
mov dword [esi], eax
call fcn.00406620
mov byte [ebp - 4], 0x10
jmp 0x477143
cmp dword [ebp - 0x50], 0
mov eax, 0x220e
mov edi, dword [ebp - 0x4c]
cmovne eax, dword [ebp - 0x50]
push eax
push dword [ebp - 0x54]
push ecx
mov esi, esp
lea ecx, [edi - 0x10]
mov dword [ebp - 0x40], esi
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x68]
mov dword [esi], eax
call fcn.00406620
mov ecx, dword [ebp - 0x6c]
lea eax, [ebp - 0x68]
push eax
mov byte [ebp - 4], 0x12
call fcn.0040121b
mov ecx, dword [ebp - 0x60]
jmp 0x477152
lea ecx, [ebp - 0x5c]
call fcn.00427477
lea ecx, [ebp - 0x5c]
call fcn.00427477
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 7
call fcn.00427477
mov edi, dword [ebp - 0x6c]
xor ebx, ebx
push ebx
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
mov esi, eax
test esi, esi
jne 0x47734c
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x221d
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x54]
call fcn.00406620
mov byte [ebp - 4], 0x14
lea eax, [ebp - 0x54]
mov ecx, edi
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x4c]
lea ecx, [ecx - 0x10]
call fcn.00407189
jmp 0x4774f3
push ebx
push ebx
push ebx
push str.IDR_CONFIG
push 0xa
push esi
call dword [sym.imp.KERNEL32.dll_UpdateResourceW]
test eax, eax
jne 0x47739b
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x2226
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x54]
call fcn.00406620
mov byte [ebp - 4], 0x15
jmp 0x477331
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceW]
test eax, eax
jne 0x4773e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x2228
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x54]
call fcn.00406620
mov byte [ebp - 4], 0x16
jmp 0x477331
push 1
push dword [ebp + 8]
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x477433
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x222b
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x54]
call fcn.00406620
mov byte [ebp - 4], 0x17
jmp 0x477331
lea ecx, [edi + 8]
mov dword [edi], ebx
mov dword [edi + 4], ebx
call fcn.0040687a
jmp 0x4774f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x21fd
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x54]
call fcn.00406620
lea eax, [ebp - 0x54]
mov byte [ebp - 4], 0xc
push eax
mov ecx, edi
call fcn.0040121b
mov ecx, dword [ebp - 0x4c]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x5c]
call fcn.00427477
jmp 0x4774eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x21f1
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x54]
call fcn.00406620
lea eax, [ebp - 0x54]
mov byte [ebp - 4], 0xa
push eax
mov ecx, edi
call fcn.0040121b
mov ecx, dword [ebp - 0x4c]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x58]
call fcn.00427477
lea ecx, [ebp - 0x48]
call fcn.0042bae8
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x44]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, edi
call fcn.004d8aa1
ret