joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10003277
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
pushal
call 0x10003286
pop dword [ebp - 0x44]
mov eax, 0x45e609a
sub eax, 0xf45e2e14
sub dword [ebp - 0x44], eax
mov dword [ebp - 0x54], 0xeb1b345b
sub dword [ebp - 0x54], 0x9cc8ef10
mov dword [ebp - 0x50], 0xe189dbe6
sub dword [ebp - 0x50], 0xaf568fa1
mov dword [ebp - 0x4c], 0xd2936ccd
add dword [ebp - 0x4c], 0x79b8d761
mov dword [ebp - 0x48], 0xa601bca0
add dword [ebp - 0x48], 0x59fe4360
lea eax, [ebp - 0x54]
push eax
mov eax, sym.imp.kernel32.dll_GetModuleHandleA
add eax, dword [ebp - 0x44]
call dword [eax]
mov dword [ebp - 0x54], 0xe37ae990
add dword [ebp - 0x54], 0x90f77fc6
mov dword [ebp - 0x50], 0xd20c546
add dword [ebp - 0x50], 0x344b9c2f
mov dword [ebp - 0x4c], 0x1156c784
sub dword [ebp - 0x4c], 0xade75b18
mov dword [ebp - 0x48], 0x204c6838
add dword [ebp - 0x48], 0xdfb397c8
lea ebx, [ebp - 0x54]
push ebx
push eax
mov eax, 0x666dc721
sub eax, 0x566b76a5
add eax, dword [ebp - 0x44]
call dword [eax]
push 0x40
push 0x1000
push 0x3b300
push 0
call eax
mov ecx, 0x6e868d47
add ecx, 0x9179b9d4
xor esi, esi
add esi, eax
mov edi, 0x10030c00
add edi, dword [ebp - 0x44]
mov ebx, 0x17fa5a77
add ebx, 0x4056e265
mov edx, dword [edi]
xor dword [ebp - 0x28], 0xbf98720c
add edx, ebx
mov dword [esi], edx
sub dword [ebp - 0x2c], 0x8f39f4f8
add esi, 0x47355a6
sub esi, 0x47355a2
add edi, 0xa6a0486
add edi, 0xf595fb7e
loop 0x1000339f
add eax, 0xa692d257
sub eax, 0xa691c318
xor ebx, ebx
add ebx, eax
add eax, 0xba9b2b76
sub eax, 0xba9b2b71
mov ecx, 0x10000000
add ecx, dword [ebp - 0x44]
call ebx
leave
ret

Function at 0x1001ca50
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, dword [ebp + 8]
cmp byte [edi + 0x2d], 0
jne 0x1001caeb
push ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebp - 4]
push esi
push 0
push eax
push ebx
push dword [ebp + 0xc]
push dword [edi + 0x30]
call dword [sym.imp.kernel32.dll_ReadFile]
mov esi, dword [ebp - 4]
cmp esi, ebx
je 0x1001caa2
mov byte [edi + 0x2d], 0xff
test esi, esi
je 0x1001caa2
cmp esi, ebx
jge 0x1001caa2
mov eax, ebx
sub eax, esi
push eax
mov eax, dword [ebp + 0xc]
add eax, esi
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [edi + 0x18], 0
je 0x1001cae5
add dword [edi + 0x1c], ebx
cmp dword [edi + 0x1c], 0xffff
jle 0x1001cae5
xor eax, eax
mov word [edi + 0x1e], ax
mov eax, dword [edi]
push edi
mov esi, dword [eax + 0x2c]
mov ecx, esi
call dword [0x100252e0]
call esi
mov ecx, dword [edi + 0x18]
push 1
push dword [edi + 0x20]
mov esi, dword [ecx]
push eax
push ecx
mov ecx, dword [esi + 0xc]
call dword [0x100252e0]
call dword [esi + 0xc]
mov esi, dword [ebp - 4]
mov eax, esi
pop esi
pop ebx
jmp 0x1001cafd
push dword [ebp + 0x10]
push 0
push dword [ebp + 0xc]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor eax, eax
pop edi
leave
ret 0xc
Function at 0x1001cd20
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x1002d6f0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x1002da18], 0
mov eax, dword [ebp + 8]
je 0x1001cd48
push eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
jmp 0x1001cd62
lea ecx, [ebp - 0x108]
push ecx
push eax
call fcn.10003277
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
mov ecx, dword [ebp - 4]
test eax, eax
setne al
xor ecx, ebp
call fcn.10022ac0
leave
ret 4

Function at 0x1001cf30
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x310
mov eax, dword [0x1002d6f0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x1002da18], 0
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
je 0x1001cf66
push ebx
push dword [ebp + 0x10]
push edi
push esi
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
jmp 0x1001cfc5
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x310]
push eax
push esi
call fcn.10003277
lea eax, [ebp - 0x20c]
push eax
push edi
call fcn.10003277
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.kernel32.dll_GetTempFileNameA]
mov esi, eax
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.10003277
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10022ac0
leave
ret 0x10

Function at 0x1001cfe0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x1002d6f0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x1002da18], 0
push esi
mov esi, dword [ebp + 0xc]
je 0x1001d00c
push esi
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_GetTempPathW]
jmp 0x1001d03d
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
test eax, eax
je 0x1001d03b
push dword [ebp + 8]
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.10003277
push esi
call dword [sym.imp.kernel32.dll_lstrlenW]
jmp 0x1001d03d
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.10022ac0
leave
ret 8
Function at 0x401259
Capabilities:
Get graphical window text

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0xe8
push ebx
push esi
mov esi, dword [ebp + 0x78]
push edi
push dword [ebp + 0x7c]
mov edi, dword [sym.imp.USER32.dll_GetDlgItem]
push dword [esi + 0x18]
call edi
push 9
push dword [esi + 0x18]
mov dword [ebp + 0x6c], eax
call edi
mov dword [ebp + 0x78], eax
push 0x64
lea eax, [ebp - 0x78]
push eax
push dword [ebp + 0x6c]
xor ebx, ebx
mov word [ebp - 0x78], bx
call dword [sym.imp.USER32.dll_GetWindowTextW]
lea eax, [ebp - 0x78]
push eax
push dword [ebp + 0x78]
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea eax, [ebp + 0x64]
push eax
push dword [esi + 0x18]
mov dword [ebp + 0x64], ebx
mov dword [ebp + 0x68], ebx
call dword [sym.imp.USER32.dll_ClientToScreen]
xor eax, eax
lea edi, [ebp + 0x54]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp + 0x54]
push eax
push dword [ebp + 0x6c]
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ecx, dword [ebp + 0x58]
mov eax, dword [ebp + 0x54]
mov edi, dword [ebp + 0x60]
mov esi, dword [ebp + 0x5c]
push 4
sub edi, ecx
sub ecx, dword [ebp + 0x68]
push edi
sub esi, eax
sub eax, dword [ebp + 0x64]
push esi
push ecx
push eax
push ebx
push dword [ebp + 0x78]
mov dword [ebp + 0x54], eax
mov dword [ebp + 0x58], ecx
call dword [sym.imp.USER32.dll_SetWindowPos]
push 1
push edi
push esi
push dword [ebp + 0x58]
push dword [ebp + 0x54]
push dword [ebp + 0x78]
call dword [sym.imp.USER32.dll_MoveWindow]
push ebx
push dword [ebp + 0x6c]
call dword [sym.imp.USER32.dll_ShowWindow]
pop edi
pop esi
pop ebx
add ebp, 0x70
leave
ret

Function at 0x402c1f
Capabilities:
Acquire debug privileges

Disassembly:
xor eax, eax
cmp byte [esp + 4], al
push esi
mov esi, ecx
mov byte [esi], al
je 0x402c4f
test byte [0x4beb98], 4
jne 0x402c4f
push eax
push 2
mov byte [esi], 1
or byte [0x4beb98], 4
push str.SeDebugPrivilege
call fcn.00411514
add esp, 0xc
mov eax, esi
pop esi
ret 4

Function at 0x402c55
Capabilities:
Acquire debug privileges

Disassembly:
cmp byte [ecx], 0
je 0x402c72
and byte [0x4beb98], 0xfb
push 0
push 4
push str.SeDebugPrivilege
call fcn.00411514
add esp, 0xc
ret
Function at 0x4037f1
Capabilities:
Get common file path
Query environment variable

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi]
push edi
xor edi, edi
test eax, eax
je 0x403808
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edi, eax
push 0x2d0
mov ecx, esi
call fcn.0043d4c2
test edi, edi
jg 0x403893
mov eax, dword [esi]
and word [eax], 0
mov eax, dword [esi]
push ebx
mov ebx, dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
push ebp
mov ebp, 0x208
push ebp
push eax
push 0x4a3cc4
call ebx
mov edi, eax
test edi, edi
jg 0x403881
mov eax, dword [esi]
push ebp
push eax
push 0x4a3cb8
call ebx
mov edi, eax
test edi, edi
jg 0x403881
push 0
push 0x24
push dword [esi]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edi, eax
test edi, edi
jle 0x403891
mov eax, dword [esi]
push 0x4a3cac
lea eax, [eax + edi*2]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyW]
add edi, 5
test edi, edi
jle 0x403891
mov eax, dword [esi]
mov word [eax + edi*2], 0x5c
mov eax, dword [esi]
inc edi
and word [eax + edi*2], 0
pop ebp
pop ebx
push dword [esi]
call fcn.0041bb2d
test edi, edi
pop ecx
jle 0x4038ab
push dword [esi]
call fcn.0048ef50
test eax, eax
pop ecx
jne 0x4038d8
push 0
push 0x24
push dword [esi]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.TEMP_
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_lstrcatW]
push dword [esi]
call fcn.0041bb2d
pop ecx
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edi, eax
mov eax, edi
pop edi
pop esi
ret
Function at 0x403c8d
Capabilities:
Get geographical location
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
and word [ebp - 0x44], 0
push 0x20
lea eax, [ebp - 0x44]
push eax
push str.LC_ALL
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
cmp word [ebp - 0x44], 0
jne 0x403cc3
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xb
push 0x800
call dword [sym.imp.KERNEL32.DLL_GetLocaleInfoW]
cmp word [ebp - 0x44], 0
lea eax, [ebp - 0x44]
jne 0x403cd2
mov eax, 0x4a3ebc
push eax
mov ecx, 0x4bdc28
call fcn.004458a8
push dword [0x4bdc28]
call fcn.0043df72
cmp eax, 1
pop ecx
jle 0x403cf4
mov word [0x4c1010], ax
leave
ret

Function at 0x403e15
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push edi
mov edi, dword [sym.imp.USER32.dll_GetLastInputInfo]
lea eax, [ebp - 8]
xor ebx, ebx
push eax
mov dword [ebp - 8], 8
mov dword [ebp - 4], ebx
call edi
mov eax, dword [ebp - 4]
mov ecx, eax
sub ecx, dword [0x4bdbf0]
test ecx, ecx
jle 0x403e48
mov dword [0x4bdbf0], eax
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_GetTickCount]
call esi
mov dword [0x4bdbf0], eax
jmp 0x403e80
lea eax, [ebp - 8]
push eax
mov dword [ebp - 4], ebx
call edi
call esi
mov ecx, eax
sub ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 8]
jb 0x403e78
sub eax, dword [0x4bdbf0]
cmp eax, dword [ebp + 8]
jae 0x403e88
push 0xa
call dword [sym.imp.KERNEL32.DLL_Sleep]
cmp byte [0x4bc2c0], bl
jg 0x403e58
mov eax, dword [ebp - 4]
mov ecx, eax
sub ecx, dword [0x4bdbf0]
pop esi
test ecx, ecx
jle 0x403e9d
mov dword [0x4bdbf0], eax
xor eax, eax
cmp byte [0x4bc2c0], bl
pop edi
setg al
pop ebx
leave
ret

Function at 0x404072
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
push 0x3ff
lea eax, [ebp - 0x400]
push eax
push str.SHOWEWFMSG
mov byte [ebp - 0x400], 0
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableA]
cmp byte [ebp - 0x400], 0x31
jne 0x4040b4
push 0
push 0x4a3f10
push dword [ebp + 8]
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
leave
ret

Function at 0x4040b6
Capabilities:
Terminate process

Disassembly:
cmp byte [0x4bc2c0], 2
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_Sleep]
push 0x14
pop esi
je 0x4040cd
push esi
call edi
cmp dword [0x4bdc00], 0
je 0x4040e8
push 0x1e
pop esi
jmp 0x4040e8
cmp dword [0x4bdbf4], 0
je 0x4040eb
push 0xa
call edi
dec esi
jns 0x4040db
mov eax, dword [0x4bdbf4]
test eax, eax
pop edi
pop esi
je 0x404109
push 0
push eax
mov dword [0x4bdbf4], 0
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
mov byte [0x4bc2c0], 0xff
ret
Function at 0x404111
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push dword [ebp + 0xc]
mov esi, 0x8000004
push 0x64
push ebx
push esi
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.DLL_CreateFileMappingA]
mov edi, eax
cmp edi, ebx
mov byte [ebp - 1], 1
je 0x404152
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0xb7
jne 0x404163
mov byte [ebp - 1], bl
jmp 0x404163
push dword [ebp + 0xc]
push ebx
push esi
call dword [sym.imp.KERNEL32.DLL_OpenFileMappingA]
mov edi, eax
cmp edi, ebx
je 0x40419f
push ebx
push ebx
push ebx
push 6
push edi
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
push edi
mov dword [0x4bdc08], eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [0x4bdc08]
cmp eax, ebx
je 0x40419f
cmp byte [ebp - 1], bl
je 0x40419a
push 0x64
push ebx
push eax
call fcn.0048f7a0
mov eax, dword [0x4bdc08]
add esp, 0xc
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4054b3
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
cmp dword [ebp + 8], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
jne 0x4054cf
lea ebx, [ebp - 0x14]
cmp dword [ebp + 0xc], edi
mov esi, dword [ebp + 0xc]
jne 0x4054ed
cmp dword [ebp + 8], edi
lea esi, [ebp - 0x10]
je 0x405678
push dword [ebx]
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_lstrcpyW]
push 0x26c
mov ecx, ebx
call fcn.0043d4c2
push esi
call fcn.004037f1
mov edi, eax
lea eax, [edi + 1]
push eax
push dword [esi]
mov dword [ebp - 0x18], edi
push dword [ebx]
call fcn.00405064
add esp, 0x10
push 0
call dword [sym.imp.KERNEL32.DLL_SetLastError]
and dword [ebp - 4], 0
and dword [ebp - 0xc], 0
mov dword [ebp - 8], 0xc7
jmp 0x405530
mov edi, dword [ebp - 0x18]
cmp dword [ebp + 8], 0
je 0x4055db
mov eax, dword [ebx]
lea eax, [eax + edi*2]
push 0x4a40e8
mov dword [ebp - 0x1c], eax
call fcn.00439c36
mov edi, eax
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
add edi, eax
push edi
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
push eax
push dword [ebp + 0x14]
push str.pecmd__s._lu._lu_s_
push dword [ebp - 0x1c]
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [ebx]
add esp, 0x18
xor edi, edi
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
test eax, eax
jne 0x40559a
push edi
push edi
push 5
mov ecx, 0x4bdfa0
call fcn.00413857
dec dword [ebp - 8]
jns 0x40552d
jmp 0x405654
cmp dword [ebp + 0xc], edi
mov dword [ebp - 0xc], 1
je 0x405678
push dword [ebx]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edi, eax
lea eax, [edi + 1]
push eax
push dword [ebx]
mov dword [ebp + 8], eax
push dword [esi]
call fcn.00405064
mov eax, dword [esi]
mov word [eax + edi*2], 0x5c
mov eax, dword [ebp + 8]
mov ecx, dword [esi]
add esp, 0xc
and word [ecx + eax*2], 0
jmp 0x4055dd
mov eax, edi
and dword [ebp + 8], 0
add eax, eax
mov dword [ebp + 0xc], eax
push dword [ebp + 0x18]
mov edi, dword [esi]
push dword [ebp + 8]
add edi, dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
push eax
push dword [ebp + 0x14]
push str.pecmd__s._lu._lu_s
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [esi]
add esp, 0x18
xor edi, edi
push edi
push 0x80
push 1
push edi
push edi
push 0x40000000
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], edi
call fcn.0040511c
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x40564f
push edi
push edi
push 5
mov ecx, 0x4bdfa0
call fcn.00413857
inc dword [ebp + 8]
cmp dword [ebp + 8], 0xc8
jl 0x4055e6
mov eax, dword [esi]
and word [eax], di
cmp dword [ebp - 0xc], edi
jne 0x405659
mov eax, dword [ebx]
mov word [eax], di
mov eax, dword [ebp + 0x10]
cmp eax, edi
je 0x405667
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
jmp 0x405675
cmp dword [ebp - 4], edi
je 0x405675
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edi, dword [ebp - 4]
lea ecx, [ebp - 0x10]
call fcn.00437960
lea ecx, [ebp - 0x14]
call fcn.00437960
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40568f
Capabilities:
Get common file path
Get startup folder

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
push esi
push edi
push str.PECMD:MSGSVR:HWND
xor ebx, ebx
push ebx
call fcn.00404111
pop ecx
pop ecx
call fcn.00403c8d
mov byte [0x4bdbe6], 1
call fcn.0048fe5b
call fcn.00439559
push ebx
push 0x24
pop edi
push edi
lea eax, [ebp - 0x12c]
push eax
push ebx
mov byte [ebp - 0x12c], bl
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push str.System32Kernel32.dll
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push 0x4a4154
push eax
mov dword [ebp - 4], eax
call esi
push 7
pop ecx
mov dword [ebp - 0x28], edi
push str.GetNativeSystemInfo
push dword [ebp - 4]
mov dword [0x4bdb9c], eax
xor eax, eax
mov dword [ebp - 0x24], ebx
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
call esi
cmp eax, ebx
je 0x405732
lea ecx, [ebp - 0x28]
push ecx
call eax
cmp word [ebp - 0x28], bx
je 0x40576f
push str.Wow64RevertWow64FsRedirection
push dword [ebp - 4]
call esi
push str.Wow64DisableWow64FsRedirection
push dword [ebp - 4]
mov dword [0x4bdbe0], eax
call esi
cmp dword [0x4bdbe0], ebx
mov dword [0x4bdbdc], eax
jne 0x405764
mov dword [0x4bdbdc], ebx
mov bl, 1
mov word [0x4bdbc8], 0x100
movsx eax, bl
push str.bX64
push eax
push 0x4bdfa0
mov byte [0x4bdbe5], bl
call fcn.0043f7f4
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405790
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov dword [ebp - 8], eax
lea ecx, [eax + 8]
push ebx
mov bx, word [eax]
mov dword [ebp - 8], ecx
mov ax, word [ecx]
call fcn.00482120
test al, al
jne 0x4057b4
inc ecx
inc ecx
mov dword [ebp - 8], ecx
push 0x63
lea eax, [ebp - 0x78]
push eax
push str.DEBUGMDG
mov byte [ebp - 0x78], 0
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableA]
cmp byte [ebp - 0x78], 0x31
jne 0x4057d6
mov byte [0x4bdbec], 1
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
push dword [ebp - 8]
and dword [ebp - 0x10], 0
lea ecx, [ebp - 0x14]
mov dword [0x4bdbf0], eax
call fcn.004457e4
lea ecx, [ebp - 0xc]
call fcn.0043d47d
push 1
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x14]
mov ecx, 0x4bdfa0
call fcn.0044b30d
push dword [ebp - 0xc]
lea ecx, [ebp - 0x10]
call fcn.004458a8
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0xc]
mov dword [ebp - 8], eax
call fcn.00437960
lea ecx, [ebp - 0x14]
call fcn.00437960
mov ecx, dword [ebp - 8]
call fcn.00403eac
push str._InstallService
mov edi, eax
push 0xf
pop esi
mov dword [ebp - 8], edi
call fcn.00402bf0
test al, al
pop ecx
pop edi
pop esi
je 0x405877
push 0x1e
push str._Service
push dword [ebp - 8]
mov byte [ebp - 1], 0x49
call fcn.004125f9
mov ecx, dword [ebp - 8]
add esp, 0xc
add ecx, 0x1e
call fcn.00403eac
mov dword [ebp - 8], eax
jmp 0x405892
push 8
lea eax, [ebp - 8]
push eax
push 0x4a41a4
call fcn.0043f1bd
add esp, 0xc
test al, al
je 0x4058f1
mov byte [ebp - 1], 0x53
cmp bx, 0x22
jne 0x4058cc
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edx, dword [ebp - 8]
lea ecx, [edx + eax*2 - 2]
cmp ecx, edx
jbe 0x4058cc
mov ax, word [ecx]
call fcn.00482120
test al, al
je 0x4058be
dec ecx
dec ecx
cmp ecx, edx
ja 0x4058ac
cmp ecx, edx
jbe 0x4058cc
cmp word [ecx], 0x22
jne 0x4058cc
and word [ecx], 0
sub dword [ebp - 8], 2
movsx ax, byte [ebp - 1]
mov ecx, dword [ebp - 8]
mov word [ecx], ax
sub dword [ebp - 8], 2
mov eax, dword [ebp - 8]
mov word [eax], 0x7e
push dword [ebp - 8]
call fcn.0040dcff
jmp 0x405911
push 0xe
lea eax, [ebp - 8]
push eax
push str._RemoveService
call fcn.0043f1bd
add esp, 0xc
test al, al
pop ebx
je 0x40591a
push dword [ebp - 8]
call fcn.00405bad
pop ecx
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
lea ecx, [ebp - 0x10]
call fcn.00437960
xor eax, eax
leave
ret
Function at 0x4059b2
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
mov dword [0x4bdbf8], eax
cmp word [eax], 0x7e
push edi
mov dword [ebp - 0x14], 0x100
mov byte [ebp - 1], bl
jne 0x4059ec
inc eax
inc eax
mov dword [0x4bdbf8], eax
cmp word [eax], 0x49
sete byte [ebp - 1]
inc eax
inc eax
mov dword [ebp + 8], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp + 8]
push eax
call fcn.004050f3
pop ecx
mov ecx, dword [ebp + 8]
mov esi, ecx
sub esi, dword [ebp - 0x10]
mov eax, 0x400
sar esi, 1
cmp esi, eax
jle 0x405a0e
mov esi, eax
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0xc], ecx
call fcn.004379a9
push 6
push dword [ebp - 0xc]
push str.__gui_
call fcn.00438b38
mov edi, dword [sym.imp.KERNEL32.DLL_lstrlenW]
add esp, 0x10
test al, al
je 0x405a63
mov eax, dword [ebp - 0xc]
add eax, 0xc
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
mov dword [ebp - 0x14], ebx
call fcn.004379a9
pop ecx
push dword [ebp + 8]
call edi
inc eax
add eax, eax
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.004125af
add esp, 0xc
add esi, esi
push esi
push dword [ebp - 0x10]
lea eax, [ebp - 0x828]
push eax
call fcn.004125f9
add esp, 0xc
push dword [ebp - 0x10]
mov word [ebp + esi - 0x828], bx
mov byte [0x4c1003], bl
call edi
mov esi, eax
inc esi
lea eax, [esi + 0x226]
push eax
lea ecx, [ebp - 8]
call fcn.0043d49b
mov eax, dword [ebp - 8]
push 0x1cc
add eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
mov ecx, eax
cmp ecx, ebx
jle 0x405ba0
mov eax, dword [ebp - 8]
mov word [eax + ecx*2 + 2], bx
mov eax, dword [ebp - 8]
lea edi, [eax + ecx*2 + 2]
mov dword [ebp + 8], edi
lea edx, [eax + 2]
xor edi, edi
mov word [eax], 0x22
jmp 0x405ae9
mov ax, word [edx]
call fcn.00482120
test al, al
je 0x405ae7
xor edi, edi
inc edi
inc edx
inc edx
cmp edx, dword [ebp + 8]
jb 0x405ad8
cmp di, bx
mov edx, dword [ebp - 8]
lea eax, [edx + 2]
mov dword [ebp + 8], eax
je 0x405b0a
dec eax
dec eax
mov word [edx + ecx*2 + 2], 0x22
inc ecx
mov dword [ebp + 8], eax
inc ecx
push 0x1e
lea edi, [eax + ecx*2]
push 0x4a41f4
push edi
call fcn.004125f9
push esi
push dword [ebp - 0x10]
add edi, 0x1e
push edi
call fcn.00405064
add esp, 0x18
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
cmp edi, ebx
je 0x405b9d
mov eax, dword [ebp - 0x14]
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
or eax, 0x10
push ebx
push 2
push eax
push 0xf01ff
lea eax, [ebp - 0x828]
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp eax, ebx
je 0x405b9d
cmp byte [ebp - 1], bl
je 0x405b9d
push eax
call esi
push 0x20000000
lea eax, [ebp - 0x828]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x405b9d
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push dword [ebp + 8]
call esi
push edi
call esi
lea ecx, [ebp - 8]
call fcn.00437960
pop edi
pop esi
pop ebx
leave
ret