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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
push 0
push dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.0040350a
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4033e4
mov eax, 0x407217
jmp 0x4034f2
mov dword [ebp - 0x14], esp
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4033f5
add eax, 8
push eax
push dword [ebp + 0x10]
push 0
mov ebx, dword [ebp + 0xc]
push dword [ebx]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x403422
push 6
call fcn.00403cb8
add esp, 4
mov dword [ebp - 8], eax
push 0x80000301
push 0
push dword [ebp - 0x10]
push 1
mov ebx, 0x1bc
call fcn.00404880
add esp, 0x10
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
push eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x403458
push ebx
call fcn.00403cac
add esp, 4
pop eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], esp
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x40346d
add eax, 8
push eax
push dword [ebp + 0x10]
push 0
mov ebx, dword [ebp + 0xc]
push dword [ebx]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x40349a
push 6
call fcn.00403cb8
add esp, 4
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], esp
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x4034bf
push 6
call fcn.00403cb8
add esp, 4
cmp dword [ebp - 8], 0
jne 0x4034e8
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4034e3
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.00403cb2
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x4034f2
mov eax, 0x407217
jmp 0x4034f2
push eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x403503
push ebx
call fcn.00403cac
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 0x10

Function at 0x403a1e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push 0x80000005
push 0
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
test eax, eax
jne 0x403a3c
mov eax, 0x407217
push eax
push 1
mov ebx, 0x194
call fcn.00404d00
add esp, 0x10
mov dword [ebp - 4], eax
mov dword [ebp - 8], esp
push 0
mov eax, 0
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
test eax, eax
je 0x403a75
add eax, 8
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
nop
nop
nop
nop
cmp dword [ebp - 8], esp
je 0x403a95
push 6
call fcn.00403cb8
add esp, 4
jmp 0x403a9a
mov esp, ebp
pop ebp
ret 8
Function at 0x404790
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, dword [esp + 8]
push edi
push 0
push 0x20
push 3
push 0
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x4047f9
push ebx
lea ecx, [esp + 0x10]
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
lea edx, [ebx + 8]
push edx
call fcn.00403e00
add esp, 4
mov esi, eax
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esi + 8]
push ebx
push ecx
push edi
mov dword [esi], 1
mov dword [esi + 4], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop ebx
pop edi
ret
Function at 0x4013d0
Capabilities:
Shutdown system

Disassembly:
sub esp, 0x14
lea eax, [esp]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4013f0
xor al, al
add esp, 0x14
ret
lea ecx, [esp + 8]
push ecx
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov eax, dword [esp]
push 0
push 0
push 0
lea edx, [esp + 0x10]
push edx
push 0
push eax
mov dword [esp + 0x1c], 1
mov dword [esp + 0x28], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4013ea
push eax
push 6
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
setne al
add esp, 0x14
ret
Function at 0x4027d0
Capabilities:
Delete file
Get common file path
Get file size
Get program files directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x304
push ebp
xor eax, eax
push esi
push edi
mov byte [esp + 0x10], 0
mov ecx, 0x3f
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x110], 0
mov ecx, 0x3f
lea edi, [esp + 0x111]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x210], 0
mov ecx, 0x3f
lea edi, [esp + 0x211]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
stosb byte es:[edi], al
push 0x26
lea eax, [esp + 0x18]
push eax
push 0
mov byte [0x50313c], 1
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea edi, [esp + 0x10]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402847
mov ecx, dword [0x47a868]
mov dx, word [0x47a86c]
mov dword [edi], ecx
mov word [edi + 4], dx
xor eax, eax
mov cl, byte [esp + eax + 0x10]
mov byte [esp + eax + 0x110], cl
inc eax
test cl, cl
jne 0x402864
mov eax, str.X_debug.txt
mov esi, eax
jmp 0x402880
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402880
lea edi, [esp + 0x110]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402891
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, eax
shr ecx, 2
push 0
rep movsd dword es:[edi], dword [esi]
push 0x80
push 3
push 0
push 1
mov ecx, eax
push bind
lea eax, [esp + 0x128]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebp
mov esi, eax
cmp esi, 0xffffffff
je 0x402989
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0x19000
jbe 0x4028fc
lea ecx, [esp + 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor eax, eax
mov edi, edi
mov cl, byte [esp + eax + 0x10]
mov byte [esp + eax + 0x210], cl
inc eax
test cl, cl
jne 0x402900
mov eax, str.X_Err.txt
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402917
lea edi, [esp + 0x210]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402928
mov ecx, eax
shr ecx, 2
push 0
rep movsd dword es:[edi], dword [esi]
push 0x80
push 3
push 0
push 3
mov ecx, eax
push 0xc0000000
lea edx, [esp + 0x228]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call ebp
mov esi, eax
cmp esi, 0xffffffff
je 0x402989
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0x19000
jbe 0x402989
lea eax, [esp + 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
mov esp, ebp
pop ebp
ret
Function at 0x402990
Capabilities:
Get common file path
Get program files directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x204
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4029a5
sub eax, edx
mov ebx, eax
mov byte [esp + 0x10], cl
xor eax, eax
mov ecx, 0x7f
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
stosb byte es:[edi], al
push 0x26
lea eax, [esp + 0x18]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea edi, [esp + 0x10]
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4029e0
mov ecx, dword [0x47a868]
mov dx, word [0x47a86c]
mov eax, dword [ebp + 8]
mov dword [edi], ecx
mov word [edi + 4], dx
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402a00
lea edi, [esp + 0x10]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402a10
mov ecx, eax
shr ecx, 2
push 0
mov esi, edx
rep movsd dword es:[edi], dword [esi]
push 0x80
push 4
push 0
push 3
mov ecx, eax
push 0xc0000000
lea eax, [esp + 0x28]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402a86
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [esp + 0x10]
push ecx
push ebx
push edx
push esi
call edi
push 0
lea eax, [esp + 0x10]
push eax
push 2
push 0x47ad4c
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402ab0
Capabilities:
Get common file path
Get program files directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x204
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402ac5
sub eax, edx
mov ebx, eax
mov byte [esp + 0x10], cl
xor eax, eax
mov ecx, 0x7f
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
stosb byte es:[edi], al
push 0x26
lea eax, [esp + 0x18]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea edi, [esp + 0x10]
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402b00
mov ecx, dword [0x47a868]
mov dx, word [0x47a86c]
mov dword [edi], ecx
mov eax, str.X_Err.txt
mov word [edi + 4], dx
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402b22
lea edi, [esp + 0x10]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402b30
mov ecx, eax
shr ecx, 2
push 0
mov esi, edx
rep movsd dword es:[edi], dword [esi]
push 0x80
push 4
push 0
push 3
mov ecx, eax
push 0xc0000000
lea eax, [esp + 0x28]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402ba6
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [esp + 0x10]
push ecx
push ebx
push edx
push esi
call edi
push 0
lea eax, [esp + 0x10]
push eax
push 2
push 0x47ad4c
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x402c10
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
xor eax, eax
mov ecx, 0x27
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
push eax
mov dword [esp + 0xc], 0x9c
call esi
test eax, eax
jne 0x402c62
lea ecx, [esp + 8]
push ecx
mov dword [esp + 0xc], 0x94
call esi
test eax, eax
jne 0x402c62
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0xc], 6
sbb eax, eax
pop edi
inc eax
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x402c70
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x308
push esi
push edi
call fcn.00402c10
test eax, eax
je 0x402e44
xor eax, eax
mov byte [esp + 0x110], 0
mov ecx, 0x7f
lea edi, [esp + 0x111]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x10], 0
mov ecx, 0x3f
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
stosb byte es:[edi], al
push 0x25
lea eax, [esp + 0x118]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea edi, [esp + 0x110]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402cd7
mov ecx, dword [str.driversetchosts]
mov edx, dword [0x47adc4]
mov eax, dword [0x47adc8]
mov dword [edi], ecx
mov ecx, dword [0x47adcc]
mov dword [edi + 4], edx
mov dx, word [0x47add0]
mov dword [edi + 8], eax
mov al, byte [0x47add2]
mov dword [edi + 0xc], ecx
lea ecx, [esp + 0x110]
mov word [edi + 0x10], dx
push 0x47adbc
push ecx
mov byte [edi + 0x12], al
call fcn.0044dd88
add esp, 8
test eax, eax
mov dword [esp + 0xc], eax
jne 0x402d4c
push eax
push str.error
push str.Open_host
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
lea edi, [esp + 0x10]
mov byte [esp + 0x10], 0xa
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402d63
mov edx, dword [str.added_by_sag]
mov eax, dword [0x47ad90]
mov ecx, dword [0x47ad94]
mov dword [edi], edx
mov dx, word [0x47ad98]
mov dword [edi + 4], eax
mov al, byte [0x47ad9a]
mov dword [edi + 8], ecx
mov word [edi + 0xc], dx
mov byte [edi + 0xe], al
lea eax, [esp + 0x10]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402da0
sub eax, edx
mov byte [esp + eax + 0x10], 0xa
mov eax, dword [ebp + 8]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x402db3
lea edi, [esp + 0x10]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402dc3
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10]
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402de0
mov ecx, dword [0x47ad80]
mov edx, dword [0x47ad84]
mov al, byte [0x47ad88]
mov dword [edi], ecx
mov dword [edi + 4], edx
mov byte [edi + 8], al
mov eax, dword [ebp + 0x10]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402e06
lea edi, [esp + 0x10]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402e14
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0xc]
lea ecx, [esp + 0x10]
push esi
push ecx
call fcn.0044e0dd
push esi
call fcn.0044dc7d
add esp, 0xc
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x405200
Capabilities:
Create thread

Disassembly:
push ecx
push ebx
push esi
push 0x74
call fcn.0044dffd
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
jne 0x405226
push str.SSLTray:_ftpCommand_malloc_failed.
call fcn.00402a90
add esp, 4
pop esi
pop ebx
pop ecx
ret
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x14]
mov dword [esi + 0xc], edx
lea edx, [esp + 0xc]
push edx
push ebx
push esi
push 0x4051e0
mov dword [esi + 4], eax
mov eax, dword [esp + 0x34]
mov dword [esi + 8], ecx
mov ecx, dword [esp + 0x38]
push ebx
push ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x24], ebx
mov dword [esi], edi
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
jne 0x405280
push str.SSLTray:_Create_FTP_command_thread_failed.
call fcn.00402a90
add esp, 4
pop edi
pop esi
pop ebx
pop ecx
ret
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00404fa0
mov eax, dword [esi]
mov ecx, dword [eax + 4]
mov ebp, dword [sym.imp.WS2_32.dll_shutdown]
add esp, 4
push 2
push ecx
call ebp
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ebx, dword [sym.imp.WS2_32.dll_closesocket]
push eax
call ebx
mov al, byte [edi + 0x10]
test al, al
je 0x4052ca
mov ecx, dword [edi + 0xc]
push 2
push ecx
call ebp
mov edx, dword [edi + 0xc]
push edx
call ebx
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push ecx
call fcn.0041bb80
add esp, 4
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4052e0
Capabilities:
Query service configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x404
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x405342
mov byte [esp + 0x10], al
mov ecx, 0xff
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x14]
push str.SSLTray:_HookGetInstalledName_OpenSCManager_failed_with_error__d
push eax
call fcn.0044dd9b
lea ecx, [esp + 0x1c]
push ecx
call fcn.00402a90
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 1
push str.XMonitor
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x40539b
mov byte [esp + 0x10], al
mov ecx, 0xff
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x14]
push str.SSLTray:_HookGetInstalledName_open_service_failed_with_error__d
push edx
call fcn.0044dd9b
lea eax, [esp + 0x1c]
push eax
call fcn.00402a90
add esp, 0x10
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x405401
cmp eax, 0x7a
je 0x405401
mov byte [esp + 0x10], 0
xor eax, eax
mov ecx, 0xff
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x14]
push str.SSLTray:_QueryServiceConfig_failed_with_error__d
push edx
call fcn.0044dd9b
lea eax, [esp + 0x1c]
push eax
call fcn.00402a90
add esp, 0x10
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xc]
push ecx
call fcn.0044dffd
add esp, 4
lea edx, [esp + 0xc]
push edx
push 0x1000
mov edi, eax
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
jne 0x405470
mov byte [esp + 0x10], al
mov ecx, 0xff
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x14]
push str.SSLTray:_QueryServiceConfig_failed_with_error__d
push eax
call fcn.0044dd9b
lea ecx, [esp + 0x1c]
push ecx
call fcn.00402a90
add esp, 0x10
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0x20]
mov eax, dword [ebp + 8]
push edx
push 0x47b42c
push eax
call fcn.0044dd9b
push edi
call fcn.0044dee5
add esp, 0x10
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4054b0
Capabilities:
Check if file exists
Create service
Get common file path
Get file attributes
Get program files directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x610
push esi
push edi
push 0
push 0x26
lea eax, [esp + 0x518]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push 0x47b5b0
lea ecx, [esp + 0x514]
push ecx
lea edx, [esp + 0x10]
push str._sSAG_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40554c
mov byte [esp + 0x110], 0
xor eax, eax
mov ecx, 0xff
lea edi, [esp + 0x111]
rep stosd dword es:[edi], eax
lea ecx, [esp + 8]
push ecx
stosw word es:[edi], ax
lea edx, [esp + 0x114]
push str.SSLTray:_Hook_file__s_not_exits.
push edx
stosb byte es:[edi], al
call fcn.0044dd9b
lea eax, [esp + 0x11c]
push eax
call fcn.00402a90
add esp, 0x10
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
jne 0x4055aa
mov byte [esp + 0x110], al
mov ecx, 0xff
lea edi, [esp + 0x111]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x114]
push str.SSLTray:_HookInstall_open_SCManager_failed_with_error__d
push ecx
call fcn.0044dd9b
lea edx, [esp + 0x11c]
push edx
call fcn.00402a90
add esp, 0x10
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x1c]
push eax
push 1
push 3
push 1
push 0xf01ff
push ecx
push str.XMonitor
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
jne 0x405628
mov byte [esp + 0x110], al
mov ecx, 0xff
lea edi, [esp + 0x111]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x114]
push str.SSLTray:_DriverServiceInstall_create_service_failed_with_error__d
push edx
call fcn.0044dd9b
lea eax, [esp + 0x11c]
push eax
call fcn.00402a90
add esp, 0x10
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call edi
push esi
call edi
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x405640
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get program files directory
Modify service

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x614
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x405687
mov byte [esp + 0x10], al
mov ecx, 0xff
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SSLTray:_Hook_Update_open_SCManager_failed_with_error__d
jmp 0x40574f
push 0xf01ff
push str.XMonitor
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x4056e3
mov byte [esp + 0x10], al
mov ecx, 0xff
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x14]
push str.SSLTray:_Hook_Update_open_service_failed_with_error__d
push edx
call fcn.0044dd9b
lea eax, [esp + 0x1c]
push eax
call fcn.00402a90
add esp, 0x10
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0x26
lea ecx, [esp + 0x520]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push 0x47b5b0
lea edx, [esp + 0x51c]
push edx
lea eax, [esp + 0x418]
push str._sSAG_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x410]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40576f
mov byte [esp + 0x10], 0
xor eax, eax
mov ecx, 0xff
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x410]
push edx
stosb byte es:[edi], al
push str.SSLTray:_Hook_file__s_not_exits.
lea eax, [esp + 0x18]
push eax
call fcn.0044dd9b
lea ecx, [esp + 0x1c]
push ecx
call fcn.00402a90
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
push edx
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x428]
push eax
push 1
push 3
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
test eax, eax
jne 0x4057e0
mov byte [esp + 0x10], al
mov ecx, 0xff
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x14]
push str.SSLTray:_ChangeServiceConfig_failed_with_error__d
push ecx
call fcn.0044dd9b
lea edx, [esp + 0x1c]
push edx
call fcn.00402a90
add esp, 0x10
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret