Function at 0x401840
Capabilities:
Copy file
Persist via windows service
Query or enumerate registry value
Set file attributes
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x43d180]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.00417930
add esp, 0xc
lea eax, [ebp - 0x418]
push eax
push str.SystemCurrentControlSetServicesGIDv2
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x4018a6
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
call esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00416230
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push ebx
push 0
push 0x1e
push 0x402
push dword [0x440974]
call esi
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 0x420]
push 4
push eax
push 4
push 0
push str.Type
push dword [ebp - 0x418]
mov dword [ebp - 0x420], 1
call ebx
push 4
lea eax, [ebp - 0x420]
mov dword [ebp - 0x420], 1
push eax
push 4
push 0
push str.ErrorControl
push dword [ebp - 0x418]
call ebx
push 4
lea eax, [ebp - 0x420]
mov dword [ebp - 0x420], 1
push eax
push 4
push 0
push str.Start
push dword [ebp - 0x418]
call ebx
push dword [ebp - 0x418]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call ebx
push 0
push 0x28
push 0x402
push dword [0x440974]
call esi
lea eax, [ebp - 0x418]
push eax
push str.SystemCurrentControlSetControlClass4D36E96B_E325_11CE_BFC1_08002BE10318
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
je 0x401984
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
call esi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00416230
mov esp, ebp
pop ebp
ret
push 0
push 0x32
push 0x402
push dword [0x440974]
call esi
lea eax, [ebp - 0x41c]
mov dword [ebp - 0x41c], 0x208
push eax
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x424]
push eax
push 0
push str.UpperFilters
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x4019ed
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push dword [ebp - 0x418]
call ebx
call esi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00416230
mov esp, ebp
pop ebp
ret
push edi
push 0
push 0x3c
push 0x402
push dword [0x440974]
call esi
mov ebx, dword [ebp - 0x41c]
cmp ebx, 5
jb 0x401a24
push ebx
lea ecx, [ebp - 0x414]
call fcn.00402030
test eax, eax
jne 0x401ae2
mov ebx, dword [ebp - 0x41c]
lea ecx, [ebp - 0x20c]
mov edi, str.GIDv2
mov eax, ecx
mov edx, 0x104
sub edi, eax
jmp 0x401a40
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x401a5e
movzx eax, word [edi + ecx]
test ax, ax
je 0x401a5e
mov word [ecx], ax
add ecx, 2
dec edx
jne 0x401a40
jmp 0x401a62
test edx, edx
jne 0x401a65
sub ecx, 2
xor eax, eax
mov word [ecx], ax
lea eax, [ebp - 0x414]
push ebx
push eax
lea eax, [ebp - 0x200]
push 0x104
push eax
call fcn.00416a6c
mov eax, dword [ebp - 0x41c]
add esp, 0x10
add eax, 0xc
mov dword [ebp - 0x41c], eax
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x424]
push 0
push str.UpperFilters
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x401ae2
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push dword [ebp - 0x418]
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
call esi
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00416230
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x418]
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
push 0
push 0x46
push 0x402
push dword [0x440974]
call esi
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x80
push 0x440b80
call edi
push 0
push 0x50
push 0x402
push dword [0x440974]
call esi
push 0
push 0x440b80
push 0x440978
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x401bbe
push 0x440b80
push 0x440978
push str.Sucessfully_copied__s_to__s
call fcn.00401350
add esp, 0xc
push 0x80
push 0x440b80
call edi
push 0
push 0x5a
push 0x402
push dword [0x440974]
call esi
push 0x440b80
push 0x440978
call fcn.00401ee0
test eax, eax
jne 0x401b9a
pop edi
pop ebx
mov eax, 0x64d
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00416230
mov esp, ebp
pop ebp
ret
push 0
push 0x64
push 0x402
push dword [0x440974]
call esi
pop edi
pop ebx
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00416230
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
push 0x440b80
push 0x440978
push str.FAILED_to_copy__s_to__s_ERROR:_d
call fcn.00401350
add esp, 0x10
call esi
mov ecx, dword [ebp - 4]
pop edi
pop ebx
xor ecx, ebp
pop esi
call fcn.00416230
mov esp, ebp
pop ebp
ret