Function at 0x420210
Capabilities:
Copy file
Create directory
Create process on windows
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50a9b9
mov eax, dword fs:[0]
push eax
sub esp, 0x80
push ebx
push esi
push edi
mov eax, dword [0x54112c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x38], 0
call fcn.00418b00
mov edi, dword [ebp - 0x28]
mov ebx, 1
mov ecx, ebx
mov dword [ebp - 4], 0
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x42027a
push 0x104
lea ecx, [ebp - 0x28]
call fcn.0041fd20
mov edi, dword [ebp - 0x28]
push edi
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
push dword [edi - 8]
push edi
call fcn.004d9665
add esp, 8
test eax, eax
js 0x42082b
cmp eax, dword [edi - 8]
jg 0x42082b
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
lea ecx, [ebp - 0x2c]
call fcn.00418b00
mov esi, dword [ebp - 0x2c]
mov ecx, ebx
mov byte [ebp - 4], 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x4202dc
push 0x104
lea ecx, [ebp - 0x2c]
call fcn.0041fd20
mov esi, dword [ebp - 0x2c]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
push dword [esi - 8]
push esi
call fcn.004d9665
add esp, 8
test eax, eax
js 0x42082b
cmp eax, dword [esi - 8]
jg 0x42082b
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
add esi, 0xfffffff0
push esi
mov dword [ebp - 0x34], esi
call fcn.0041b3d0
add eax, 0x10
add esp, 4
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.004200d0
push dword [ebp - 0x1c]
push edi
call fcn.0041b0c0
add esp, 8
or ebx, 0xffffffff
test eax, eax
jne 0x42077c
lea ecx, [ebp - 0x1c]
call fcn.004200d0
push dword [ebp - 0x1c]
push edi
call fcn.0041b0c0
add esp, 8
test eax, eax
jne 0x42077c
lea ecx, [ebp - 0x18]
call fcn.00418b00
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov edx, dword [0x545f54]
mov ecx, dword fs:[0x2c]
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
mov ecx, dword [ecx + edx*4]
mov dword [ebp - 0x30], ecx
nop
mov eax, dword [0x5455b4]
cmp eax, dword [ecx + 4]
jg 0x420782
mov eax, dword [0x5455b8]
mov ecx, 0x5455b8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
push dword [ebp - 0x24]
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 4
push str.ReasonAV__u
push eax
call fcn.0041b810
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
add esp, 0xc
or eax, ecx
jge 0x4203f0
push 0x104
lea ecx, [ebp - 0x18]
call fcn.0041fd20
mov esi, dword [ebp - 0x18]
push dword [ebp - 0x20]
push edi
push esi
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push dword [esi - 8]
push esi
call fcn.004d9665
add esp, 8
test eax, eax
js 0x42082b
cmp eax, dword [esi - 8]
jg 0x42082b
xor ecx, ecx
mov dword [esi - 0xc], eax
push ecx
push esi
mov word [esi + eax*2], cx
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
mov byte [ebp - 4], 3
test eax, eax
mov eax, ebx
jne 0x420456
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x42044b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
inc dword [ebp - 0x24]
mov ecx, dword [ebp - 0x30]
jmp 0x420390
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x420468
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.Uninstall.exe
lea ecx, [ebp - 0x18]
call fcn.0041b040
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call fcn.0041c5d0
mov ecx, eax
test ecx, ecx
je 0x420821
mov eax, dword [ecx]
call dword [eax + 0xc]
mov esi, dword [ebp - 0x18]
add eax, 0x10
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x38], 1
push dword [esi - 0xc]
push esi
push 1
push 0x51254c
push eax
call fcn.0041b4c0
push 0x51254c
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0041a4f0
add esp, 0x20
mov edx, dword [ebp - 0x24]
mov eax, ebx
mov byte [ebp - 4], 7
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4204e7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
cmp word [edx], 0
je 0x42061b
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax - 0xc]
mov dword [ebp - 0x38], ecx
add ecx, 1
mov dword [ebp - 0x24], ecx
js 0x42082b
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, dword [ebp - 0x24]
or ecx, edx
jge 0x420529
push dword [ebp - 0x24]
lea ecx, [ebp - 0x14]
call fcn.0041fd20
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x38]
mov edx, 0x20
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [eax - 8]
jg 0x42082b
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebp - 0x14]
mov word [eax + ecx*2], dx
mov edx, dword [ebp + 8]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x38], eax
jmp 0x420560
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x420560
mov eax, dword [ebp - 0x14]
sub ecx, dword [ebp - 0x38]
mov dword [ebp - 0x20], edx
sub dword [ebp - 0x20], eax
sar dword [ebp - 0x20], 1
sar ecx, 1
mov eax, dword [eax - 0xc]
mov dword [ebp - 0x24], eax
js 0x42082b
push ecx
push edx
call fcn.004d9665
mov edx, eax
mov ecx, bind
mov eax, dword [ebp - 0x24]
sub ecx, edx
add esp, 8
mov dword [ebp - 0x30], edx
cmp ecx, eax
jl 0x42082b
add edx, eax
js 0x42082b
mov eax, dword [ebp - 0x14]
mov ecx, 1
sub ecx, dword [eax - 4]
mov dword [ebp - 0x38], ecx
mov ecx, dword [eax - 8]
sub ecx, edx
or ecx, dword [ebp - 0x38]
jge 0x4205d5
push edx
lea ecx, [ebp - 0x14]
call fcn.0041fd20
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x20]
lea edx, [eax + ecx*2]
cmp ecx, dword [ebp - 0x24]
jbe 0x4205e3
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x30]
add ecx, ecx
push ecx
push edx
push ecx
mov ecx, dword [ebp - 0x24]
lea eax, [eax + ecx*2]
push eax
call fcn.00428b40
mov eax, dword [ebp - 0x14]
add esp, 0x10
mov ecx, dword [ebp - 0x30]
add ecx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
cmp ecx, dword [eax - 8]
jg 0x42082b
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebp - 0x14]
mov word [eax + ecx*2], dx
push 0
push esi
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
test eax, eax
je 0x4206d5
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.DLL_MoveFileExW]
push 0x44
lea eax, [ebp - 0x8c]
push 0
push eax
call fcn.004b0600
mov eax, dword [ebp - 0x14]
add esp, 0xc
cmp dword [eax - 4], 1
jle 0x420664
push dword [eax - 0xc]
lea ecx, [ebp - 0x14]
call fcn.0041b780
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x48]
push ecx
lea ecx, [ebp - 0x8c]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_CreateProcessW]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x38], eax
push dword [ecx - 8]
push ecx
call fcn.004d9665
mov edx, eax
add esp, 8
test edx, edx
js 0x42082b
mov ecx, dword [ebp - 0x14]
cmp edx, dword [ecx - 8]
jg 0x42082b
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x14]
mov word [eax + edx*2], cx
cmp dword [ebp - 0x38], ecx
je 0x4206d5
push dword [ebp - 0x48]
mov ebx, dword [sym.imp.KERNEL32.DLL_CloseHandle]
call ebx
push dword [ebp - 0x44]
call ebx
mov byte [ebp - 0xd], 1
or ebx, 0xffffffff
jmp 0x4206d9
mov byte [ebp - 0xd], 0
mov edx, dword [ebp - 0x14]
mov eax, ebx
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4206f7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x420712
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x34]
mov edx, dword [ebp - 0x1c]
mov eax, ebx
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x420733
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x42074b
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x420767
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [ebp - 0xd], 0
jmp 0x420715
push 0x5455b4
call fcn.0048c8ea
add esp, 4
cmp dword [0x5455b4], 0xffffffff
jne 0x4203a1
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push 0x50f730
mov dword [0x5455a8], 0x511548
mov dword [0x5455ac], eax
mov byte [0x5455b0], 0
call fcn.0048c6c7
xor eax, eax
mov dword [0x5455b8], 0x511560
push 0x50f760
mov dword [0x5455bc], 0x5455a8
mov dword [0x5455cc], 2
mov dword [0x5455c4], 0
mov dword [0x5455c8], 0
mov dword [0x5455d0], eax
mov dword [0x5455c0], 0x5455b8
call fcn.0048c6c7
push 0x5455b4
call fcn.0048c8a0
add esp, 0xc
jmp 0x4203a1
push 0x80004005
call fcn.0041b1a0
push 0x80070057
call fcn.0041b1a0
int3