joyce8/EMBER2024-capa huggingface dataset:
Function at 0x670c60
Capabilities:
Enumerate pe sections

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x14
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x670e11
mov ebp, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x34]
mov eax, 1
mov ecx, ebp
xor edx, edx
mov dl, byte [edi + 4]
xor ebx, ebx
shl eax, cl
xor ecx, ecx
mov bl, byte [edi + 5]
mov cl, byte [esi]
mov dword [esp + 0x10], ecx
sub ecx, edx
xor edx, edx
mov dl, byte [esi + 1]
mov dword [esp + 0x14], edx
sub edx, ebx
mov dword [esp + 0x30], edx
xor edx, edx
mov dl, byte [esi + 2]
xor ebx, ebx
mov bl, byte [edi + 6]
mov dword [esp + 0x18], edx
sub edx, ebx
xor ebx, ebx
mov bl, byte [edi + 7]
mov dword [esp + 0x2c], edx
xor edx, edx
mov dl, byte [esi + 3]
mov dword [esp + 0x1c], edx
sub edx, ebx
test ecx, ecx
mov dword [esp + 0x20], edx
jge 0x670e11
mov ebx, dword [esp + 0x30]
test ebx, ebx
jge 0x670e11
mov ebx, dword [esp + 0x2c]
test ebx, ebx
jge 0x670e11
test edx, edx
jge 0x670e11
mov ebx, dword [esp + 0x10]
xor edx, edx
mov dl, byte [edi]
sub edx, ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x34], edx
xor edx, edx
mov dl, byte [edi + 1]
sub edx, ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x10], edx
xor edx, edx
mov dl, byte [edi + 2]
sub edx, ebx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x18], edx
xor edx, edx
mov dl, byte [edi + 3]
sub edx, ebx
mov ebx, dword [esp + 0x34]
cmp ebx, eax
jge 0x670e11
cmp dword [esp + 0x10], eax
jge 0x670e11
mov ebx, dword [esp + 0x18]
cmp ebx, eax
jge 0x670e11
cmp edx, eax
jge 0x670e11
neg eax
cmp ecx, eax
jg 0x670da3
cmp dword [esp + 0x30], eax
jg 0x670da3
cmp dword [esp + 0x2c], eax
jg 0x670da3
cmp dword [esp + 0x20], eax
jg 0x670da3
mov eax, dword [esp + 0x34]
test eax, eax
jg 0x670da3
mov eax, dword [esp + 0x10]
test eax, eax
jg 0x670da3
test ebx, ebx
jg 0x670da3
test edx, edx
jg 0x670da3
test ebp, ebp
jne 0x670da3
mov ecx, dword [esp + 0x28]
mov al, byte [esp + 0x38]
pop edi
pop esi
pop ebp
mov byte [ecx + 0x18], al
pop ebx
add esp, 0x14
ret
dec ebp
xor ebx, ebx
mov edx, ebx
mov al, byte [esi]
sar edx, 3
and dl, 1
mov ecx, ebp
shl dl, cl
add dl, al
mov eax, ebx
sar eax, 2
and al, 1
mov byte [esp + 0x30], dl
shl al, cl
mov cl, byte [esi + 1]
mov edx, ebx
sar edx, 1
and dl, 1
add al, cl
mov ecx, ebp
shl dl, cl
mov byte [esp + 0x31], al
mov al, byte [esi + 2]
add dl, al
mov al, bl
and al, 1
mov byte [esp + 0x32], dl
shl al, cl
mov cl, byte [esi + 3]
lea edx, [esp + 0x30]
add al, cl
mov ecx, dword [esp + 0x38]
mov byte [esp + 0x33], al
mov eax, dword [esp + 0x28]
push ecx
push edi
mov ecx, dword [eax + ebx*4]
push ebp
push edx
push ecx
call fcn.00670c60
add esp, 0x14
inc ebx
cmp ebx, 0x10
jl 0x670da6
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x670e20
Capabilities:
Enumerate pe sections

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x14
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x671001
mov ebp, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x34]
mov eax, 1
mov ecx, ebp
xor edx, edx
mov dl, byte [edi + 4]
xor ebx, ebx
shl eax, cl
xor ecx, ecx
mov bl, byte [edi + 5]
mov cl, byte [esi]
mov dword [esp + 0x10], ecx
sub ecx, edx
xor edx, edx
mov dl, byte [esi + 1]
mov dword [esp + 0x14], edx
sub edx, ebx
mov dword [esp + 0x30], edx
xor edx, edx
mov dl, byte [esi + 2]
xor ebx, ebx
mov bl, byte [edi + 6]
mov dword [esp + 0x18], edx
sub edx, ebx
xor ebx, ebx
mov bl, byte [edi + 7]
mov dword [esp + 0x2c], edx
xor edx, edx
mov dl, byte [esi + 3]
mov dword [esp + 0x1c], edx
sub edx, ebx
test ecx, ecx
mov dword [esp + 0x20], edx
jge 0x671001
mov ebx, dword [esp + 0x30]
test ebx, ebx
jge 0x671001
mov ebx, dword [esp + 0x2c]
test ebx, ebx
jge 0x671001
test edx, edx
jge 0x671001
mov ebx, dword [esp + 0x10]
xor edx, edx
mov dl, byte [edi]
sub edx, ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x34], edx
xor edx, edx
mov dl, byte [edi + 1]
sub edx, ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x10], edx
xor edx, edx
mov dl, byte [edi + 2]
sub edx, ebx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x18], edx
xor edx, edx
mov dl, byte [edi + 3]
sub edx, ebx
mov ebx, dword [esp + 0x34]
cmp ebx, eax
jge 0x671001
cmp dword [esp + 0x10], eax
jge 0x671001
mov ebx, dword [esp + 0x18]
cmp ebx, eax
jge 0x671001
cmp edx, eax
jge 0x671001
neg eax
cmp ecx, eax
jg 0x670f93
cmp dword [esp + 0x30], eax
jg 0x670f93
cmp dword [esp + 0x2c], eax
jg 0x670f93
cmp dword [esp + 0x20], eax
jg 0x670f93
mov eax, dword [esp + 0x34]
test eax, eax
jg 0x670f93
mov eax, dword [esp + 0x10]
test eax, eax
jg 0x670f93
test ebx, ebx
jg 0x670f93
test edx, edx
jg 0x670f93
test ebp, ebp
jne 0x670f93
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x38]
pop edi
pop esi
fld dword [ecx]
fadd dword [eax]
pop ebp
pop ebx
fstp dword [eax]
fld dword [ecx + 4]
fadd dword [eax + 4]
fstp dword [eax + 4]
fld dword [ecx + 8]
fadd dword [eax + 8]
fstp dword [eax + 8]
fld dword [ecx + 0xc]
fadd dword [eax + 0xc]
fstp dword [eax + 0xc]
fld dword [ecx + 0x10]
fadd dword [eax + 0x10]
fstp dword [eax + 0x10]
fld dword [ecx + 0x14]
fadd dword [eax + 0x14]
fstp dword [eax + 0x14]
add esp, 0x14
ret
dec ebp
xor ebx, ebx
mov eax, ebx
mov ecx, ebp
sar eax, 3
and al, 1
mov edx, ebx
shl al, cl
mov cl, byte [esi]
sar edx, 2
and dl, 1
add al, cl
mov ecx, ebp
shl dl, cl
mov byte [esp + 0x30], al
mov al, byte [esi + 1]
add dl, al
mov eax, ebx
sar eax, 1
and al, 1
mov byte [esp + 0x31], dl
mov dl, byte [esi + 2]
shl al, cl
add al, dl
mov dl, bl
and dl, 1
mov byte [esp + 0x32], al
mov al, byte [esi + 3]
shl dl, cl
lea ecx, [esp + 0x30]
add dl, al
mov eax, dword [esp + 0x38]
mov byte [esp + 0x33], dl
mov edx, dword [esp + 0x28]
push eax
push edi
mov eax, dword [edx + ebx*4]
push ebp
push ecx
push eax
call fcn.00670e20
add esp, 0x14
inc ebx
cmp ebx, 0x10
jl 0x670f96
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x6728d0
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
push edi
push ebp
sub esp, 0x10
mov edi, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
mov dword [esp + 4], 0
cmp edi, 0x100
jge 0x6728fe
mov edx, dword [edi*4 + 0x7f9f70]
test edx, edx
jne 0x672918
push 1
call fcn.0066a310
pop ecx
mov dword [eax + 4], 9
or eax, 0xffffffff
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret
mov eax, dword [edx]
mov dword [esp + 8], eax
movsx eax, byte [edx + 4]
test eax, eax
je 0x67296b
xor esi, esi
xor eax, eax
jmp 0x672938
cmp byte [eax + ebp], 0xa
jne 0x672937
inc esi
inc eax
cmp eax, ebx
jb 0x672930
lea eax, [esi + ebx]
push eax
call fcn.006618c0
pop ecx
mov dword [esp + 4], eax
mov ecx, eax
xor edx, edx
jmp 0x672961
cmp byte [edx + ebp], 0xa
jne 0x67295a
mov byte [ecx], 0xd
inc ecx
mov al, byte [edx + ebp]
mov byte [ecx], al
inc ecx
inc edx
cmp edx, ebx
jb 0x672950
add ebx, esi
mov ebp, dword [esp + 4]
mov eax, dword [edi*4 + 0x7f9f70]
cmp byte [eax + 5], 0
je 0x672985
push 2
push 0
push edi
call fcn.00672860
add esp, 0xc
push 0
lea eax, [esp + 0x10]
push eax
push ebx
push ebp
push dword [esp + 0x18]
call dword [sym.imp.kernel32.dll_WriteFile]
mov esi, eax
cmp dword [esp + 4], 0
je 0x6729ab
push dword [esp + 4]
call fcn.006618f0
pop ecx
test esi, esi
je 0x6729c0
mov eax, dword [esp + 0xc]
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret
call dword [fcn.00a1215c]
mov dword [0xa0cfe8], eax
xor eax, eax
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x672a40
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
push edi
push ebp
sub esp, 8
cmp dword [esp + 0x1c], 0x100
jge 0x672a60
mov eax, dword [esp + 0x1c]
mov edx, dword [eax*4 + 0x7f9f70]
test edx, edx
jne 0x672a80
push 1
call fcn.0066a310
pop ecx
mov dword [eax + 4], 9
or eax, 0xffffffff
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
ret
movsx ebx, byte [edx + 4]
push 0
lea eax, [esp + 8]
push eax
push dword [esp + 0x2c]
push dword [esp + 0x2c]
mov eax, dword [edx]
push eax
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x672b30
cmp dword [esp + 4], 0
je 0x672b22
test ebx, ebx
je 0x672b22
mov esi, dword [esp + 0x20]
mov ecx, esi
xor ebx, ebx
xor ebp, ebp
jmp 0x672ae5
mov al, byte [ecx]
cmp al, 0xd
jne 0x672ae0
mov edx, dword [esp + 4]
dec edx
cmp edi, edx
jae 0x672ae0
cmp byte [ecx + 1], 0xa
jne 0x672ae0
inc ecx
inc ebx
jmp 0x672ae4
mov byte [esi], al
inc ecx
inc esi
inc ebp
mov edi, ebp
cmp edi, dword [esp + 4]
jb 0x672ac0
mov eax, dword [esp + 0x24]
cmp dword [esp + 4], eax
jne 0x672b1e
cmp dword [esp + 4], 1
jbe 0x672b1e
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x20]
cmp byte [ecx + eax - 1], 0xd
jne 0x672b1e
push 1
push 0xffffffffffffffff
push dword [esp + 0x24]
call fcn.00672860
add esp, 0xc
inc ebx
sub dword [esp + 4], ebx
mov eax, dword [esp + 4]
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
ret
call dword [fcn.00a1215c]
mov dword [0xa0cfe8], eax
xor eax, eax
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x401380
Capabilities:
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x4087b8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
lea eax, [esp + 8]
mov dword [esp + 8], 0
push eax
push 0x40d118
push 0x80000002
mov dword [esp + 0x10], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov eax, dword [esp + 8]
test eax, eax
je 0x4014db
lea ecx, [esp + 4]
push esi
push ecx
push 0x40d108
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
push str.C:OKGFileOKGCon.exe
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::CString_2
push 1
lea ecx, [esp + 8]
mov dword [esp + 0x1c], 0
call sub.MFC42.DLL_CString::GetBuffer
mov edx, dword [esp + 4]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [edx - 8]
inc ecx
push ecx
push eax
mov eax, dword [esp + 0x10]
push 1
push 0
push str.DisplayIcon
push eax
call esi
push 0x40d108
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::operator_1
push 1
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esp + 4]
mov edx, dword [esp + 8]
mov ecx, dword [ecx - 8]
inc ecx
push ecx
push eax
push 1
push 0
push str.DisplayName
push edx
call esi
push str.2.09
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::operator_1
push 1
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esp + 4]
mov edx, dword [esp + 8]
mov ecx, dword [ecx - 8]
inc ecx
push ecx
push eax
push 1
push 0
push str.DisplayVersion
push edx
call esi
push str.C:OKGFileUninst.exe
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::operator_1
push 0xa
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esp + 4]
mov edx, dword [esp + 8]
mov ecx, dword [ecx - 8]
inc ecx
push ecx
push eax
push 1
push 0
push str.UninstallString
push edx
call esi
mov eax, dword [esp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call esi
mov ecx, dword [esp + 0xc]
push ecx
call esi
lea ecx, [esp + 4]
mov dword [esp + 0x18], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop esi
mov eax, dword [0x40dc98]
push 0x40dc8c
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
je 0x401502
mov edx, dword [0x40dc98]
push edx
call fcn.004023f0
add esp, 4
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
Function at 0x401600
Capabilities:
Create shortcut via ishelllink
Get common file path

Disassembly:
sub esp, 0x210
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [esp]
push eax
push 0x40b670
push 1
push 0
push 0x40b660
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x40172c
mov eax, dword [esp]
mov edx, dword [esp + 0x214]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x50]
mov eax, dword [esp]
mov edx, dword [esp + 0x220]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [esp]
mov edx, dword [esp + 0x21c]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov al, byte [esp + 0x224]
test al, al
je 0x4016d2
push ebx
push esi
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, str.HH.exe
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x10]
mov ecx, ebx
and ecx, 3
lea edx, [esp + 0x18]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x44]
pop edi
pop esi
pop ebx
mov eax, dword [esp]
lea edx, [esp + 4]
push edx
push 0x40b680
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jl 0x401722
mov ecx, dword [esp + 0x218]
lea eax, [esp + 8]
push 0x104
push eax
push 0xffffffffffffffff
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esp + 4]
lea ecx, [esp + 8]
push 1
push ecx
mov edx, dword [eax]
push eax
call dword [edx + 0x18]
mov eax, dword [esp + 4]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [esp]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
add esp, 0x210
ret
Function at 0x401740
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x408803
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x210
push ebx
push ebp
push esi
push edi
xor ebx, ebx
lea ecx, [esp + 0x10]
mov dword [esp + 0x228], ebx
call fcn.0040809a
mov edx, dword [esp + 0x230]
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x18]
mov ebp, dword [edx - 8]
lea esi, [esp + 0x18]
rep stosd dword es:[edi], eax
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x14], esi
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x14]
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push edx
and ecx, 3
mov byte [esp + 0x230], 1
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
call esi
cmp eax, 1
jne 0x4017f7
lea ecx, [esp + 0x10]
mov byte [esp + 0x228], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x230]
mov dword [esp + 0x228], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
jmp 0x4018a3
sub ebp, 2
cmp ebp, ebx
jle 0x401810
cmp byte [esp + ebp + 0x18], 0x5c
je 0x40180e
mov byte [esp + ebp + 0x18], bl
dec ebp
cmp ebp, ebx
jg 0x4017fe
cmp ebp, ebx
je 0x40187a
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator_1
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x18], esp
push edx
call sub.MFC42.DLL_CString::CString_1
call fcn.00401740
add esp, 4
cmp eax, ebx
je 0x40187a
mov eax, dword [esp + 0x230]
push ebx
push eax
call esi
test eax, eax
mov byte [esp + 0x228], bl
lea ecx, [esp + 0x10]
je 0x401885
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x230]
mov dword [esp + 0x228], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
jmp 0x4018a3
mov byte [esp + 0x228], bl
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x230]
mov dword [esp + 0x228], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [esp + 0x220]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x21c
ret
Function at 0x401d30
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x408888
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
lea ecx, [esp + 4]
call fcn.0040809a
mov eax, dword [esp + 0x18]
lea ecx, [esp + 4]
push eax
push str..PhysicalDrive_d
push ecx
mov dword [esp + 0x1c], 0
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x10]
add esp, 0xc
push 0
push 0
push 3
push 0
push 3
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401df8
mov eax, dword [esp + 0x1c]
push edi
mov ecx, eax
push 0
shr eax, 0x17
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
shl ecx, 9
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x20]
push 0
shl edx, 9
push ecx
push edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 8]
mov dword [esp + 0x14], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret
lea ecx, [esp + 4]
mov dword [esp + 0x10], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 8]
xor eax, eax
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x402140
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
sub esp, 0x1c
push ebp
push esi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
test ebp, ebp
je 0x4021e8
push 0xf01ff
push str.SIoctl
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x4021e1
push ebx
lea eax, [esp + 0xc]
push edi
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4021c2
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea ecx, [esp + 0x10]
push ecx
push esi
call ebx
test eax, eax
je 0x4021c2
cmp dword [esp + 0x14], 3
jne 0x4021c2
push 0x3e8
call edi
lea edx, [esp + 0x10]
push edx
push esi
call ebx
test eax, eax
jne 0x4021a8
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
call esi
push ebp
call esi
mov eax, edi
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x1c
ret
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
xor eax, eax
pop ebp
add esp, 0x1c
ret
Function at 0x4021f0
Capabilities:
Create service
Get common file path
Start service

Disassembly:
push 0xffffffffffffffff
push 0x4088cb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x108
push esi
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0xc]
push 0x104
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString_2
push str.Drivers_sioctl.sys
lea ecx, [esp + 0xc]
mov dword [esp + 0x11c], 0
call sub.MFC42.DLL_CString::operator
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x4022e2
mov edx, dword [esp + 8]
push 0
push 0
push 0x40dc8c
push 0
push 0
push edx
push 1
push 3
push 1
push 0xf01ff
push str.SIoctl
push str.SIoctl
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
test esi, esi
je 0x4022e2
push ebx
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, eax
call esi
push edi
call esi
lea ecx, [esp + 0xc]
mov dword [esp + 0x11c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, ebx
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x108]
mov dword fs:[0], ecx
add esp, 0x114
ret
lea ecx, [esp + 8]
mov dword [esp + 0x118], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x110]
pop edi
xor eax, eax
pop esi
mov dword fs:[0], ecx
add esp, 0x114
ret
Function at 0x4023f0
Capabilities:
Get common file path
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4088eb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30c
push ebx
push esi
push edi
push str.C:SOSGhostOKGUP.OKD
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push eax
mov dword [esp + 0x33c], 0
call esi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4024a6
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x14]
push 0x104
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edx, [esp + 0x14]
lea ecx, [esp + 0xc]
push edx
call sub.MFC42.DLL_CString::operator_1
push str.OKGUP.OKD
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator
mov eax, dword [esp + 0xc]
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push eax
call esi
mov ebx, eax
cmp ebx, 0xffffffff
je 0x402511
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x118]
lea edx, [esp + 0x118]
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x328]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x118]
push ecx
call fcn.00403210
add esp, 4
lea edx, [esp + 0x10]
lea eax, [esp + 0x118]
push 0
push edx
push 0x200
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0xc]
mov dword [esp + 0x320], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x318]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x318
ret
Function at 0x402540
Capabilities:
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x408908
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
push edi
call fcn.004030d0
cmp al, 5
mov byte [0x40d030], al
je 0x40262d
cmp al, 6
je 0x40262d
lea ecx, [esp + 8]
call fcn.0040809a
push str..PhysicalDrive0
lea ecx, [esp + 0xc]
mov dword [esp + 0x1c], 0
call sub.MFC42.DLL_CString::operator_1
mov eax, dword [esp + 8]
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402609
push 0
push 0
push 0x7000
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0xc]
push 0
push ecx
push 0x200
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 8]
mov dword [esp + 0x18], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
lea ecx, [esp + 8]
mov dword [esp + 0x18], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
call fcn.004021f0
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0xc8
call esi
mov eax, dword [esp + 0x20]
push eax
push 1
push 0x38
call fcn.00402310
add esp, 0xc
mov edi, eax
push 0xc8
call esi
call fcn.00402140
mov ecx, dword [esp + 0x10]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret