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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x438310]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41889a
cmp byte [ebx], 0xa
jne 0x41889a
or byte [edi + eax + 0x28], 4
jmp 0x41889f
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x41899e
mov dl, byte [eax]
cmp dl, 0x1a
je 0x418981
inc eax
cmp dl, 0xd
je 0x4188cb
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x4188f1
cmp eax, ecx
jae 0x4188ff
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x4188b3
jmp 0x41899e
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41897c
cmp dword [ebp - 0x10], 0
je 0x41897c
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x438310]
test byte [eax + edi + 0x28], 0x48
je 0x418956
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x418941
mov byte [esi], dl
jmp 0x418952
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x438310]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x41899e
cmp byte [ebp - 1], 0xa
jne 0x418965
cmp esi, ebx
jne 0x418965
mov byte [esi], 0xa
jmp 0x41899d
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041957a
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x41899e
mov byte [esi], 0xd
jmp 0x41899d
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x438310]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41899b
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41899e
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4189a7
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x438310]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4189ed
cmp word [ebx], dx
jne 0x4189ed
or byte [eax + edi + 0x28], 4
jmp 0x4189f2
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x418b55
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x418b35
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x418a33
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x418a69
cmp eax, edx
jae 0x418a77
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x418a0e
jmp 0x418b55
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x418b30
cmp dword [ebp - 0x18], 0
je 0x418b30
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x438310]
test byte [eax + edi + 0x28], 0x48
je 0x418b06
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x418aca
mov word [esi], cx
jmp 0x418b01
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x438310]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x438310]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x438310]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x418b55
pop eax
cmp word [ebp - 4], ax
jne 0x418b16
cmp esi, ebx
jne 0x418b16
mov word [esi], ax
jmp 0x418b52
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041957a
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x418b55
push 0xd
pop eax
jmp 0x418b11
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x438310]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x418b4f
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x418b55
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41bb09
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42f9c8
push 0x42f9c0
push str.FlsAlloc
push 0x1f
call fcn.0041b9c8
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41bb3d
push dword [ebp + 8]
mov ecx, esi
call dword [0x4281f4]
call esi
jmp 0x41bb43
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x41bb87
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42f9d8
push 0x42f9d0
push str.FlsGetValue
push 0x21
call fcn.0041b9c8
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41bbbe
push dword [ebp + 8]
mov ecx, esi
call dword [0x4281f4]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x41bbc6
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42f9e0
push 0x42f9d8
push str.FlsSetValue
push 0x22
call fcn.0041b9c8
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41bc00
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x4281f4]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]

Function at 0x41c90d
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x436040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x1a
jbe 0x41c950
call fcn.00412fe6
mov dword [eax], 0xf
call fcn.00412ff9
mov dword [eax], 0xd
call fcn.00417df9
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b2c7
leave
ret
test eax, eax
jne 0x41c957
inc eax
jmp 0x41c944
add eax, 0x40
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
push 0x5c
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov ecx, eax
test ecx, ecx
je 0x41c942
xor eax, eax
cmp ecx, 1
setne al
jmp 0x41c944

Function at 0x41daf9
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041d614
Function at 0x41e474
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x436040]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x41e4bf
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.0041e60f
test al, al
jne 0x41e4b9
sub edx, 2
cmp edx, edi
jne 0x41e49f
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x41e4e1
lea eax, [edi + 2]
cmp edx, eax
je 0x41e4e1
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.0041e3c0
add esp, 0x10
jmp 0x41e5db
push esi
lea ecx, [ebp - 0x255]
call fcn.0041e60f
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41e524
push dword [ebp - 0x25c]
jmp 0x41e4d1
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x41e561
cmp word [ebp - 0x226], 0
je 0x41e582
cmp word [ebp - 0x226], ax
jne 0x41e561
cmp word [ebp - 0x224], 0
je 0x41e582
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.0041e3c0
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x41e5ce
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x41e53b
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x41e5b6
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x41e5db
push 0x41e1f0
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00423b90
add esp, 0x10
jmp 0x41e5ab
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b2c7
leave
ret
Function at 0x41eee7
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 0x41ef84
push ebx
push esi
call fcn.0041eeb0
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.0041ca38
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x41ef31
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41ef83
push edi
push eax
call fcn.0041a651
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x41ef51
call fcn.00417e3d
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41ef82
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0041ca38
add esp, 0x20
test eax, eax
jne 0x41ef70
push edi
call fcn.00417e3d
jmp 0x41ef78
push ebx
call fcn.00417e3d
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 0x41ef87
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x41ef98
pop esi
ret
push ebx
push edi
push esi
call fcn.0041eeb0
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0041a651
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x41efc0
push ebx
push esi
push edi
call fcn.0040bf60
add esp, 0xc
push 0
call fcn.00417e3d
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret
Function at 0x424ef5
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.00424e71
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x425064
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x425064
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x425019
jg 0x424f51
test eax, eax
je 0x42500f
push 1
push 0x1000
call fcn.0041b838
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x424f74
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x425006
push 0x8000
push ebx
call fcn.0041731b
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x424f9d
jg 0x424f98
cmp ecx, 0x1000
jb 0x424f9d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.0041a0b6
add esp, 0x10
cmp eax, 0xffffffff
je 0x424fe2
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x424f98
jl 0x424fc9
test ecx, ecx
jne 0x424f8a
push dword [ebp - 0xc]
push ebx
call fcn.0041731b
push esi
call fcn.00417e3d
add esp, 0xc
xor ebx, ebx
jmp 0x425072
cmp byte [edi + 0x24], 0
je 0x424ff9
cmp dword [edi + 0x20], 5
jne 0x424ff9
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x425004
mov ebx, dword [edi + 0x18]
jmp 0x425006
xor ebx, ebx
push esi
call fcn.00417e3d
pop ecx
jmp 0x425072
test ecx, ecx
jg 0x424fdb
jl 0x425019
test eax, eax
jae 0x424fdb
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0041957a
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x425039
cmp byte [edi + 0x1c], 0
je 0x424fdb
jmp 0x42506a
push ebx
call fcn.00415927
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x424fdb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x425072
cmp byte [edi + 0x1c], 0
je 0x42506f
mov ebx, dword [edi + 0x18]
jmp 0x425072
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0041957a
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x426ce0
Capabilities:
Parse pe header

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

Disassembly:
cmp ecx, dword [0x1000a038]
jne 0x10001412
repz ret
jmp fcn.10001b72

Function at 0x10005b7f
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x1000a038]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.100028be
and dword [ebp - 0x14], 0
cmp dword [0x1000b838], 0
mov dword [ebp - 0x18], eax
jne 0x10005c32
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x10005cda
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x10005cda
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x1000b838], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x1000b83c], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x1000b840], eax
call edi
push eax
call esi
mov dword [0x1000b848], eax
test eax, eax
je 0x10005c32
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x1000b844], eax
mov eax, dword [0x1000b844]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x10005c8b
cmp dword [0x1000b848], ecx
je 0x10005c8b
push eax
call esi
push dword [0x1000b848]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x10005c8b
test ebx, ebx
je 0x10005c8b
call edi
test eax, eax
je 0x10005c82
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x10005c82
test byte [ebp - 8], 1
jne 0x10005c8b
or dword [ebp + 0x10], 0x200000
jmp 0x10005cbe
mov eax, dword [0x1000b83c]
cmp eax, dword [ebp - 0x18]
je 0x10005cbe
push eax
call esi
test eax, eax
je 0x10005cbe
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x10005cbe
mov eax, dword [0x1000b840]
cmp eax, dword [ebp - 0x18]
je 0x10005cbe
push eax
call esi
test eax, eax
je 0x10005cbe
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x1000b838]
call esi
test eax, eax
je 0x10005cda
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x10005cdc
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10001408
leave
ret
Function at 0x401ee0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 0x10], ecx
xor eax, eax
jne 0x401ee9
xor ecx, ecx
jne 0x401ee9
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
shl eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 4]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x401f30
mov eax, dword [ebp - 0xc]
jmp 0x401f8d
cmp dword [ebp - 4], 1
je 0x401f43
cmp dword [ebp - 4], 2
je 0x401f43
mov eax, 0xd
jmp 0x401f8d
cmp dword [ebp + 0xc], 0
je 0x401f81
cmp dword [ebp - 8], 0
je 0x401f79
mov eax, dword [ebp - 8]
xor edx, edx
mov ecx, 2
div ecx
test edx, edx
jne 0x401f70
mov edx, dword [ebp - 8]
shr edx, 1
mov eax, dword [ebp + 0xc]
movzx ecx, word [eax + edx*2 - 2]
test ecx, ecx
je 0x401f77
mov eax, 0xd
jmp 0x401f8d
jmp 0x401f81
xor edx, edx
mov eax, dword [ebp + 0xc]
mov word [eax], dx
mov ecx, dword [ebp - 8]
shr ecx, 1
mov edx, dword [ebp + 0x10]
mov dword [edx], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc

Function at 0x402090
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0x14], ecx
xor eax, eax
jne 0x402099
xor ecx, ecx
jne 0x402099
xor edx, edx
cmp dword [ebp + 0xc], 0
setne dl
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0
jne 0x4020ba
mov eax, 0xd
jmp 0x402115
xor eax, eax
jne 0x4020a1
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
lea edx, [ecx + eax*2]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax*2]
mov dword [ebp - 4], edx
cmp dword [ebp - 0xc], 1
jne 0x4020cb
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 7
push 0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esp, ebp
pop ebp
ret 8
Function at 0x402120
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x412018]
xor eax, ebp
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x230], ecx
lea ecx, [ebp - 0x14]
call fcn.00401ba0
mov eax, dword [ebp - 0x230]
mov ecx, dword [eax + 4]
or ecx, 0x2001f
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x230]
mov ecx, dword [eax]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00401e10
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40218b
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x224], edx
lea ecx, [ebp - 0x14]
call fcn.00401c00
mov eax, dword [ebp - 0x224]
jmp 0x40221c
mov dword [ebp - 4], 0x100
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0x220]
push edx
push 0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x4021f1
lea ecx, [ebp - 0x220]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00402120
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4021e8
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x228], edx
lea ecx, [ebp - 0x14]
call fcn.00401c00
mov eax, dword [ebp - 0x228]
jmp 0x40221c
mov dword [ebp - 4], 0x100
jmp 0x402192
lea ecx, [ebp - 0x14]
call fcn.00401d40
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x230]
call fcn.00401c80
mov dword [ebp - 0x22c], eax
lea ecx, [ebp - 0x14]
call fcn.00401c00
mov eax, dword [ebp - 0x22c]
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00407668
mov esp, ebp
pop ebp
ret 4
Function at 0x406750
Capabilities:
Create service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x412018]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x21c], ecx
mov ecx, dword [ebp - 0x21c]
call fcn.004099d0
test eax, eax
je 0x406782
mov eax, 1
jmp 0x406827
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4067a1
xor eax, eax
jmp 0x406827
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
push 0
push str.RPCSS
push 0
push 0
lea ecx, [ebp - 0x218]
push ecx
push 1
push 3
push 0x10
push 0xf01ff
mov edx, dword [ebp - 0x21c]
add edx, 0x230
push edx
mov eax, dword [ebp - 0x21c]
add eax, 0x230
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40680e
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x406827
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.00407668
mov esp, ebp
pop ebp
ret

Function at 0x406840
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x2c]
call fcn.004099d0
test eax, eax
jne 0x40685f
mov eax, 1
jmp 0x4068ea
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40687b
xor eax, eax
jmp 0x4068ea
push 0x10020
mov eax, dword [ebp - 0x2c]
add eax, 0x230
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4068aa
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x4068ea
lea eax, [ebp - 0x28]
push eax
push 1
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 8], 0
je 0x4068e8
mov eax, 1
jmp 0x4068ea
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x407f1a
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov byte [ebp - 0x49], 0xc1
mov byte [ebp - 0x48], 0xc8
mov eax, 0xb945c6c8
cmpsd dword [esi], dword es:[edi]
call fcn.00407c81
xchg byte [0x458d4597], dl
test al, 0x50
call fcn.00407c91
mov esi, dword [ebp + 0xc]
push eax
push esi
push dword [ebp + 8]
call fcn.00407c46
add esp, 0x10
invalid
invalid
push eax

Function at 0x407fea
Capabilities:
Contain obfuscated stackstrings

Disassembly:
call 0x5128dd77
mov byte [ebp - 0x17], bl
mov byte [ebp - 0x16], 0x40
mov byte [ebp - 0x15], bl
mov byte [ebp - 0x14], 0xe9
mov byte [ebp - 0x13], 0xd6
salc