Function at 0x4219d1
Capabilities:
Check if file exists
Get common file path
Get file attributes
Persist via run registry key
Set current directory
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x8c8
mov eax, dword [0x4424f4]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov ebx, edx
mov esi, 0x80070002
push edi
mov dword [ebp - 0x8b8], ebx
mov edi, ecx
call fcn.0041f21e
test eax, eax
je 0x421e7c
push edi
xor eax, eax
push 0x4052a0
push 4
mov dword [ebp - 0x8b4], eax
mov ebx, eax
mov esi, eax
call fcn.0041e83a
xor eax, eax
add esp, 0xc
inc eax
inc eax
cmp dword [ebp + 8], 0
mov dword [ebp - 0x8c8], eax
je 0x421c90
push 0x208
lea eax, [ebp - 0x494]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x421e62
push ecx
lea eax, [ebp - 0x8bc]
mov edx, 0x208
push eax
lea ecx, [ebp - 0x494]
call fcn.0040c15d
test eax, eax
js 0x421a8d
mov eax, dword [ebp - 0x8bc]
mov edx, 0x208
push ecx
push 0x4052bc
push ecx
lea ecx, [ebp - 0x494]
sub edx, eax
lea ecx, [ecx + eax*2]
call fcn.0040c1c3
lea eax, [ebp - 0x494]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x421aa8
test al, 0x10
jne 0x421aa8
xor eax, eax
inc eax
jmp 0x421aaa
xor eax, eax
test eax, eax
je 0x421c6f
test edi, edi
je 0x421ada
push 0x5c
push edi
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
lea ecx, [ebp - 0x84]
test eax, eax
je 0x421ad1
add eax, 2
push eax
jmp 0x421ad2
push edi
push 0x3c
pop edx
call fcn.0040c040
cmp dword [ebp - 0x8b8], 0
mov eax, 0x4052d8
jne 0x421aed
mov eax, 0x4052e4
mov ebx, 0x208
lea ecx, [ebp - 0x494]
push eax
mov edx, ebx
call fcn.0040c075
push edi
mov edx, ebx
lea ecx, [ebp - 0x494]
call fcn.0040c075
push ecx
lea eax, [ebp - 0x8c0]
mov edx, ebx
push eax
lea ecx, [ebp - 0x494]
call fcn.0040c15d
test eax, eax
js 0x421b46
mov eax, dword [ebp - 0x8c0]
mov edx, ebx
push ecx
push 0x4052f8
push ecx
lea ecx, [ebp - 0x494]
sub edx, eax
lea ecx, [ecx + eax*2]
call fcn.0040c1c3
lea eax, [ebp - 0x8a8]
xor ebx, ebx
push eax
push 3
push ebx
push 0x401858
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x8a8], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x421b90
lea eax, [ebp - 0x8a8]
push eax
push 3
push ebx
push 0x401858
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, eax
test ebx, ebx
jne 0x421c11
mov ecx, dword [ebp - 0x8a8]
lea eax, [ebp - 0x494]
push eax
call fcn.0042219e
mov edx, eax
mov dword [ebp - 0x8ac], edx
test edx, edx
je 0x421bfc
lea ecx, [ebp - 0x494]
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x8b4]
jne 0x421bb7
sub ecx, ebx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x494]
push eax
push 1
xor eax, eax
push eax
push edx
push dword [ebp - 0x8a8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x8ac]
mov ebx, eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
jmp 0x421c01
mov ebx, 0x80004005
push dword [ebp - 0x8a8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x421c37
jle 0x421c1c
movzx ebx, bx
or ebx, 0x80070000
push ebx
lea eax, [ebp - 0x84]
push eax
push 0x405020
push 2
pop eax
push eax
call fcn.0041e83a
add esp, 0x10
jmp 0x421c62
cmp dword [0x442534], 0xffffffff
jne 0x421c49
push ecx
push 4
pop edx
call fcn.0041e30f
push 4
mov edx, 0x405064
pop ecx
call fcn.0041e767
or dword [0x442678], 1
mov ebx, 0xd2af9
not ebx
shr ebx, 0x1f
test ebx, ebx
jne 0x421e5a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x421c84
movzx esi, si
or esi, 0x80070000
push esi
push edi
push 0x405338
jmp 0x421e30
xor eax, eax
push eax
mov dword [ebp - 0x8ac], eax
call dword [sym.imp.ole32.dll_OleInitialize]
mov esi, eax
test esi, esi
js 0x421e71
lea eax, [ebp - 0x8a4]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x421d01
push edi
mov edx, 0x103
lea ecx, [ebp - 0x69c]
call fcn.0040c040
lea eax, [ebp - 0x69c]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
test eax, eax
je 0x421d01
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x69c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov dword [ebp - 0x8ac], 1
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x8b4]
jne 0x421d06
sub ecx, edx
sar ecx, 1
push 2
pop edx
lea eax, [ecx + 5]
xor ecx, ecx
mov dword [ebp - 0x8b0], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00440dea
mov dword [ebp - 0x8a8], eax
pop ecx
test eax, eax
je 0x421de7
test edi, edi
je 0x421d5e
push dword [ebp - 0x8b0]
mov edx, eax
mov ecx, edi
call fcn.0041ea11
mov eax, dword [ebp - 0x8a8]
push 8
xor ecx, ecx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [ebp - 0x8c4], eax
cmp eax, 0x20
jbe 0x421dbf
cmp dword [ebp - 0x8b8], 0
mov ecx, 0x40537c
jne 0x421d88
mov ecx, 0x405390
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x8b0], eax
test eax, eax
je 0x421db1
mov ecx, eax
call dword [0x445628]
call dword [ebp - 0x8b0]
mov esi, eax
xor ebx, ebx
test esi, esi
setns bl
ret
push dword [ebp - 0x8c4]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x421ddb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x421dd0
push 0x57
pop esi
test esi, esi
jle 0x421ddb
movzx esi, si
or esi, 0x80070000
push dword [ebp - 0x8a8]
call fcn.00440db7
pop ecx
cmp dword [ebp - 0x8ac], 0
je 0x421dfd
lea eax, [ebp - 0x8a4]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call dword [sym.imp.ole32.dll_OleUninitialize]
test ebx, ebx
jne 0x421e69
test esi, esi
jne 0x421e29
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x421e22
movzx esi, si
or esi, 0x80070000
test esi, esi
jne 0x421e29
mov esi, 0x80004005
push esi
push edi
push 0x4053d8
push 2
pop eax
push eax
call fcn.0041e83a
xor eax, eax
add esp, 0x10
cmp dword [ebp + 8], eax
sete al
push 2
mov dword [ebp + 8], eax
mov eax, dword [ebp - 0x8c8]
pop ecx
cmp eax, ecx
jl 0x421a24
jmp 0x421ea3
push edi
push 0x4052fc
jmp 0x421e99
mov esi, 0x80004005
jmp 0x421ea3
push edi
push 0x4053a4
jmp 0x421e99
push esi
push 0x40467c
xor eax, eax
push eax
jmp 0x421e9b
test ebx, ebx
je 0x421e93
push esi
push edi
push 0x405414
push 2
call fcn.0041e83a
add esp, 0x10
jmp 0x421ea3
push edi
push 0x405454
push 4
call fcn.0041e83a
add esp, 0xc
mov ecx, dword [ebp - 8]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00441130
leave
ret 4