joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403c8d
Capabilities:
Create process on windows
Get common file path
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24c
mov eax, dword [0x41f044]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
push 0x206
mov word [ebp - 0x238], ax
xor esi, esi
lea eax, [ebp - 0x236]
push esi
push eax
call fcn.0040c400
add esp, 0xc
xor eax, eax
push 9
mov word [ebp - 0x2c], ax
pop ecx
lea edi, [ebp - 0x2a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x421ad8
mov ebx, 0x104
mov eax, ecx
mov dword [ebp - 0x240], esi
mov dword [ebp - 0x244], ebx
lea edi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, si
jne 0x403cee
sub eax, edi
sar eax, 1
mov edi, dword [sym.imp.KERNEL32.dll_OpenEventW]
je 0x403d15
push ecx
push esi
push 0x20000
call edi
test eax, eax
jne 0x403ead
lea eax, [ebp - 0x23c]
push eax
push 0xf003f
push esi
push 0x41bcd0
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403d7e
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x240]
push eax
push esi
push 0x41be30
push dword [ebp - 0x23c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x403d72
lea eax, [ebp - 0x2c]
push eax
push esi
push 0x20000
call edi
test eax, eax
jne 0x403ea1
push dword [ebp - 0x23c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x238]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ecx, 0x421af8
mov eax, ecx
lea edi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, si
jne 0x403d96
sub eax, edi
sar eax, 1
lea eax, [ebp - 0x238]
jne 0x403dd2
push 0x41be40
push ebx
push eax
call fcn.00408b61
add esp, 0xc
xor eax, eax
movzx ecx, word [eax + 0x41be40]
mov word [ebp + eax - 0x2c], cx
inc eax
inc eax
cmp cx, si
jne 0x403dbd
jmp 0x403df2
push ecx
push ebx
push eax
call fcn.00408b61
add esp, 0xc
xor eax, eax
movzx ecx, word [eax + 0x421af8]
mov word [ebp + eax - 0x2c], cx
inc eax
inc eax
cmp cx, si
jne 0x403ddf
push 0x41bc5c
lea eax, [ebp - 0x238]
push ebx
push eax
call fcn.00408b61
add esp, 0xc
call fcn.004041ab
lea eax, [ebp - 0x238]
push eax
call fcn.00404036
mov eax, dword [0x422230]
pop ecx
cmp eax, esi
je 0x403e2f
push eax
call fcn.004095ee
pop ecx
mov dword [0x422230], esi
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push esi
push 0x41bc40
lea eax, [ebp - 0x238]
push eax
push esi
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
lea eax, [ebp - 0x23c]
push eax
push 3
push esi
push 0x41bcd0
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403ead
lea eax, [ebp - 0x2c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x403e72
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x2c]
push eax
push 1
push esi
push 0x41be30
push dword [ebp - 0x23c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x403ead
push dword [ebp - 0x23c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00408b52
leave
ret
Function at 0x403ebe
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
xor eax, eax
push eax
push eax
push 3
push eax
push 3
push connect
push dword [ebp + 8]
or esi, 0xffffffff
mov ebx, esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, esi
jne 0x403eed
mov edx, esi
jmp 0x403f0c
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp eax, 1
jne 0x403f03
mov esi, dword [ebp - 0xc]
mov ebx, dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x403f81
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 8]
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403fa1
mov eax, dword [ebp + 8]
call fcn.00403fec
test eax, eax
je 0x403fe7
push edi
push esi
push esi
push 2
push esi
push 1
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x403fe6
push esi
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jne 0x403fdf
xor esi, esi
inc esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebp
ret

Function at 0x403fec
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push esi
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x403fff
xor eax, eax
pop esi
ret
test al, 1
je 0x404006
xor eax, 1
test al, 4
je 0x40400d
xor eax, 4
test al, 2
je 0x404014
xor eax, 2
test al, 0x20
je 0x40401b
xor eax, 0x20
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, esi
pop esi
ret
Function at 0x404036
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x422230]
push ebx
push esi
mov esi, dword [eax + 0x1fc]
push edi
push dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40406c
push dword [ebp + 8]
call fcn.00403ebe
pop ecx
cmp eax, esi
jne 0x40406c
inc ebx
jmp 0x4040e4
mov edi, 0x100000
push edi
call fcn.00409b46
pop ecx
mov esi, eax
mov eax, dword [0x422230]
push esi
push dword [ebp - 8]
add eax, 0x200
mov dword [ebp - 4], edi
push eax
lea edi, [ebp - 4]
call fcn.00403f13
add esp, 0xc
test eax, eax
je 0x4040dd
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00408c4d
pop ecx
push 0x32
mov eax, 0xc8
call fcn.00402228
mov edi, dword [ebp - 4]
pop ecx
push eax
lea ebx, [edi + esi]
mov dword [ebp - 8], eax
call fcn.0040244f
add edi, dword [ebp - 8]
pop ecx
push edi
push esi
push dword [ebp + 8]
call fcn.00403f81
add esp, 0xc
mov ebx, eax
dec ebx
neg ebx
sbb ebx, ebx
inc ebx
push esi
call fcn.0040a0a7
pop ecx
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret

Function at 0x4040eb
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push edi
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 1
push connect
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, 0xffffffff
jne 0x40411a
xor eax, eax
jmp 0x404136
push esi
lea eax, [ebp - 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
jne 0x40413a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
pop edi
pop ebx
leave
ret
push esi
call fcn.00409589
pop ecx
push 0
mov ebx, eax
lea eax, [ebp - 4]
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], esi
je 0x40416b
xor esi, esi
push ebx
call fcn.004095ee
pop ecx
mov eax, esi
jmp 0x404135
dec esi
lea edi, [ebx + esi]
cmp byte [edi], 0x3c
jne 0x40416b
xor eax, eax
inc eax
cmp dword [ebp + 0xc], eax
jbe 0x40418d
mov cl, byte [edi + eax]
cmp cl, byte [eax + 0x41be54]
jne 0x40416b
inc eax
cmp eax, dword [ebp + 0xc]
jb 0x40417c
push 0x6422e
lea eax, [ebx + esi]
push eax
push dword [ebp + 0x10]
call fcn.0040d440
mov eax, dword [ebp + 0x14]
mov dword [eax], esi
xor esi, esi
add esp, 0xc
inc esi
jmp 0x404160
Function at 0x404298
Capabilities:
Check if file exists
Create process on windows
Get file attributes
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x214
mov eax, dword [0x41f044]
xor eax, esp
mov dword [esp + 0x210], eax
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
push edi
mov edi, dword [ebp + 8]
push 0x64
push 0x421698
push 0x67
push edi
call esi
push 0x64
mov ebx, 0x4215d0
push ebx
push 0x6d
push edi
call esi
mov eax, edi
call fcn.00404457
mov eax, dword [ebp + 0x10]
mov edx, 0x421768
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
inc eax
inc eax
test cx, cx
jne 0x4042e8
call section..text
push 0x7d0
mov dword [0x42006c], eax
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.0040109c
test eax, eax
je 0x404321
call fcn.00402491
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
xor esi, esi
push esi
push edi
push esi
push esi
push esi
mov eax, connect
push eax
push esi
push eax
push 0xcf0000
push 0x421698
push ebx
push esi
mov dword [0x421760], edi
call dword [sym.imp.USER32.dll_CreateWindowExW]
test eax, eax
je 0x404355
call fcn.0040260a
cmp eax, esi
jne 0x40436e
mov ecx, dword [esp + 0x21c]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00408b52
mov esp, ebp
pop ebp
ret 0x10
xor eax, eax
push 0x206
mov word [esp + 0x14], ax
lea eax, [esp + 0x16]
push esi
push eax
call fcn.0040c400
mov ecx, dword [0x421c70]
add esp, 0xc
cmp ecx, esi
jbe 0x4043b3
cmp word [0x421c74], si
jbe 0x4043b3
mov esi, 0x420050
call fcn.00402f3d
mov ax, word [0x421c74]
mov word [0x420060], ax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x3e8
xor edx, edx
mov edi, ecx
div edi
xor edx, edx
mov ebx, 0x422028
div ecx
push edx
push 0x41be68
push ebx
call fcn.004045a3
add esp, 0xc
call fcn.00402ffb
lea edi, [esp + 0x10]
call fcn.00402fa1
push 0x41bd68
mov edi, 0x104
lea eax, [esp + 0x14]
push edi
push eax
call fcn.00408b61
add esp, 0xc
push ebx
lea eax, [esp + 0x14]
push edi
push eax
call fcn.00408b61
add esp, 0xc
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404441
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push esi
push 0x41bc40
lea eax, [esp + 0x1c]
push eax
push esi
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.00403c8d
push esi
jmp 0x40431b

Function at 0x405483
Capabilities:
Hash data using sha1

Disassembly:
and dword [eax + 4], 0
and dword [eax], 0
mov dword [eax + 8], 0x67452301
mov dword [eax + 0xc], 0xefcdab89
mov dword [eax + 0x10], 0x98badcfe
mov dword [eax + 0x14], 0x10325476
mov dword [eax + 0x18], 0xc3d2e1f0
ret
Function at 0x405617
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0xff0]
mov eax, 0x1070
call fcn.00413500
mov eax, dword [0x41f044]
xor eax, ebp
mov dword [ebp + 0xfec], eax
mov eax, dword [ebp + 0xff8]
push esi
push edi
push 0x41bd60
push eax
lea eax, [ebp - 0x18]
mov esi, ecx
xor edi, edi
push eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], edi
call fcn.004090bb
add esp, 0xc
cmp dword [ebp - 0x18], edi
jne 0x405672
mov edi, esi
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
jmp 0x405705
push ebx
push 2
push edi
push dword [ebp - 0x18]
call fcn.00409867
push dword [ebp - 0x18]
call fcn.00409a89
push edi
push edi
push dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
call fcn.00409867
lea eax, [ebp - 0x80]
call fcn.00405483
push dword [ebp - 0x18]
mov esi, 0x1000
push esi
lea eax, [ebp - 0x14]
push 1
push eax
call fcn.004093ae
mov ebx, eax
add esp, 0x2c
cmp ebx, edi
jbe 0x4056df
push ebx
lea edi, [ebp - 0x80]
lea ecx, [ebp - 0x14]
call fcn.004054ae
push dword [ebp - 0x18]
add dword [ebp - 0x1c], ebx
push esi
lea eax, [ebp - 0x14]
push 1
push eax
call fcn.004093ae
mov ebx, eax
add esp, 0x14
test ebx, ebx
ja 0x4056b8
mov edi, dword [ebp - 0x20]
push edi
lea esi, [ebp - 0x80]
call fcn.00405547
push dword [ebp - 0x18]
call fcn.00409442
mov eax, dword [ebp - 0x1c]
pop ecx
pop ecx
pop ebx
cmp eax, dword [ebp - 0x24]
jb 0x405664
xor eax, eax
inc eax
mov ecx, dword [ebp + 0xfec]
pop edi
xor ecx, ebp
pop esi
call fcn.00408b52
add ebp, 0xff0
leave
ret

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

Disassembly:
push edi
mov edi, edx
test ecx, ecx
jne 0x406eb3
xor eax, eax
pop edi
ret
push esi
not eax
mov edx, 0xff
cmp edi, 8
jb 0x406f65
mov esi, edi
shr esi, 3
push ebx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d308]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d308]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d308]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d308]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d308]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d308]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d308]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d308]
inc ecx
sub edi, 8
dec esi
jne 0x406eca
pop ebx
test edi, edi
je 0x406f7e
movzx esi, byte [ecx]
xor esi, eax
and esi, edx
shr eax, 8
xor eax, dword [esi*4 + 0x41d308]
inc ecx
dec edi
jne 0x406f69
pop esi
not eax
pop edi
ret
Function at 0x406f83
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [ecx]
movsx edx, dl
xor edx, eax
push esi
mov esi, 0xff
and edx, esi
mov edx, dword [edx*4 + 0x41d308]
shr eax, 8
xor edx, eax
mov eax, dword [ecx + 8]
mov dword [ecx], edx
movzx edx, dl
add edx, dword [ecx + 4]
imul edx, edx, 0x8088405
inc edx
mov dword [ecx + 4], edx
shr edx, 0x18
xor edx, eax
and edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x41d308]
pop esi
mov dword [ecx + 8], eax
ret

Function at 0x4075f8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 0xc]
imul edi, dword [ebp + 0x10]
cmp byte [esi], 0
je 0x407628
push 0
lea eax, [ebp + 0x10]
push eax
push edi
push dword [ebp + 8]
push dword [esi + 2]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407623
mov byte [esi + 6], 1
mov eax, dword [ebp + 0x10]
jmp 0x407650
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
lea edx, [ecx + edi]
cmp edx, eax
jbe 0x407639
sub eax, ecx
mov edi, eax
mov eax, dword [esi + 0xc]
push edi
add eax, ecx
push eax
push dword [ebp + 8]
call fcn.0040d440
add esp, 0xc
add dword [esi + 0x14], edi
mov eax, edi
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop ebp
ret
Function at 0x4082f7
Capabilities:
Get common file path

Disassembly:
push ecx
cmp dword [ebx], 0
push esi
push edi
jne 0x40839d
cmp dword [ebx + 4], 0xffffffff
jne 0x40839d
lea esi, [ebx + 0x244]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x408324
sub eax, edx
sar eax, 1
movzx eax, word [ebx + eax*2 + 0x242]
cmp ax, 0x5c
je 0x40835b
cmp ax, 0x2f
je 0x40835b
dec esi
dec esi
mov ax, word [esi + 2]
inc esi
inc esi
test ax, ax
jne 0x408348
mov edi, esi
mov esi, 0x41bd68
movsd dword es:[edi], dword [esi]
push 0x18
call fcn.00409589
and dword [eax + 0x14], 0
and dword [eax + 7], 0
pop ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 0xc], ecx
mov ecx, dword [esp + 0x14]
push eax
mov byte [eax], 0
mov byte [eax + 1], 1
mov byte [eax + 0xb], 0
mov dword [eax + 0x10], ecx
call fcn.00407871
mov dword [ebx], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
pop ecx
add eax, 0x200
jmp 0x4083a2
mov eax, 0x1000000
pop edi
pop esi
pop ecx
ret 8

Function at 0x408b52
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x41f044]
jne 0x408b5c
repz ret
jmp fcn.0040a849

Function at 0x413811
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.0040aba9
and dword [ebp - 4], 0
cmp dword [0x420f30], 0
mov ebx, eax
jne 0x4138c2
push 0x41ab94
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x413973
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x41ab88
push edi
call esi
test eax, eax
je 0x413973
push eax
call fcn.0040ab37
mov dword [esp], 0x41ab78
push edi
mov dword [0x420f30], eax
call esi
push eax
call fcn.0040ab37
mov dword [esp], 0x41ab64
push edi
mov dword [0x420f34], eax
call esi
push eax
call fcn.0040ab37
mov dword [esp], 0x41ab48
push edi
mov dword [0x420f38], eax
call esi
push eax
call fcn.0040ab37
pop ecx
mov dword [0x420f40], eax
test eax, eax
je 0x4138c2
push 0x41ab30
push edi
call esi
push eax
call fcn.0040ab37
pop ecx
mov dword [0x420f3c], eax
mov eax, dword [0x420f3c]
cmp eax, ebx
je 0x41391a
cmp dword [0x420f40], ebx
je 0x41391a
push eax
call fcn.0040abb2
push dword [0x420f40]
mov esi, eax
call fcn.0040abb2
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x41391a
test edi, edi
je 0x41391a
call esi
test eax, eax
je 0x413911
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x413911
test byte [ebp - 0xc], 1
jne 0x41391a
or dword [ebp + 0x10], 0x200000
jmp 0x413953
mov eax, dword [0x420f34]
cmp eax, ebx
je 0x413953
push eax
call fcn.0040abb2
pop ecx
test eax, eax
je 0x413953
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x413953
mov eax, dword [0x420f38]
cmp eax, ebx
je 0x413953
push eax
call fcn.0040abb2
pop ecx
test eax, eax
je 0x413953
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x420f30]
call fcn.0040abb2
pop ecx
test eax, eax
je 0x413973
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x413975
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4029c5
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
push 0xf003f
xor edi, edi
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x4029ea
call fcn.0040d8c8
pop edi
leave
ret 8
mov ecx, dword [ebp + 8]
push ebx
push esi
push 2
add ecx, 0x40
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, eax
cmp ebx, edi
jne 0x402a1a
call fcn.0040d8c8
mov edi, eax
push dword [ebp - 4]
call esi
pop esi
mov eax, edi
pop ebx
jmp 0x4029e5
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push dword [ebp + 0xc]
push 0xffffffffffffffff
push ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x402a39
call fcn.0040d8c8
mov edi, eax
push ebx
call esi
jmp 0x402a0f

Function at 0x402a3e
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x427adc]
push ebx
push esi
push edi
mov ecx, 0x427adc
call dword [eax + 0xc]
push 0xf003f
xor edi, edi
push edi
add eax, 0x10
push edi
mov dword [ebp - 4], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
cmp ebx, edi
jne 0x402a8a
call fcn.0040d8c8
mov esi, eax
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.00405ed3
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 4
mov eax, dword [ebp + 8]
push 0x14
add eax, 0x40
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
cmp esi, edi
jne 0x402ab0
call fcn.0040d8c8
push ebx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402a76
push 6
mov dword [ebp - 0x20], edi
pop ecx
xor eax, eax
lea edi, [ebp - 0x1c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x402ae8
cmp dword [ebp - 0x1c], 4
je 0x402ad8
cmp dword [ebp - 0x1c], 2
jne 0x402ae8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
xor esi, esi
jmp 0x402a76
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x402ad8
call fcn.0040d8c8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
call esi
push ebx
call esi
mov esi, edi
jmp 0x402a76
Function at 0x402b11
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x427adc]
push ebx
push esi
push edi
mov ecx, 0x427adc
call dword [eax + 0xc]
push 0xf003f
xor esi, esi
push esi
add eax, 0x10
push esi
mov dword [esp + 0x24], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
cmp edi, esi
mov dword [esp + 0x14], edi
jne 0x402b68
call fcn.0040d8c8
mov esi, eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
call fcn.00405ed3
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp + 8]
push 0x24
add eax, 0x40
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, esi
mov dword [esp + 0x10], eax
jne 0x402b90
call fcn.0040d8c8
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402b51
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
push 6
pop ecx
xor eax, eax
mov dword [esp + 0x1c], esi
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x14]
call ebx
test eax, eax
je 0x402c06
cmp dword [esp + 0x20], 1
je 0x402c7b
cmp dword [esp + 0x20], 3
je 0x402c06
push 7
pop ecx
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
push eax
push 1
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x402c06
call fcn.0040d8c8
push dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
call esi
push dword [esp + 0x14]
call esi
mov esi, edi
jmp 0x402b51
cmp dword [esp + 0x20], 1
je 0x402c7b
lea esi, [esp + 0x38]
call fcn.0040b061
cmp dword [esp + 0x20], 1
je 0x402c7b
lea ecx, [esp + 0x38]
call fcn.00402033
fcomp qword [0x421f78]
fnstsw ax
test ah, 5
jp 0x402c58
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push 7
pop ecx
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x14]
call ebx
cmp dword [esp + 0x20], 1
jne 0x402c1d
cmp dword [esp + 0x20], 1
je 0x402c7b
push dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [esp + 0x14]
call esi
mov esi, 0x800705b4
jmp 0x402b51
push dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [esp + 0x14]
call esi
xor esi, esi
jmp 0x402b51
Function at 0x403741
Capabilities:
Create directory

Disassembly:
push 0x30
mov eax, 0x41e94f
call fcn.00411a1c
xor ecx, ecx
push ecx
mov ecx, dword [ebp + 8]
mov eax, 0x403469
push eax
lea eax, [ebp - 0x28]
push eax
xor ebx, ebx
call fcn.0040554c
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 4], ebx
call fcn.00408616
mov eax, dword [eax]
pop ecx
push ebx
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
cmp eax, 0x50
je 0x40378d
call fcn.0040cd11
mov esi, eax
jmp 0x403790
xor esi, esi
inc esi
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.00405ed3
cmp esi, ebx
jge 0x4037ba
or dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x28], bl
jne 0x4037b3
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
add ecx, eax
call dword [ebp - 0x20]
mov eax, esi
jmp 0x403851
lea eax, [ebp + 8]
push eax
call fcn.0040874c
pop ecx
mov eax, dword [ebp + 8]
mov esi, vtable.ATL::CSecurityDesc.0
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
lea eax, [ebp - 0x3c]
push eax
mov byte [ebp - 4], 2
call fcn.004023b4
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040b272
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
jge 0x40382e
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], esi
call fcn.00401c76
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
call fcn.00405ed3
or dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x28], bl
jne 0x40382a
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
add ecx, eax
call dword [ebp - 0x20]
mov eax, edi
jmp 0x403851
call fcn.00403859
lea ecx, [ebp - 0x30]
mov edi, eax
mov dword [ebp - 0x30], esi
call fcn.00401c76
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
call fcn.00405ed3
cmp edi, ebx
jl 0x403816
xor eax, eax
call fcn.00411abb
ret 4