joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000dff0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 8], 0
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x1003be90], eax
je 0x1000e014
mov eax, 0x10dd
jmp 0x1000e1bc
cmp dword [0x1003be94], 0
je 0x1000e027
mov eax, dword [0x1003be94]
jmp 0x1000e1bc
cmp dword [ebp + 0xc], 0
jne 0x1000e037
mov eax, 0x57
jmp 0x1000e1bc
cmp dword [ebp + 8], 0
jne 0x1000e047
mov eax, 6
jmp 0x1000e1bc
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x1000e070
mov dword [ebp - 8], 6
mov ecx, dword [ebp - 8]
mov dword [0x1003be94], ecx
mov edx, dword [ebp + 8]
mov dword [0x1003be98], edx
mov eax, dword [ebp - 8]
jmp 0x1000e1bc
push 0x18
call fcn.1000f6a3
add esp, 4
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x1000e0cb
mov dword [ebp - 8], 8
mov ecx, dword [ebp - 8]
mov dword [0x1003be94], ecx
cmp dword [ebp - 4], 0
je 0x1000e0ba
mov edx, dword [ebp - 4]
mov dword [ebp - 0x20], edx
push 0x18
mov eax, dword [ebp - 0x20]
push eax
call fcn.1000f6f6
add esp, 8
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
mov dword [0x1003be98], ecx
mov eax, dword [ebp - 8]
jmp 0x1000e1bc
push 0
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call fcn.1000dfd0
mov dword [ebp - 0x10], eax
push 0
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.1000dfd0
mov dword [ebp + 0xc], eax
mov edx, dword [ebp - 0x10]
movzx eax, byte [edx + 0x36]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x40]
sub edx, dword [ebp - 0xc]
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0xc], 0
je 0x1000e10b
cmp dword [ebp - 0xc], 0x1e
jbe 0x1000e127
mov dword [ebp - 8], 9
cmp dword [0x1003be88], 0
je 0x1000e122
jmp 0x1000e099
jmp 0x1000e090
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x44]
cmp ecx, dword [ebp + 0xc]
je 0x1000e14e
mov dword [ebp - 8], 9
cmp dword [0x1003be88], 0
je 0x1000e149
jmp 0x1000e099
jmp 0x1000e090
mov dword [ebp - 0x18], 0
lea edx, [ebp - 0x18]
push edx
push 0x40
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call sub.KERNEL32.dll_VirtualProtect
test eax, eax
jne 0x1000e179
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 8], eax
jmp 0x1000e090
mov edx, dword [ebp - 4]
mov dword [edx + 4], 1
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
mov dword [edx + 0x10], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
mov dword [ecx + 0xc], edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x18]
mov dword [eax + 0x14], ecx
mov edx, dword [ebp - 4]
mov eax, dword [0x1003bea0]
mov dword [edx], eax
mov ecx, dword [ebp - 4]
mov dword [0x1003bea0], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret 8
Function at 0x1000e1d0
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x1003be90], eax
je 0x1000e1ed
mov eax, 0x10dd
jmp 0x1000e2d0
mov eax, dword [0x1003bea0]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x1000e26c
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x10]
movzx eax, byte [edx + 0x36]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0xc]
push edx
call sub.KERNEL32.dll_VirtualProtect
mov eax, dword [ebp - 4]
cmp dword [eax + 4], 0
jne 0x1000e248
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x10], 0
je 0x1000e248
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x10]
push eax
call fcn.1000d070
add esp, 4
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x10], 0
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0xc], ecx
push 0x18
mov edx, dword [ebp - 0xc]
push edx
call fcn.1000f6f6
add esp, 8
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
jmp 0x1000e1f5
mov dword [0x1003bea0], 0
call fcn.1000d950
mov ecx, dword [0x1003be9c]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x1000e2ba
mov edx, dword [ebp - 8]
mov eax, dword [edx + 4]
push eax
call sub.KERNEL32.dll_ResumeThread
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
push 8
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.1000f6f6
add esp, 8
mov edx, dword [ebp - 0x18]
mov dword [ebp - 8], edx
jmp 0x1000e284
mov dword [0x1003be9c], 0
mov dword [0x1003be90], 0
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x1000e7b0
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp dword [0x1003be94], 0
je 0x1000e7c9
mov eax, dword [0x1003be94]
jmp 0x1000e868
call sub.KERNEL32.dll_GetCurrentThread
cmp dword [ebp + 8], eax
jne 0x1000e7da
xor eax, eax
jmp 0x1000e868
push 8
call fcn.1000f6a3
add esp, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x1000e832
mov dword [ebp - 8], 8
cmp dword [ebp - 4], 0
je 0x1000e81b
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x10], ecx
push 8
mov edx, dword [ebp - 0x10]
push edx
call fcn.1000f6f6
add esp, 8
mov dword [ebp - 4], 0
mov eax, dword [ebp - 8]
mov dword [0x1003be94], eax
mov dword [0x1003be98], 0
mov eax, dword [ebp - 8]
jmp 0x1000e868
mov ecx, dword [ebp + 8]
push ecx
call sub.KERNEL32.dll_SuspendThread
cmp eax, 0xffffffff
jne 0x1000e84a
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 8], eax
jmp 0x1000e7fa
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [0x1003be9c]
mov dword [ecx], edx
mov eax, dword [ebp - 4]
mov dword [0x1003be9c], eax
xor eax, eax
mov esp, ebp
pop ebp
ret 4
Function at 0x10016bf6
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x10016c35
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x10016c35
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10016c35
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x10016c35
cmp dword [ecx + 0x74], 0xe
jbe 0x10016c35
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x10021187
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x10021224
push ebx
push esi
call fcn.10021150
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.1001f058
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x100211d1
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10021223
push edi
push eax
call fcn.1001cd70
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x100211f1
call fcn.1001abf0
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10021222
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1001f058
add esp, 0x20
test eax, eax
jne 0x10021210
push edi
call fcn.1001abf0
jmp 0x10021218
push ebx
call fcn.1001abf0
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x10024ad2
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.1001b523
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x10024b41
cmp esi, dword [ebp - 4]
je 0x10024b3c
cmp dword [ebp + 0xc], 0
je 0x10024b3c
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x10024b19
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.10024627
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x10024b43
xor eax, eax
inc eax
jmp 0x10024b43
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x10024bae
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x10038040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.1001b523
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.1001b523
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x10024c25
cmp word [ecx], dx
je 0x10024c25
mov eax, dword [0x1002ff2c]
push edi
dec eax
push eax
push 0x1002fe18
call fcn.10024b47
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x10024c98
cmp word [eax], dx
je 0x10024c98
mov eax, dword [edi]
test eax, eax
je 0x10024c49
cmp word [eax], dx
je 0x10024c49
lea eax, [ebp - 0x10]
push eax
call fcn.1002452d
jmp 0x10024c52
lea eax, [ebp - 0x10]
push eax
call fcn.100245c8
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x10024cc2
mov eax, dword [0x1002fe14]
push dword [ebp - 0x14]
dec eax
push eax
push 0x1002fb08
call fcn.10024b47
add esp, 0xc
test al, al
je 0x10024cc2
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x10024c8d
cmp word [eax], di
je 0x10024c8d
lea eax, [ebp - 0x10]
push eax
call fcn.1002452d
pop ecx
jmp 0x10024cc4
lea eax, [ebp - 0x10]
push eax
call fcn.100245c8
jmp 0x10024c8a
mov eax, dword [edi]
test eax, eax
je 0x10024caf
cmp word [eax], dx
je 0x10024caf
lea eax, [ebp - 0x10]
push eax
call fcn.100244e2
pop ecx
jmp 0x10024cc2
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x10024d8d
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.100249cc
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x10024d8d
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x10024d8d
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x10024d8d
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x10024d1a
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.1001e87b
test ebx, ebx
je 0x10024d88
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.1001e87b
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x10024d8d
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x10024d8d
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.10026f5d
add esp, 0x10
xor eax, eax
inc eax
jmp 0x10024d8f
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1000f695
leave
ret
Function at 0x10028e90
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x10028ebd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10028ebd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x401ae0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
mov dword [0x40406c], eax
push str.Riched32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push 0
mov ecx, dword [ebp + 8]
push ecx
push 0
push 0
push 0
push 0x80000000
push 0
push 0x80000000
push 0xcf0000
push str.mifedount
push str.Deltapo
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x401b33
xor eax, eax
jmp 0x401b4e
push 0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, 1
mov esp, ebp
pop ebp
ret

Function at 0x710c84
Capabilities:
Encode data using xor

Disassembly:
push 0x7109ec
mov edi, dword [esp]
add esp, 4
sub ebx, 1
sub eax, ebx
and ebx, ebx
call fcn.00710cbb
sub eax, 0xdd55cf5e
mov ebx, ebx
xor dword [edx], edi
and eax, ebx
and eax, ebx
add edx, 1
inc ebx
cmp edx, ecx
jne fcn.00710c84
add eax, ebx
ret
Function at 0x405e80
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ecx
push ebp
mov ebp, dword [esp + 0xc]
mov ecx, dword [ebp]
push 0
lea eax, [esp + 8]
push eax
push ecx
push edx
push edi
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x405eba
push str.Failed_to_send_message_request_n
call fcn.0040efe0
add esp, 4
mov eax, 0x20000006
pop ebp
pop ecx
ret
mov eax, dword [esp + 4]
mov dword [ebp], eax
test ebx, ebx
je 0x405ef8
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x405ed0
mov ecx, dword [esi]
push 0
push esi
push ecx
push ebx
push edi
call ebp
test eax, eax
jne 0x405ef8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x405ed0
push str.Failed_to_fetch_message_response_n
call fcn.0040efe0
add esp, 4
xor eax, eax
pop ebp
pop ecx
ret

Function at 0x405f70
Capabilities:
Access the windows event log

Disassembly:
sub esp, 0x208
mov eax, dword [0x421e94]
xor eax, esp
mov dword [esp + 0x204], eax
mov ecx, dword [esp + 0x210]
push esi
mov esi, dword [esp + 0x210]
lea eax, [esp + 0x218]
push eax
push ecx
push 0xff
lea edx, [esp + 0x14]
push 0x100
push edx
call fcn.0040dd56
xor eax, eax
add esp, 0x14
lea ecx, [esp + 8]
mov word [esp + 0x206], ax
mov dword [esp + 4], ecx
cmp dword [esi + 0x260], eax
jne 0x405fd8
mov edx, ecx
push edx
call fcn.0040da69
add esp, 4
add esi, 0x40
push esi
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x40600b
push 0
lea eax, [esp + 8]
push eax
push 0
push 1
push 0
push 0
push 0
push 4
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov ecx, dword [esp + 0x208]
pop esi
xor ecx, esp
call fcn.0040dd76
add esp, 0x208
ret

Function at 0x406740
Capabilities:
Query or enumerate registry value

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0x14]
mov eax, dword [edi]
add eax, eax
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x10]
push esi
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
push eax
push 0
mov dword [edi], 0
mov eax, dword [ecx]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4067b6
mov eax, dword [esp + 0x10]
cmp eax, 1
je 0x406785
cmp eax, 2
jne 0x4067a1
mov eax, dword [esp + 0x14]
test esi, esi
je 0x4067b0
test eax, eax
je 0x4067ab
test al, 1
jne 0x4067a1
mov ecx, eax
shr ecx, 1
cmp word [esi + ecx*2 - 2], 0
je 0x4067b0
pop edi
mov eax, 0xd
pop esi
ret 0xc
xor edx, edx
mov word [esi], dx
shr eax, 1
mov dword [edi], eax
xor eax, eax
pop edi
pop esi
ret 0xc

Function at 0x4067c0
Capabilities:
Set registry value

Disassembly:
mov edx, dword [esp + 4]
push 4
lea eax, [esp + 0xc]
push eax
mov eax, dword [ecx]
push 4
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
ret 8
Function at 0x4067e0
Capabilities:
Set registry value

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, ecx
test esi, esi
jne 0x4067f4
pop edi
lea eax, [esi + 0xd]
pop esi
ret 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
lea eax, [eax + eax + 2]
push eax
mov eax, dword [edi]
push esi
push ecx
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop esi
ret 0xc

Function at 0x406820
Capabilities:
Set registry value

Disassembly:
push ecx
push ebp
mov ebp, dword [esp + 0x10]
mov dword [esp + 4], ecx
test ebp, ebp
jne 0x406836
lea eax, [ebp + 0xd]
pop ebp
pop ecx
ret 8
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
push edi
xor edi, edi
mov esi, ebp
push esi
call ebx
inc eax
lea ecx, [eax + eax]
add esi, ecx
add edi, ecx
cmp eax, 1
jne 0x406843
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
push edi
push ebp
push 7
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop esi
pop ebx
pop ebp
pop ecx
ret 8
Function at 0x4072b0
Capabilities:
Delete service
Stop service

Disassembly:
mov eax, 0x1020
call fcn.0040e3a0
mov eax, dword [0x421e94]
xor eax, esp
mov dword [esp + 0x101c], eax
push ebx
push ebp
push esi
push edi
push 0xf003f
xor ebp, ebp
push ebp
push ebp
mov edi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x40730b
push 1
lea ebx, [edi + 0x40]
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x407300
push eax
mov ebp, 1
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test ebp, ebp
jne 0x407315
mov eax, 1
jmp 0x4074a6
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x40736f
push 0x400
lea eax, [esp + 0x30]
push eax
push 0xd80a
call fcn.00406320
add esp, 0xc
test eax, eax
jne 0x407362
push str.Could_not_open_Service_Manager
lea ecx, [esp + 0x30]
push 0x400
push ecx
call fcn.0040e046
push eax
call fcn.00406170
add esp, 0x10
push 0
push ebx
lea edx, [esp + 0x34]
push edx
jmp 0x40749c
push 0x10020
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x4073cd
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x400
lea eax, [esp + 0x30]
push eax
push 0xd80c
call fcn.00406320
add esp, 0xc
test eax, eax
jne 0x407362
push str.Could_not_open_service
lea ecx, [esp + 0x30]
push 0x400
push ecx
call fcn.0040e046
push eax
call fcn.00406170
add esp, 0x10
push esi
push ebx
lea edx, [esp + 0x34]
push edx
jmp 0x40749c
lea eax, [esp + 0x10]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40743c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
je 0x40743c
cmp eax, 0x425
jne 0x4073fa
cmp dword [esp + 0x14], 3
je 0x40743c
push 0x400
lea ecx, [esp + 0x30]
push ecx
push 0xd80e
call fcn.00406320
add esp, 0xc
test eax, eax
jne 0x40742c
push str.Could_not_stop_service
lea edx, [esp + 0x30]
push 0x400
push edx
call fcn.00406240
add esp, 0xc
push 0
push ebx
lea eax, [esp + 0x34]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebp, eax
call esi
push edi
call esi
test ebp, ebp
jne 0x40730b
push 0x400
lea ecx, [esp + 0x830]
push ecx
push 0xd80d
call fcn.00406320
add esp, 0xc
test eax, eax
jne 0x407491
push str.Could_not_delete_service
lea edx, [esp + 0x830]
push 0x400
push edx
call fcn.00406240
add esp, 0xc
push 0
push ebx
lea eax, [esp + 0x834]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
mov ecx, dword [esp + 0x102c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040dd76
add esp, 0x1020
ret
Function at 0x4074f0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x22c
mov eax, dword [0x421e94]
xor eax, esp
mov dword [esp + 0x228], eax
mov eax, dword [ecx]
mov edx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ecx + 4]
push edi
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x1c]
push ecx
xor ebx, ebx
or esi, 0x2001f
push esi
push ebx
push edx
push eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [esp + 0x10]
mov edi, eax
cmp edi, ebx
jne 0x40756f
xor eax, eax
cmp ecx, ebx
je 0x407557
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x1c]
and esi, 0x300
mov edi, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], esi
cmp eax, ebx
je 0x407593
cmp ecx, ebx
je 0x40757a
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x228]
xor ecx, esp
call fcn.0040dd76
mov esp, ebp
pop ebp
ret 4
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
lea edx, [esp + 0x28]
push edx
push ebx
push ebx
push ebx
lea eax, [esp + 0x28]
push eax
lea edx, [esp + 0x44]
push edx
push ebx
push ecx
mov dword [esp + 0x38], 0x100
call esi
test eax, eax
jne 0x4075fa
jmp 0x4075c0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x14]
call fcn.004074f0
mov edi, eax
cmp edi, ebx
jne 0x407649
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x14]
push ebx
push ebx
push ebx
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x44]
push eax
push ebx
push ecx
mov dword [esp + 0x38], 0x100
call esi
test eax, eax
je 0x4075c0
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x40760d
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x10], ebx
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push edx
mov dword [esp + 0x18], ebx
call fcn.004065d0
mov esi, eax
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x407630
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x228]
xor ecx, esp
call fcn.0040dd76
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x407658
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x234]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040dd76
mov esp, ebp
pop ebp
ret 4

Function at 0x407a80
Capabilities:
Create thread

Disassembly:
push ecx
push esi
push 0
push 0
push 0
push 0
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x30], eax
test eax, eax
jne 0x407a9c
pop esi
pop ecx
ret
push edi
lea eax, [esp + 8]
push eax
push 0
push esi
push 0x4074c0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
test edi, edi
jne 0x407ac4
mov ecx, dword [esi + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ecx
ret