joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41dff0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cec2b
mov eax, dword fs:[0]
push eax
mov eax, 0x1120
call fcn.00497bd0
mov eax, dword [0x4fbf60]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x40
lea eax, [ebp - 0x106c]
push 0
push eax
call fcn.00483200
add esp, 0xc
xor ecx, ecx
push 0xffe
xor eax, eax
push ecx
lea edx, [ebp - 0x100e]
push edx
mov dword [ebp - 0x1070], 0x44
mov dword [ebp - 0x1028], 0
mov dword [ebp - 0x1024], eax
mov dword [ebp - 0x1020], eax
mov dword [ebp - 0x101c], eax
mov word [ebp - 0x1010], cx
call fcn.00483200
add esp, 0xc
lea eax, [ebp - 0x1028]
push eax
lea ecx, [ebp - 0x1070]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x1010]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov dword [ebp - 0x1014], eax
test eax, eax
jne 0x41e169
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
mov dword [ebp - 0x1018], eax
call esi
push eax
push 0x334
lea eax, [ebp - 0x1128]
push eax
mov ebx, str.env.cpp
call fcn.00407320
mov esi, eax
xor eax, eax
mov dword [ebp - 4], eax
cmp esi, eax
je 0x41e151
lea ebx, [esi + 0x10]
cmp ebx, eax
je 0x41e0ec
lea eax, [esi + 0x20]
push str.ERROR:
push eax
call fcn.00409b50
add esp, 8
test ebx, ebx
je 0x41e103
lea eax, [esi + 0x20]
jmp 0x41e105
xor eax, eax
push str.failed_to_create_process
push eax
call fcn.00409b50
add esp, 8
test ebx, ebx
je 0x41e11c
lea eax, [esi + 0x20]
jmp 0x41e11e
xor eax, eax
push edi
push eax
call fcn.00409b50
add esp, 8
test ebx, ebx
je 0x41e131
lea eax, [esi + 0x20]
jmp 0x41e133
xor eax, eax
push str._getlasterror
push eax
call fcn.00409b50
mov ecx, dword [ebp - 0x1018]
add esp, 8
push ecx
add esi, 0x20
push esi
call fcn.0040f950
lea ecx, [ebp - 0x1128]
mov dword [ebp - 4], 0xffffffff
call fcn.004073f0
mov eax, dword [ebp - 0x1014]
xor edx, edx
cmp eax, 1
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0047f164
mov esp, ebp
pop ebp
ret
Function at 0x41e190
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [0x4fbf60]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x234], eax
test eax, eax
jne 0x41e1c0
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047f164
mov esp, ebp
pop ebp
ret
push ebx
push esi
push 0x22c
lea eax, [ebp - 0x230]
push 0
push eax
call fcn.00483200
add esp, 0xc
push 0
push 2
mov dword [ebp - 0x230], 0x22c
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
lea ecx, [ebp - 0x230]
mov esi, eax
push ecx
push esi
xor bl, bl
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x41e24d
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Process32NextW]
lea edx, [ebp - 0x230]
push edx
push esi
call edi
test eax, eax
je 0x41e24c
jmp 0x41e220
mov eax, dword [ebp - 0x234]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call fcn.0048020e
add esp, 8
test eax, eax
je 0x41e24a
lea edx, [ebp - 0x230]
push edx
push esi
call edi
test eax, eax
jne 0x41e220
jmp 0x41e24c
mov bl, 1
pop edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.0047f164
mov esp, ebp
pop ebp
ret

Function at 0x41e270
Capabilities:
Check for time delay via gettickcount
Enumerate processes
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x4fbf60]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
cmp eax, str.KometaLaunchPanel.exe
je 0x41e3bf
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x32
mov dword [ebp - 0x238], eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
mov byte [ebp - 0x231], 0
push esi
jmp 0x41e2c0
push 0x22c
lea ecx, [ebp - 0x230]
push 0
push ecx
call fcn.00483200
add esp, 0xc
push 0
push 2
mov dword [ebp - 0x230], 0x22c
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
lea edx, [ebp - 0x230]
mov ebx, eax
push edx
push ebx
mov byte [ebp - 0x232], 0
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x41e3a3
lea eax, [ebp - 0x230]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
je 0x41e3a3
nop
lea ecx, [ebp - 0x20c]
push str.KometaLaunchPanel.exe
push ecx
call fcn.0048020e
add esp, 8
test eax, eax
jne 0x41e387
mov byte [ebp - 0x232], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x238]
cmp eax, 0xbb8
jb 0x41e39b
mov edx, dword [ebp - 0x228]
push edx
push 0
push 0x100001
mov byte [ebp - 0x231], 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0xea60
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call edi
lea eax, [ebp - 0x230]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x41e320
jmp 0x41e3a3
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
call edi
cmp byte [ebp - 0x232], 0
je 0x41e3bc
cmp byte [ebp - 0x231], 0
je 0x41e2c0
pop esi
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047f164
mov esp, ebp
pop ebp
ret
Function at 0x41e7e0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cbf88
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x4fbf60]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 0x10], ebx
movzx eax, word [ebp + 0xc]
push 0x4daad4
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
cmp esi, ebx
je 0x41e82e
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
jmp 0x41e830
xor eax, eax
cmp eax, ebx
je 0x41e910
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp edi, ebx
je 0x41e910
cmp esi, ebx
jbe 0x41e910
lea ecx, [ebp + 0xc]
push ecx
push 1
mov dword [ebp - 4], ebx
push ebx
mov dword [ebp + 0xc], ebx
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x41e8fd
lea ecx, [ebp - 0x10]
push ecx
push esi
mov dword [ebp - 0x10], ebx
mov edx, dword [eax]
mov edx, dword [edx + 0x10]
push edi
push eax
call edx
test eax, eax
js 0x41e8fa
mov eax, dword [ebp + 0xc]
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
cmp eax, ebx
jne 0x41e8a9
push 0x80004003
call fcn.0049ab80
mov esi, dword [eax]
lea edi, [ebp - 0x18]
push edi
push ebx
push edx
push ecx
push eax
mov eax, dword [esi + 0x14]
call eax
test eax, eax
js 0x41e8fa
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [esi], eax
cmp eax, ebx
je 0x41e8d3
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push eax
call edx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
cmp eax, ebx
je 0x41e8e6
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
cmp eax, ebx
je 0x41e910
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x41fa80
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cec02
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x4fbf60]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [edi], 0x4daec0
mov dword [edi + 0x60], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
lea esi, [edi + 4]
push esi
mov dword [ebp - 4], ebx
push edi
mov dword [ebp - 0x10], 1
call fcn.00407ae0
mov dword [ebp - 4], 1
mov eax, dword [edi]
mov ecx, dword [eax + 4]
mov dword [edi + ecx], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov ecx, esi
call fcn.00407c40
lea edx, [esi + 8]
mov dword [esi + 0x10], edx
lea ecx, [esi + 0x18]
mov dword [esi + 0x20], ecx
lea edx, [esi + 0x1c]
mov dword [esi + 0x24], edx
mov dword [esi], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [esi + 0x50], bl
mov byte [esi + 0x49], bl
lea eax, [esi + 0xc]
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x28]
mov dword [esi + 0x30], ecx
lea edx, [esi + 0x2c]
mov dword [esi + 0x34], edx
mov dword [eax], ebx
mov eax, dword [esi + 0x24]
mov dword [eax], ebx
mov ecx, dword [esi + 0x34]
mov dword [ecx], ebx
mov edx, dword [esi + 0x10]
mov dword [edx], ebx
mov eax, dword [esi + 0x20]
mov edx, dword [0x502270]
mov dword [eax], ebx
mov ecx, dword [esi + 0x30]
mov dword [ecx], ebx
mov dword [esi + 0x54], ebx
mov dword [esi + 0x4c], edx
mov dword [esi + 0x44], ebx
mov eax, dword [ebp + 0xc]
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 8
jb 0x41fb52
mov eax, dword [eax]
push 0x40
mov ecx, 0x32
mov edx, eax
mov ebx, esi
call fcn.00420630
test eax, eax
jne 0x41fb85
mov eax, dword [edi]
mov ecx, dword [eax + 4]
mov eax, dword [ecx + edi + 0xc]
add ecx, edi
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x41fb7d
or eax, 4
push 0
push eax
call fcn.00406be0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x420860
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cd8b8
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x4fbf60]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
cmp dword [edi + 0x44], ebx
je 0x4209b7
cmp byte [edi + 0x49], bl
je 0x4209b7
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
push 0xffffffffffffffff
mov ecx, edi
call edx
cmp eax, 0xffffffff
je 0x4209a5
mov ecx, 0xf
xor eax, eax
mov byte [ebp - 0x2c], bl
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], 8
cmp ecx, 0x10
jae 0x4208d4
lea eax, [ebp - 0x2c]
mov byte [eax + 8], bl
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x18]
mov edx, eax
cmp ebx, 0x10
jae 0x4208ec
lea edx, [ebp - 0x2c]
mov eax, edx
add edx, dword [ebp - 0x1c]
mov ecx, dword [edi + 0x44]
mov esi, dword [ecx]
lea ebx, [ebp - 0x30]
push ebx
push edx
push eax
lea eax, [edi + 0x4c]
push eax
mov eax, dword [esi + 0x18]
call eax
sub eax, 0
je 0x42092d
dec eax
je 0x420931
sub eax, 2
je 0x420988
cmp dword [ebp - 0x18], 0x10
jb 0x4209a5
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0047f3b4
add esp, 4
xor al, al
jmp 0x4209b9
mov byte [edi + 0x49], 0
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov ecx, eax
cmp ebx, 0x10
jae 0x420941
lea ecx, [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
sub esi, ecx
je 0x42096a
cmp ebx, 0x10
jae 0x420950
lea eax, [ebp - 0x2c]
mov ecx, dword [edi + 0x54]
push ecx
push esi
push 1
push eax
call fcn.00481077
add esp, 0x10
cmp esi, eax
jne 0x420993
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
cmp byte [edi + 0x49], 0
je 0x4209a9
test esi, esi
jne 0x4208e0
push esi
push 8
lea ecx, [ebp - 0x2c]
call fcn.004114a0
jmp 0x4208da
cmp dword [ebp - 0x18], 0x10
jb 0x4209b7
mov eax, dword [ebp - 0x2c]
jmp 0x4209ae
cmp dword [ebp - 0x18], 0x10
jb 0x4209a5
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0047f3b4
add esp, 4
xor al, al
jmp 0x4209b9
cmp ebx, 0x10
jb 0x4209b7
push eax
call fcn.0047f3b4
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0047f164
mov esp, ebp
pop ebp
ret
Function at 0x423af0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d0164
mov eax, dword fs:[0]
push eax
sub esp, 0x114
mov eax, dword [0x4fbf60]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov dword [ebp - 0x74], ebx
push ebx
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], ebx
push 0x4da6dc
mov dword [ebp - 0x68], edi
mov word [edi], ax
call fcn.004028fc
mov eax, 1
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], ebx
push ecx
lea esi, [ebp - 0x2c]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], eax
call fcn.0041c840
add esp, 4
mov dword [ebp - 4], 1
cmp dword [ebp - 0x1c], ebx
je 0x423be5
lea edx, [ebp - 0x48]
push edx
mov edi, str.kometa.exe
mov ebx, esi
call fcn.00421040
add esp, 4
push eax
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.004132a0
mov esi, 8
mov byte [ebp - 4], 1
cmp dword [ebp - 0x34], esi
jb 0x423ba7
mov eax, dword [ebp - 0x48]
push eax
call fcn.0047f3b4
add esp, 4
cmp dword [ebp - 0x18], esi
jb 0x423bcc
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x423bd1
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x423bd1
test al, 0x10
jne 0x423bd1
push 9
push str.kometa1
jmp 0x423bd8
lea eax, [ebp - 0x2c]
jmp 0x423bb3
push 9
push str.kometa0
mov ecx, dword [ebp - 0x68]
call fcn.0040285b
mov edi, dword [ebp - 0x68]
xor ebx, ebx
lea ecx, [ebp - 0x6c]
push ecx
mov dword [ebp - 0x6c], ebx
call fcn.00412db0
add esp, 4
lea edx, [ebp - 0x120]
push edx
call fcn.004083b0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x110]
push ecx
call fcn.0040f950
lea ecx, [ebp - 0x64]
lea eax, [ebp - 0x120]
call fcn.004084e0
mov ecx, eax
lea esi, [ebp - 0x48]
mov byte [ebp - 4], 4
call fcn.004256b0
push 0xffffffffffffffff
push ebx
push eax
mov ecx, edi
mov byte [ebp - 4], 5
call fcn.00402cfc
mov esi, 8
cmp dword [ebp - 0x34], esi
jb 0x423c55
mov edx, dword [ebp - 0x48]
push edx
call fcn.0047f3b4
add esp, 4
xor eax, eax
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
cmp dword [ebp - 0x50], esi
jb 0x423c76
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.0047f3b4
add esp, 4
lea ecx, [ebp - 0xc0]
mov byte [ebp - 4], 1
call fcn.00408450
lea edx, [ebp - 0xc0]
push edx
mov dword [ebp - 0xc0], vtable.std::ios_base.0
call fcn.0047e8b1
add esp, 4
cmp dword [ebp - 0x18], esi
jb 0x423caf
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0047f3b4
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0047f164
mov esp, ebp
pop ebp
ret
Function at 0x424560
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 4]
push eax
mov dword [ebp - 4], 0
call fcn.00412db0
add esp, 4
test eax, eax
je 0x424584
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
inc ecx
mov dword [ebp - 0xc], ecx
push 1
push 1
mov ecx, 0x4db068
mov dword [ebp - 8], 0
call fcn.00412a10
add esp, 0xc
test eax, eax
jne 0x4245d2
mov eax, dword [ebp - 8]
test eax, eax
je 0x4245d2
push 4
lea ecx, [ebp - 0xc]
push ecx
push 4
push 0
push str.pcnt
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esp, ebp
pop ebp
ret
Function at 0x426f70
Capabilities:
Check mutex on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d0078
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x4fbf60]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
mov eax, dword [0x4fbf60]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
lea eax, [esp + 0x10]
push eax
mov esi, ecx
call fcn.00426e20
add esp, 4
xor ebx, ebx
mov dword [esp + 0x48], ebx
cmp dword [esp + 0x10], ebx
je 0x4270b1
cmp dword [esi + 0x14], 8
jb 0x426fd0
mov eax, dword [esi]
jmp 0x426fd2
mov eax, esi
push 0xffffffffffffffff
push eax
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 2
call fcn.00414830
mov ecx, eax
add esp, 8
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
lea esi, [ecx + 1]
mov edi, edi
mov dl, byte [ecx]
inc ecx
cmp dl, bl
jne 0x427000
sub ecx, esi
push ecx
push eax
lea ecx, [esp + 0x24]
call fcn.004026cf
mov edi, dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
push ebx
push 1
push 0x50227c
call esi
sub eax, ebx
je 0x427108
dec eax
je 0x427020
mov eax, dword [0x502280]
mov edi, eax
cmp eax, ebx
je 0x42708d
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, ebx
je 0x427054
cmp eax, 0x80
jne 0x42708d
mov ecx, dword [esp + 0x2c]
cmp ecx, ebx
je 0x427086
cmp dword [esp + 0x30], 0x10
mov eax, dword [esp + 0x1c]
jae 0x42706b
lea eax, [esp + 0x1c]
mov esi, dword [esp + 0x10]
mov edx, dword [esi]
push edx
push ecx
push 1
push eax
call fcn.00481077
mov eax, dword [esi]
push eax
call fcn.004809f8
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp dword [esp + 0x30], 0x10
jb 0x4270a1
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0047f3b4
add esp, 4
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
mov dword [esp + 0x48], 0xffffffff
mov esi, dword [esp + 0x14]
cmp esi, ebx
je 0x4270ea
lea edx, [esi + 4]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x4270ea
mov edx, dword [esi]
mov eax, dword [edx]
mov ecx, esi
call eax
lea ecx, [esi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x4270ea
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0047f164
mov esp, ebp
pop ebp
ret
push str.KOMETA_LOGGING_MUTEX
push ebx
push ebx
call edi
push 1
push 2
push 0x50227c
mov dword [0x502280], eax
call esi
jmp 0x427020
Function at 0x427ab0
Capabilities:
Get common file path
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x4fbf60]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x50228c], 0
jne 0x427b5b
xor eax, eax
push 0x208
push eax
lea ecx, [ebp - 0x20e]
push ecx
mov word [ebp - 0x210], ax
call fcn.00483200
add esp, 0xc
push 0x104
lea edx, [ebp - 0x210]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x427b14
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047f164
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x210]
push 0x4dfb24
push eax
call fcn.00482736
add esp, 8
test eax, eax
je 0x427b32
xor ecx, ecx
mov word [eax + 2], cx
push 0
push 0
push 0
push 0
push 0x502288
push 0
push 0
lea edx, [ebp - 0x210]
push edx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je 0x427b04
mov byte [0x50228c], 1
mov eax, dword [0x502288]
mov ecx, dword [ebp - 4]
mov dword [esi], eax
xor ecx, ebp
mov al, 1
call fcn.0047f164
mov esp, ebp
pop ebp
ret

Function at 0x427b80
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4fbf60]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, 1
test byte [0x5022c8], al
jne 0x427bcc
or dword [0x5022c8], eax
xor eax, eax
push 0x4d1200
mov dword [0x5022c0], 7
mov dword [0x5022bc], 0
mov word [0x5022ac], ax
call fcn.0047f953
add esp, 4
cmp dword [0x5022bc], 0
jne 0x427c60
xor eax, eax
lea edx, [ebp - 0x28]
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
push edx
lea eax, [ebp - 0x24]
xor ecx, ecx
push eax
mov word [ebp - 0x24], cx
mov dword [ebp - 0x28], 0xf
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
je 0x427c60
mov ecx, dword [0x5022c0]
push esi
mov esi, dword [ebp - 0x28]
push edi
mov edi, dword [0x5022ac]
lea esi, [ebp + esi*2 - 0x24]
mov eax, edi
cmp ecx, 8
jae 0x427c34
mov eax, 0x5022ac
mov edx, dword [0x5022bc]
lea edx, [eax + edx*2]
mov eax, edi
cmp ecx, 8
jae 0x427c49
mov eax, 0x5022ac
mov ecx, dword [ebp - 0x28]
push ecx
push esi
lea ecx, [ebp - 0x24]
push ecx
push edx
push eax
mov ecx, 0x5022ac
call fcn.0040cc40
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov eax, 0x5022ac
call fcn.0047f164
mov esp, ebp
pop ebp
ret
Function at 0x427c80
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cc8b8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x4fbf60]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
xor esi, esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
lea ecx, [ebp - 0x1c]
xor eax, eax
push ecx
push eax
mov dword [ebp - 4], esi
mov eax, 0x400
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x1c], esi
call fcn.00428190
cmp ebx, esi
je 0x427d99
mov edi, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
sub edx, edi
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp + 8]
sar edx, 1
lea ecx, [ebp - 0x14]
push ecx
push edi
mov dword [ebp - 0x14], edx
lea edx, [ebp - 0x18]
push edx
push ebx
push eax
push esi
mov dword [ebp - 0x18], 0x44
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov esi, eax
test esi, esi
jne 0x427d75
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x427d73
cmp dword [ebp - 0x18], 0x44
jbe 0x427d37
lea esi, [ebp - 0x30]
call fcn.00429370
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
cmp eax, 0x400
jbe 0x427d57
push eax
lea eax, [ebp - 0x1c]
lea esi, [ebp - 0x30]
mov dword [ebp - 0x1c], 0
call fcn.00428140
mov edi, dword [ebp - 0x30]
lea ecx, [ebp - 0x20]
push ecx
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x14]
push edx
push edi
lea eax, [ebp - 0x18]
push eax
push ebx
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov esi, eax
test esi, esi
setne bl
test edi, edi
je 0x427d85
push edi
call fcn.0047f3b4
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x30]
cmp eax, esi
je 0x427da9
push eax
call fcn.0047f3b4
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x42a2f0
Capabilities:
Check if file exists
Delete file
Get file attributes

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 0x10], 0
je 0x42a345
cmp byte [eax], 0
je 0x42a345
cmp dword [esi + 0x14], 8
jb 0x42a306
mov esi, dword [esi]
test esi, esi
je 0x42a345
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x42a345
test al, 0x10
jne 0x42a345
push 0
push 0x4000000
push 3
push 0
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x42a33e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
ret
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop esi
ret