joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a940
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov ecx, dword [esp + 0xc]
push ebx
push esi
mov esi, dword [esp + 0x20]
push edi
mov edi, dword [esp + 0x1c]
push esi
push 0
lea eax, [esp + 0x14]
push eax
push 0
push edi
mov ebx, 7
push ecx
mov dword [esp + 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40a9b7
mov edx, dword [esp + 0x20]
mov dword [edx], 0
mov dword [esi], 0
cmp eax, 2
jne 0x40a98b
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
push edi
push 0xc00003fa
push 1
call fcn.004050e0
add esp, 0x14
pop edi
pop esi
mov eax, 1
pop ebx
pop ecx
ret
cmp dword [esp + 0xc], ebx
je 0x40a9ee
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
push 0
push ecx
push edi
push 0x8000040f
mov dword [eax], 0
push 2
mov dword [esi], 0
call fcn.004050e0
add esp, 0x14
pop edi
pop esi
mov eax, 2
pop ebx
pop ecx
ret
cmp dword [esi], 0
je 0x40a984
mov ebx, dword [esp + 0x20]
mov eax, dword [ebx]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x40aa10
push eax
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [esi]
push edx
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebx], eax
test eax, eax
jne 0x40aa47
push eax
push str.get_environment__
push edi
push 0xc00003eb
push 1
mov dword [esi], eax
call fcn.004050e0
add esp, 0x14
pop ebp
pop edi
pop esi
mov eax, 3
pop ebx
pop ecx
ret
mov ecx, dword [esp + 0x1c]
push esi
push eax
lea eax, [esp + 0x18]
push eax
push 0
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40aaa7
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
push edi
push 0xc00003fa
push 1
call fcn.004050e0
mov edx, dword [ebx]
add esp, 0x14
push edx
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop ebp
mov dword [ebx], 0
pop edi
mov dword [esi], 0
pop esi
mov eax, 4
pop ebx
pop ecx
ret
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x40aab0
Capabilities:
Check if file exists
Query environment variable
Query or enumerate registry value

Disassembly:
sub esp, 8
push esi
push edi
mov edi, dword [esp + 0x20]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x40aaf2
push eax
mov eax, dword [esp + 0x1c]
push str.get_string__
push eax
push 0xc00003eb
push 1
call fcn.004050e0
add esp, 0x14
pop edi
lea eax, [esi + 1]
pop esi
add esp, 8
ret
push ebx
push ebp
mov ebp, dword [esp + 0x24]
push edi
push 0
push ebp
call fcn.00412740
mov eax, dword [esp + 0x2c]
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x20]
push esi
lea edx, [esp + 0x18]
push edx
push 0
push eax
push ecx
mov dword [esp + 0x28], 2
mov dword [esp + 0x2c], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test ebx, ebx
je 0x40ab84
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp ebx, 2
jne 0x40ab57
cmp byte [esp + 0x34], 0
je 0x40abd0
push 0
push edi
call fcn.00404fa0
mov edx, dword [esp + 0x28]
add esp, 4
push eax
push edx
push 0xc00003fa
push 1
call fcn.004050e0
add esp, 0x14
pop ebp
pop ebx
pop edi
mov eax, 2
pop esi
add esp, 8
ret
cmp byte [esp + 0x30], 0
je 0x40ab92
push esi
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
cmp byte [esp + 0x2c], 0
jne 0x40abaa
cmp dword [esp + 0x10], 2
jne 0x40abb1
mov dword [esp + 0x10], 1
jmp 0x40abb1
cmp dword [esp + 0x10], 2
je 0x40abda
mov eax, dword [esp + 0x14]
push eax
push esi
push ebp
call fcn.004127c0
add esp, 0xc
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 8
ret
push edi
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x40abeb
cmp eax, edi
jbe 0x40abc0
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
push esi
push 0xc00003fe
push 1
call fcn.004050e0
add esp, 0x14
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop ebp
pop ebx
pop edi
mov eax, 3
pop esi
add esp, 8
ret

Function at 0x40ac60
Capabilities:
Set registry value

Disassembly:
mov edx, dword [esp + 0xc]
mov eax, edx
push esi
lea esi, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40ac70
sub eax, esi
mov esi, dword [esp + 0xc]
xor ecx, ecx
sar eax, 1
cmp byte [esp + 0x14], cl
lea eax, [eax + eax + 2]
setne cl
push eax
push edx
mov edx, dword [esp + 0x10]
inc ecx
push ecx
push 0
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x40aca8
pop esi
ret
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
push esi
push 0xc00003fb
push 1
call fcn.004050e0
add esp, 0x14
mov eax, 1
pop esi
ret
Function at 0x40ad00
Capabilities:
Set registry value

Disassembly:
mov ecx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
push 4
lea eax, [esp + 0x14]
push eax
push 4
push 0
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x40ad22
pop esi
ret
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
push esi
push 0xc00003fb
push 1
call fcn.004050e0
add esp, 0x14
mov eax, 1
pop esi
ret

Function at 0x40ad50
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
sub esp, 8
mov ecx, dword [esp + 0x14]
push esi
push edi
mov edi, dword [esp + 0x18]
mov eax, 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
lea eax, [esp + 8]
push eax
mov eax, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x14]
push edx
push 0
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
jne 0x40ad92
pop edi
lea eax, [esi + 1]
pop esi
add esp, 8
ret
cmp esi, 2
jne 0x40ada6
cmp byte [esp + 0x20], 0
jne 0x40ada6
pop edi
xor eax, eax
pop esi
add esp, 8
ret
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
push edi
push 0xc00003fa
push 1
call fcn.004050e0
add esp, 0x14
xor eax, eax
cmp esi, 2
sete al
pop edi
pop esi
add eax, 0xfffffffe
add esp, 8
ret

Function at 0x40b010
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x2c
mov eax, dword [0x422760]
xor eax, esp
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x34]
push ebx
mov ebx, dword [esp + 0x34]
push esi
mov esi, dword [esp + 0x40]
push edi
mov edi, dword [esp + 0x48]
lea ecx, [esp + 0x10]
push ecx
push edi
lea edx, [esp + 0x14]
push edx
push 0
push esi
push eax
mov dword [esp + 0x24], 4
mov dword [esp + 0x28], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40b0c0
cmp eax, 2
je 0x40b0ba
cmp dword [esp + 0xc], 4
je 0x40b098
mov eax, dword [esp + 0x4c]
push eax
push 0x41dc80
push 0xffffffffffffffff
lea ecx, [esp + 0x20]
push 0x10
push ecx
call fcn.004126d2
mov eax, dword [esp + 0x64]
push 0
lea edx, [esp + 0x2c]
push edx
push esi
push ebx
push eax
push 2
call fcn.004050e0
add esp, 0x2c
jmp 0x40b0ba
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
push esi
push 0xc00003fa
push 1
call fcn.004050e0
add esp, 0x14
mov ecx, dword [esp + 0x4c]
mov dword [edi], ecx
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004126f3
add esp, 0x2c
ret
Function at 0x40b3a0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x30
mov eax, dword [0x422760]
xor eax, esp
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x3c]
push ebx
mov ebx, dword [esp + 0x38]
push ebp
mov ebp, dword [esp + 0x48]
push esi
push edi
mov edi, dword [esp + 0x48]
push 0x20019
test edi, edi
sete cl
push str.AppExit
push ebx
mov dword [esp + 0x1c], eax
mov byte [ebp], cl
call fcn.0040b0e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40b3fd
pop edi
lea eax, [esi + 1]
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004126f3
add esp, 0x30
ret
mov dword [esp + 0x18], 1
mov dword [esp + 0x14], 0x10
test edi, edi
jne 0x40b468
xor edx, edx
mov word [esp + 0x1c], dx
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x20]
push edx
push 0
lea eax, [esp + 0x2c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push esi
test eax, eax
je 0x40b4b0
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x40b4b6
mov ecx, dword [esp + 0x10]
push ebp
push ecx
push 0
push ebx
call fcn.0040b3a0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004126f3
add esp, 0x30
ret
mov eax, dword [edi]
push eax
push 0x41dc80
push 0xffffffffffffffff
lea ecx, [esp + 0x28]
push 0x10
push ecx
call fcn.004126d2
add esp, 0x14
test eax, eax
jge 0x40b418
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x10]
push ebp
push edx
push 0
push ebx
call fcn.0040b3a0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004126f3
add esp, 0x30
ret
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.004126f3
add esp, 0x30
ret
Function at 0x40c330
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
push edi
push esi
push ebx
call ebp
test eax, eax
je 0x40c3b6
xor edi, edi
mov eax, dword [esp + 0xc]
mov ecx, dword [esi + 4]
cmp eax, 5
ja case.0x40c34e.4
jmp dword [eax*4 + 0x40c3bc]
mov eax, ecx
sub eax, 2
je 0x40c366
sub eax, 2
jne 0x40c393
pop edi
xor eax, eax
pop ebp
ret
mov eax, 1
jmp 0x40c39c
mov eax, ecx
sub eax, 1
je case.0x40c34e.4
sub eax, 2
jmp 0x40c391
mov eax, ecx
sub eax, 6
je 0x40c366
sub eax, 1
je case.0x40c34e.4
jmp 0x40c393
mov eax, ecx
sub eax, 4
je case.0x40c34e.4
sub eax, 1
je 0x40c366
or eax, 0xffffffff
cmp ecx, dword [esp + 0x10]
jne 0x40c3b6
add edi, 0x32
cmp edi, 0x1f4
jg 0x40c3b9
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push ebx
call ebp
test eax, eax
jne 0x40c342
or eax, 0xffffffff
pop edi
pop ebp
ret
Function at 0x40d290
Capabilities:
Modify service

Disassembly:
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40d2a2
cmp word [eax], 0
mov dword [esp + 0xc], eax
jne 0x40d2aa
mov dword [esp + 0xc], 0x41e5d8
mov ecx, dword [esp + 8]
lea eax, [esp + 0xc]
push eax
push 1
push ecx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
je 0x40d2c3
xor eax, eax
ret
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
mov edx, dword [esp + 0xc]
add esp, 4
push eax
push edx
push 0x40000428
push 1
call fcn.004050e0
add esp, 0x14
mov eax, 1
ret

Function at 0x40e130
Capabilities:
Delete service

Disassembly:
push ebx
mov ebx, dword [esp + 8]
test ebx, ebx
jne 0x40e13e
lea eax, [ebx + 1]
pop ebx
ret
push edi
push 5
call fcn.0040c840
mov edi, eax
add esp, 4
test edi, edi
jne 0x40e16b
push 0x400001fb
call fcn.00412306
add eax, 0x40
push eax
call fcn.00405150
add esp, 8
lea eax, [edi + 2]
pop edi
pop ebx
ret
push esi
push 0x100
lea esi, [ebx + 2]
push esi
push 0x10000
push esi
push edi
call fcn.0040c880
add esp, 0x14
mov dword [ebx + 0x70494], eax
test eax, eax
jne 0x40e19e
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop edi
mov eax, 3
pop ebx
ret
push ebp
lea eax, [esp + 0x14]
push eax
lea ebp, [ebx + 0x202]
push ebp
push esi
push edi
mov dword [esp + 0x24], 0x100
call dword [sym.imp.ADVAPI32.dll_GetServiceDisplayNameW]
lea ecx, [esp + 0x14]
push ecx
push esi
push ebp
push edi
mov dword [esp + 0x24], 0x100
call dword [sym.imp.ADVAPI32.dll_GetServiceKeyNameW]
mov edx, dword [ebx + 0x70494]
push edx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
pop ebp
test eax, eax
jne 0x40e209
push 0x40000221
call fcn.00412306
add eax, 0x40
push eax
call fcn.00405150
add esp, 8
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop edi
mov eax, 4
pop ebx
ret
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
push 0x40000222
call fcn.00412306
add eax, 0x20
push eax
call fcn.00405150
add esp, 0xc
pop esi
pop edi
xor eax, eax
pop ebx
ret

Function at 0x40e230
Capabilities:
Modify service

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov ecx, dword [esi + 0x70494]
lea eax, [esp + 4]
push eax
push 4
push ecx
mov dword [esp + 0x10], 1
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x40e280
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7c
je 0x40e280
push 0
push eax
call fcn.00404fa0
add esp, 4
push eax
add esi, 2
push esi
push 0x40000413
push 1
call fcn.004050e0
add esp, 0x14
pop esi
pop ecx
ret
Function at 0x40ea40
Capabilities:
Modify service

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
test esi, esi
jne 0x40ea50
lea eax, [esi + 1]
pop esi
pop ecx
ret
mov eax, dword [esi + 0x8414]
and eax, 0x100
or eax, 0x10
mov dword [esi + 0x8414], eax
mov eax, dword [esi + 0x8400]
sub eax, 2
je 0x40ea88
sub eax, 1
je 0x40ea7e
mov dword [esp + 0xc], 2
jmp 0x40ea90
mov dword [esp + 0xc], 4
jmp 0x40ea90
mov dword [esp + 0xc], 3
cmp word [esi + 0x202], 0
push ebx
lea ebx, [esi + 0x202]
jne 0x40eaba
lea ecx, [esi + 2]
push ecx
push 0x41d488
push 0xffffffffffffffff
push 0x100
push ebx
call fcn.004126d2
add esp, 0x14
push ebp
push edi
xor edi, edi
xor ebp, ebp
cmp dword [esi + 0x8408], edi
je 0x40eae5
mov ebp, dword [esi + 0x8404]
cmp dword [esi + 0x8410], edi
je 0x40eade
mov edi, dword [esi + 0x840c]
jmp 0x40eaf1
mov edi, 0x41e5d8
jmp 0x40eaf1
cmp byte [esp + 0x1c], 0
je 0x40eaf1
mov ebp, str.LocalSystem
push ebp
call fcn.00401470
add esp, 4
test eax, eax
je 0x40eb6d
mov edi, 0x41e5d8
cmp dword [esi + 0x4040c], 0
mov eax, 0x41e5d8
je 0x40eb13
xor eax, eax
mov edx, dword [esp + 0x18]
mov ecx, dword [esi + 0x70494]
push ebx
push edi
push ebp
push eax
mov eax, dword [esi + 0x8414]
push 0
push 0
push 0
push 0xffffffffffffffff
push edx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x40eb82
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
push 0x4000020b
call fcn.00412306
add eax, 0x40
push eax
call fcn.00405150
add esp, 0xc
pop edi
pop ebp
pop ebx
mov eax, 5
pop esi
pop ecx
ret
push ebp
call fcn.004014d0
add esp, 4
test eax, eax
je 0x40eb03
push ebp
push 0x40000205
jmp 0x40eb51
cmp dword [esi + 0x4040c], 0
je 0x40eba9
mov edx, dword [esi + 0x40408]
mov eax, dword [esi + 0x70494]
push edx
push eax
lea ecx, [esi + 2]
push ecx
call fcn.0040cbe0
add esp, 0xc
test eax, eax
jne 0x40eb62
cmp word [esi + 0x402], 0
lea eax, [esi + 0x402]
jne 0x40ebc0
cmp byte [esp + 0x1c], 0
je 0x40ebd4
mov edx, dword [esi + 0x70494]
push eax
push edx
lea eax, [esi + 2]
push eax
call fcn.0040d290
add esp, 0xc
mov eax, dword [esi + 0x70494]
xor ecx, ecx
cmp dword [esi + 0x8400], 1
lea edx, [esp + 0x10]
sete cl
push edx
push 3
push eax
mov dword [esp + 0x1c], ecx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x40ec26
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7c
je 0x40ec26
push 0
push eax
call fcn.00404fa0
add esp, 4
push eax
lea ecx, [esi + 2]
push ecx
push 0x40000429
push 1
call fcn.004050e0
add esp, 0x14
cmp byte [esi], 0
jne 0x40ec67
mov edx, dword [esp + 0x1c]
push edx
push esi
call fcn.0040b4d0
add esp, 8
test eax, eax
je 0x40ec5e
push 0x4000021d
call fcn.00412306
add eax, 0x40
push eax
call fcn.00405150
add esp, 8
pop edi
pop ebp
pop ebx
mov eax, 6
pop esi
pop ecx
ret
push esi
call fcn.0040e230
add esp, 4
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
pop ecx
ret
Function at 0x40f7a0
Capabilities:
Create service
Delete service
Persist via windows service

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x40f7ae
lea eax, [esi + 1]
pop esi
ret
push ebp
push 3
call fcn.0040c840
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40f7e1
push 0x400001fb
call fcn.00412306
add eax, 0x40
push eax
call fcn.00405150
push esi
call fcn.0040d760
add esp, 0xc
lea eax, [ebp + 2]
pop ebp
pop esi
ret
push ebx
push edi
push 0x7fff
lea ebx, [esi + 0x8418]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
push 0
push 0
push 0
push 0
push ebx
push 1
push 2
push 0x10
push 0xf01ff
lea edi, [esi + 2]
push edi
push edi
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [esi + 0x70494], eax
test eax, eax
jne 0x40f85a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
push 0x40000203
call fcn.00412306
add eax, 0x40
push eax
call fcn.00405150
add esp, 0xc
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop ebx
pop ebp
mov eax, 5
pop esi
ret
push 0
push esi
call fcn.0040ea40
add esp, 8
test eax, eax
je 0x40f887
mov eax, dword [esi + 0x70494]
push eax
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop ebx
pop ebp
mov eax, 6
pop esi
ret
push edi
push 0x4000021e
call fcn.00412306
add eax, 0x20
push eax
call fcn.00405150
add esp, 0xc
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop ebx
pop ebp
xor eax, eax
pop esi
ret

Function at 0x4126f3
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x422760]
jne 0x4126fd
repz ret
jmp fcn.00416323
Function at 0x41b899
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00414e09
and dword [ebp - 4], 0
cmp dword [0x423e9c], 0
mov ebx, eax
jne 0x41b94a
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x41b9fb
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x41b9fb
push eax
call fcn.00414d97
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x423e9c], eax
call esi
push eax
call fcn.00414d97
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x423ea0], eax
call esi
push eax
call fcn.00414d97
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x423ea4], eax
call esi
push eax
call fcn.00414d97
pop ecx
mov dword [0x423eac], eax
test eax, eax
je 0x41b94a
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00414d97
pop ecx
mov dword [0x423ea8], eax
mov eax, dword [0x423ea8]
cmp eax, ebx
je 0x41b9a2
cmp dword [0x423eac], ebx
je 0x41b9a2
push eax
call fcn.00414e12
push dword [0x423eac]
mov esi, eax
call fcn.00414e12
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x41b9a2
test edi, edi
je 0x41b9a2
call esi
test eax, eax
je 0x41b999
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x41b999
test byte [ebp - 0xc], 1
jne 0x41b9a2
or dword [ebp + 0x10], 0x200000
jmp 0x41b9db
mov eax, dword [0x423ea0]
cmp eax, ebx
je 0x41b9db
push eax
call fcn.00414e12
pop ecx
test eax, eax
je 0x41b9db
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x41b9db
mov eax, dword [0x423ea4]
cmp eax, ebx
je 0x41b9db
push eax
call fcn.00414e12
pop ecx
test eax, eax
je 0x41b9db
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x423e9c]
call fcn.00414e12
pop ecx
test eax, eax
je 0x41b9fb
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x41b9fd
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x672817d0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.67287c40
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.67287c40
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x67281830
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x675a4054]
test esi, esi
jle 0x67281950
mov eax, dword [0x675a4058]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp edx, ebx
ja 0x67281864
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x672818e7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x67281850
mov dword [esp], ebx
call fcn.67281f90
mov edi, eax
test eax, eax
je 0x67281977
mov eax, dword [0x675a4058]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.672820d0
mov edx, dword [0x675a4058]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x67281957
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x672818e0
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x672818f0
add dword [0x675a4054], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 0x40
mov eax, 4
mov ecx, dword [esp + 0x20]
cmovne eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x675a4058]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x672818e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.672817d0
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x6728186e
mov eax, dword [0x675a4058]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.672817d0
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.672817d0
lea esi, [esi]
nop
Function at 0x67281c10
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x675a4064
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x675a405c]
sub esp, 4
test ebx, ebx
je 0x67281c65
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x67281c5e
test esi, esi
je 0x67281c5e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x67281c40
mov dword [esp], 0x675a4064
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x67281f90
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x67280000], 0x5a4d
jne 0x67281fb5
mov ecx, dword [0x6728003c]
cmp dword [ecx + 0x67280000], 0x4550
lea edx, [ecx + 0x67280000]
je 0x67281fc0
ret
cmp word [ecx + 0x67280018], 0x10b
jne 0x67281fb5
push esi
movzx eax, word [ecx + 0x67280014]
push ebx
movzx esi, word [ecx + 0x67280006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x67280000
test esi, esi
je 0x67282008
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x67281ffe
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x6728200a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x67281ff0
xor eax, eax
pop ebx
pop esi
ret