joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1006cef1
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.1006ce6d
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x1006d060
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x1006d060
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x1006d015
jg 0x1006cf4d
test eax, eax
je 0x1006d00b
push 1
push 0x1000
call fcn.10063270
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1006cf70
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x1006d002
push 0x8000
push ebx
call fcn.1006cd9e
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x1006cf99
jg 0x1006cf94
cmp ecx, 0x1000
jb 0x1006cf99
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.10065e55
add esp, 0x10
cmp eax, 0xffffffff
je 0x1006cfde
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x1006cf94
jl 0x1006cfc5
test ecx, ecx
jne 0x1006cf86
push dword [ebp - 0xc]
push ebx
call fcn.1006cd9e
push esi
call fcn.100632cd
add esp, 0xc
xor ebx, ebx
jmp 0x1006d06e
cmp byte [edi + 0x24], 0
je 0x1006cff5
cmp dword [edi + 0x20], 5
jne 0x1006cff5
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x1006d000
mov ebx, dword [edi + 0x18]
jmp 0x1006d002
xor ebx, ebx
push esi
call fcn.100632cd
pop ecx
jmp 0x1006d06e
test ecx, ecx
jg 0x1006cfd7
jl 0x1006d015
test eax, eax
jae 0x1006cfd7
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10064983
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1006d035
cmp byte [edi + 0x1c], 0
je 0x1006cfd7
jmp 0x1006d066
push ebx
call fcn.1006a285
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1006cfd7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x1006d06e
cmp byte [edi + 0x1c], 0
je 0x1006d06b
mov ebx, dword [edi + 0x18]
jmp 0x1006d06e
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10064983
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1006f340
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1006f36d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1006f36d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x40125e
Capabilities:
Get graphical window text

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0xe8
push ebx
push esi
mov esi, dword [ebp + 0x78]
push edi
push dword [ebp + 0x7c]
mov edi, dword [sym.imp.USER32.dll_GetDlgItem]
push dword [esi + 0x18]
call edi
push 9
push dword [esi + 0x18]
mov dword [ebp + 0x6c], eax
call edi
mov dword [ebp + 0x78], eax
push 0x64
lea eax, [ebp - 0x78]
push eax
push dword [ebp + 0x6c]
xor ebx, ebx
mov word [ebp - 0x78], bx
call dword [sym.imp.USER32.dll_GetWindowTextW]
lea eax, [ebp - 0x78]
push eax
push dword [ebp + 0x78]
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea eax, [ebp + 0x64]
push eax
push dword [esi + 0x18]
mov dword [ebp + 0x64], ebx
mov dword [ebp + 0x68], ebx
call dword [sym.imp.USER32.dll_ClientToScreen]
xor eax, eax
lea edi, [ebp + 0x54]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp + 0x54]
push eax
push dword [ebp + 0x6c]
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ecx, dword [ebp + 0x58]
mov eax, dword [ebp + 0x54]
mov edi, dword [ebp + 0x60]
mov esi, dword [ebp + 0x5c]
push 4
sub edi, ecx
sub ecx, dword [ebp + 0x68]
push edi
sub esi, eax
sub eax, dword [ebp + 0x64]
push esi
push ecx
push eax
push ebx
push dword [ebp + 0x78]
mov dword [ebp + 0x54], eax
mov dword [ebp + 0x58], ecx
call dword [sym.imp.USER32.dll_SetWindowPos]
push 1
push edi
push esi
push dword [ebp + 0x58]
push dword [ebp + 0x54]
push dword [ebp + 0x78]
call dword [sym.imp.USER32.dll_MoveWindow]
push ebx
push dword [ebp + 0x6c]
call dword [sym.imp.USER32.dll_ShowWindow]
pop edi
pop esi
pop ebx
add ebp, 0x70
leave
ret

Function at 0x402c66
Capabilities:
Acquire debug privileges

Disassembly:
xor eax, eax
cmp byte [esp + 4], al
push esi
mov esi, ecx
mov byte [esi], al
je 0x402c96
test byte [0x4beb98], 4
jne 0x402c96
push eax
push 2
mov byte [esi], 1
or byte [0x4beb98], 4
push str.SeDebugPrivilege
call fcn.0041147a
add esp, 0xc
mov eax, esi
pop esi
ret 4
Function at 0x40381a
Capabilities:
Get common file path
Query environment variable

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi]
push edi
xor edi, edi
test eax, eax
je 0x403831
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
push 0x2d0
mov ecx, esi
call fcn.0043d3ea
test edi, edi
jg 0x4038bc
mov eax, dword [esi]
and word [eax], 0
mov eax, dword [esi]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push ebp
mov ebp, 0x208
push ebp
push eax
push 0x4a3cc4
call ebx
mov edi, eax
test edi, edi
jg 0x4038aa
mov eax, dword [esi]
push ebp
push eax
push 0x4a3cb8
call ebx
mov edi, eax
test edi, edi
jg 0x4038aa
push 0
push 0x24
push dword [esi]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
test edi, edi
jle 0x4038ba
mov eax, dword [esi]
push 0x4a3cac
lea eax, [eax + edi*2]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
add edi, 5
test edi, edi
jle 0x4038ba
mov eax, dword [esi]
mov word [eax + edi*2], 0x5c
mov eax, dword [esi]
inc edi
and word [eax + edi*2], 0
pop ebp
pop ebx
push dword [esi]
call fcn.0041baa3
test edi, edi
pop ecx
jle 0x4038d4
push dword [esi]
call fcn.0048eec0
test eax, eax
pop ecx
jne 0x403901
push 0
push 0x24
push dword [esi]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.TEMP_
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push dword [esi]
call fcn.0041baa3
pop ecx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
mov eax, edi
pop edi
pop esi
ret
Function at 0x403cb6
Capabilities:
Get geographical location
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
and word [ebp - 0x44], 0
push 0x20
lea eax, [ebp - 0x44]
push eax
push str.LC_ALL
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp word [ebp - 0x44], 0
jne 0x403cec
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xb
push 0x800
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
cmp word [ebp - 0x44], 0
lea eax, [ebp - 0x44]
jne 0x403cfb
mov eax, 0x4a3ebc
push eax
mov ecx, 0x4bdc28
call fcn.0044580a
push dword [0x4bdc28]
call fcn.0043de9a
cmp eax, 1
pop ecx
jle 0x403d1d
mov word [0x4c1010], ax
leave
ret

Function at 0x403e3e
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push edi
mov edi, dword [sym.imp.USER32.dll_GetLastInputInfo]
lea eax, [ebp - 8]
xor ebx, ebx
push eax
mov dword [ebp - 8], 8
mov dword [ebp - 4], ebx
call edi
mov eax, dword [ebp - 4]
mov ecx, eax
sub ecx, dword [0x4bdbf0]
test ecx, ecx
jle 0x403e71
mov dword [0x4bdbf0], eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov dword [0x4bdbf0], eax
jmp 0x403ea9
lea eax, [ebp - 8]
push eax
mov dword [ebp - 4], ebx
call edi
call esi
mov ecx, eax
sub ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 8]
jb 0x403ea1
sub eax, dword [0x4bdbf0]
cmp eax, dword [ebp + 8]
jae 0x403eb1
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x4bc2c0], bl
jg 0x403e81
mov eax, dword [ebp - 4]
mov ecx, eax
sub ecx, dword [0x4bdbf0]
pop esi
test ecx, ecx
jle 0x403ec6
mov dword [0x4bdbf0], eax
xor eax, eax
cmp byte [0x4bc2c0], bl
pop edi
setg al
pop ebx
leave
ret

Function at 0x40409b
Capabilities:
Terminate process

Disassembly:
cmp byte [0x4bc2c0], 2
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x14
pop esi
je 0x4040b2
push esi
call edi
cmp dword [0x4bdc00], 0
je 0x4040cd
push 0x1e
pop esi
jmp 0x4040cd
cmp dword [0x4bdbf4], 0
je 0x4040d0
push 0xa
call edi
dec esi
jns 0x4040c0
mov eax, dword [0x4bdbf4]
test eax, eax
pop edi
pop esi
je 0x4040ee
push 0
push eax
mov dword [0x4bdbf4], 0
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov byte [0x4bc2c0], 0xff
ret
Function at 0x4040f6
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp + 0xc]
mov esi, 0x8000004
push 0x64
push ebx
push esi
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edi, eax
cmp edi, ebx
mov byte [ebp - 1], 1
je 0x404137
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x404148
mov byte [ebp - 1], bl
jmp 0x404148
push dword [ebp + 0xc]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov edi, eax
cmp edi, ebx
je 0x404184
push ebx
push ebx
push ebx
push 6
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push edi
mov dword [0x4bdc08], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4bdc08]
cmp eax, ebx
je 0x404184
cmp byte [ebp - 1], bl
je 0x40417f
push 0x64
push ebx
push eax
call fcn.0048f710
mov eax, dword [0x4bdc08]
add esp, 0xc
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405461
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
cmp dword [ebp + 8], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
jne 0x40547d
lea ebx, [ebp - 0x14]
cmp dword [ebp + 0xc], edi
mov esi, dword [ebp + 0xc]
jne 0x40549b
cmp dword [ebp + 8], edi
lea esi, [ebp - 0x10]
je 0x405626
push dword [ebx]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x26c
mov ecx, ebx
call fcn.0043d3ea
push esi
call fcn.0040381a
mov edi, eax
lea eax, [edi + 1]
push eax
push dword [esi]
mov dword [ebp - 0x18], edi
push dword [ebx]
call fcn.00405049
add esp, 0x10
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
and dword [ebp - 4], 0
and dword [ebp - 0xc], 0
mov dword [ebp - 8], 0xc7
jmp 0x4054de
mov edi, dword [ebp - 0x18]
cmp dword [ebp + 8], 0
je 0x405589
mov eax, dword [ebx]
lea eax, [eax + edi*2]
push 0x4a40d8
mov dword [ebp - 0x1c], eax
call fcn.00439b48
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push dword [ebp + 0x14]
push str.pecmd__s._lu._lu_s_
push dword [ebp - 0x1c]
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [ebx]
add esp, 0x18
xor edi, edi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x405548
push edi
push edi
push 5
mov ecx, 0x4bdfa0
call fcn.004137db
dec dword [ebp - 8]
jns 0x4054db
jmp 0x405602
cmp dword [ebp + 0xc], edi
mov dword [ebp - 0xc], 1
je 0x405626
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
lea eax, [edi + 1]
push eax
push dword [ebx]
mov dword [ebp + 8], eax
push dword [esi]
call fcn.00405049
mov eax, dword [esi]
mov word [eax + edi*2], 0x5c
mov eax, dword [ebp + 8]
mov ecx, dword [esi]
add esp, 0xc
and word [ecx + eax*2], 0
jmp 0x40558b
mov eax, edi
and dword [ebp + 8], 0
add eax, eax
mov dword [ebp + 0xc], eax
push dword [ebp + 0x18]
mov edi, dword [esi]
push dword [ebp + 8]
add edi, dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push dword [ebp + 0x14]
push str.pecmd__s._lu._lu_s
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [esi]
add esp, 0x18
xor edi, edi
push edi
push 0x80
push 1
push edi
push edi
push 0x40000000
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], edi
call fcn.004050ca
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x4055fd
push edi
push edi
push 5
mov ecx, 0x4bdfa0
call fcn.004137db
inc dword [ebp + 8]
cmp dword [ebp + 8], 0xc8
jl 0x405594
mov eax, dword [esi]
and word [eax], di
cmp dword [ebp - 0xc], edi
jne 0x405607
mov eax, dword [ebx]
mov word [eax], di
mov eax, dword [ebp + 0x10]
cmp eax, edi
je 0x405615
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
jmp 0x405623
cmp dword [ebp - 4], edi
je 0x405623
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 4]
lea ecx, [ebp - 0x10]
call fcn.00437884
lea ecx, [ebp - 0x14]
call fcn.00437884
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40563d
Capabilities:
Get common file path
Get startup folder

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
push esi
push edi
push str.PECMD:MSGSVR:HWND
xor ebx, ebx
push ebx
call fcn.004040f6
pop ecx
pop ecx
call fcn.00403cb6
mov byte [0x4bdbe6], 1
call fcn.0048fdcb
call fcn.0043946b
push ebx
push 0x24
pop edi
push edi
lea eax, [ebp - 0x12c]
push eax
push ebx
mov byte [ebp - 0x12c], bl
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push str.System32Kernel32.dll
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4a4144
push eax
mov dword [ebp - 4], eax
call esi
push 7
pop ecx
mov dword [ebp - 0x28], edi
push str.GetNativeSystemInfo
push dword [ebp - 4]
mov dword [0x4bdb9c], eax
xor eax, eax
mov dword [ebp - 0x24], ebx
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
call esi
cmp eax, ebx
je 0x4056e0
lea ecx, [ebp - 0x28]
push ecx
call eax
cmp word [ebp - 0x28], bx
je 0x40571d
push str.Wow64RevertWow64FsRedirection
push dword [ebp - 4]
call esi
push str.Wow64DisableWow64FsRedirection
push dword [ebp - 4]
mov dword [0x4bdbe0], eax
call esi
cmp dword [0x4bdbe0], ebx
mov dword [0x4bdbdc], eax
jne 0x405712
mov dword [0x4bdbdc], ebx
mov bl, 1
mov word [0x4bdbc8], 0x100
movsx eax, bl
push str.bX64
push eax
push 0x4bdfa0
mov byte [0x4bdbe5], bl
call fcn.0043f71c
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40573e
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov dword [ebp - 8], eax
lea ecx, [eax + 8]
push ebx
mov bx, word [eax]
mov dword [ebp - 8], ecx
mov ax, word [ecx]
call fcn.004820ac
test al, al
jne 0x405762
inc ecx
inc ecx
mov dword [ebp - 8], ecx
push 0x63
lea eax, [ebp - 0x78]
push eax
push str.DEBUGMDG
mov byte [ebp - 0x78], 0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp byte [ebp - 0x78], 0x31
jne 0x405784
mov byte [0x4bdbec], 1
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push dword [ebp - 8]
and dword [ebp - 0x10], 0
lea ecx, [ebp - 0x14]
mov dword [0x4bdbf0], eax
call fcn.00445746
lea ecx, [ebp - 0xc]
call fcn.0043d3a5
push 1
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x14]
mov ecx, 0x4bdfa0
call fcn.0044b25d
push dword [ebp - 0xc]
lea ecx, [ebp - 0x10]
call fcn.0044580a
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0xc]
mov dword [ebp - 8], eax
call fcn.00437884
lea ecx, [ebp - 0x14]
call fcn.00437884
mov ecx, dword [ebp - 8]
call fcn.00403ed5
push str._InstallService
mov edi, eax
push 0xf
pop esi
mov dword [ebp - 8], edi
call fcn.00402c37
test al, al
pop ecx
pop edi
pop esi
je 0x405825
push 0x1e
push str._Service
push dword [ebp - 8]
mov byte [ebp - 1], 0x49
call fcn.0041255f
mov ecx, dword [ebp - 8]
add esp, 0xc
add ecx, 0x1e
call fcn.00403ed5
mov dword [ebp - 8], eax
jmp 0x405840
push 8
lea eax, [ebp - 8]
push eax
push 0x4a4194
call fcn.0043f0e5
add esp, 0xc
test al, al
je 0x40589f
mov byte [ebp - 1], 0x53
cmp bx, 0x22
jne 0x40587a
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebp - 8]
lea ecx, [edx + eax*2 - 2]
cmp ecx, edx
jbe 0x40587a
mov ax, word [ecx]
call fcn.004820ac
test al, al
je 0x40586c
dec ecx
dec ecx
cmp ecx, edx
ja 0x40585a
cmp ecx, edx
jbe 0x40587a
cmp word [ecx], 0x22
jne 0x40587a
and word [ecx], 0
sub dword [ebp - 8], 2
movsx ax, byte [ebp - 1]
mov ecx, dword [ebp - 8]
mov word [ecx], ax
sub dword [ebp - 8], 2
mov eax, dword [ebp - 8]
mov word [eax], 0x7e
push dword [ebp - 8]
call fcn.0040dc86
jmp 0x4058bf
push 0xe
lea eax, [ebp - 8]
push eax
push str._RemoveService
call fcn.0043f0e5
add esp, 0xc
test al, al
pop ebx
je 0x4058c8
push dword [ebp - 8]
call fcn.00405b5b
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea ecx, [ebp - 0x10]
call fcn.00437884
xor eax, eax
leave
ret
Function at 0x405960
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
mov dword [0x4bdbf8], eax
cmp word [eax], 0x7e
push edi
mov dword [ebp - 0x14], pe_nt_image_headers32
mov byte [ebp - 1], bl
jne 0x40599a
inc eax
inc eax
mov dword [0x4bdbf8], eax
cmp word [eax], 0x49
sete byte [ebp - 1]
inc eax
inc eax
mov dword [ebp + 8], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp + 8]
push eax
call fcn.00405061
pop ecx
mov ecx, dword [ebp + 8]
mov esi, ecx
sub esi, dword [ebp - 0x10]
mov eax, 0x400
sar esi, 1
cmp esi, eax
jle 0x4059bc
mov esi, eax
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0xc], ecx
call fcn.004378b6
push 6
push dword [ebp - 0xc]
push str.__gui_
call fcn.00438a4a
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
add esp, 0x10
test al, al
je 0x405a11
mov eax, dword [ebp - 0xc]
add eax, 0xc
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
mov dword [ebp - 0x14], ebx
call fcn.004378b6
pop ecx
push dword [ebp + 8]
call edi
inc eax
add eax, eax
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.00412515
add esp, 0xc
add esi, esi
push esi
push dword [ebp - 0x10]
lea eax, [ebp - 0x828]
push eax
call fcn.0041255f
add esp, 0xc
push dword [ebp - 0x10]
mov word [ebp + esi - 0x828], bx
mov byte [0x4c1003], bl
call edi
mov esi, eax
inc esi
lea eax, [esi + 0x226]
push eax
lea ecx, [ebp - 8]
call fcn.0043d3c3
mov eax, dword [ebp - 8]
push 0x1cc
add eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, eax
cmp ecx, ebx
jle 0x405b4e
mov eax, dword [ebp - 8]
mov word [eax + ecx*2 + 2], bx
mov eax, dword [ebp - 8]
lea edi, [eax + ecx*2 + 2]
mov dword [ebp + 8], edi
lea edx, [eax + 2]
xor edi, edi
mov word [eax], 0x22
jmp 0x405a97
mov ax, word [edx]
call fcn.004820ac
test al, al
je 0x405a95
xor edi, edi
inc edi
inc edx
inc edx
cmp edx, dword [ebp + 8]
jb 0x405a86
cmp di, bx
mov edx, dword [ebp - 8]
lea eax, [edx + 2]
mov dword [ebp + 8], eax
je 0x405ab8
dec eax
dec eax
mov word [edx + ecx*2 + 2], 0x22
inc ecx
mov dword [ebp + 8], eax
inc ecx
push 0x1e
lea edi, [eax + ecx*2]
push 0x4a41e4
push edi
call fcn.0041255f
push esi
push dword [ebp - 0x10]
add edi, 0x1e
push edi
call fcn.00405049
add esp, 0x18
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
cmp edi, ebx
je 0x405b4b
mov eax, dword [ebp - 0x14]
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
or eax, 0x10
push ebx
push 2
push eax
push 0xf01ff
lea eax, [ebp - 0x828]
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp eax, ebx
je 0x405b4b
cmp byte [ebp - 1], bl
je 0x405b4b
push eax
call esi
push 0x20000000
lea eax, [ebp - 0x828]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x405b4b
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push dword [ebp + 8]
call esi
push edi
call esi
lea ecx, [ebp - 8]
call fcn.00437884
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405b5b
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edx, esi
xor ebx, ebx
jmp 0x405b7d
call fcn.004820ac
test al, al
jne 0x405b85
inc esi
inc esi
mov ax, word [esi]
cmp ax, bx
jne 0x405b72
mov eax, esi
sub eax, edx
sar eax, 1
mov ecx, 0x400
cmp eax, ecx
jle 0x405b96
mov eax, ecx
lea edi, [eax + eax]
push edi
push edx
lea eax, [ebp - 0x824]
push eax
call fcn.0041255f
add esp, 0xc
mov word [ebp + edi - 0x824], bx
jmp 0x405bb6
inc esi
inc esi
mov ax, word [esi]
call fcn.004820ac
test al, al
jne 0x405bb4
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 4], eax
je 0x405c24
push 0x10020
lea ecx, [ebp - 0x824]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
mov dword [ebp + 8], eax
je 0x405c24
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, 0xc8
push edi
call esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push dword [ebp + 8]
call ebx
push edi
call esi
jmp 0x405c2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
call ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x405d1a
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7f8
push ebx
push esi
push edi
mov esi, str.service:
lea edi, [ebp - 0x7f8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
mov ecx, 0x1f9
lea edi, [ebp - 0x7e6]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
call fcn.00403ed5
mov edx, eax
mov ecx, edx
call fcn.00403f9c
mov esi, eax
sub esi, edx
sar esi, 1
mov eax, 0x3e8
cmp esi, eax
jl 0x405d68
mov esi, eax
push esi
push edx
lea eax, [ebp - 0x7e8]
push eax
call fcn.00405049
add esp, 0xc
lea eax, [ebp - 0x7f8]
push eax
push 0x64
xor edi, edi
push edi
push 0x8000004
push edi
push 0xffffffffffffffff
mov word [ebp + esi*2 - 0x7e8], di
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, eax
cmp ebx, edi
je 0x405ddd
push edi
push edi
push edi
push 6
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, edi
je 0x405ddd
push 0x64
push edi
push esi
call fcn.00403ee8
mov dword [esi], 0xffffffff
mov dword [esi + 8], edi
lea eax, [esi + 4]
add esp, 0xc
mov dword [0x4bc0f4], eax
mov dword [0x4bdc00], esi
pop edi
pop esi
pop ebx
leave
ret