joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403e33
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x4225c4]
mov eax, dword [0x421e90]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x403ff9
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x4225e0]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x403ff9
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x403e9d
xor eax, eax
jmp 0x40400d
test al, 0x20
je 0x403eae
push 2
push edi
push edi
push ecx
call fcn.004050ca
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x403f83
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x403fca
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x403f10
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x403f01
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x403ee3
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x403f50
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x403f5c
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x403ed7
jmp 0x403f5e
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x403ff4
cmp dword [ebp + 0x3a4], edi
je 0x403fca
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x403fbc
mov dword [0x42214c], eax
jmp 0x404000
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x403fae
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x403f5e
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x403f5e
push dword [ebp + 0x3a4]
call fcn.00404fb5
pop ecx
jmp 0x40400a
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x403fe2
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x403e96
mov dword [0x422148], 0x1c
mov dword [0x42214c], edi
jmp 0x40400a
sub eax, dword [ebp - 0x7c]
jmp 0x40400d
and dword [0x42214c], 0
mov dword [0x422148], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00404f12
add ebp, 0x39c
leave
ret
Function at 0x40426f
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x421e90]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x421d48]
je 0x4042a4
inc eax
cmp eax, 0x13
jb 0x404295
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x421d48]
jne 0x4043ca
mov eax, dword [0x4221a4]
cmp eax, 1
je 0x4043a2
cmp eax, edx
jne 0x4042d4
cmp dword [0x421d34], 1
je 0x4043a2
cmp ecx, 0xfc
je 0x4043ca
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x40430a
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00405e50
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00404df0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40433e
mov eax, edi
push eax
call fcn.00404df0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4085b0
push edi
call fcn.00405f50
add esp, 0x10
push edi
call fcn.00404df0
push dword [esi + 0x421d4c]
mov ebx, eax
call fcn.00404df0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00404b50
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00405e50
push edi
push ebx
call fcn.00405e60
push 0x408590
push ebx
call fcn.00405e60
push dword [esi + 0x421d4c]
push ebx
call fcn.00405e60
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00405d54
add esp, 0x2c
jmp 0x4043ca
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x421d4c]
push dword [esi]
call fcn.00404df0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.DLL_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00404f12
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x405d54
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x4222cc], ebx
push esi
push edi
jne 0x405dd4
push str.user32.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x405e0f
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x4222cc], eax
je 0x405e0f
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x4222d0], eax
call esi
cmp dword [0x422154], 2
mov dword [0x4222d4], eax
jne 0x405dd4
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x4222dc], eax
je 0x405dd4
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x4222d8], eax
mov eax, dword [0x4222d8]
test eax, eax
je 0x405e19
call eax
test eax, eax
je 0x405e00
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x4222dc]
test eax, eax
je 0x405e00
test byte [ebp - 8], 1
jne 0x405e19
cmp dword [0x422160], 4
jb 0x405e13
or byte [ebp + 0x12], 0x20
jmp 0x405e38
xor eax, eax
jmp 0x405e48
or byte [ebp + 0x12], 4
jmp 0x405e38
mov eax, dword [0x4222d0]
test eax, eax
je 0x405e38
call eax
mov ebx, eax
test ebx, ebx
je 0x405e38
mov eax, dword [0x4222d4]
test eax, eax
je 0x405e38
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x4222cc]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40688e
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x4068bc
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x4068c3
cmp ebx, dword [eax + 4]
jae 0x4068c3
xor eax, eax
jmp 0x406ab3
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4068d4
xor eax, eax
inc eax
jmp 0x406ab2
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4068ea
cmp ecx, edx
jae 0x406a2f
cmp dword [eax + 4], 0
je 0x4068f3
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4068db
cmp dword [ebp + 8], 0
je 0x406915
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x406a2f
cmp eax, esi
jae 0x406a2f
mov eax, dword [0x4222e8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40693a
cmp dword [esi*4 + 0x4222f0], edi
je 0x406a33
inc esi
cmp esi, eax
jl 0x406928
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x406aaf
cmp dword [ebp - 8], 0x1000000
jne 0x406aaf
test byte [ebp - 0xc], 0xcc
je 0x4069b8
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x406aaf
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x406aaf
cmp word [eax + 0x18], 0x10b
jne 0x406aaf
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x406aaf
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4069b8
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4069b8
test byte [ecx + 0x27], 0x80
jne 0x406a2f
push 1
push 0x422330
call dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
test eax, eax
jne 0x4068cc
mov ecx, dword [0x4222e8]
test ecx, ecx
mov edx, ecx
jle 0x4069ec
lea eax, [ecx*4 + 0x4222ec]
cmp dword [eax], edi
je 0x4069ec
dec edx
sub eax, 4
test edx, edx
jg 0x4069e0
test edx, edx
jne 0x406a1d
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4069f9
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x406a11
lea eax, [edx*4 + 0x4222f0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4069ff
cmp ecx, 0x10
jge 0x406a1d
inc ecx
mov dword [0x4222e8], ecx
push 0
push 0x422330
call dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
jmp 0x4068cc
xor eax, eax
jmp 0x406ab2
test esi, esi
jle 0x4068cc
mov ebx, dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
push 1
push 0x422330
call ebx
test eax, eax
jne 0x4068cc
cmp dword [esi*4 + 0x4222f0], edi
je 0x406a89
mov eax, dword [0x4222e8]
lea esi, [eax - 1]
test esi, esi
jl 0x406a77
cmp dword [esi*4 + 0x4222f0], edi
je 0x406a73
dec esi
jns 0x406a67
test esi, esi
jge 0x406a87
cmp eax, 0x10
jge 0x406a82
inc eax
mov dword [0x4222e8], eax
lea esi, [eax - 1]
jmp 0x406a89
je 0x406aa1
xor ecx, ecx
test esi, esi
jl 0x406aa1
lea eax, [ecx*4 + 0x4222f0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x406a8f
push 0
push 0x422330
call ebx
jmp 0x4068cc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40780d
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00404b50
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x4078a8
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x422154]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x4078a8
cmp eax, 1
je 0x4078c9
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x4078a8
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x407875
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4078a4
xor eax, eax
inc eax
jmp 0x4078e8
cmp edi, eax
jae 0x4078ac
xor eax, eax
jmp 0x4078e8
cmp eax, esi
jae 0x4078b3
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov eax, dword [0x422154]
jmp 0x4078cc
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401000
Capabilities:
Check if file exists
Copy file
Delete file

Disassembly:
mov eax, 0x1010
call fcn.00402340
push ebx
push ebp
push esi
push edi
push 0x40d790
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0xfff
push 0x8009
push 0x40db98
call fcn.00407bc0
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
jne 0x401059
push 0xfff
push 0x8101
push 0x40db98
call fcn.00407bc0
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
je 0x40113c
push esi
call fcn.00407b36
mov ebx, eax
add esp, 4
cmp ebx, 0x7a120
jbe 0x40113c
push 0x40d7a8
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x4010bd
push 0x40d7a8
call ebp
push 0x40d7a8
lea eax, [esp + 0x24]
push str......._s_deleted_r_n
push eax
call fcn.004022e1
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x30]
push ecx
push esi
call fcn.00404820
add esp, 0x18
push 0x40d7a8
push ebx
push 0x40db98
lea edx, [esp + 0x2c]
push str......._s__ld__copied_to__s_r_n
push edx
call fcn.004022e1
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x34]
push ecx
push eax
push esi
call fcn.00404820
push esi
call fcn.00407a1c
add esp, 0x24
push 0
push 0x40d7a8
push 0x40db98
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x401123
push 0x40db98
call ebp
push 0x1ff
push 0x8101
jmp 0x40112d
push 0x1ff
push 0x8009
push 0x40db98
call fcn.00407bc0
add esp, 0xc
mov esi, eax
test esi, esi
je 0x401205
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x1a]
mov ecx, dword [esp + 0x18]
and edx, 0xffff
and eax, 0xffff
push edx
mov edx, dword [esp + 0x1a]
and ecx, 0xffff
push eax
mov eax, dword [esp + 0x1a]
push ecx
mov ecx, dword [esp + 0x1c]
and edx, 0xffff
and eax, 0xffff
push edx
and ecx, 0xffff
push eax
push ecx
lea edx, [esp + 0x38]
push str._d__02d__02d__.2d:_.2d:_.2d
push edx
call fcn.004022e1
lea edi, [esp + 0x40]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x40]
push ecx
push eax
push esi
call fcn.00404820
mov edx, dword [esp + 0x1050]
lea ecx, [esp + 0x1054]
push ecx
lea eax, [esp + 0x50]
push edx
push eax
call fcn.00402290
lea edi, [esp + 0x58]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x5c]
push ecx
push esi
call fcn.00404820
add esp, 0x44
push 2
push 0x40a048
push esi
call fcn.00404820
push esi
call fcn.00407a1c
add esp, 0x10
push 0x40d790
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1010
ret
Function at 0x401850
Capabilities:
Stop service

Disassembly:
sub esp, 0x1c
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x401888
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed__error_code___d
call section..text
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
mov eax, dword [esp + 0x2c]
push 0xf01ff
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
jne 0x4018c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService_failed__error_code___d
call section..text
add esp, 8
push edi
call ebx
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1c
ret
lea ecx, [esp + 0xc]
push ecx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4018ef
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x1c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ControlService_failed__error_code___d
call section..text
add esp, 8
push esi
call ebx
push edi
call ebx
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1c
ret

Function at 0x401920
Capabilities:
Start service

Disassembly:
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x401952
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed__error_code___d
call section..text
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
ret
mov eax, dword [esp + 0x10]
push 0xf01ff
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
jne 0x40198c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService_failed__error_code___d
call section..text
add esp, 8
push edi
call ebx
pop edi
pop esi
xor eax, eax
pop ebx
ret
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push ecx
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x4019b6
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop edi
pop esi
mov eax, 1
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartService_failed__error_code___d
call section..text
add esp, 8
push esi
call ebx
push edi
call ebx
pop edi
pop esi
xor eax, eax
pop ebx
ret
Function at 0x401bf0
Capabilities:
Delete service

Disassembly:
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x401c1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed__error_code___d
call section..text
add esp, 8
pop edi
ret
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
push 0xf01ff
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
jne 0x401c58
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService_failed__error_code___d
call section..text
add esp, 8
push edi
call ebp
pop esi
pop ebp
pop ebx
pop edi
ret
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
push ebx
jne 0x401c7c
push str.Failed_to_delete_service__s
call section..text
add esp, 8
push esi
call ebp
push edi
call ebp
pop esi
pop ebp
pop ebx
pop edi
ret
push str.Service__s_removed
call section..text
add esp, 8
push esi
call ebp
push edi
call ebp
pop esi
pop ebp
pop ebx
pop edi
ret

Function at 0x401ca0
Capabilities:
Create service
Persist via windows service

Disassembly:
push ebx
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x401cc9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed__error_code___d
call section..text
add esp, 8
pop ebx
ret
mov eax, dword [esp + 8]
push ebp
push esi
push edi
push 0
mov esi, dword [esp + 0x1c]
push 0
push 0
push 0
push 0
push eax
push 1
push 2
push 0x110
push 0xf01ff
push esi
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
test edi, edi
jne 0x401d1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Failed_to_create_service__s__error_code___d
call section..text
add esp, 0xc
push ebx
call ebp
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
push str.Service__s_installed
call section..text
add esp, 8
push edi
call ebp
push ebx
call ebp
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x343d77
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, 0x400
push esi
call fcn.003564cd
mov ebx, eax
pop ecx
test ebx, ebx
je 0x343e15
push dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push dword [ebp + 8]
push eax
call fcn.00347bc7
add esp, 0xc
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.00347cf2
pop ecx
pop ecx
test eax, eax
jne 0x343dbf
push ebx
call fcn.003563f0
jmp 0x343e14
push dword [ebp + 0x10]
push ebx
call fcn.00356ee8
mov esi, eax
pop ecx
pop ecx
cmp esi, 0xffffffff
je 0x343dfe
test esi, esi
je 0x343dfe
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.00347c95
add esp, 4
push eax
push 1
lea eax, [ebp - 0x14]
call fcn.00347ca0
push eax
call fcn.00357061
push esi
call fcn.0035715a
add esp, 0x14
jmp 0x343db7
push ebx
call fcn.003563f0
pop ecx
call dword [0x745b8180]
push eax
push 8
call fcn.00343042
pop ecx
pop ecx
pop esi
pop ebx
leave
ret

Function at 0x34472e
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
lea ebx, [edi + 4]
push esi
mov esi, eax
mov dword [ebp - 4], esi
mov dword [ebp - 8], ebx
cmp ebx, dword [ebp + 0xc]
jbe 0x344749
xor eax, eax
jmp 0x344781
call fcn.003438e0
mov dword [esi], eax
add esi, 4
xor ecx, ecx
test edi, edi
jbe 0x34477f
mov eax, dword [ebp + 8]
sub eax, esi
mov dword [ebp + 0xc], eax
mov ebx, dword [ebp - 4]
mov edx, ecx
and edx, 3
mov dl, byte [edx + ebx]
mov ebx, dword [ebp + 0xc]
lea eax, [ecx + esi]
xor dl, byte [ebx + eax]
inc ecx
mov byte [eax], dl
cmp ecx, edi
jb 0x344761
mov ebx, dword [ebp - 8]
mov eax, ebx
pop esi
pop ebx
leave
ret

Function at 0x344785
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, eax
lea eax, [edi - 4]
mov esi, ecx
cmp eax, dword [ebp + 0xc]
jbe 0x34479a
xor eax, eax
jmp 0x3447c5
mov eax, esi
add esi, 4
sub edi, 4
push 0
pop edx
je 0x3447c3
sub esi, dword [ebp + 8]
push ebx
mov ecx, dword [ebp + 8]
mov ebx, edx
and ebx, 3
mov bl, byte [ebx + eax]
add ecx, edx
xor bl, byte [esi + ecx]
inc edx
mov byte [ecx], bl
cmp edx, edi
jb 0x3447ab
pop ebx
mov eax, edi
pop edi
pop esi
pop ebp
ret

Function at 0x345014
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
xor edi, edi
mov esi, eax
cmp dword [0x745ca624], edi
jne 0x345036
push 0x80004
call fcn.003564cd
pop ecx
mov dword [0x745ca624], eax
push dword [esi]
call fcn.00364f76
mov ecx, dword [0x745ca624]
mov dword [ecx], eax
mov ebx, dword [esi + 4]
cmp ebx, dword [ebp + 8]
jbe 0x345075
mov ebx, dword [ebp + 8]
jmp 0x345075
push dword [esi + 8]
mov eax, dword [0x745ca624]
push ebx
lea eax, [eax + edi + 4]
push 1
push eax
call fcn.0035780c
add esp, 0x10
test eax, eax
je 0x34507b
add edi, eax
sub ebx, eax
sub dword [esi + 4], eax
test ebx, ebx
ja 0x345052
jmp 0x34507f
and dword [esi + 4], 0
push 8
add edi, 4
push edi
push dword [0x745ca624]
call fcn.00341ed0
add esp, 0xc
call fcn.0034509d
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x34a1d1
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
call fcn.0034a8f1
mov dword [ebp - 8], eax
mov eax, 1
test eax, eax
je 0x34a22f
mov ecx, dword [ebp - 8]
movzx edx, word [ecx]
cmp edx, 0x5a4d
jne 0x34a224
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x3c]
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0x40
jb 0x34a224
cmp dword [ebp - 4], 0x400
jae 0x34a224
mov edx, dword [ebp - 4]
add edx, dword [ebp - 8]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp dword [eax], 0x4550
jne 0x34a224
jmp 0x34a22f
mov ecx, dword [ebp - 8]
sub ecx, 1
mov dword [ebp - 8], ecx
jmp 0x34a1df
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
Function at 0x34a511
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
mov eax, dword [ebp + 0xc]
movzx ecx, word [eax + 0x14]
mov edx, dword [ebp + 0xc]
lea eax, [edx + ecx + 0x18]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 0xc]
movzx edx, word [ecx + 6]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
sub ecx, 1
mov dword [ebp - 0xc], ecx
test eax, eax
je 0x34a598
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
add eax, dword [edx + 0xc]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 0x10]
add edx, dword [ecx + 0x14]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x10]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 0x14]
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x24]
and eax, 0x20000000
je 0x34a58d
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x14]
mov dword [ecx], edx
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
mov edx, dword [ebp - 0x10]
add edx, 0x28
mov dword [ebp - 0x10], edx
jmp 0x34a534
pop edi
pop esi
mov esp, ebp
pop ebp
ret