joyce8/EMBER2024-capa huggingface dataset:
Function at 0x410320
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 3
push 0x80000000
push dword [ebp + 8]
lea ecx, [ebp - 8]
mov dword [ebp - 8], ebx
call fcn.00404073
cmp dword [ebp - 8], ebx
jne 0x410351
push 0xfffffffffffffffe
pop esi
jmp 0x410416
push edi
push dword [ebp - 8]
call fcn.0042db94
push ebx
push ebx
push ebx
push dword [ebp - 8]
mov esi, eax
mov dword [ebp - 0x10], esi
call fcn.004298d4
add esp, 0x14
add esi, 0xc
push esi
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.0042e092
mov edi, dword [esi]
push ebx
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0xc], ebx
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0xc]
push 6
add eax, edi
push ebx
push eax
call fcn.00470340
mov eax, dword [ebp - 0xc]
push dword [ebp + 0x10]
mov dword [esi + 8], eax
push eax
push edi
mov dword [esi + 4], eax
call fcn.0042b070
add esp, 0x18
cmp al, 1
mov byte [ebp - 1], al
pop edi
jne 0x4103ff
push dword [0x49aeb4]
lea ecx, [ebp - 0x1c]
push esi
call fcn.0040abbe
mov eax, dword [ebp - 0xc]
push ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.004314af
add esp, 0xc
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 6
push eax
mov ecx, esi
call fcn.0042e092
lea ecx, [ebp - 0x1c]
call fcn.00428a48
push 1
push esi
call fcn.0044244b
cmp byte [ebp - 1], bl
pop ecx
pop ecx
jge 0x410413
or esi, 0xffffffff
jmp 0x410416
mov esi, dword [esi + 4]
lea ecx, [ebp - 8]
call fcn.00402abc
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x411755
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1f4
push ebx
push esi
xor esi, esi
push edi
push esi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0xf003f
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x18], eax
xor eax, eax
push 9
xor ebx, ebx
pop ecx
lea edi, [ebp - 0x48]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
inc ebx
mov dword [ebp - 0x20], esi
cmp word [eax], 0x3f
mov dword [ebp - 0x10], esi
sete cl
mov dword [ebp - 0xc], ebx
cmp ecx, esi
mov dword [ebp - 0x14], ecx
je 0x4117ce
inc eax
inc eax
mov dword [ebp + 8], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp + 8]
push eax
call fcn.0040fcda
mov eax, dword [ebp + 8]
cmp word [eax], si
pop ecx
je 0x4117ce
mov word [eax], si
inc eax
inc eax
mov dword [ebp + 8], eax
cmp dword [ebp - 0x18], esi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x4118ca
xor ecx, ecx
cmp word [eax], 0x21
sete cl
cmp ecx, esi
mov dword [ebp - 0x1c], ecx
je 0x4117f2
inc eax
inc eax
mov dword [ebp + 8], eax
lea ecx, [ebp + 8]
call fcn.0040ac34
push dword [ebp + 8]
call fcn.0040dca1
pop ecx
mov ecx, dword [ebp - 0x14]
neg ecx
sbb ecx, ecx
and ecx, 0xffffffd4
add ecx, 0x30
push ecx
push eax
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, esi
mov dword [ebp + 8], eax
je 0x4118c1
cmp dword [ebp - 0x14], esi
je 0x41188d
lea ecx, [ebp - 0x20]
push ecx
push 0x24
lea ecx, [ebp - 0x48]
push ecx
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
mov ebx, eax
mov dword [ebp - 8], 1
call edi
cmp ebx, esi
mov dword [ebp - 4], eax
jne 0x411858
cmp eax, esi
je 0x4118b8
mov dword [ebp - 0xc], eax
jmp 0x4118b8
push dword [ebp - 0x28]
lea eax, [ebp - 0x1f4]
push dword [ebp - 0x2c]
mov dword [ebp - 0xc], esi
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push dword [ebp - 0x38]
push dword [ebp - 0x3c]
push dword [ebp - 0x40]
push dword [ebp - 0x44]
push dword [ebp - 0x48]
push str.0_0x_lX_0x_lX_0x_lX_0x_lX_0x_lX_0x_lX_0x_lX_0x_lX_0x_lX
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x2c
jmp 0x4118b8
cmp dword [ebp - 0x1c], esi
je 0x4118a0
lea ecx, [ebp - 0x64]
push ecx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
jmp 0x4118b0
push esi
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
cmp eax, esi
mov dword [ebp - 8], eax
jne 0x4118b8
mov dword [ebp - 8], ebx
call edi
mov dword [ebp - 4], eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0x10], esi
je 0x4118fe
cmp dword [ebp - 0xc], esi
je 0x4118ec
push dword [ebp - 0xc]
lea eax, [ebp - 0x1f4]
push 0x4870bc
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x1f4]
push eax
push dword [ebp - 0x10]
call fcn.0042cbf7
cmp dword [ebp - 8], esi
je 0x411908
mov eax, dword [ebp - 4]
jmp 0x41190a
call edi
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x4122d1
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x264
and dword [ebp - 4], 0
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
and dword [ebp + 0xc], 0xfffffffe
and edi, 1
cmp word [ebx], 0
mov dword [ebp - 0x14], edi
je 0x4124a8
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
jmp 0x412306
mov edi, dword [ebp - 0x14]
push ebx
mov dword [ebp - 0x10], ebx
call esi
add eax, edi
mov edi, dword [ebp - 0x10]
push edi
lea ebx, [ebx + eax*2]
call esi
and dword [ebp - 8], 0
lea eax, [edi + eax*2 - 2]
cmp word [eax], 0x5c
jne 0x412332
and word [eax], 0
mov dword [ebp - 8], 2
jmp 0x412344
push edi
call fcn.0046fe88
test eax, eax
pop ecx
je 0x412344
mov dword [ebp - 8], 1
push edi
lea ecx, [ebp + 8]
call fcn.0043a4ba
cmp dword [ebp - 8], 0
je 0x412360
push 0x487300
lea ecx, [ebp + 8]
call fcn.0042e232
and dword [ebp - 0xc], 0
lea eax, [ebp - 0x264]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call fcn.0046ff71
push dword [ebp + 8]
call fcn.0040b2ed
add esp, 0x10
push dword [ebp + 8]
call esi
inc eax
lea edi, [eax + eax]
mov eax, dword [ebp + 8]
mov word [edi + eax - 2], 0x5c
mov eax, dword [ebp + 8]
and word [edi + eax], 0
cmp dword [ebp - 0xc], 0
je 0x41244b
mov eax, dword [ebp + 8]
and word [edi + eax], 0
lea eax, [ebp - 0x238]
push eax
lea ecx, [ebp + 8]
call fcn.0042e232
test byte [ebp - 0x264], 0x10
jne 0x4123f6
cmp dword [ebp + 0xc], 0
push dword [ebp + 8]
je 0x4123ea
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x412432
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4123e5
inc eax
mov dword [ebp - 4], eax
jmp 0x412432
call fcn.0040c9a2
test eax, eax
pop ecx
je 0x412432
jmp 0x4123e5
cmp word [ebp - 0x238], 0x2e
jne 0x41241e
cmp word [ebp - 0x236], 0
je 0x412432
cmp word [ebp - 0x236], 0x2e
jne 0x41241e
cmp word [ebp - 0x234], 0
je 0x412432
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004122d1
test eax, eax
pop ecx
pop ecx
jne 0x412432
and dword [ebp - 4], eax
lea eax, [ebp - 0x264]
push eax
lea ecx, [ebp - 0xc]
call fcn.004040e9
test eax, eax
jne 0x4123a7
jmp 0x412459
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x412456
inc eax
mov dword [ebp - 4], eax
lea ecx, [ebp - 0xc]
call fcn.00402ad6
xor edi, edi
cmp dword [ebp - 8], edi
je 0x412496
cmp dword [ebp + 0xc], edi
push dword [ebp - 0x10]
je 0x412489
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x412496
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jne 0x412493
xor eax, eax
inc eax
jmp 0x412493
call fcn.0040c9a2
cmp eax, edi
pop ecx
je 0x412496
mov dword [ebp - 4], eax
lea ecx, [ebp + 8]
call fcn.00428a48
cmp word [ebx], di
jne 0x412303
pop esi
mov eax, dword [ebp - 4]
pop edi
pop ebx
leave
ret
Function at 0x4135ff
Capabilities:
Check mutex on windows

Disassembly:
test byte [0x49e003], 1
je 0x413617
push str.UCallBackhWnd
call fcn.0040cd6e
test eax, eax
pop ecx
jne 0x41361a
xor eax, eax
ret
push edi
push str.GlobalPECMD:main_u
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
test edi, edi
je 0x413655
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
sub esi, 0xb7
neg esi
sbb esi, esi
push edi
inc esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
pop esi
jne 0x413655
xor eax, eax
inc eax
pop edi
ret
xor eax, eax
pop edi
ret

Function at 0x413e6b
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
add esi, 0x84
lea eax, [esi + 0x325]
push eax
lea ecx, [ebp - 0xc]
call fcn.0042e1e2
cmp word [ebx], 0x5c
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
lea edi, [eax + esi*2]
mov dword [ebp - 8], 2
jne 0x413f44
and dword [ebp + 8], 0
push 0x2c
push ebx
call dword [sym.imp.SHLWAPI.dll_StrChrW]
mov esi, eax
test esi, esi
je 0x413eda
and word [esi], 0
inc esi
inc esi
push esi
call dword [sym.imp.USER32.dll_CharUpperW]
movzx esi, word [esi]
test si, si
je 0x413eda
mov dword [ebp + 8], esi
push edi
inc ebx
push 0x324
inc ebx
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
cmp word [edi], 0
mov esi, edi
je 0x413fab
mov ax, word [ebp + 8]
cmp word [esi], ax
jb 0x413f31
mov edi, dword [ebp - 4]
push ebx
push esi
push str._s_sFonts
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
push edi
call fcn.0046fe88
add esp, 0x14
test eax, eax
je 0x413f31
push 0x487300
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
call fcn.00413db3
pop ecx
mov dword [ebp - 8], eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp word [esi], 0
jne 0x413ef4
jmp 0x413fab
push ebx
call fcn.0040dca1
and dword [ebp + 8], 0
mov esi, eax
push esi
call fcn.0046fe88
test eax, eax
pop ecx
pop ecx
je 0x413f75
push esi
lea ecx, [ebp + 8]
call fcn.0043a57e
push 0x487300
lea ecx, [ebp + 8]
call fcn.0042e232
mov esi, dword [ebp + 8]
push esi
push 0x4874f0
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_wsprintfW]
push esi
call fcn.0040b2ed
push esi
call fcn.0046fe88
add esp, 0x14
test eax, eax
je 0x413fa3
push dword [ebp - 4]
call fcn.00413db3
pop ecx
mov dword [ebp - 8], eax
lea ecx, [ebp + 8]
call fcn.00428a48
lea ecx, [ebp - 0xc]
call fcn.00428a48
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x416597
Capabilities:
Check for time delay via gettickcount
Log keystrokes via application hook

Disassembly:
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, 0x49b604
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
test byte [esp + 0x32], 1
jne 0x4165c0
cmp dword [0x49ae78], ebx
jne 0x4165c0
mov dword [0x49ae74], ebx
movzx eax, byte [esp + 0x30]
add dword [0x49ae78], 1
cmp dword [0x49ae70], ebx
mov dword [esp + 0x30], eax
jne 0x416605
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
push 0x416498
push 0xd
call dword [sym.imp.USER32.dll_SetWindowsHookExW]
cmp eax, ebx
mov dword [0x49ae70], eax
jne 0x416605
sub dword [0x49ae78], 1
xor esi, esi
jmp 0x4166f5
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebp
mov esi, dword [esp + 0x30]
mov edi, eax
add edi, esi
cmp esi, 0x3e8
jb 0x41662c
push ebx
call fcn.0042a26a
pop ecx
cmp dword [esp + 0x34], 2
jne 0x4166c2
cmp esi, ebx
jne 0x4166c2
push 0xa
pop esi
jmp 0x4166c2
cmp dword [esp + 0x34], 2
je 0x416655
call ebp
mov esi, edi
sub esi, eax
cmp esi, ebx
jle 0x4166ce
cmp byte [0x499280], bl
jle 0x4166ce
push 0xa
pop eax
cmp esi, eax
ja 0x416666
mov eax, esi
push 0x4bf
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
jmp 0x4166ba
cmp dword [0x49ae74], ebx
jne 0x4166ce
cmp dword [esp + 0x34], 2
je 0x416690
call ebp
mov esi, edi
sub esi, eax
cmp esi, ebx
jle 0x4166c2
push 1
push ebx
push ebx
push ebx
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x4166c2
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
cmp byte [0x499280], bl
jg 0x416677
cmp dword [0x49ae74], ebx
je 0x416644
push 0x49b604
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x49ae74]
sub dword [0x49ae78], 1
pop ebp
jne 0x4166ee
mov dword [0x49ae74], ebx
mov esi, eax
mov edi, 0x49b604
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x1c
ret
Function at 0x41dada
Capabilities:
Check for time delay via gettickcount
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 8]
cmp word [eax], 0x2a
push ebx
push esi
lea eax, [ebp + 8]
push edi
push eax
sete byte [ebp - 4]
call fcn.00404037
mov edi, dword [ebp + 8]
lea eax, [ebp - 1]
push eax
lea eax, [ebp - 2]
push eax
lea eax, [ebp - 5]
push eax
lea eax, [ebp - 6]
push eax
lea eax, [ebp - 3]
push eax
lea ebx, [ebp + 8]
mov byte [ebp - 2], 0x2a
mov byte [ebp - 3], 0
mov byte [ebp - 1], 0
call fcn.00416705
mov eax, dword [ebp + 8]
add esp, 0x18
xor ebx, ebx
cmp word [eax], bx
mov esi, 0x49b604
push esi
je 0x41dbe0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [ebp - 4], bl
je 0x41db50
cmp dword [0x49add8], ebx
jne 0x41dc4d
mov eax, dword [ebp + 8]
movsx ecx, byte [ebp - 2]
mov byte [0x499271], 0xff
movzx edx, word [eax]
cmp ecx, edx
mov byte [0x49ae15], 1
jne 0x41db7b
movzx eax, word [eax + 2]
cmp ecx, eax
jne 0x41db7b
mov byte [0x499271], 0
push 0x49ab6c
push 0x10000
push edi
push 0x41dac9
push 0x100000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov dword [ebp - 0x18], eax
cmp word [edi], bx
jne 0x41dbc2
cmp byte [0x49ae15], 0
je 0x41dcdb
call esi
sub eax, dword [ebp - 0x18]
cmp eax, 0x7d0
jae 0x41dcdb
push 0x14
mov ecx, 0x49aed0
call fcn.0040c4a3
jmp 0x41dbb0
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x18], 0xbb8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x49add8]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x20], ebx
push str.LogohWnd
mov ebx, str.SOFTWAREPELOGON
push ebx
mov edi, 0x80000002
push edi
mov dword [ebp - 0x1c], 4
call fcn.00429788
push str.LogohWnd
push ebx
push edi
call fcn.00429876
xor ecx, ecx
add esp, 0x24
cmp dword [ebp - 0x10], ecx
jne 0x41dc59
mov eax, dword [ebp - 0x14]
cmp eax, ecx
mov dword [ebp - 0x10], eax
jne 0x41dc59
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x41dcdb
mov edx, dword [ebp - 0x10]
cmp edx, dword [0x49add8]
mov al, byte [ebp - 3]
jne 0x41dc76
test al, al
jne 0x41dc73
cmp byte [ebp - 1], al
jne 0x41dc73
xor ecx, ecx
inc ecx
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0xc]
neg ecx
sbb ecx, ecx
lea edi, [ebp - 0xc]
and ecx, edi
neg al
push ecx
sbb eax, eax
add eax, 0x67
push eax
push 0x111
push edx
call dword [sym.imp.USER32.dll_PostMessageW]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
cmp byte [ebp - 1], 0
mov ebx, eax
je 0x41dcbc
mov edi, 0x49add8
mov dword [ebp - 0x18], 0xfa0
jmp 0x41dcd6
mov edi, dword [ebp - 0x24]
jmp 0x41dcd6
call esi
sub eax, ebx
cmp eax, dword [ebp - 0x18]
jae 0x41dcdb
push 0xa
mov ecx, 0x49aed0
call fcn.0040c4a3
cmp dword [edi], 0
jne 0x41dcc1
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret
Function at 0x41e330
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x6c]
sub esp, 0xa4
push ebx
push esi
mov esi, dword [ebp + 0x7c]
push edi
push 0x485fc4
lea ecx, [ebp + 0x64]
sar esi, 0x10
call fcn.0043a4ba
mov ebx, dword [ebp + 0x74]
push esi
push dword [ebx]
call fcn.0040d3f8
pop ecx
pop ecx
push 0x20a
lea ecx, [ebp + 0x68]
mov dword [ebp + 0x74], eax
call fcn.0042e1e2
push dword [ebp + 0x68]
push 0x208
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edi, dword [ebp + 0x78]
push edi
lea ecx, [ebp - 0x38]
call fcn.0040b4f5
push edi
lea ecx, [ebp - 0x38]
call fcn.0040bb89
push dword [ebp + 0x68]
mov eax, dword [edi + 0x18]
push 0x4861b4
mov dword [ebp - 0x20], eax
call fcn.0042cbf7
movzx eax, si
push eax
lea ecx, [ebp - 0x38]
mov word [ebp - 0x30], si
call fcn.0042c2e0
mov ecx, dword [ebp + 0x7c]
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp + 0x64]
push eax
push dword [ebp + 0x74]
push 0
push ebx
call fcn.0041d2c6
movzx esi, ax
or esi, dword [ebp + 0x7c]
add esp, 0x14
mov edi, 0x49b604
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
and dword [ebp + 0x10], 0
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
lea ecx, [ebp - 0x38]
call fcn.0041da45
lea ecx, [ebp + 0xc]
call fcn.00428a48
lea ecx, [ebp + 0x68]
call fcn.00428a48
lea ecx, [ebp + 0x64]
call fcn.00428a48
pop edi
mov eax, esi
pop esi
pop ebx
add ebp, 0x6c
leave
ret
Function at 0x41fb44
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push 0x20a
lea ecx, [ebp - 4]
call fcn.0042e1e2
mov eax, dword [ebp - 4]
mov word [eax], 0x20
mov eax, dword [ebp - 4]
and word [eax + 2], 0
mov eax, dword [ebp - 4]
push 0x208
add eax, 2
push eax
push str.SystemRoot
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push str.System32OnShutdown.wcs
lea ecx, [ebp - 4]
call fcn.0042e232
mov cl, byte [ebp + 0xc]
test cl, 0x20
mov eax, str.unknown
je 0x41fb9d
mov eax, 0x484f34
test cl, 0x10
je 0x41fba7
mov eax, str.reboot
test cl, 2
je 0x41fbb1
mov eax, str.logout
test cl, 4
je 0x41fbbb
mov eax, 0x488088
test cl, 8
je 0x41fbc5
mov eax, str.hiber
test cl, 0x40
je 0x41fbcf
mov eax, str.poweroff
test cl, cl
jns 0x41fbd8
mov eax, str.lock
push ebx
push esi
push edi
push eax
lea ecx, [ebp - 4]
call fcn.0042e232
push 0x4850e8
lea ecx, [ebp - 4]
call fcn.0042e232
push dword [ebp + 8]
lea ecx, [ebp - 4]
call fcn.0042e232
push dword [ebp - 4]
mov ebx, 0x49aed0
mov ecx, ebx
call fcn.0041e615
test byte [ebp + 0xc], 0x70
push 6
pop ecx
mov esi, str._25INDATA
lea edi, [ebp - 0x1c]
rep movsd dword es:[edi], dword [esi]
je 0x41fc29
lea eax, [ebp - 0x1c]
push eax
mov ecx, ebx
call fcn.0041e615
lea ecx, [ebp - 4]
call fcn.00428a48
pop edi
pop esi
pop ebx
leave
ret

Function at 0x41fc36
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 0xc]
mov eax, esi
push edi
and eax, 0xfffffffe
push eax
push dword [ebp + 0x10]
call fcn.0041fb44
push 2
push str.SeShutdownPrivilege
and esi, 0x4000
call fcn.0040e27e
push 2
push str.SeRemoteShutdownPrivilege
call fcn.0040e27e
add esp, 0x18
call fcn.0040c76b
xor edi, edi
test byte [ebp + 0xc], 1
jne 0x41fc9a
cmp eax, 0x60002
jb 0x41fc9a
xor eax, eax
cmp dword [ebp + 8], edi
setne al
push eax
push 1
push edi
push 0x484964
push edi
call dword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownW]
cmp esi, edi
mov dword [ebp - 4], edi
jne 0x41fcb9
lea eax, [ebp - 4]
push eax
push 1
push 2
push edi
push 1
push 0x16
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
push str.NtShutdownSystem
push str.NTDLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, eax
xor eax, eax
inc eax
cmp ecx, edi
je 0x41fce5
xor eax, eax
cmp dword [ebp + 8], edi
sete al
inc eax
push eax
call ecx
pop edi
pop esi
leave
ret
Function at 0x429788
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ax, word [0x49ab68]
push esi
xor esi, esi
cmp ax, si
jne 0x4297b4
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [0x49ad64]
jmp 0x4297fc
push esi
lea ecx, [ebp - 4]
push ecx
push esi
movzx eax, ax
or eax, 0x20019
push eax
push esi
push esi
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, esi
jne 0x4297fc
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
leave
ret

Function at 0x4297ff
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ax, word [0x49ab68]
push esi
xor esi, esi
cmp ax, si
jne 0x42982b
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [0x49aff0]
jmp 0x429873
push esi
lea ecx, [ebp - 4]
push ecx
push esi
movzx eax, ax
or eax, 0x20006
push eax
push esi
push esi
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, esi
jne 0x429873
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
leave
ret

Function at 0x429876
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ax, word [0x49ab68]
test ax, ax
jne 0x429896
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [0x49aff4]
leave
ret
and dword [ebp - 4], 0
movzx eax, ax
lea ecx, [ebp - 4]
push ecx
or eax, 2
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4298d2
push esi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
leave
ret
Function at 0x429e80
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [0x49b050], 0
push edi
mov edi, ecx
jne 0x42a0af
and dword [ebp - 4], 0
test byte [0x49b1c8], 4
jne 0x429eb6
or byte [0x49b1c8], 8
push 2
push str.SeDebugPrivilege
call fcn.0040e27e
pop ecx
pop ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x49b04c
mov esi, str.WS2_32.DLL
push esi
push str.WSAStartup
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b054
push esi
push str.shutdown
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b058
push esi
push str.closesocket
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b05c
push esi
push str.connect
call fcn.004299ca
add esp, 0x40
lea eax, [ebp - 4]
push eax
push 0x49b060
push esi
push str.send
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b064
push esi
push str.select
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b068
push esi
push str.recvfrom
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b06c
push esi
push str.sendto
call fcn.004299ca
add esp, 0x40
lea eax, [ebp - 4]
push eax
push 0x49b070
push esi
push str.bind
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b074
push esi
push str.listen
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b078
push esi
push str.accept
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b080
push esi
push str.getsockname
call fcn.004299ca
add esp, 0x40
lea eax, [ebp - 4]
push eax
push 0x49b07c
push esi
push str.getpeername
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b084
push esi
push str.ioctlsocket
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b088
push esi
push str.setsockopt
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b08c
push esi
push str.ntohl
call fcn.004299ca
add esp, 0x40
lea eax, [ebp - 4]
push eax
push 0x49b090
push esi
push str.htonl
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b094
push esi
push str.htons
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b098
push esi
push str.inet_addr
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b09c
push esi
push str.gethostbyname
call fcn.004299ca
add esp, 0x40
lea eax, [ebp - 4]
push eax
push 0x49b0a0
push esi
push str.inet_ntoa
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b0a4
push esi
push str.WSAGetLastError
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b0a8
push esi
push str.__WSAFDIsSet
call fcn.004299ca
lea eax, [ebp - 4]
push eax
push 0x49b050
push esi
push str.socket
call fcn.004299ca
add esp, 0x40
pop esi
mov eax, edi
pop edi
leave
ret