joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405130
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x405160
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x405230
add esp, 0x10
mov eax, 1
pop ebx
pop esi
pop edi
ret 0xc
cmp eax, 1
je 0x405260
cmp eax, 3
jne 0x40514a
mov eax, dword [0x4e9024]
cmp eax, 0xffffffff
je 0x40514a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x40514a
test byte [eax + 0x20], 0x30
je 0x405290
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x4051a3
call sym.__pthread_cleanup_dest.part.0
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x4051d5
mov dword [esp], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x4051c7
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x14], 0
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call dbg.pthread_mutex_destroy
lea eax, [ebx + 0x38]
mov dword [esp], eax
call dbg.pthread_spin_destroy
cmp eax, 1
je 0x405310
mov ecx, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test ecx, ecx
je 0x405380
mov eax, dword [0x4e9024]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
jmp 0x40514a
mov eax, dword [0x550060]
test eax, eax
je 0x40514a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov dword [0x550060], 0
sub esp, 4
jmp 0x40514a
mov dword [esp + 4], dbg.SetThreadName_VEH
mov dword [esp], 1
call dword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
sub esp, 8
mov dword [0x550060], eax
mov eax, 1
add esp, 0x10
pop ebx
pop esi
pop edi
ret 0xc
mov edx, dword [ebx + 0x68]
mov eax, dword [eax + 0x18]
test edx, edx
jne 0x405318
test eax, eax
je 0x4052aa
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [ebx + 0xb4]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x68], 1
test eax, eax
je 0x4052c7
call sym.__pthread_cleanup_dest.part.0
lea edi, [ebx + 0x1c]
lea esi, [ebx + 0x38]
test byte [ebx + 0x24], 4
je 0x405360
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x4052f0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov dword [ebx + 0x14], 0
mov dword [esp], edi
call dbg.pthread_mutex_destroy
mov dword [esp], esi
call dbg.pthread_spin_destroy
cmp eax, 1
jne 0x4051f4
call sym._replace_spin_keys.part.0
lea esi, [esi]
test eax, eax
je 0x405328
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
lea eax, [ebx + 0x1c]
mov dword [ebx + 0x18], 0
mov dword [esp], eax
call dbg.pthread_mutex_destroy
lea eax, [ebx + 0x38]
mov dword [esp], eax
call dbg.pthread_spin_destroy
cmp eax, 1
je 0x405310
mov dword [ebx + 0x38], 0xffffffff
jmp 0x40514a
mov dword [esp], edi
call dbg.pthread_mutex_destroy
mov dword [esp], esi
call dbg.pthread_spin_destroy
cmp eax, 1
jne 0x40534a
jmp 0x405310
mov eax, ebx
call sym._push_pthread_mem.part.0
jmp 0x405209
Function at 0x405c50
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
cmp dword [0x550084], 1
je 0x405c61
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4e9024]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x405c80
mov eax, dword [eax + 0x18]
add esp, 0x1c
ret
call sym.___pthread_self_lite.part.0
test eax, eax
jne 0x405c76
add esp, 0x1c
ret

Function at 0x405ce0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
cmp dword [0x550084], 1
je 0x405cf1
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4e9024]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x405d10
add eax, 0xc
add esp, 0x1c
ret
call sym.___pthread_self_lite.part.0
test eax, eax
jne 0x405d06
jmp 0x405d09

Function at 0x405d40
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov esi, dword [esp + 0x20]
call sym.___pthread_self_lite
mov dword [eax + 4], esi
mov ebx, eax
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x405d62
call sym.__pthread_cleanup_dest.part.0
test byte [ebx + 0x20], 0x30
jne 0x405d7c
add ebx, 0x70
mov dword [esp + 4], 1
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_longjmp]
mov eax, dword [0x4e9024]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
push edx
test eax, eax
je 0x405dbf
cmp dword [ebx + 0x14], 0
mov eax, dword [eax + 0x18]
je 0x405e03
mov dword [ebx + 0x68], 1
mov esi, dword [ebx + 4]
test eax, eax
je 0x405db2
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov dword [ebx + 0x18], 0
test byte [ebx + 0x24], 4
jne 0x405dc8
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__endthreadex]
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
mov dword [ebx + 0x14], 0
mov eax, ebx
call sym._push_pthread_mem
mov eax, dword [0x4e9024]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push eax
push eax
jmp 0x405dbf
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x405e17
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov dword [ebx + 0x18], 0
mov esi, dword [ebx + 4]
jmp 0x405de2

Function at 0x405e30
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x55008c]
test eax, eax
jne 0x405e40
xor eax, eax
ret
sub esp, 0x1c
cmp dword [0x550084], 1
je 0x405e51
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4e9024]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x405e90
mov edx, dword [eax + 0x10]
test edx, edx
jle 0x405e78
xor eax, eax
add esp, 0x1c
ret
test byte [eax + 0x20], 3
je 0x405e6d
mov eax, dword [eax + 0x24]
and eax, 1
jmp 0x405e6f
call sym.___pthread_self_lite.part.0
test eax, eax
je 0x405e6d
jmp 0x405e66
Function at 0x405ea0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
cmp dword [0x550084], 1
je 0x405eb1
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4e9024]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x405ef0
mov edx, dword [esp + 0x20]
add eax, 0x10
test edx, edx
jle 0x405ee0
lock add dword [eax], 1
add esp, 0x1c
ret
lock sub dword [eax], 1
add esp, 0x1c
ret
call sym.___pthread_self_lite.part.0
test eax, eax
jne 0x405ec6
add esp, 0x1c
ret

Function at 0x405ff0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
cmp dword [0x550084], 1
je 0x406003
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4e9024]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x406060
test byte [ebx + 0x20], 0xc
jne 0x406029
mov eax, dword [0x55008c]
test eax, eax
jne 0x406030
add esp, 0x14
pop ebx
pop esi
ret
lea esi, [ebx + 0x1c]
mov dword [esp], esi
call dbg.pthread_mutex_lock
movzx eax, byte [ebx + 0x20]
test al, 3
je 0x406052
mov edx, dword [ebx + 0x24]
test dl, 1
je 0x406052
mov ecx, dword [ebx + 0x10]
test ecx, ecx
jle 0x406071
mov dword [esp], esi
call dbg.pthread_mutex_unlock
add esp, 0x14
pop ebx
pop esi
ret
call sym.___pthread_self_lite.part.0
mov ebx, eax
test eax, eax
jne 0x40601a
add esp, 0x14
pop ebx
pop esi
ret
and eax, 0xfffffff3
and edx, 0xfffffffe
or eax, 4
mov dword [ebx + 0x24], edx
mov byte [ebx + 0x20], al
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x406091
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push eax
mov dword [esp], esi
call dbg.pthread_mutex_unlock
call dbg._pthread_invoke_cancel
nop

Function at 0x406170
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
cmp dword [0x550084], 1
mov esi, dword [esp + 0x20]
je 0x406187
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4e9024]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x4061f8
test esi, esi
je 0x4061d0
call dbg.pthread_testcancel
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x406208
mov dword [esp + 4], esi
mov dword [esp], eax
call dbg._pthread_wait_for_single_object
call dbg.pthread_testcancel
add esp, 0x14
xor eax, eax
pop ebx
pop esi
ret
call dbg.pthread_testcancel
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
call dbg.pthread_testcancel
add esp, 0x14
xor eax, eax
pop ebx
pop esi
ret
call sym.___pthread_self_lite.part.0
mov ebx, eax
jmp 0x40619e
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
jmp 0x4061ba
Function at 0x406b50
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x24
mov esi, dword [esp + 0x30]
test esi, esi
je 0x406c88
mov dword [esp], 0x4e901c
call dbg.pthread_mutex_lock
mov eax, esi
call dbg.__pthread_get_pointer
mov dword [esp], 0x4e901c
mov ebx, eax
call dbg.pthread_mutex_unlock
test ebx, ebx
je 0x406c88
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x406c88
lea edx, [esp + 0x1c]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
sub esp, 8
test eax, eax
je 0x406c88
test byte [ebx + 0x24], 4
jne 0x406c98
cmp dword [0x550084], 1
je 0x406bc9
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4e9024]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x406ca8
cmp esi, dword [eax + 0xb4]
je 0x406cc0
mov ecx, dword [ebx + 0x68]
mov eax, dword [ebx + 0x14]
test ecx, ecx
je 0x406c00
lea edx, [eax - 1]
cmp edx, 0xfffffffd
ja 0x406c17
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebx + 0x14]
sub esp, 8
mov dword [esp], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x406c34
mov dword [esp], eax
call esi
sub esp, 4
mov edx, dword [esp + 0x34]
mov dword [ebx + 0x18], 0
test edx, edx
je 0x406c4c
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x34]
mov dword [ecx], eax
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call dbg.pthread_mutex_destroy
lea eax, [ebx + 0x38]
mov dword [esp], eax
call dbg.pthread_spin_destroy
cmp eax, 1
je 0x406cc7
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
xor esi, esi
test eax, eax
jne 0x406c8d
mov eax, ebx
call sym._push_pthread_mem.part.0
jmp 0x406c8d
mov esi, 3
add esp, 0x24
mov eax, esi
pop ebx
pop esi
ret
mov esi, 0x16
add esp, 0x24
mov eax, esi
pop ebx
pop esi
ret
call sym.___pthread_self_lite.part.0
test eax, eax
je 0x406bee
jmp 0x406be2
mov esi, 0x24
jmp 0x406c8d
call sym._replace_spin_keys.part.0
lea esi, [esi]
Function at 0x408b0e
Capabilities:
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0xc], 0
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
call eax
sub esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x408bd5
mov eax, dword [str.WazuhSvc]
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_OpenServiceA]
call eax
sub esp, 0xc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x408bc5
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_StartServiceA]
call eax
sub esp, 0xc
test eax, eax
je 0x408ba0
mov dword [ebp - 0xc], 1
jmp 0x408bb5
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
cmp eax, 0x420
jne 0x408bb5
mov dword [ebp - 0xc], 0xffffffff
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
leave
ret

Function at 0x408bda
Capabilities:
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0xc], 0
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
call eax
sub esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x408c85
mov eax, dword [str.WazuhSvc]
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_OpenServiceA]
call eax
sub esp, 0xc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x408c75
lea eax, [ebp - 0x30]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_ControlService]
call eax
sub esp, 0xc
test eax, eax
je 0x408c65
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call eax
sub esp, 4
mov dword [esp], 0x12c
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
leave
ret
Function at 0x408c9b
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0xc], 0
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
call eax
sub esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x408d46
mov eax, dword [str.WazuhSvc]
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_OpenServiceA]
call eax
sub esp, 0xc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x408d36
lea eax, [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
call eax
sub esp, 8
test eax, eax
je 0x408d26
mov eax, dword [ebp - 0x2c]
cmp eax, 4
jne 0x408d26
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
leave
ret
Function at 0x408d4b
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x468
mov dword [ebp - 0xc], 0
call dbg.UninstallService
test eax, eax
jne 0x408d92
mov dword [esp + 0xc], str.Failure_running_UninstallService__.
mov dword [esp + 8], global___func__.100
mov dword [esp + 4], 0x8d
mov dword [esp], str.win32_win_service.c
call dbg._plain_merror
mov eax, 0
jmp 0x408f69
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
call eax
sub esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x408ed4
mov edx, dword [0x4e902c]
mov eax, dword [str.WazuhSvc]
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov ecx, dword [ebp - 0xc]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], 1
mov dword [esp + 0x14], 2
mov dword [esp + 0x10], 0x10
mov dword [esp + 0xc], 0xf01ff
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CreateServiceA]
call eax
sub esp, 0x34
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x408e56
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call eax
sub esp, 4
jmp 0x408ed8
mov eax, dword [0x4e9030]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
call eax
sub esp, 0xc
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call eax
sub esp, 4
cmp dword [ebp - 0x18], 0
je 0x408ed7
mov dword [esp + 0xc], str.Successfully_added_to_the_service_database.
mov dword [esp + 8], global___func__.100
mov dword [esp + 4], 0xb7
mov dword [esp], str.win32_win_service.c
call dbg._plain_minfo
mov eax, 1
jmp 0x408f69
nop
jmp 0x408ed8
nop
mov dword [esp + 8], 0x401
mov dword [esp + 4], 0
lea eax, [ebp - 0x421]
mov dword [esp], eax
call sym._memset
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
lea edx, [ebp - 0x20]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x1300
mov eax, dword [sym.imp.KERNEL32.dll_FormatMessageA]
call eax
sub esp, 0x1c
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unable_to_create_service_entry:__s
mov dword [esp + 8], global___func__.100
mov dword [esp + 4], 0xca
mov dword [esp], str.win32_win_service.c
call dbg._plain_merror
mov eax, 0
leave
ret
Function at 0x40d906
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov byte [ebp - 0x811], 0
mov byte [ebp - 0x11], 0
mov dword [esp + 8], 0x7ff
lea eax, [ebp - 0x811]
mov dword [esp + 4], eax
mov dword [esp], str._WINDIR_
mov eax, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
call eax
sub esp, 0xc
mov dword [esp + 4], 0x5c
lea eax, [ebp - 0x811]
mov dword [esp], eax
call sym._strchr
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40d9a3
mov eax, dword [ebp - 0xc]
mov byte [eax], 0
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x811]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x4eb685
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._snprintf_7
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
js 0x40d997
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
jl 0x40d99e
mov eax, 0
jmp 0x40d9a8
mov eax, dword [ebp + 8]
jmp 0x40d9a8
mov eax, 0
leave
ret
Function at 0x410f82
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov dword [ebp - 0x34], 0x10
lea eax, [ebp - 0x30]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x4ec198
mov dword [esp], 0
mov eax, dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
call eax
sub esp, 0xc
test eax, eax
jne 0x410fbd
mov eax, 0
jmp 0x411098
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x34]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x28]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x10
lea eax, [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call eax
sub esp, 0x18
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
je 0x41101e
mov eax, 0
jmp 0x411098
mov dword [ebp - 0x28], 1
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edx
cmp dword [ebp + 0xc], 0
je 0x411042
mov eax, dword [ebp - 0x1c]
or eax, 2
mov dword [ebp - 0x1c], eax
jmp 0x41104b
mov eax, dword [ebp - 0x1c]
and eax, 0xfffffffd
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x28]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call eax
sub esp, 0x18
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
je 0x411093
mov eax, 0
jmp 0x411098
mov eax, 1
leave
ret
Function at 0x413e3c
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
push edi
push ebx
sub esp, 0xf0
mov dword [ebp - 0x4e], 0
lea eax, [ebp - 0x4a]
mov ecx, 0x3e
mov ebx, 0
mov dword [eax], ebx
mov dword [eax + ecx - 4], ebx
lea edx, [eax + 4]
and edx, 0xfffffffc
sub eax, edx
add ecx, eax
and ecx, 0xfffffffc
shr ecx, 2
mov edi, edx
mov eax, ebx
rep stosd dword es:[edi], eax
mov dword [ebp - 0xd4], pe_nt_image_headers32
mov eax, dword [0x5701f4]
mov eax, dword [eax + 8]
mov edx, eax
lea eax, [ebp - 0xd4]
mov dword [esp + 8], eax
lea eax, [ebp - 0xd0]
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, dword [sym.imp.WSOCK32.DLL_getsockname]
call eax
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x413f5b
movzx eax, word [ebp - 0xd0]
cwde
cmp eax, 2
je 0x413ecd
cmp eax, 0x17
je 0x413ef2
jmp 0x413f29
lea eax, [ebp - 0xd0]
mov dword [esp + 8], 0x41
lea edx, [ebp - 0x4e]
mov dword [esp + 4], edx
mov eax, dword [eax + 4]
mov dword [esp], eax
call dbg.get_ipv4_string
jmp 0x413f92
lea eax, [ebp - 0xd0]
mov dword [esp + 0x14], 0x41
lea edx, [ebp - 0x4e]
mov dword [esp + 0x10], edx
mov edx, dword [eax + 8]
mov dword [esp], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 4], edx
mov edx, dword [eax + 0x10]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x14]
mov dword [esp + 0xc], eax
call dbg.get_ipv6_string
jmp 0x413f92
movzx eax, word [ebp - 0xd0]
cwde
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unknown_address_family:__d
mov dword [esp + 8], global___func__.2
mov dword [esp + 4], 0x3b
mov dword [esp], str.client_agent_notify.c
call dbg._mdebug2
jmp 0x413f92
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
mov dword [esp], eax
call dbg.win_strerror
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.getsockname___failed:__s
mov dword [esp + 8], global___func__.2
mov dword [esp + 4], 0x40
mov dword [esp], str.client_agent_notify.c
call dbg._mdebug2
lea eax, [ebp - 0x4e]
mov dword [esp], eax
call sym._strdup
lea esp, [ebp - 8]
pop ebx
pop edi
pop ebp
ret