joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403700
Capabilities:
Access peb ldr_data
Check if file exists
Create thread
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x42f961
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
mov eax, dword [0x43b3c0]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x30], esp
push 0xffffffffffffffff
mov ebp, 1
mov dword [esp + 0x40], ebp
push ebx
lea eax, [esp + 0x4c]
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], ebx
push eax
mov byte [ecx + 4], bl
call fcn.004027b0
push esi
call fcn.00403880
cmp al, bl
jne 0x40379c
push ebx
mov dword [edi + 0x18], 0xf
mov dword [edi + 0x14], ebx
push 0x435d2a
mov ecx, edi
mov byte [edi + 4], bl
call fcn.00403070
mov byte [esp + 0x20], bl
cmp dword [esp + 0x40], 0x10
mov dword [esp + 0xc], ebp
jb 0x403863
mov ecx, dword [esp + 0x2c]
push ecx
jmp 0x40385b
mov ebp, dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp dword [esp + 0x44], ebx
je 0x4037ea
cmp dword [esi + 0xd8], ebx
jne 0x4037bc
push ebx
push ebx
push ebx
push ebx
call ebp
mov dword [esi + 0xd8], eax
cmp dword [esi + 0x74], 0x10
jb 0x4037c7
mov eax, dword [esi + 0x60]
jmp 0x4037ca
lea eax, [esi + 0x60]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4037ea
cmp dword [esi + 0x74], 0x10
jb 0x4037e0
mov eax, dword [esi + 0x60]
jmp 0x4037e3
lea eax, [esi + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
push ebx
push ebx
push ebx
mov byte [esi + 4], bl
call ebp
lea edx, [esi + 0x10]
push edx
push ebx
push esi
push 0x40c350
push ebx
push ebx
mov dword [esi + 8], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0xc], eax
cmp dword [esp + 0x44], ebx
je 0x403828
mov eax, dword [esi + 0xd8]
cmp eax, ebx
je 0x403828
push 0xdbba0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0xffffffffffffffff
lea eax, [esi + 0x5c]
push ebx
mov dword [edi + 0x18], 0xf
mov dword [edi + 0x14], ebx
push eax
mov ecx, edi
mov byte [edi + 4], bl
call fcn.004027b0
mov byte [esp + 0x20], bl
cmp dword [esp + 0x40], 0x10
mov dword [esp + 0xc], 1
jb 0x403863
mov eax, dword [esp + 0x2c]
push eax
call fcn.004174eb
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop ebp
pop ebx
add esp, 0x18
ret 0x20
Function at 0x404120
Capabilities:
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
sub esp, 0x1c
mov eax, dword [0x43b3c0]
xor eax, esp
mov dword [esp + 0x18], eax
cmp dword [esi + 0xd0], 0
je 0x40422a
mov ecx, esi
call fcn.00404280
mov dword [esi + 0xcc], eax
test eax, eax
jbe 0x40422a
push eax
lea eax, [esp + 0x10]
push 0x435f1c
push eax
call fcn.00417738
add esp, 0xc
cmp dword [esi + 0x74], 0x10
jb 0x40416e
mov eax, dword [esi + 0x60]
jmp 0x404171
lea eax, [esi + 0x60]
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 4], eax
cmp eax, 0xffffffff
je 0x40422a
push ebx
mov ebx, dword [esi + 0xcc]
push ebp
push edi
mov ebp, 0x2000
mov dword [esp + 0xc], 0
lea edi, [esi + 0xdc]
mov eax, dword [esi + 0xcc]
cmp ebp, eax
jbe 0x4041bf
mov ebp, eax
push 0x2000
push 0
push edi
call fcn.0041a300
mov edx, dword [esi + 0x20]
add esp, 0xc
lea ecx, [esp + 0xc]
push ecx
push ebp
push edi
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40420e
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40420e
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
push edi
push edx
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub ebx, dword [esp + 0xc]
jne 0x4041b3
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebp
test ebx, ebx
pop ebx
ja 0x40422a
mov dword [esi + 0xd4], 1
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.004174dc
add esp, 0x1c
ret
Function at 0x404bf0
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x124
mov eax, dword [0x43b3c0]
xor eax, esp
mov dword [esp + 0x11c], eax
push ebx
push ebp
push esi
push edi
push 0xff
lea eax, [esp + 0x2d]
push 0
push eax
mov byte [esp + 0x34], 0
call fcn.0041a300
add esp, 0xc
push 0x100
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x404e29
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x404e29
mov eax, dword [ebx + 0xc]
xor ebp, ebp
cmp dword [eax], ebp
je 0x404e29
mov edi, dword [sym.imp.WS2_32.dll_inet_addr]
xor ecx, ecx
movsx edx, word [ebx + 0xa]
mov eax, dword [eax + ecx]
push edx
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.00419f90
mov eax, dword [esp + 0x28]
movzx ecx, byte [esp + 0x2b]
movzx esi, al
shl esi, 8
movzx edx, ah
movzx eax, byte [esp + 0x2a]
add esi, edx
shl esi, 8
add esi, eax
add esp, 0xc
shl esi, 8
push str.10.0.0.0
add esi, ecx
call edi
movzx edx, al
mov dword [esp + 0x14], eax
movzx ecx, byte [esp + 0x16]
shl edx, 8
movzx eax, ah
add edx, eax
movzx eax, byte [esp + 0x17]
shl edx, 8
add edx, ecx
shl edx, 8
add edx, eax
cmp esi, edx
jbe 0x404cfc
push str.10.255.255.255
call edi
movzx ecx, al
shl ecx, 8
movzx edx, ah
add ecx, edx
mov dword [esp + 0x14], eax
movzx eax, byte [esp + 0x16]
movzx edx, byte [esp + 0x17]
shl ecx, 8
add ecx, eax
shl ecx, 8
add ecx, edx
cmp esi, ecx
jb 0x404e14
push str.172.16.0.0
call edi
movzx ecx, al
shl ecx, 8
movzx edx, ah
add ecx, edx
mov dword [esp + 0x14], eax
movzx eax, byte [esp + 0x16]
movzx edx, byte [esp + 0x17]
shl ecx, 8
add ecx, eax
shl ecx, 8
add ecx, edx
cmp esi, ecx
jbe 0x404d5c
push str.172.31.255.255
call edi
movzx ecx, al
shl ecx, 8
movzx edx, ah
add ecx, edx
mov dword [esp + 0x14], eax
movzx eax, byte [esp + 0x16]
movzx edx, byte [esp + 0x17]
shl ecx, 8
add ecx, eax
shl ecx, 8
add ecx, edx
cmp esi, ecx
jb 0x404e14
push str.192.168.0.0
call edi
movzx ecx, al
shl ecx, 8
movzx edx, ah
add ecx, edx
mov dword [esp + 0x14], eax
movzx eax, byte [esp + 0x16]
movzx edx, byte [esp + 0x17]
shl ecx, 8
add ecx, eax
shl ecx, 8
add ecx, edx
cmp esi, ecx
jbe 0x404db8
push str.192.168.255.255
call edi
movzx ecx, al
shl ecx, 8
movzx edx, ah
add ecx, edx
mov dword [esp + 0x14], eax
movzx eax, byte [esp + 0x16]
movzx edx, byte [esp + 0x17]
shl ecx, 8
add ecx, eax
shl ecx, 8
add ecx, edx
cmp esi, ecx
jb 0x404e14
push str.169.254.0.0
call edi
movzx ecx, al
shl ecx, 8
movzx edx, ah
add ecx, edx
mov dword [esp + 0x14], eax
movzx eax, byte [esp + 0x16]
movzx edx, byte [esp + 0x17]
shl ecx, 8
add ecx, eax
shl ecx, 8
add ecx, edx
cmp esi, ecx
jbe 0x404e44
push str.169.254.255.255
call edi
movzx ecx, al
shl ecx, 8
movzx edx, ah
add ecx, edx
mov dword [esp + 0x14], eax
movzx eax, byte [esp + 0x16]
movzx edx, byte [esp + 0x17]
shl ecx, 8
add ecx, eax
shl ecx, 8
add ecx, edx
cmp esi, ecx
jae 0x404e44
mov eax, dword [ebx + 0xc]
inc ebp
cmp dword [eax + ebp*4], 0
lea ecx, [ebp*4]
jne 0x404c63
xor eax, eax
mov ecx, dword [esp + 0x12c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004174dc
add esp, 0x124
ret
mov eax, 1
jmp 0x404e2b
Function at 0x405450
Capabilities:
Create service
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x218
mov eax, dword [0x43b3c0]
xor eax, esp
mov dword [esp + 0x214], eax
push ebx
push ebp
push 0xf003f
push 0
mov ebx, ecx
push 0
mov dword [esp + 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
test ebp, ebp
je 0x4054c8
push 0x104
lea eax, [esp + 0x1c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x2c]
push ecx
push 1
push 2
push 0x10
push 0xf01ff
add ebx, 4
push ebx
push ebx
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x4054e1
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.004174dc
add esp, 0x218
ret
push esi
push edi
mov ecx, 0xe
mov esi, str.SYSTEMCurrentControlSetServicesEventLogApplication_
lea edi, [esp + 0x124]
mov eax, ebx
mov dword [esp + 0x10], 0
rep movsd dword es:[edi], dword [esi]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405502
lea edi, [esp + 0x124]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x405513
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x128]
push eax
and ecx, 3
push reloc.WS2_32.dll_bind
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x40555b
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ecx
call esi
push ebp
call esi
xor eax, eax
jmp 0x4055d6
lea eax, [esp + 0x20]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405562
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
sub eax, edx
inc eax
push eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x24]
push edx
push 2
push 0
push str.EventMessageFile
push eax
call esi
mov edx, dword [esp + 0x10]
push 4
lea ecx, [esp + 0x1c]
push ecx
push 4
push 0
push str.TypesSupported
push edx
mov dword [esp + 0x30], 7
call esi
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [esp + 0x1c]
push 0x64
push 4
mov eax, ebx
call fcn.00405670
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ecx
call esi
push ebp
call esi
mov eax, 1
mov ecx, dword [esp + 0x224]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004174dc
add esp, 0x218
ret

Function at 0x405670
Capabilities:
Access the windows event log

Disassembly:
sub esp, 0xc
push esi
xor esi, esi
mov dword [esp + 4], eax
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
test eax, eax
je 0x405693
mov esi, 1
cmp dword [edi + 0x74], 0
jne 0x4056a8
lea eax, [edi + 4]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov dword [edi + 0x74], eax
mov eax, dword [edi + 0x74]
test eax, eax
je 0x4056ce
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esp + 0x1c]
push 0
push esi
push 0
push edx
push 0
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
pop esi
add esp, 0xc
ret 8
Function at 0x4057c0
Capabilities:
Access the windows event log

Disassembly:
sub esp, 0xc
push ebx
push ebp
push edi
push str.Entering_CNTService::Initialize__
mov ecx, esi
call fcn.00405b80
mov eax, dword [esi + 0x4c]
push 2
push eax
push str.CNTService::SetStatus__lu___lu_
mov ecx, esi
call fcn.00405b80
mov ecx, dword [esi + 0x4c]
add esp, 0x10
lea ebx, [esi + 0x50]
push ebx
push ecx
mov dword [esi + 0x54], 2
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebp, ebp
mov dword [esi + 0x5c], eax
mov dword [esi + 0x64], ebp
mov dword [esi + 0x68], ebp
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ebp
cmp edi, ebp
jne 0x405887
cmp dword [esi + 0x74], ebp
jne 0x40583b
lea ecx, [esi + 4]
push ecx
push ebp
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov dword [esi + 0x74], eax
mov eax, dword [esi + 0x74]
cmp eax, ebp
je 0x405857
push ebp
lea edx, [esp + 0x10]
push edx
push ebp
push ebp
push ebp
push 0x68
push ebp
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
mov eax, dword [esi + 0x4c]
push 1
push eax
push str.CNTService::SetStatus__lu___lu_
mov ecx, esi
call fcn.00405b80
mov ecx, dword [esi + 0x4c]
add esp, 0xc
push ebx
push ecx
mov dword [esi + 0x54], 1
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
cmp dword [esi + 0x74], ebp
jne 0x40589a
lea edx, [esi + 4]
push edx
push ebp
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov dword [esi + 0x74], eax
mov eax, dword [esi + 0x74]
cmp eax, ebp
je 0x4058b6
push ebp
lea ecx, [esp + 0x10]
push ecx
push ebp
push ebp
push ebp
push 0x69
push ebp
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
mov edx, dword [esi + 0x4c]
push 4
push edx
push str.CNTService::SetStatus__lu___lu_
mov ecx, esi
call fcn.00405b80
mov eax, dword [esi + 0x4c]
add esp, 0xc
push ebx
push eax
mov dword [esi + 0x54], 4
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
push str.Leaving_CNTService::Initialize__
mov ecx, esi
call fcn.00405b80
add esp, 4
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xc
ret

Function at 0x405b80
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x404
mov eax, dword [0x43b3c0]
xor eax, esp
mov dword [esp + 0x400], eax
push esi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
add esi, 4
push esi
lea eax, [esp + 0xc]
push str.__s___lu_:
push eax
call fcn.00417738
add esp, 0x10
lea eax, [esp + 4]
lea edx, [eax + 1]
pop esi
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405bc0
push edi
sub eax, edx
mov edx, dword [esp + 0x40c]
lea ecx, [esp + 0x410]
push ecx
push edx
lea eax, [esp + eax + 0xc]
push eax
call fcn.0041922e
lea edi, [esp + 0x10]
add esp, 0xc
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405bf0
mov cx, word [0x4364f0]
lea edx, [esp + 4]
push edx
mov word [edi], cx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [esp + 0x404]
pop edi
xor ecx, esp
call fcn.004174dc
add esp, 0x404
ret
Function at 0x407510
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x42f098
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x43b3c0]
xor eax, esp
push eax
lea eax, [esp + 0x10]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0xc], esi
mov dword [esi], vtable.CProxyListenThread.0
mov dword [esp + 0x18], 0
mov ecx, dword [esi + 0x30]
test ecx, ecx
je 0x407556
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov eax, dword [esi + 8]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], vtable.CThread.0
test eax, eax
je 0x40756c
push eax
call edi
mov esi, dword [esi + 0xc]
test esi, esi
je 0x407576
push esi
call edi
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0x10
ret

Function at 0x407590
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov ecx, dword [ebp + 0x2c]
mov edx, dword [ebp + 0x28]
push ecx
push edx
lea eax, [ebp + 0x18]
push eax
push str.CProxyListenThread:_Listen__s:_d___d__n
call fcn.00404f40
add esp, 0x10
xor ebx, ebx
cmp dword [ebp + 0x30], ebx
jne 0x4075e5
push 0x30
call fcn.00417676
add esp, 4
cmp eax, ebx
je 0x4075e0
mov ecx, dword [ebp + 0x2c]
movzx edx, word [ebp + 0x28]
push ecx
push edx
lea ecx, [ebp + 0x18]
push ecx
mov edi, eax
call fcn.0040c1f0
jmp 0x4075e2
xor eax, eax
mov dword [ebp + 0x30], eax
mov ecx, dword [ebp + 0x30]
call fcn.0040c280
mov edi, eax
mov eax, dword [edi + 0x1bc]
cmp eax, 0xffffffff
jne 0x40762a
mov eax, dword [ebp + 0x30]
lea ecx, [eax + 8]
mov eax, dword [ecx]
mov edx, dword [eax + 0x20]
call edx
mov ecx, dword [ebp + 0x30]
cmp ecx, ebx
je 0x407616
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov eax, dword [ebp + 8]
push 0xbb8
push eax
mov dword [ebp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4075b7
push eax
push str.CProxyListenThread:_Accept_Socket__d__from_Application_n
call fcn.00404f40
push 0x20
call fcn.00417676
add esp, 0xc
cmp eax, ebx
je 0x407662
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
mov dword [0x43d770], ebx
mov dword [eax], vtable.CProxyHttpThread.0
mov dword [eax + 0x18], ebx
mov byte [eax + 0x1c], bl
mov esi, eax
jmp 0x407664
xor esi, esi
push ebx
push ebx
push ebx
mov dword [edi + 0x214], 1
push ebx
mov dword [esi + 0x18], edi
mov byte [esi + 4], 1
call dword [sym.imp.KERNEL32.dll_CreateEventA]
lea ecx, [esi + 0x10]
push ecx
push ebx
push esi
push 0x40c350
push ebx
push ebx
mov dword [esi + 8], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0xc], eax
jmp 0x4075b7
Function at 0x4076f0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x410
mov eax, dword [0x43b3c0]
xor eax, esp
mov dword [esp + 0x40c], eax
push ebx
push esi
push edi
mov ebx, ecx
mov ecx, 8
mov esi, str.SYSTEMCurrentControlSetServices_
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea eax, [ebx + 4]
movsb byte es:[edi], byte [esi]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x407721
lea edi, [esp + 0x18]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x407731
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x18]
rep movsb byte es:[edi], byte [esi]
dec eax
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x407750
mov ecx, dword [str.Parameters]
mov edx, dword [0x436f94]
mov dword [eax], ecx
mov ecx, dword [0x436f98]
mov dword [eax + 4], edx
lea edx, [esp + 0xc]
push edx
push 1
mov dword [eax + 8], ecx
push 0
lea eax, [esp + 0x24]
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4077e9
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x10]
lea edx, [ebx + 0x78]
push edx
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
push 0
push str.Start
mov edi, 4
push ecx
mov dword [esp + 0x28], edi
call esi
lea edx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x10]
lea eax, [ebx + 0x7c]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 0
push 0x436fa4
push edx
mov dword [esp + 0x28], edi
call esi
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebx + 0x78]
pop edi
mov dword [ebx + 0x80], ecx
mov ecx, dword [esp + 0x414]
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.004174dc
add esp, 0x410
ret
Function at 0x407e00
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x40c
mov eax, dword [0x43b3c0]
xor eax, esp
mov dword [esp + 0x408], eax
push esi
push edi
push str.Saving_current_status
mov ecx, ebx
call fcn.00405b80
mov ecx, 8
mov esi, str.SYSTEMCurrentControlSetServices_
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea eax, [ebx + 4]
movsb byte es:[edi], byte [esi]
add esp, 4
mov dword [esp + 8], 0
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407e45
lea edi, [esp + 0x10]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x407e53
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x10]
rep movsb byte es:[edi], byte [esi]
dec eax
mov edi, edi
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x407e70
mov ecx, dword [str.Status]
mov edx, dword [0x437054]
mov dword [eax], ecx
mov dword [eax + 4], edx
lea eax, [esp + 0x10]
push eax
push str.Creating_key:__s
mov ecx, ebx
call fcn.00405b80
add esp, 8
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0xc]
push edx
push 0
push 0x20006
push 0
push 0x435d2a
push 0
lea eax, [esp + 0x2c]
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x407ef2
push eax
push str.Failed_to_create_Status_key___lu_
mov ecx, ebx
call fcn.00405b80
add esp, 8
pop edi
pop esi
mov ecx, dword [esp + 0x408]
xor ecx, esp
call fcn.004174dc
add esp, 0x40c
ret
mov ecx, dword [ebx + 0x80]
lea esi, [ebx + 0x80]
push ecx
push str.Saving_Current_as__ld
mov ecx, ebx
call fcn.00405b80
mov edx, dword [esp + 0x10]
add esp, 8
push 4
push esi
push 4
push 0
push str.Current
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x410]
pop edi
pop esi
xor ecx, esp
call fcn.004174dc
add esp, 0x40c
ret
Function at 0x4082c0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x42f1b9
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43b3c0]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov esi, dword [esp + 0x30]
xor edi, edi
mov dword [esp + 0x14], edi
mov dword [esi], vtable.CPureString.0
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov eax, dword [esp + 0x34]
mov dword [esp + 0x28], edi
mov dword [esp + 0x14], 1
lea ebx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x408313
mov edx, dword [ecx + 4]
sub eax, ebx
mov ebx, dword [ecx + 8]
lea ebp, [eax + ebx]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edx
cmp ebp, edi
je 0x40836e
lea eax, [ebp + 1]
push eax
call fcn.00417676
mov edi, eax
mov eax, dword [esp + 0x1c]
push ebx
push eax
push edi
call fcn.00419f90
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x44]
push ecx
push edx
lea eax, [edi + ebx]
push eax
call fcn.00419f90
lea eax, [ebp + 1]
mov dword [esi + 0xc], eax
mov dword [esi + 8], ebp
mov byte [edi + ebp], 0
add esp, 0x1c
mov dword [esi + 4], edi
mov eax, esi
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret

Function at 0x408390
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x42f1b9
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43b3c0]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov esi, dword [esp + 0x30]
xor edi, edi
mov dword [esp + 0x14], edi
mov dword [esi], vtable.CPureString.0
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov eax, str.KeepAlive:
mov dword [esp + 0x28], edi
mov dword [esp + 0x14], 1
lea ebx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4083e4
sub eax, ebx
mov ebx, eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x1c], eax
mov eax, dword [ecx + 8]
lea ebp, [ebx + eax]
mov dword [esp + 0x18], eax
cmp ebp, edi
je 0x408440
lea eax, [ebp + 1]
push eax
call fcn.00417676
push ebx
mov edi, eax
push str.KeepAlive:
push edi
call fcn.00419f90
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
push ecx
push edx
add ebx, edi
push ebx
call fcn.00419f90
lea eax, [ebp + 1]
mov dword [esi + 0xc], eax
mov dword [esi + 8], ebp
mov byte [edi + ebp], 0
add esp, 0x1c
mov dword [esi + 4], edi
mov eax, esi
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret