Function at 0x402650
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x834
mov eax, dword [0x4197b8]
xor eax, esp
mov dword [esp + 0x830], eax
push ebx
push esi
push edi
xor edi, edi
push 0x206
lea eax, [esp + 0x42e]
push edi
push eax
mov word [esp + 0x434], di
call fcn.004089f0
add esp, 0xc
push 0x206
lea ecx, [esp + 0x1e]
push edi
push ecx
mov word [esp + 0x24], di
call fcn.004089f0
add esp, 0xc
push 0x206
lea edx, [esp + 0x636]
push edi
push edx
mov word [esp + 0x63c], di
call fcn.004089f0
add esp, 0xc
push 0x206
lea eax, [esp + 0x226]
push edi
push eax
mov word [esp + 0x22c], di
call fcn.004089f0
add esp, 0xc
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor ebx, ebx
cmp eax, edi
mov dword [esp + 0x14], eax
je 0x40270b
push str.Wow64EnableWow64FsRedirection
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
cmp ebx, edi
je 0x40270b
push edi
call ebx
call fcn.004021d0
push 0x104
lea ecx, [esp + 0x42c]
push ecx
push edi
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, eax
neg esi
sbb esi, esi
neg esi
je 0x4028c5
lea edx, [esp + 0x428]
push 0x5c
push edx
call fcn.004047dc
add esp, 8
cmp eax, edi
je 0x40274f
mov word [eax], di
push 0x104
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [esp + 0x18]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x402766
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x16], 0x5c
je 0x4027da
lea eax, [esp + 0x18]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x402784
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x16], 0x2f
je 0x4027da
lea eax, [esp + 0x18]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, di
jne 0x4027a2
mov ecx, dword [str.System32]
mov edx, dword [0x41670c]
mov dword [eax], ecx
mov ecx, dword [0x416710]
mov dword [eax + 4], edx
mov edx, dword [0x416714]
mov dword [eax + 8], ecx
mov ecx, dword [0x416718]
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], ecx
push str.ammntdrv.sys
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x228]
push str._s_s
push eax
call fcn.0040447c
add esp, 0x10
call fcn.00401980
cmp dword [esp + 0x10], edi
je 0x402834
test eax, eax
je 0x40282d
call fcn.004022b0
test eax, eax
jne 0x40282d
push str.driver_amd64_ammntdrv10.sys
lea ecx, [esp + 0x42c]
push ecx
push str._s_s
lea edx, [esp + 0x63c]
push edx
jmp 0x402877
push str.driver_amd64_ammntdrv.sys
jmp 0x402862
test eax, eax
je 0x40285d
call fcn.004022b0
test eax, eax
jne 0x40285d
push str.driveri386_ammntdrv10.sys
lea ecx, [esp + 0x42c]
push ecx
push str._s_s
lea edx, [esp + 0x63c]
push edx
jmp 0x402877
push str.driveri386_ammntdrv.sys
lea eax, [esp + 0x42c]
push eax
push str._s_s
lea ecx, [esp + 0x63c]
push ecx
call fcn.0040447c
add esp, 0x10
lea edx, [esp + 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x220]
push eax
lea ecx, [esp + 0x634]
push ecx
call fcn.00401070
mov esi, eax
cmp esi, edi
je 0x4028c5
lea edx, [esp + 0x220]
push edx
push str.Copy__s_to_system32._n
call fcn.004043cd
add esp, 8
cmp ebx, edi
je 0x4028cd
push 1
call ebx
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x4028dc
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + 0x83c]
pop edi
mov eax, esi
pop esi
pop ebx
xor ecx, esp
call fcn.004043be
mov esp, ebp
pop ebp
ret