joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4115c1
Capabilities:
Copy file

Disassembly:
push 0xf4
mov eax, 0x591321
call fcn.0054669f
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
push eax
mov dword [ebp - 0xfc], eax
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x100], edi
call fcn.0041efad
mov ebx, eax
and dword [ebp - 4], 0
lea eax, [ebp - 0x28]
push edi
push eax
call fcn.0041efad
add esp, 0x10
mov edi, eax
push 0
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.00412791
cmp dword [ebx + 0x14], 8
mov cl, al
jb 0x41161b
mov ebx, dword [ebx]
cmp dword [edi + 0x14], 8
jb 0x411623
mov edi, dword [edi]
xor eax, eax
test cl, cl
sete al
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, eax
lea ecx, [ebp - 0x28]
cmp esi, 1
sete bl
call fcn.00406687
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.00406687
cmp esi, 1
je 0x4116d0
call fcn.0040c461
push 2
pop esi
push esi
push eax
lea ecx, [ebp - 0xf8]
call fcn.0040bd69
lea eax, [ebp - 0xf8]
mov dword [ebp - 4], esi
push str.Failed_to_copy_from_
push eax
call fcn.00401609
pop ecx
pop ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._due_to
push dword [ebp - 0xfc]
push str._to_
push dword [ebp - 0x100]
push esi
call fcn.004015e9
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
push eax
call fcn.004015e9
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
mov ecx, eax
call fcn.004044df
lea ecx, [ebp - 0xf8]
call fcn.0040bf50
mov al, bl
call fcn.00546649
ret

Function at 0x4116d8
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x639034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0041efad
pop ecx
pop ecx
cmp dword [eax + 0x14], 8
jb 0x4116ff
mov eax, dword [eax]
push ebx
push 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [ebp - 0x1c]
lea ebx, [eax - 1]
neg ebx
sbb bl, bl
inc bl
call fcn.00406687
mov ecx, dword [ebp - 4]
mov al, bl
xor ecx, ebp
pop ebx
call fcn.00546623
leave
ret
Function at 0x411d41
Capabilities:
Get common file path
Query environment variable

Disassembly:
push 0x254
mov eax, 0x591413
call fcn.0054669f
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x260], ebx
mov eax, dword fs:[0x2c]
mov ecx, dword [0x6453b4]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x63f560]
cmp eax, dword [ecx + 8]
jg 0x411ec8
cmp byte [0x63f55c], 0
jne 0x411e20
cmp esi, 0x12
jne 0x411de4
push 0x104
lea eax, [ebp - 0x21c]
push eax
push str._ProgramW6432_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.00411114
pop ecx
pop ecx
mov esi, eax
mov dword [ebp - 4], 1
push 0x5c
mov ecx, esi
call fcn.00408905
push esi
mov ecx, ebx
call fcn.004037a9
lea ecx, [ebp - 0x234]
call fcn.00406661
jmp 0x411ec0
cmp esi, 0x13
jne 0x411e20
push 0x104
lea eax, [ebp - 0x21c]
push eax
push str._CommonProgramW6432_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.00411114
pop ecx
pop ecx
mov esi, eax
mov dword [ebp - 4], 2
jmp 0x411dc3
and dword [ebp - 0x260], 0
lea eax, [ebp - 0x22c]
push esi
push eax
call fcn.00412545
mov esi, eax
lea edi, [ebp - 0x244]
pop ecx
pop ecx
lea eax, [ebp - 0x260]
movsd dword es:[edi], dword [esi]
push eax
push 0
push 0
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x244]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
jne 0x411eb2
push dword [ebp - 0x260]
lea eax, [ebp - 0x25c]
push eax
call fcn.00411114
pop ecx
pop ecx
mov esi, eax
push 0x5c
mov ecx, esi
mov dword [ebp - 4], 3
call fcn.00408905
push esi
lea ecx, [ebp - 0x234]
call fcn.004037a9
lea ecx, [ebp - 0x25c]
call fcn.00406661
push dword [ebp - 0x260]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
lea eax, [ebp - 0x234]
push eax
jmp 0x411dcd
and dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0xf
mov byte [ebx], 0
mov eax, ebx
call fcn.00546649
ret
mov edi, 0x63f560
push edi
call fcn.00547217
cmp dword [0x63f560], 0xffffffff
pop ecx
jne 0x411d7c
and dword [ebp - 4], 0
call fcn.004f37cc
push edi
cmp dword [eax + 0x1c], 1
sete byte [0x63f55c]
or dword [ebp - 4], 0xffffffff
call fcn.005471cd
pop ecx
jmp 0x411d7c
Function at 0x4120ae
Capabilities:
Create directory

Disassembly:
push 0x140
mov eax, 0x591486
call fcn.0054669f
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x90]
mov esi, dword [ebp + 0xc]
push edi
push eax
call fcn.00411980
pop ecx
pop ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x90], ebx
jne 0x4121e7
lea ecx, [ebp - 0x88]
call fcn.00426f3f
test al, al
je 0x4120f9
mov bl, 1
jmp 0x4121e7
lea eax, [ebp - 0x40]
push edi
push eax
call fcn.0041ee2c
pop ecx
pop ecx
cmp dword [ebp - 0x30], 0
mov byte [ebp - 4], 1
je 0x4121d7
lea eax, [ebp - 0x40]
push esi
push eax
call fcn.004120ae
pop ecx
pop ecx
test al, al
je 0x4121d7
lea eax, [ebp - 0x58]
push edi
push eax
call fcn.0041efad
pop ecx
pop ecx
cmp dword [eax + 0x14], 8
jb 0x41213b
mov eax, dword [eax]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, 1
je 0x41215b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [ebp - 0x149], bl
cmp eax, 0xb7
jne 0x412162
mov byte [ebp - 0x149], 1
lea ecx, [ebp - 0x58]
call fcn.00406687
cmp byte [ebp - 0x149], 0
je 0x412178
xor eax, eax
inc eax
jmp 0x4121d5
call fcn.0040c461
push 2
push eax
lea ecx, [ebp - 0x148]
call fcn.0040bd69
lea eax, [ebp - 0x148]
mov byte [ebp - 4], 2
push str.Failed_to_create_directory_at_
push eax
call fcn.00401609
pop ecx
pop ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._due_to
push edi
push esi
call fcn.004015e9
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
mov ecx, eax
call fcn.004044df
lea ecx, [ebp - 0x148]
call fcn.0040bf50
mov al, bl
mov bl, al
lea ecx, [ebp - 0x28]
call fcn.00406661
lea ecx, [ebp - 0x40]
call fcn.00406661
lea ecx, [ebp - 0x80]
call fcn.00406661
mov al, bl
call fcn.00546649
ret
Function at 0x4122a2
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x639034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov ecx, edi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x38], eax
call fcn.00426ffb
test al, al
jne 0x4122f8
xor ebx, ebx
mov dword [esi], 2
lea eax, [ebp - 0x1c]
mov byte [ebp - 0x1c], bl
push eax
lea ecx, [esi + 4]
mov dword [ebp - 8], 0xf
mov dword [ebp - 0xc], ebx
call fcn.004037a9
lea ecx, [ebp - 0x1c]
jmp 0x4123f2
lea eax, [edi + 8]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0041efad
pop ecx
pop ecx
cmp dword [eax + 0x14], 8
jb 0x41230f
mov eax, dword [eax]
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 5
push accept
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x3c], eax
call fcn.00406687
cmp dword [ebp - 0x3c], 0xffffffff
jne 0x41233f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
jmp 0x4122d7
mov eax, dword [ebp - 0x38]
cdq
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x48]
push edi
push eax
mov dword [ebp - 0x44], edx
call fcn.004111d4
pop ecx
pop ecx
push ebx
mov edi, dword [eax]
lea ecx, [ebp - 0x34]
push edi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], 0xf
mov byte [ebp - 0x34], bl
call fcn.00406862
cmp dword [ebp - 0x20], 0x10
lea ecx, [ebp - 0x40]
push ebx
push ecx
push edi
mov edi, dword [ebp - 0x3c]
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
push eax
push edi
mov dword [ebp - 0x40], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
mov dword [ebp - 0x38], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x38]
cmp eax, 1
jne 0x4123ba
mov eax, dword [ebp - 0x44]
cmp dword [ebp - 0x40], eax
jne 0x4123c8
lea eax, [ebp - 0x34]
mov dword [esi], ebx
push eax
lea ecx, [esi + 4]
call fcn.004037a9
jmp 0x4123ef
test eax, eax
jne 0x4123c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
jmp 0x4123ce
mov dword [esi], 0x26
lea eax, [ebp - 0x1c]
mov dword [ebp - 0xc], ebx
push eax
lea ecx, [esi + 4]
mov dword [ebp - 8], 0xf
mov byte [ebp - 0x1c], bl
call fcn.004037a9
lea ecx, [ebp - 0x1c]
call fcn.00406661
lea ecx, [ebp - 0x34]
call fcn.00406661
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00546623
leave
ret

Function at 0x41247b
Capabilities:
Move file

Disassembly:
push 0x34
mov eax, 0x591510
call fcn.0054669f
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.0041efad
mov edi, eax
and dword [ebp - 4], 0
lea eax, [ebp - 0x28]
push esi
push eax
call fcn.0041efad
add esp, 0x10
cmp dword [edi + 0x14], 8
jb 0x4124b2
mov edi, dword [edi]
cmp dword [eax + 0x14], 8
jb 0x4124ba
mov eax, dword [eax]
push 0xb
push edi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [ebp - 0x28]
lea ebx, [eax - 1]
neg ebx
sbb bl, bl
inc bl
call fcn.00406687
lea ecx, [ebp - 0x40]
call fcn.00406687
mov al, bl
call fcn.00546649
ret
Function at 0x4124e5
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x639034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push eax
call fcn.00411491
mov edi, eax
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.0041efad
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x41251b
mov eax, dword [eax]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [ebp - 0x1c]
lea ebx, [eax - 1]
neg ebx
sbb bl, bl
inc bl
call fcn.00406687
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00546623
leave
ret

Function at 0x412600
Capabilities:
Write file on windows

Disassembly:
push 0x24
mov eax, 0x59153d
call fcn.0054669f
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x14]
push eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x30], ecx
push eax
call fcn.0041efad
pop ecx
pop ecx
mov edi, eax
xor esi, esi
cmp dword [edi + 0x14], 8
mov dword [ebp - 4], esi
jb 0x412633
mov edi, dword [edi]
push esi
push ebx
call fcn.00411491
pop ecx
push eax
push 2
push esi
push 4
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
lea ecx, [ebp - 0x28]
mov edi, eax
call fcn.00406687
cmp edi, 0xffffffff
jne 0x412664
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4126ae
push esi
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], esi
push eax
push dword [ebp + 0x10]
push dword [ebp - 0x30]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 1
je 0x412688
call ebx
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 1
je 0x41269c
test esi, esi
je 0x4126a0
call ebx
mov esi, eax
test esi, esi
jne 0x4126ac
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x2c], eax
push 0x27
pop ecx
cmovne esi, ecx
mov eax, esi
call fcn.00546649
ret
Function at 0x414a4a
Capabilities:
Enumerate processes

Disassembly:
push 0x2a0
mov eax, 0x591a70
call fcn.0054669f
mov dword [ebp - 0x298], ecx
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x29c], edi
mov dword [ebp - 0x2a0], edi
mov dword [ebp - 0x294], ebx
mov dword [ebp - 0x290], ebx
mov dword [ebp - 0x28c], ebx
push ebx
push 2
mov dword [ebp - 4], ebx
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
jne 0x414ab4
lea eax, [ebp - 0x294]
mov ecx, edi
push eax
call fcn.00413065
lea ecx, [ebp - 0x294]
call fcn.00416241
mov eax, edi
jmp 0x414c49
lea eax, [ebp - 0x284]
mov dword [ebp - 0x284], 0x22c
push eax
push esi
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x414ad8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x414a94
mov dword [ebp - 0x2ac], ebx
mov dword [ebp - 0x2a8], ebx
mov dword [ebp - 0x2a4], ebx
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp - 0x298]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x27c]
lea ecx, [ebp - 0x2ac]
mov dword [ebp - 0x288], eax
lea eax, [ebp - 0x288]
push eax
call fcn.00412dd7
test ebx, ebx
jle 0x414b25
cmp dword [ebp - 0x288], ebx
jne 0x414bd5
mov eax, dword [ebp - 0x26c]
and dword [ebp - 0x18], 0
mov dword [ebp - 0x29c], eax
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 2
push eax
push dword [ebp - 0x288]
mov ecx, edi
call fcn.00414995
test al, al
jne 0x414bac
and dword [ebp - 0x30], 0
lea ecx, [ebp - 0x40]
xor eax, eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
lea eax, [ebp - 0x260]
push eax
call fcn.00412707
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.0041ef1a
pop ecx
pop ecx
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x28]
call fcn.0040442e
lea ecx, [ebp - 0x58]
call fcn.00406661
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 2
call fcn.00406687
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x29c]
push eax
lea eax, [ebp - 0x288]
push eax
lea ecx, [ebp - 0x294]
call fcn.00412d9e
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.00406661
lea eax, [ebp - 0x284]
push eax
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x414af7
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x298]
lea esi, [ebx + 4]
push esi
call fcn.0040640b
pop ecx
lea eax, [ebp - 0x2ac]
push eax
lea ecx, [ebx + 0x34]
call fcn.004162f1
mov ecx, dword [ebp - 0x2a0]
lea eax, [ebp - 0x294]
push eax
call fcn.00413065
push esi
mov byte [ebp - 4], 4
call fcn.0040642a
pop ecx
lea ecx, [ebp - 0x2ac]
call fcn.0040a611
lea ecx, [ebp - 0x294]
call fcn.00416241
mov eax, dword [ebp - 0x2a0]
call fcn.00546649
ret 8
Function at 0x4153c3
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x639034]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
mov word [ebp - 8], 0x500
lea eax, [ebp - 0x14]
mov dword [ebp - 0xc], ebx
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x415424
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x14]
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
push dword [ebp - 0x14]
neg eax
sbb eax, eax
and dword [ebp - 0x10], eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
cmp eax, 1
pop ebx
sete al
xor ecx, ebp
call fcn.00546623
leave
ret
Function at 0x41cf39
Capabilities:
Read file via mapping

Disassembly:
push 0xbc
mov eax, 0x590314
call fcn.0054669f
push str.GlobalBattle.netHelperSvcPortObject
xor ebx, ebx
or edi, 0xffffffff
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov esi, eax
test esi, esi
je 0x41cf95
push 8
pop eax
push eax
push ebx
push ebx
push 4
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
je 0x41cf8c
cmp byte [eax], 1
jne 0x41cf85
push 8
pop ecx
cmp word [eax + 2], cx
jb 0x41cf85
mov edi, dword [eax + 4]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x41cfd9
call fcn.0040c461
push 2
push eax
lea ecx, [ebp - 0xc8]
call fcn.0040bd69
lea eax, [ebp - 0xc8]
mov dword [ebp - 4], ebx
push str.Failed_to_open_mapping_file_due_to:
push eax
call fcn.00401609
pop ecx
pop ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.004044df
lea ecx, [ebp - 0xc8]
call fcn.0040bf50
mov eax, edi
call fcn.00546649
ret
Function at 0x41dbf0
Capabilities:
Query service status
Stop service

Disassembly:
push 0x19c
mov eax, 0x592a91
call fcn.0054669f
mov esi, dword [ebp + 8]
xor ebx, ebx
push ebx
mov dword [ebp - 0x1a4], esi
call fcn.0041d224
mov edi, eax
mov dword [ebp - 0x1a8], edi
pop ecx
test edi, edi
je 0x41dddc
lea eax, [ebp - 0x28]
push esi
push eax
call fcn.0041efad
pop ecx
pop ecx
cmp dword [eax + 0x14], 8
jb 0x41dc35
mov eax, dword [eax]
push 0x80000020
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x1a0], edi
call fcn.00406687
test edi, edi
je 0x41dd67
lea eax, [ebp - 0x2c]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x41dcfc
cmp dword [ebp - 0x28], 1
je 0x41dcbe
cmp dword [ebp - 0x28], 3
je 0x41dc8a
lea eax, [ebp - 0x2c]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x41dcab
push 0x1e
push 1
lea eax, [ebp - 0x1a0]
push esi
push eax
call fcn.0041de0c
mov edi, dword [ebp - 0x1a0]
add esp, 0x10
mov bl, al
jmp 0x41dd5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1a0], eax
cmp eax, 0x426
jne 0x41dcc5
mov bl, 1
jmp 0x41dd5e
call fcn.0040c461
push 2
push eax
lea ecx, [ebp - 0xe4]
call fcn.0040bd69
lea eax, [ebp - 0xe4]
mov dword [ebp - 4], ebx
push str.Failed_to_stop_service_
push eax
call fcn.00401609
pop ecx
pop ecx
push dword [ebp - 0x1a0]
push str._due_to_error
push esi
jmp 0x41dd3c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 1
push str.AgentErrors.log
lea ecx, [ebp - 0xe4]
mov esi, eax
call fcn.0040bd69
lea eax, [ebp - 0xe4]
mov dword [ebp - 4], 1
push str.Failed_to_query_service_
push eax
call fcn.00401609
pop ecx
pop ecx
push esi
push str._due_to_error
push dword [ebp - 0x1a4]
push eax
call fcn.004015e9
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
mov ecx, eax
call fcn.004044df
lea ecx, [ebp - 0xe4]
call fcn.0040bf50
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x41ddd0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x424
je 0x41ddce
push 1
push str.AgentErrors.log
lea ecx, [ebp - 0x19c]
call fcn.0040bd69
lea eax, [ebp - 0x19c]
mov dword [ebp - 4], 2
push str.Failed_to_open_service_
push eax
call fcn.00401609
pop ecx
pop ecx
push edi
push str._so_that_it_can_be_stopped_due_to_error
push esi
push eax
call fcn.004015e9
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
mov ecx, eax
call fcn.004044df
lea ecx, [ebp - 0x19c]
call fcn.0040bf50
jmp 0x41ddd0
mov bl, 1
push dword [ebp - 0x1a8]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, bl
call fcn.00546649
ret
Function at 0x41de0c
Capabilities:
Query service status

Disassembly:
push 0x1a0
mov eax, 0x592ada
call fcn.0054669f
mov ebx, dword [ebp + 0x14]
xor esi, esi
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x1a4], ecx
mov dword [ebp - 0x1a0], eax
test ebx, ebx
je 0x41ded2
lea eax, [ebp - 0x19c]
push eax
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x41dfde
mov eax, dword [ebp - 0x198]
cmp eax, edi
je 0x41df59
sub eax, 1
je 0x41de9b
sub eax, 1
je 0x41de93
sub eax, 1
je 0x41de8e
sub eax, 1
je 0x41de9b
sub eax, 1
je 0x41de93
sub eax, 1
je 0x41de89
sub eax, 1
je 0x41de9b
xor al, al
jmp 0x41de9d
cmp edi, 7
jmp 0x41de96
cmp edi, 1
jmp 0x41de96
cmp edi, 4
setne al
jmp 0x41de9d
mov al, 1
test al, al
jne 0x41df61
and dword [ebp - 0x1a8], 0
lea eax, [ebp - 0x1ac]
push eax
mov dword [ebp - 0x1ac], 1
call fcn.0041ca72
inc esi
pop ecx
mov ecx, dword [ebp - 0x1a4]
cmp esi, ebx
jb 0x41de3d
call fcn.0040c461
push 2
pop esi
push esi
push eax
lea ecx, [ebp - 0x180]
call fcn.0040bd69
lea eax, [ebp - 0x180]
mov dword [ebp - 4], esi
push str.Service_
push eax
call fcn.00401609
pop ecx
pop ecx
push 0x5a1cd8
push ebx
push str._within
push edi
mov ecx, eax
call fcn.0041cab9
add esp, 4
push eax
push str._failed_to
push dword [ebp - 0x1a0]
push ecx
call fcn.004015e9
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
mov ecx, eax
call fcn.004044df
push eax
call fcn.00401609
pop ecx
pop ecx
lea ecx, [ebp - 0x180]
call fcn.0040bf50
mov al, 1
call fcn.00546649
ret
push 1
push str.AgentErrors.log
lea ecx, [ebp - 0xc8]
call fcn.0040bd69
lea eax, [ebp - 0xc8]
mov dword [ebp - 4], 1
push str.Encountered_state
push eax
call fcn.00401609
push edi
mov ecx, eax
call fcn.0041cab9
add esp, 0xc
push eax
push 0x5a1c9c
push dword [ebp - 0x1a0]
push str._while_waiting_for_service_
push dword [ebp - 0x198]
call fcn.0041cab9
push eax
push ecx
call fcn.00401609
add esp, 0xc
push eax
call fcn.00401609
pop ecx
pop ecx
push eax
call fcn.004015e9
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
jmp 0x41e053
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 1
push str.AgentErrors.log
lea ecx, [ebp - 0xc8]
mov esi, eax
call fcn.0040bd69
and dword [ebp - 4], 0
lea eax, [ebp - 0xc8]
push str.Failed_to_query_service_
push eax
call fcn.00401609
pop ecx
pop ecx
push esi
push 0x5a1c50
push edi
mov ecx, eax
call fcn.0041cab9
add esp, 4
push eax
push str._while_waiting_for_service_to
push dword [ebp - 0x1a0]
push ecx
call fcn.004015e9
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
mov ecx, eax
call fcn.004044df
lea ecx, [ebp - 0xc8]
call fcn.0040bf50
xor al, al
jmp 0x41df5b
Function at 0x42060c
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, ecx
call fcn.004204e5
test al, al
je 0x420779
mov ecx, esi
call fcn.004203ae
test eax, eax
je 0x420779
lea ecx, [ebp - 0x14]
xor ebx, ebx
push ecx
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], ebx
push ecx
push eax
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_GetExplicitEntriesFromAclW]
test eax, eax
jne 0x420779
mov byte [ebp - 0x10], bl
mov byte [ebp - 2], bl
mov byte [ebp - 1], bl
inc ebx
push ebx
call fcn.0041fba1
push 3
mov dword [ebp - 0x1c], eax
call fcn.0041fba1
push 2
mov dword [ebp - 0x20], eax
call fcn.0041fba1
and dword [ebp - 0x18], 0
add esp, 0xc
cmp dword [ebp - 0xc], 0
mov ecx, eax
mov dword [ebp - 8], ecx
jbe 0x420743
xor esi, esi
push edi
mov edi, dword [ebp - 0x14]
cmp dword [esi + edi + 4], ebx
je 0x4206a2
cmp dword [esi + edi + 4], 2
jne 0x42072f
cmp dword [esi + edi + 0x14], 0
jne 0x42072f
test ecx, ecx
je 0x4206d4
mov eax, dword [esi + edi]
and eax, 0x20031
cmp eax, 0x20031
jne 0x4206d4
push dword [esi + edi + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x4206d4
mov byte [ebp - 1], bl
jmp 0x42072c
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x4206fe
mov eax, dword [esi + edi]
and eax, 0x20031
cmp eax, 0x20031
jne 0x4206fe
push dword [esi + edi + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x4206fe
mov byte [ebp - 2], bl
jmp 0x42072c
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x42072c
mov eax, dword [esi + edi]
mov edx, 0x30031
and eax, edx
cmp eax, edx
jne 0x42072c
push dword [esi + edi + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
mov ecx, dword [ebp - 0x10]
test eax, eax
movzx ecx, cl
cmovne ecx, ebx
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 8]
mov edi, dword [ebp - 0x18]
add esi, 0x20
inc edi
mov dword [ebp - 0x18], edi
cmp edi, dword [ebp - 0xc]
jb 0x42068e
pop edi
lea eax, [ebp - 0x1c]
push eax
call fcn.00420b84
lea eax, [ebp - 0x20]
push eax
call fcn.00420b84
lea eax, [ebp - 8]
push eax
call fcn.00420b84
add esp, 0xc
cmp byte [ebp - 1], 0
je 0x420773
cmp byte [ebp - 2], 0
je 0x420773
cmp byte [ebp - 0x10], 0
jne 0x420775
xor bl, bl
mov al, bl
jmp 0x42077b
xor al, al
pop esi
pop ebx
leave
ret

Function at 0x4220c0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x639034]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov ecx, dword [ebp - 4]
neg eax
sbb al, al
xor ecx, ebp
inc al
call fcn.00546623
leave
ret