joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40bc20
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x808
mov eax, dword [0x4ae7ec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x40bc40
cmp word [eax], 0
jne 0x40bc53
mov eax, 0x51
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x808]
xor ecx, ecx
sub edx, eax
push esi
mov edi, edi
cmp ecx, 0x400
jae 0x40bc79
mov si, word [eax]
mov word [edx + eax], si
add eax, 2
inc ecx
cmp word [eax], 0
jne 0x40bc60
xor eax, eax
mov word [ebp + ecx*2 - 0x808], ax
lea ecx, [ebp - 0x808]
push 0x434fc4
push ecx
call fcn.00418d2c
add esp, 8
test eax, eax
je 0x40bcfb
add eax, 4
je 0x40bce7
mov ecx, eax
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x40bca5
sub ecx, esi
sar ecx, 1
mov edx, 0
je 0x40bce7
jmp 0x40bcc0
cmp word [eax + edx*2], 0x5c
je 0x40bce0
inc edx
cmp edx, ecx
jb 0x40bcc0
mov eax, 0x51
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
lea esi, [eax + edx*2]
test esi, esi
jne 0x40bd4d
mov eax, 0x51
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x808]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40bd04
sub eax, edx
xor ecx, ecx
sar eax, 1
je 0x40bd42
mov edx, 0x3a
lea esp, [esp]
cmp word [ebp + ecx*2 - 0x808], dx
je 0x40bd37
inc ecx
cmp ecx, eax
jb 0x40bd20
lea esi, [ebp - 0x808]
jmp 0x40bd4d
lea esi, [ebp + ecx*2 - 0x808]
test esi, esi
jne 0x40bd4a
lea esi, [ebp - 0x808]
jmp 0x40bd4d
add esi, 2
cmp word [esi], 0x5c
jne 0x40bd56
add esi, 2
cmp word [esi], 0
push ebx
push edi
je 0x40be46
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov eax, esi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40bd70
sub eax, edx
sar eax, 1
mov ecx, 0
je 0x40bd92
cmp word [esi + ecx*2], 0x5c
je 0x40bd96
inc ecx
cmp ecx, eax
jb 0x40bd86
xor esi, esi
jmp 0x40bda2
lea esi, [esi + ecx*2]
test esi, esi
je 0x40bda2
xor edx, edx
mov word [esi], dx
cmp word [ebp - 0x808], 0
je 0x40be1a
push 4
lea edi, [ebp - 0x808]
mov eax, edi
push 0x4352f4
push eax
call fcn.00419aab
add esp, 0xc
test eax, eax
jne 0x40bdce
lea edi, [ebp - 0x800]
push 0x2a
push edi
call fcn.004173c3
add esp, 8
test eax, eax
jne 0x40bdfe
push 0x3f
push edi
call fcn.004173c3
add esp, 8
test eax, eax
jne 0x40bdfe
lea ecx, [ebp - 0x808]
push ecx
call ebx
cmp eax, 0xffffffff
je 0x40bdfe
test al, 0x10
je 0x40be59
cmp word [ebp - 0x808], 0
je 0x40be1a
lea edx, [ebp - 0x808]
push edx
call ebx
cmp eax, 0xffffffff
je 0x40be1a
test al, 0x10
jne 0x40be2d
push 0
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40be59
test esi, esi
je 0x40be46
mov ecx, 0x5c
mov word [esi], cx
add esi, 2
cmp word [esi], 0
jne 0x40bd68
pop edi
pop ebx
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
pop ebx
xor ecx, ebp
mov eax, 1
pop esi
call fcn.004171f3
mov esp, ebp
pop ebp
ret
Function at 0x40c310
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, 0x50
test edi, edi
jne 0x40c32d
pop edi
lea eax, [esi + 1]
pop esi
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [ebp + 0xc]
test ebx, ebx
jne 0x40c33f
lea eax, [ebx + 0x51]
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
call sym.SelectBehaviorsExe.exe_TM_IsWinNT
test eax, eax
je 0x40c3c6
push 0x4353ac
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
jne 0x40c374
push str.Unable_to_load_library_shell32.dll
push 0x4353dc
call fcn.0040b0a0
add esp, 8
pop ebx
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
push str.SHGetSpecialFolderPathA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40c3a4
push 0
push 0x26
push edi
push 0
call eax
mov esi, eax
neg esi
sbb esi, esi
push ebx
inc esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop ebx
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
push str.Unable_to_import_function__SHGetSpecialFolderPath_
push 0x4353dc
call fcn.0040b0a0
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop ebx
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
lea eax, [ebp + 8]
push eax
push 0x20019
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40c413
lea ecx, [ebp - 4]
push ecx
push edi
lea edx, [ebp - 8]
push edx
push eax
mov eax, dword [ebp + 8]
push str.ProgramFilesDir
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [ebp + 8]
mov esi, eax
neg esi
sbb esi, esi
push ecx
neg esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40c6e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
mov eax, dword [0x4ae7ec]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
je 0x40c7d2
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x40c7d2
push ebx
push 0x401
lea eax, [ebp - 0x408]
push eax
mov byte [ebp - 0x408], 0
mov ebx, 1
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x40c7bf
push ebx
lea ecx, [ebp - 0x408]
push 0x5c
push ecx
call sym.SelectBehaviorsExe.exe_TM_SearchCharA
add esp, 0xc
test eax, eax
je 0x40c770
push edi
inc eax
push eax
lea edx, [ebp - 0x408]
push edx
push esi
call sym.SelectBehaviorsExe.exe_TM_CopyStringExA
add esp, 0x10
xor ebx, ebx
mov eax, ebx
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
push 1
lea eax, [ebp - 0x408]
push 0x3a
push eax
call sym.SelectBehaviorsExe.exe_TM_SearchCharA
add esp, 0xc
test eax, eax
je 0x40c7b8
push edi
inc eax
push eax
lea ecx, [ebp - 0x408]
push ecx
push esi
call sym.SelectBehaviorsExe.exe_TM_CopyStringExA
push edi
push 0x5c
push esi
call sym.SelectBehaviorsExe.exe_TM_AddCharToString
add esp, 0x1c
xor ebx, ebx
mov eax, ebx
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov word [esi], 0x5c
xor ebx, ebx
mov eax, ebx
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov eax, 0x51
pop esi
call fcn.004171f3
mov esp, ebp
pop ebp
ret

Function at 0x40c7f0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
mov eax, dword [0x4ae7ec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
test eax, eax
je case.default.0x40c887
xor ecx, ecx
cmp byte [eax], cl
je 0x40c835
push esi
lea esi, [ebp - 0x408]
sub esi, eax
lea ecx, [ecx]
cmp ecx, 0x400
jae 0x40c834
mov dl, byte [eax]
mov byte [esi + eax], dl
inc eax
inc ecx
cmp byte [eax], 0
jne 0x40c820
pop esi
lea eax, [ebp - 0x408]
mov byte [ebp + ecx - 0x408], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c846
sub eax, edx
lea ecx, [eax + 1]
cmp ecx, 0x401
jae 0x40c874
cmp byte [ebp + eax - 0x409], 0x5c
je 0x40c874
mov byte [ebp + eax - 0x408], 0x5c
mov byte [ebp + eax - 0x407], 0
lea edx, [ebp - 0x408]
push edx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
dec eax
cmp eax, 5
ja case.default.0x40c887
jmp dword [eax*4 + 0x40c910]
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov eax, 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov eax, 3
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov eax, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov eax, 5
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov eax, 6
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.004171f3
mov esp, ebp
pop ebp
ret
Function at 0x40c930
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x808
mov eax, dword [0x4ae7ec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
test eax, eax
je case.default.0x40c9df
xor ecx, ecx
cmp word [eax], cx
je 0x40c97a
lea edx, [ebp - 0x808]
sub edx, eax
push esi
mov edi, edi
cmp ecx, 0x400
jae 0x40c979
mov si, word [eax]
mov word [edx + eax], si
add eax, 2
inc ecx
cmp word [eax], 0
jne 0x40c960
pop esi
xor eax, eax
mov word [ebp + ecx*2 - 0x808], ax
lea eax, [ebp - 0x808]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40c990
sub eax, edx
sar eax, 1
lea ecx, [eax + 1]
cmp ecx, 0x401
jae 0x40c9cc
cmp word [ebp + eax*2 - 0x80a], 0x5c
je 0x40c9cc
mov edx, 0x5c
xor ecx, ecx
mov word [ebp + eax*2 - 0x808], dx
mov word [ebp + eax*2 - 0x806], cx
lea edx, [ebp - 0x808]
push edx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
dec eax
cmp eax, 5
ja case.default.0x40c9df
jmp dword [eax*4 + 0x40ca68]
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov eax, 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov eax, 3
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov eax, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov eax, 5
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov eax, 6
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.004171f3
mov esp, ebp
pop ebp
ret
Function at 0x40cb60
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x43c
mov eax, dword [0x4ae7ec]
xor eax, esp
mov dword [esp + 0x438], eax
mov edx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 0x10]
mov dword [esp + 0xc], edi
test edx, edx
jne 0x40cba8
mov eax, 0x51
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x438]
xor ecx, esp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x40cb8e
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cbb1
sub eax, esi
je 0x40cbdf
cmp byte [edx + eax - 1], 0x3a
jne 0x40cbdf
push 0x5c
push edx
push 0x43554c
lea eax, [esp + 0x44]
push 0x401
push eax
call sym.SelectBehaviorsExe.exe_TM_FormatString
add esp, 0x14
jmp 0x40cbf2
push 0x401
push edx
lea ecx, [esp + 0x40]
push ecx
call sym.SelectBehaviorsExe.exe_TM_CopyStringA
add esp, 0xc
push 0x435554
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x40cc76
push str.GetDiskFreeSpaceExA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40cc76
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0x44]
push ecx
call eax
test eax, eax
je 0x40ccfc
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
push 0
push 0x100000
push edx
push eax
call fcn.00430ee0
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push 0
push 0x100000
push ecx
push edx
mov dword [ebx], eax
call fcn.00430ee0
mov dword [edi], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x438]
xor ecx, esp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x40ccfc
mov eax, dword [esp + 0x10]
mul dword [esp + 0x1c]
mov edi, edx
mov edx, dword [esp + 0x18]
push edi
mov esi, eax
push esi
push 0
push edx
call fcn.00428e20
push 0
push 0x100000
push edx
push eax
call fcn.00430ee0
push edi
push esi
mov dword [ebx], eax
mov eax, dword [esp + 0x1c]
push 0
push eax
call fcn.00428e20
push 0
push 0x100000
push edx
push eax
call fcn.00430ee0
mov ecx, dword [esp + 0xc]
mov dword [ecx], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x438]
xor ecx, esp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x444]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.004171f3
mov esp, ebp
pop ebp
ret
Function at 0x40cd20
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x83c
mov eax, dword [0x4ae7ec]
xor eax, esp
mov dword [esp + 0x838], eax
mov edx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 0x10]
mov dword [esp + 0xc], edi
test edx, edx
jne 0x40cd68
mov eax, 0x51
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x838]
xor ecx, esp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x40cd4e
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40cd71
sub eax, esi
sar eax, 1
je 0x40cda6
cmp word [edx + eax*2 - 2], 0x3a
jne 0x40cda6
push 0x5c
push edx
push str._s_c
lea eax, [esp + 0x44]
push 0x401
push eax
call sym.SelectBehaviorsExe.exe_TM_FormatStringW
add esp, 0x14
jmp 0x40cdb9
push 0x401
push edx
lea ecx, [esp + 0x40]
push ecx
call sym.SelectBehaviorsExe.exe_TM_CopyStringW
add esp, 0xc
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40ce3d
push str.GetDiskFreeSpaceExW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40ce3d
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0x44]
push ecx
call eax
test eax, eax
je 0x40cec3
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
push 0
push 0x100000
push edx
push eax
call fcn.00430ee0
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push 0
push 0x100000
push ecx
push edx
mov dword [ebx], eax
call fcn.00430ee0
mov dword [edi], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x838]
xor ecx, esp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
je 0x40cec3
mov eax, dword [esp + 0x10]
mul dword [esp + 0x1c]
mov edi, edx
mov edx, dword [esp + 0x18]
push edi
mov esi, eax
push esi
push 0
push edx
call fcn.00428e20
push 0
push 0x100000
push edx
push eax
call fcn.00430ee0
push edi
push esi
mov dword [ebx], eax
mov eax, dword [esp + 0x1c]
push 0
push eax
call fcn.00428e20
push 0
push 0x100000
push edx
push eax
call fcn.00430ee0
mov ecx, dword [esp + 0xc]
mov dword [ecx], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x838]
xor ecx, esp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x844]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.004171f3
mov esp, ebp
pop ebp
ret
Function at 0x40cee0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1c44
call fcn.00429400
mov eax, dword [0x4ae7ec]
xor eax, esp
mov dword [esp + 0x1c40], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [esp + 0x10], eax
test eax, eax
jne 0x40cf26
mov eax, 0x51
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1c40]
xor ecx, esp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
xor eax, eax
cmp eax, 0x400
jae 0x40cf46
mov cl, byte [eax + 0x4355b4]
mov byte [esp + eax + 0x1438], cl
inc eax
cmp byte [eax + 0x4355b4], 0
jne 0x40cf28
mov byte [esp + eax + 0x1438], 0
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov bl, byte [esp + 0x1438]
mov dword [esp + 0xc], eax
cmp bl, 0x5a
jg 0x40d0f8
mov esi, dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointA]
mov edi, dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
push 0x1414
lea edx, [esp + 0x24]
push 0
push edx
call fcn.004219f0
add esp, 0xc
test byte [esp + 0xc], 1
je 0x40d0e2
xor eax, eax
test bl, bl
je 0x40cfbd
lea esp, [esp]
cmp eax, 0x400
jae 0x40cfbd
mov cl, byte [esp + eax + 0x1438]
mov byte [esp + eax + 0x20], cl
inc eax
cmp byte [esp + eax + 0x1438], 0
jne 0x40cfa0
mov byte [esp + eax + 0x20], 0
xor eax, eax
test bl, bl
je 0x40cfe8
cmp eax, 0x400
jae 0x40cfe8
mov dl, byte [esp + eax + 0x1438]
mov byte [esp + eax + 0x1840], dl
inc eax
cmp byte [esp + eax + 0x1438], 0
jne 0x40cfc8
mov byte [esp + eax + 0x1840], 0
lea eax, [esp + 0x1840]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d000
sub eax, edx
lea ecx, [eax + 1]
cmp ecx, 0x401
jae 0x40d024
mov byte [esp + eax + 0x1840], 0x5c
mov byte [esp + eax + 0x1841], 0
lea edx, [esp + 0x1438]
push edx
call sym.SelectBehaviorsExe.exe_TM_GetDriveTypeA
add esp, 4
mov dword [esp + 0x1430], eax
push 0x401
lea eax, [esp + 0x425]
push eax
lea ecx, [esp + 0x1848]
push ecx
call esi
push 0x401
lea edx, [esp + 0x1028]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push edx
push 0x401
lea eax, [esp + 0xc3b]
push eax
lea ecx, [esp + 0x185c]
push ecx
call edi
push 0x401
lea edx, [esp + 0x826]
push edx
lea eax, [esp + 0x1440]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
lea ecx, [esp + 0x142c]
push ecx
lea edx, [esp + 0x142c]
push edx
lea eax, [esp + 0x1440]
push eax
call sym.SelectBehaviorsExe.exe_TM_GetDiskSizeA
mov edx, dword [esp + 0x1c]
add esp, 0xc
push 0
push 0
push 0x1414
lea ecx, [esp + 0x2c]
push ecx
push edx
call sym.SelectBehaviorsExe.exe_TM_ListAddEx2
mov bl, byte [esp + 0x144c]
add esp, 0x14
shr dword [esp + 0xc], 1
inc bl
mov byte [esp + 0x1438], bl
cmp bl, 0x5a
jle 0x40cf74
mov ecx, dword [esp + 0x1c4c]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.004171f3
mov esp, ebp
pop ebp
ret
Function at 0x40d4c0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
mov eax, dword [0x4ae7ec]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
xor eax, eax
test ecx, ecx
je 0x40d593
cmp eax, 0x400
jae 0x40d4fe
mov dl, byte [eax + 0x4355b4]
mov byte [ebp + eax - 0x408], dl
inc eax
cmp byte [eax + 0x4355b4], 0
jne 0x40d4e0
mov byte [ebp + eax - 0x408], 0
mov eax, 0x4af62c
push ebx
mov bl, byte [ecx]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d511
xor ecx, ecx
sub eax, edx
je 0x40d52d
mov edi, edi
cmp bl, byte [ecx + 0x4af62c]
je 0x40d5a1
inc ecx
cmp ecx, eax
jb 0x40d520
mov byte [ebp - 0x409], bl
push esi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov bl, byte [ebp - 0x408]
mov dword [ebp - 0x410], eax
cmp bl, 0x5a
jg 0x40d58f
mov esi, dword [ebp + 0xc]
mov edi, edi
cmp bl, byte [ebp - 0x409]
jne 0x40d574
test al, 1
je 0x40d574
cmp esi, 0xffffffff
je 0x40d5af
lea ecx, [ebp - 0x408]
push ecx
call sym.SelectBehaviorsExe.exe_TM_GetDriveTypeA
add esp, 4
cmp eax, esi
je 0x40d5af
mov eax, dword [ebp - 0x410]
inc bl
shr eax, 1
mov byte [ebp - 0x408], bl
mov dword [ebp - 0x410], eax
cmp bl, 0x5a
jle 0x40d550
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov al, byte [ecx + 0x4af610]
mov byte [ebp - 0x409], al
jmp 0x40d533
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.004171f3
mov esp, ebp
pop ebp
ret

Function at 0x40d5d0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc1c
mov eax, dword [0x4ae7ec]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x40d6df
push 2
push 0x434fac
push esi
call fcn.0041795f
add esp, 0xc
test eax, eax
je 0x40d61d
mov al, byte [esi]
mov byte [ebp - 0x408], al
mov word [ebp - 0x407], 0x5c3a
mov byte [ebp - 0x405], 0
jmp 0x40d681
xor ecx, ecx
cmp byte [esi], cl
je 0x40d645
push edi
lea edi, [ebp - 0x408]
mov eax, esi
sub edi, esi
mov edi, edi
cmp ecx, 0x400
jae 0x40d644
mov dl, byte [eax]
mov byte [edi + eax], dl
inc eax
inc ecx
cmp byte [eax], 0
jne 0x40d630
pop edi
lea eax, [ebp - 0x408]
mov byte [ebp + ecx - 0x408], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d656
sub eax, edx
je 0x40d681
cmp byte [ebp + eax - 0x409], 0x5c
je 0x40d681
push 0x401
lea eax, [ebp - 0x408]
push 0x5c
push eax
call sym.SelectBehaviorsExe.exe_TM_AddCharToString
add esp, 0xc
push 0x401
lea ecx, [ebp - 0xc10]
push ecx
lea edx, [ebp - 0xc14]
push edx
lea eax, [ebp - 0xc1c]
push eax
lea ecx, [ebp - 0xc18]
push ecx
push 0x401
lea edx, [ebp - 0x80c]
push edx
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
je 0x40d6df
test dword [ebp - 0xc14], 0x80000
je 0x40d6df
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
pop esi
call fcn.004171f3
mov esp, ebp
pop ebp
ret
Function at 0x40d6f0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80c
mov eax, dword [0x4ae7ec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
mov byte [ebp - 0x80c], bl
cmp eax, ebx
jne 0x40d728
lea eax, [ebp - 0x80c]
push eax
push 0x401
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
jmp 0x40d73d
push 0x401
push eax
lea ecx, [ebp - 0x80c]
push ecx
call sym.SelectBehaviorsExe.exe_TM_CopyStringA
add esp, 0xc
cmp byte [ebp - 0x80c], bl
je 0x40d840
xor eax, eax
jmp 0x40d750
cmp eax, 0x400
jae 0x40d76d
mov dl, byte [eax + 0x4355b4]
mov byte [ebp + eax - 0x408], dl
inc eax
cmp byte [eax + 0x4355b4], bl
jne 0x40d750
mov byte [ebp + eax - 0x408], bl
lea eax, [ebp - 0x80c]
push 0x3a
push eax
call fcn.00417dc0
add esp, 8
cmp eax, ebx
je 0x40d80a
xor ecx, ecx
cmp byte [ebp - 0x80c], bl
je 0x40d7c0
cmp ecx, 0x400
jae 0x40d7c0
lea edx, [ebp + ecx - 0x80c]
lea esi, [eax + 1]
cmp edx, esi
je 0x40d7c0
mov dl, byte [edx]
mov byte [ebp + ecx - 0x408], dl
inc ecx
cmp byte [ebp + ecx - 0x80c], bl
jne 0x40d797
lea eax, [ebp - 0x408]
mov byte [ebp + ecx - 0x408], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40d7d0
sub eax, edx
cmp eax, 2
jne 0x40d7f1
mov eax, dword [ebp - 0x408]
push eax
call sym.SelectBehaviorsExe.exe_TM_ToUpperA
add esp, 4
mov bl, al
jmp 0x40d810
push 0x401
lea ecx, [ebp - 0x408]
push 0x4355b4
push ecx
call sym.SelectBehaviorsExe.exe_TM_CopyStringA
add esp, 0xc
mov bl, byte [ebp - 0x408]
cmp bl, 0x5a
jge 0x40d840
mov esi, dword [ebp + 0xc]
jmp 0x40d820
lea edx, [ebp - 0x408]
inc bl
push edx
mov byte [ebp - 0x408], bl
call sym.SelectBehaviorsExe.exe_TM_GetDriveTypeA
add esp, 4
cmp eax, esi
je 0x40d852
cmp bl, 0x5a
jl 0x40d820
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.004171f3
mov esp, ebp
pop ebp
ret