Function at 0x40fd90
Capabilities:
Copy file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5005ed
mov eax, dword fs:[0]
push eax
sub esp, 0x458
mov eax, dword [0x569080]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x464], ebx
mov edi, dword [ebp + 8]
mov dword [ebx], 0
call fcn.004226e0
test al, al
je 0x410135
lea eax, [ebp - 0x424]
push eax
push 0
push 0
push 0x24
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
xor ecx, ecx
mov eax, edi
cmp word [edi], cx
je 0x40fe0a
nop word [eax + eax]
lea eax, [eax + 2]
inc ecx
cmp word [eax], 0
jne 0x40fe00
mov si, word [ebp - 0x424]
lea eax, [ebp - 0x424]
xor edx, edx
test si, si
je 0x40fe32
nop
lea eax, [eax + 2]
inc edx
cmp word [eax], 0
jne 0x40fe20
cmp ecx, edx
jb 0x410135
xor edx, edx
xor ecx, ecx
lea eax, [ebp - 0x424]
test si, si
je 0x40fe64
lea eax, [eax + 2]
inc ecx
cmp word [eax], 0
jne 0x40fe41
cmp edx, ecx
jae 0x40fe64
mov ax, word [edi + edx*2]
cmp ax, word [ebp + edx*2 - 0x424]
jne 0x410135
inc edx
jmp 0x40fe34
lea ecx, [ebp - 0x454]
call fcn.00406b70
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x43c]
push ecx
mov ecx, eax
call fcn.00423c20
mov ebx, eax
mov byte [ebp - 4], 1
cmp dword [ebx + 0x14], 7
jbe 0x40fe92
mov ebx, dword [ebx]
call fcn.004047f0
mov dword [ebp - 0x458], eax
test eax, eax
je 0x4101be
mov eax, dword [eax]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x525578]
mov ecx, dword [ebp - 0x458]
call esi
add eax, 0x10
mov dword [ebp - 0x458], eax
mov byte [ebp - 4], 2
test ebx, ebx
je 0x40ff01
test ebx, 0xffff0000
jne 0x40fee4
movzx eax, bx
lea ecx, [ebp - 0x458]
push eax
call fcn.004043d0
jmp 0x40ff10
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40fef0
sub ecx, edx
sar ecx, 1
jmp 0x40ff03
xor ecx, ecx
push ecx
push ebx
lea ecx, [ebp - 0x458]
call fcn.00403870
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x43c]
call fcn.00404130
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x454]
call fcn.00404130
mov esi, dword [ebp - 0x458]
mov ecx, dword [esi - 0xc]
test ecx, ecx
jle 0x40ff68
lea eax, [ecx - 1]
test eax, eax
js 0x4101c8
cmp eax, ecx
jg 0x4101c8
cmp word [esi + eax*2], 0x5c
je 0x40ff68
push 0x5c
lea ecx, [ebp - 0x458]
call fcn.0040bd00
mov esi, dword [ebp - 0x458]
push 0x208
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.004d5e00
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push 0
push str.shim_clone
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov ebx, dword [ebp - 0x464]
mov eax, dword [ebx]
test eax, eax
je 0x40ffa8
push eax
call fcn.004d4092
add esp, 4
xor ecx, ecx
lea eax, [ebp - 0x21c]
cmp word [ebp - 0x21c], cx
je 0x40ffca
nop dword [eax]
lea eax, [eax + 2]
inc ecx
cmp word [eax], 0
jne 0x40ffc0
lea eax, [ecx + 1]
mov ecx, 2
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.004d4097
mov ecx, eax
add esp, 4
mov ax, word [ebp - 0x21c]
mov dword [ebx], ecx
test ax, ax
je 0x410017
lea ebx, [ebp - 0x21c]
movzx edx, ax
sub ebx, ecx
mov word [ecx], dx
add ecx, 2
movzx eax, word [ebx + ecx]
mov edx, eax
test ax, ax
jne 0x410000
mov ebx, dword [ebp - 0x464]
xor eax, eax
mov word [ecx], ax
mov dword [ebp - 0x460], eax
mov byte [ebp - 0x45c], al
mov byte [ebp - 4], 8
call fcn.00422820
cmp byte [eax + 0x115], 0
je 0x41005e
lea eax, [ebp - 0x460]
push eax
call dword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
movzx ecx, byte [ebp - 0x45c]
test eax, eax
mov edx, 1
cmovne ecx, edx
mov byte [ebp - 0x45c], cl
push 0
push dword [ebx]
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
cmp eax, 1
sete al
mov byte [ebx + 4], al
je 0x4100db
mov eax, dword [ebx]
test eax, eax
je 0x410083
push eax
call fcn.004d4092
add esp, 4
xor ecx, ecx
mov eax, edi
cmp word [edi], cx
je 0x41009a
nop dword [eax]
lea eax, [eax + 2]
inc ecx
cmp word [eax], 0
jne 0x410090
lea eax, [ecx + 1]
mov ecx, 2
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.004d4097
mov ecx, eax
add esp, 4
mov dword [ebx], ecx
movzx eax, word [edi]
mov edx, eax
test ax, ax
je 0x4100d6
sub edi, ecx
mov word [ecx], dx
add ecx, 2
movzx eax, word [edi + ecx]
mov edx, eax
test ax, ax
jne 0x4100c5
xor eax, eax
mov word [ecx], ax
mov byte [ebp - 4], 5
cmp byte [ebp - 0x45c], 0
je 0x410108
push dword [ebp - 0x460]
call dword [sym.imp.KERNEL32.dll_Wow64RevertWow64FsRedirection]
movzx ecx, byte [ebp - 0x45c]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov byte [ebp - 0x45c], cl
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x41019e
mov edi, dword [esi]
push esi
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
jmp 0x41019e
mov eax, dword [ebx]
test eax, eax
je 0x410144
push eax
call fcn.004d4092
add esp, 4
xor ecx, ecx
mov eax, edi
cmp word [edi], cx
je 0x41015a
nop dword [eax]
lea eax, [eax + 2]
inc ecx
cmp word [eax], 0
jne 0x410150
lea eax, [ecx + 1]
mov ecx, 2
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.004d4097
mov ecx, eax
add esp, 4
mov dword [ebx], ecx
movzx eax, word [edi]
mov edx, eax
test ax, ax
je 0x410196
sub edi, ecx
mov word [ecx], dx
add ecx, 2
movzx eax, word [edi + ecx]
mov edx, eax
test ax, ax
jne 0x410185
xor eax, eax
mov word [ecx], ax
mov byte [ebx + 4], al
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004d3ce9
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.004027d0
push 0x80070057
call fcn.004027d0
int3