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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x460
push ebx
push esi
mov esi, dword [sym.imp.MSVCRT.dll_wcslen]
push edi
push dword [ebp + 8]
call esi
mov ebx, dword [ebp + 0xc]
mov edi, eax
pop ecx
dec edi
push dword [ebp + 8]
dec edi
mov dword [ebx], edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4ad086d8
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
jmp 0x4ad08849
test al, 0x10
je 0x4ad08854
push dword [ebp + 8]
call esi
pop ecx
mov ecx, dword [ebp + 8]
cmp word [ecx + eax*2 - 2], 0x5c
lea eax, [ecx + eax*2]
jne 0x4ad08700
and word [eax + 2], 0
mov word [eax], 0x2a
jmp 0x4ad08710
and word [eax + 4], 0
mov word [eax], 0x5c
mov word [eax + 2], 0x2a
lea eax, [ebp - 0x258]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x4ad08744
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xffffffffffffffff
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp esi, 2
je 0x4ad08854
jmp 0x4ad08841
mov dword [ebp + 0xc], 1
lea eax, [ebp - 0x22c]
push 0x4ad01438
push eax
call dword [sym.imp.MSVCRT.dll_wcscmp]
pop ecx
test eax, eax
pop ecx
je 0x4ad0880f
lea eax, [ebp - 0x22c]
push 0x4ad01430
push eax
call dword [sym.imp.MSVCRT.dll_wcscmp]
pop ecx
test eax, eax
pop ecx
je 0x4ad0880f
test byte [ebp - 0x258], 0x10
jne 0x4ad087ea
push dword [ebp + 8]
lea eax, [ebp - 0x460]
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
pop ecx
lea eax, [ebp - 0x460]
pop ecx
push eax
call esi
and word [ebp + eax*2 - 0x462], 0
pop ecx
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x460]
push eax
call dword [sym.imp.MSVCRT.dll_wcscat]
pop ecx
lea eax, [ebp - 8]
pop ecx
push eax
lea eax, [ebp - 0x460]
push eax
call fcn.4ad0869b
test eax, eax
je 0x4ad0882a
mov eax, dword [ebp - 8]
mov ecx, dword [ebx]
add eax, edi
cmp ecx, eax
jle 0x4ad0880d
mov eax, ecx
jmp 0x4ad0880d
mov eax, dword [ebx]
mov dword [ebp + 0xc], eax
lea eax, [ebp - 0x22c]
push eax
call esi
cmp dword [ebp + 0xc], eax
pop ecx
jle 0x4ad08803
mov eax, dword [ebp + 0xc]
jmp 0x4ad0880d
lea eax, [ebp - 0x22c]
push eax
call esi
pop ecx
mov dword [ebx], eax
lea eax, [ebp - 0x258]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
mov dword [ebp + 0xc], eax
jne 0x4ad0874b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 0xc], 0
jne 0x4ad08850
cmp esi, 0x12
je 0x4ad08854
push 0
push esi
call fcn.4ad1393b
pop ecx
pop ecx
xor eax, eax
jmp 0x4ad08857
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x4ad091a3
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
cmp dword [eax], 0
push 2
pop ebx
jne 0x4ad091b7
push 3
pop ebx
mov edi, dword [ebp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
push ebx
push dword [ebp + 0xc]
and dword [edi], 0
push dword [ebp + 8]
call esi
test eax, eax
jne 0x4ad09215
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4ad09211
push 0x23d3
push 0x23d2
push dword [ebp + 0xc]
call fcn.4ad146ed
sub eax, 0
je 0x4ad0920c
dec eax
dec eax
jne 0x4ad091fe
mov eax, dword [ebp + 0x10]
and dword [eax], 0
or ebx, 1
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call esi
jmp 0x4ad09218
push 1
pop eax
jmp 0x4ad0921a
xor eax, eax
jmp 0x4ad0921a
push 1
pop eax
mov dword [edi], eax
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x4ad0d7e9
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
lea eax, [ebp + 8]
push esi
mov esi, dword [ebp + 8]
push eax
push 0x20019
push 0
and dword [esi], 0
push 0x4ad01b00
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4ad0d83d
lea eax, [ebp - 4]
mov dword [ebp - 4], 4
push eax
lea eax, [ebp - 8]
push esi
push eax
push 0
push 0x4ad01ae8
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
leave
ret 4
Function at 0x4ad12003
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 4], 0x1a
mov eax, dword [ecx + 0x1c]
test eax, eax
jne 0x4ad1201c
mov eax, ecx
push eax
call fcn.4ad128d3
mov edi, dword [ebp + 0x14]
mov esi, dword [sym.imp.MSVCRT.dll__get_osfhandle]
test eax, eax
je 0x4ad1204f
push edi
call fcn.4ad14ea0
test eax, eax
jne 0x4ad1204f
push eax
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 4]
push 1
push eax
push edi
call esi
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
test eax, eax
je 0x4ad1208d
test byte [eax + 0x18], 0x80
jne 0x4ad1208d
push edi
call fcn.4ad14ea0
test eax, eax
jne 0x4ad1208d
mov eax, dword [0x4ad1f5b4]
cmp eax, 3
je 0x4ad1208d
cmp dword [ebp + 0x18], 0
je 0x4ad1208d
cmp eax, 2
je 0x4ad1208d
push dword [ebp + 0x18]
push 0
push 0
push edi
call esi
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call fcn.4ad1408a
inc dword [0x4ad1f9d0]
pop edi
pop esi
leave
ret 0x14

Function at 0x4ad12618
Capabilities:
Delete file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 0x14]
xor ebx, ebx
push edi
push ebx
push esi
mov dword [ebp - 4], ebx
push dword [ebp + 0x10]
mov dword [0x4ad1cfe8], ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4ad1265d
cmp dword [esi], ebx
jne 0x4ad1269d
call edi
cmp eax, 0x3e3
jne 0x4ad1269d
call edi
push dword [ebp + 8]
mov dword [0x4ad1d000], eax
call fcn.4ad1408a
push dword [ebp + 0x1c]
call fcn.4ad14ea0
push dword [ebp + 0x1c]
test eax, eax
jne 0x4ad1268b
call fcn.4ad1408a
push dword [ebp + 0x20]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4ad12690
call fcn.4ad1408a
push 1
push dword [0x4ad1d000]
call fcn.4ad12859
mov edx, dword [esi]
cmp edx, ebx
jne 0x4ad126ad
mov dword [0x4ad1d000], ebx
xor eax, eax
jmp 0x4ad12702
mov ecx, dword [ebp + 0x18]
mov eax, dword [ecx + 0x18]
test ah, 0xc0
jne 0x4ad126d2
cmp edx, 2
jb 0x4ad126cc
mov edx, dword [ebp + 0xc]
cmp word [edx], 0xfeff
jne 0x4ad126cc
or ah, 0x40
jmp 0x4ad126cf
or ah, 0x80
mov dword [ecx + 0x18], eax
mov ecx, dword [ecx + 0x18]
mov eax, 0x8002
and ecx, eax
cmp ecx, eax
jne 0x4ad126ff
lea eax, [ebp - 4]
mov edi, dword [esi]
push eax
push esi
push dword [ebp + 0xc]
push 1
call fcn.4ad09c8c
cmp edi, dword [esi]
je 0x4ad126ff
mov dword [0x4ad1cfe8], 1
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x1c
Function at 0x4ad128fb
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
xor esi, esi
push edi
push esi
push 2
push dword [ebp + 8]
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], esi
call fcn.4ad145c9
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x4ad1292e
push 0x6e
call fcn.4ad143d9
push 1
push esi
call fcn.4ad12859
mov esi, dword [ebp + 0xc]
mov edi, dword [sym.imp.MSVCRT.dll__get_osfhandle]
mov ebx, 0x8002
lea eax, [ebp + 8]
push 0
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 4]
call edi
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4ad129a7
mov eax, dword [esi + 0x18]
mov ecx, dword [ebp + 8]
test ah, 0xc0
mov dword [ebp + 0xc], ecx
jne 0x4ad12981
cmp ecx, 2
jbe 0x4ad1297b
mov edx, dword [ebp + 0x10]
cmp word [edx], 0xfeff
jne 0x4ad1297b
or ah, 0x40
jmp 0x4ad1297e
or ah, 0x80
mov dword [esi + 0x18], eax
test ecx, ecx
je 0x4ad129d5
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp + 8]
push eax
mov eax, dword [esi + 0x18]
push dword [ebp + 0x10]
and eax, ebx
sub eax, ebx
neg eax
sbb eax, eax
inc eax
push eax
call fcn.4ad09c8c
mov dword [ebp - 8], eax
jmp 0x4ad129d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
mov dword [0x4ad1d000], eax
call fcn.4ad1408a
push 0
push dword [0x4ad1d000]
call fcn.4ad1393b
pop ecx
pop ecx
push 1
push 0
call fcn.4ad12859
mov ecx, dword [ebp + 8]
cmp ecx, dword [ebp + 0x14]
je 0x4ad1293c
cmp dword [ebp - 8], 0
jne 0x4ad129f9
sub ecx, dword [ebp + 0xc]
push 1
push 0
push ecx
push dword [ebp - 4]
call edi
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x4ad12b1a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
push dword [ebp + 8]
mov dword [ebp - 8], esi
call dword [sym.imp.MSVCRT.dll__get_osfhandle]
xor ebx, ebx
pop ecx
cmp byte [0x4ad1cf78], bl
mov dword [ebp + 8], eax
je 0x4ad12b53
push ebx
push dword [ebp + 0x14]
push esi
push dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4ad12bee
mov eax, dword [ebp + 0xc]
mov edi, 0x4ad23b20
mov dword [ebp + 0xc], eax
mov esi, 0x800
cmp dword [ebp + 0x10], esi
jbe 0x4ad12ba9
push ebx
push ebx
push esi
push edi
push 0x400
push dword [ebp + 0xc]
push ebx
push dword [0x4ad22874]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
add dword [ebp + 0xc], esi
push dword [ebp + 0x14]
sub dword [ebp + 0x10], esi
mov dword [ebp - 4], eax
push eax
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4ad12bdf
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 4]
cmp dword [ecx], eax
je 0x4ad12b63
jmp 0x4ad12bdf
cmp dword [ebp + 0x10], ebx
je 0x4ad12be3
push ebx
push ebx
push esi
push edi
push 0xffffffffffffffff
push dword [ebp + 0xc]
push ebx
push dword [0x4ad22874]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, eax
push ebx
mov ebx, dword [ebp + 0x14]
dec esi
push ebx
push esi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4ad12bdf
cmp dword [ebx], esi
je 0x4ad12be6
xor eax, eax
jmp 0x4ad12bee
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebp - 8]
push 1
mov dword [ebx], eax
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x4ad12bf5
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [sym.imp.MSVCRT.dll__get_osfhandle]
push edi
push dword [ebx]
call esi
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebx]
call fcn.4ad1408a
push 0
push dword [ebp + 0xc]
call fcn.4ad145df
cmp eax, 0xffffffff
mov dword [ebx], eax
je 0x4ad12c98
mov edi, dword [ebp + 0x10]
push 2
mov ecx, edi
push 0
neg ecx
push ecx
push eax
call esi
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp + 8]
push 0
push eax
push edi
push dword [ebp + 0x18]
push dword [ebx]
call esi
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4ad12c5e
cmp dword [ebp + 8], edi
je 0x4ad12c62
push dword [ebx]
jmp 0x4ad12c72
mov esi, dword [ebp + 0x14]
push dword [ebx]
mov ecx, edi
mov edi, dword [ebp + 0x18]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4ad12c7f
call fcn.4ad1408a
or dword [ebx], 0xffffffff
push dword [ebp + 0xc]
jmp 0x4ad12c9b
call fcn.4ad1408a
xor esi, esi
push esi
push 1
push dword [ebp + 0xc]
call fcn.4ad145c9
cmp eax, 0xffffffff
mov dword [ebx], eax
jne 0x4ad12caf
push dword [ebp + 0xc]
push 1
push 0x271f
call fcn.4ad1393b
add esp, 0xc
push 1
pop eax
jmp 0x4ad12cc4
push 2
push esi
push esi
push eax
call dword [sym.imp.MSVCRT.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 0x14
Function at 0x4ad13677
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
push ebx
push esi
push edi
push 0x20
call fcn.4ad0da4c
mov edi, eax
mov eax, dword [ebp + 8]
push edi
mov dword [edi], eax
call fcn.4ad13386
mov eax, dword [edi + 0x14]
mov ebx, dword [edi]
mov esi, dword [edi + 8]
push 0x208
mov dword [ebp - 4], eax
mov dword [ebp + 8], ebx
call fcn.4ad0da4c
push 0
push eax
mov dword [0x4ad1cff0], eax
call fcn.4ad14ffd
push 0x104
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.4ad14d91
test eax, eax
jne 0x4ad1377e
mov ax, word [0x4ad1c744]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.4ad19436
inc eax
inc eax
and word [eax], 0
mov eax, 0x4ad228a0
mov ecx, eax
test ecx, ecx
je 0x4ad13714
lea ecx, [ebp - 0x20c]
test ecx, ecx
je 0x4ad13714
lea ecx, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
pop ecx
pop ecx
test esi, esi
je 0x4ad13783
mov ax, word [esi]
cmp ax, 0x3a
je 0x4ad13783
cmp ax, word [0x4ad1c744]
jne 0x4ad13749
cmp esi, ebx
je 0x4ad13747
push esi
push ebx
call fcn.4ad194ba
mov ax, word [eax]
cmp ax, 0x3a
je 0x4ad13747
cmp ax, word [0x4ad1c744]
jne 0x4ad13749
inc esi
inc esi
push dword [ebp + 8]
mov bx, word [esi]
and word [esi], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4ad13767
and dword [0x4ad1d000], 0
jmp 0x4ad13772
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x4ad1d000], eax
mov word [esi], bx
cmp dword [0x4ad1d000], 0
je 0x4ad13783
push 1
pop eax
jmp 0x4ad13791
push edi
call fcn.4ad13386
mov eax, dword [ebp - 4]
mov dword [edi + 0x14], eax
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x4ad13849
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [ebp + 8]
and word [ebp - 2], 0
add eax, 0x40
push ebx
mov word [ebp - 6], ax
push esi
lea eax, [ebp - 8]
push edi
push eax
mov word [ebp - 8], 0x3d
mov word [ebp - 4], 0x3a
xor bl, bl
call fcn.4ad06377
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov edi, eax
test edi, edi
mov dword [ebp + 8], edi
je 0x4ad1388f
push edi
call esi
mov bl, al
test bl, bl
jne 0x4ad1390b
test edi, edi
mov edi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
je 0x4ad138a4
push 1
call edi
mov dword [ebp - 0xc], eax
mov ax, word [ebp - 6]
push 0x4ad23b00
mov word [ebp - 0x214], ax
mov ax, word [ebp - 4]
mov word [ebp - 0x212], ax
mov ax, word [0x4ad1c744]
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 8]
xor ebx, ebx
push eax
mov word [ebp - 0x20e], bx
call fcn.4ad062e7
lea eax, [ebp - 0x214]
push eax
call esi
test eax, eax
jne 0x4ad13901
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.4ad1393b
pop ecx
pop ecx
cmp dword [ebp + 8], ebx
je 0x4ad1390b
push dword [ebp - 0xc]
call edi
push 0
push 0x4ad228a0
call fcn.4ad14ffd
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x4ad13dec
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov eax, dword [ebp + 0xc]
push edi
push 1
xor edi, edi
pop ebx
mov dword [ebp - 0x1c], edi
push 3
mov dword [ebp - 0x18], ebx
pop ecx
mov dword [ebp - 0x20], 0xc
and eax, ecx
cmp eax, 2
ja 0x4ad13ee8
test byte [ebp + 0xc], bl
je 0x4ad13e27
test byte [ebp + 0xc], 8
jne 0x4ad13ee8
cmp eax, edi
mov esi, 0x80000000
je 0x4ad13e57
push 0x4ad01cf4
mov dword [ebp - 8], 0x40000000
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll__wcsicmp]
pop ecx
test eax, eax
pop ecx
je 0x4ad13e4e
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0xc], 2
jmp 0x4ad13e5d
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], ecx
cmp dword [ebp + 0xc], 0x10a
push edi
jne 0x4ad13eac
mov edi, 0x80
lea eax, [ebp - 0x20]
push edi
push 3
push eax
mov eax, dword [ebp - 8]
push dword [ebp + 0x10]
or eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push eax
push dword [ebp + 8]
call esi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4ad13ef2
push 0
push edi
push dword [ebp - 0xc]
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0x10]
push dword [ebp - 8]
push dword [ebp + 8]
call esi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4ad13ef2
jmp 0x4ad13ece
push 0x80
lea eax, [ebp - 0x20]
push dword [ebp - 0xc]
push eax
push dword [ebp + 0x10]
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4ad13ef4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6e
mov dword [0x4ad1d000], eax
jne 0x4ad13ee8
mov dword [0x4ad1d000], 2
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret 0xc
xor edi, edi
push 8
push ebx
call dword [sym.imp.MSVCRT.dll__open_osfhandle]
test byte [ebp + 0xc], 8
pop ecx
mov dword [ebp + 0x10], eax
pop ecx
je 0x4ad13f9d
push eax
call fcn.4ad14ea0
test eax, eax
jne 0x4ad13f9d
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
je 0x4ad13f9d
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 4]
push 2
push eax
push 0xffffffffffffffff
push ebx
mov dword [ebp - 0x10], edi
call esi
cmp eax, 0xffffffff
jne 0x4ad13f64
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
mov dword [0x4ad1d000], eax
je 0x4ad13f64
cmp dword [ebp + 0x10], 0xffffffff
je 0x4ad13ee8
push dword [ebp + 0x10]
call dword [sym.imp.MSVCRT.dll__close]
pop ecx
jmp 0x4ad13ee8
lea eax, [ebp - 0x14]
push edi
push eax
lea eax, [ebp - 0x10]
push 1
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
jne 0x4ad13f87
lea eax, [ebp - 4]
push 2
push eax
push edi
push ebx
mov dword [ebp - 4], edi
call esi
cmp word [ebp - 0x10], 0x1a
jne 0x4ad13f9d
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 4]
push 2
push eax
push 0xffffffffffffffff
push ebx
call esi
push dword [ebp + 0x10]
call fcn.4ad140d4
mov eax, dword [ebp + 0x10]
jmp 0x4ad13eeb
Function at 0x4ad1417a
Capabilities:
Terminate process

Disassembly:
push esi
push 1
push dword [esp + 0xc]
xor esi, esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x4ad14198
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x4ad1d000], eax
cmp dword [esp + 0xc], esi
je 0x4ad141a9
push dword [esp + 8]
call fcn.4ad141af
mov esi, eax
mov eax, esi
pop esi
ret 8

Function at 0x4ad1435f
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov ax, word [ebp + 8]
push esi
mov word [ebp - 0xc], ax
mov ax, word [0x4ad1c744]
mov word [ebp - 8], ax
lea eax, [ebp - 0xc]
xor esi, esi
push eax
mov word [ebp - 0xa], 0x3a
mov word [ebp - 6], si
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x4ad143cd
cmp eax, 2
je 0x4ad143d2
cmp eax, 5
je 0x4ad143d2
push esi
push esi
push esi
lea eax, [ebp - 0x14]
push esi
push eax
lea eax, [ebp - 0x21c]
push 0x104
push eax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
jne 0x4ad143d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x4ad143d2
push 1
pop eax
jmp 0x4ad143d4
xor eax, eax
pop esi
leave
ret 4

Function at 0x4ad14ba1
Capabilities:
Set console window title

Disassembly:
push ebx
push ebp
xor ebp, ebp
push esi
cmp dword [esp + 0x10], ebp
push edi
je 0x4ad14c89
cmp dword [0x4ad1cf40], ebp
jne 0x4ad14c89
cmp dword [0x4ad1cf64], ebp
jne 0x4ad14c89
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x20c
push ebp
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
cmp ebx, ebp
je 0x4ad14c89
push 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleTitleW]
mov esi, eax
cmp esi, ebp
je 0x4ad14c89
push dword [esp + 0x14]
mov ebp, dword [sym.imp.MSVCRT.dll_wcslen]
call ebp
add eax, esi
pop ecx
add eax, dword [0x4ad1f5a0]
lea eax, [eax + eax + 0x14]
push eax
push ebx
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov esi, eax
test esi, esi
jne 0x4ad14c2d
push ebx
jmp 0x4ad14c7e
cmp byte [0x4ad1cf90], 0
je 0x4ad14c4d
mov eax, dword [0x4ad1f5a0]
push dword [esp + 0x14]
lea eax, [esi + eax*2]
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
pop ecx
pop ecx
jmp 0x4ad14c76
mov ebx, dword [sym.imp.MSVCRT.dll_wcscat]
push 0x4ad01d44
push esi
call ebx
pop ecx
pop ecx
push esi
call ebp
pop ecx
mov dword [0x4ad1f5a0], eax
push dword [esp + 0x14]
push esi
call ebx
pop ecx
mov byte [0x4ad1cf90], 1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebp
pop ebx
ret 4
Function at 0x4ad15520
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x664
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.4ad14661
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebp - 0x414]
push ecx
push 0x208
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov esi, eax
test esi, esi
je 0x4ad1564d
push 4
lea eax, [ebp - 0x414]
push 0x4ad01d4c
push eax
call dword [sym.imp.MSVCRT.dll_wcsncmp]
add esp, 0xc
test eax, eax
jne 0x4ad155c3
lea eax, [ebp - 0x40c]
mov dword [ebp + 8], eax
lea eax, [ebp - 0x40c]
push eax
push edi
call dword [sym.imp.MSVCRT.dll_wcsstr]
pop ecx
mov dword [ebp + 8], eax
test eax, eax
pop ecx
je 0x4ad155ac
cmp eax, edi
jbe 0x4ad155ac
mov si, word [eax]
and word [eax], 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
mov eax, dword [ebp + 8]
mov word [eax], si
jmp 0x4ad155b5
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
mov eax, ecx
inc eax
neg eax
sbb eax, eax
and eax, ecx
jmp 0x4ad1564f
mov eax, dword [ebp + 8]
test eax, eax
je 0x4ad15636
cmp word [eax], 0
je 0x4ad15636
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x664]
push eax
lea eax, [ebp - 0x414]
push 0x37
push eax
call fcn.4ad18527
push dword [ebp - 4]
movzx esi, al
call fcn.4ad185bc
test esi, esi
jne 0x4ad1564d
cmp word [ebp - 0x412], 0x5c
je 0x4ad1561f
cmp word [ebp - 0x412], 0x3a
jne 0x4ad1564d
cmp word [ebp - 0x410], 0x5c
jne 0x4ad1564d
cmp word [ebp - 0x40e], si
jne 0x4ad1564d
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x4ad1564d
push 1
pop esi
jmp 0x4ad1564d
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov esi, ecx
mov eax, esi
pop edi
pop esi
leave
ret 4

Function at 0x4ad15e94
Capabilities:
Check if file exists
Delete directory
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 8]
push esi
and dword [ebp - 4], 0
lea eax, [ebp + 8]
push edi
push eax
lea eax, [ebp - 0xc]
push eax
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp eax, 3
jne 0x4ad15ecc
cmp word [ebp - 0xa], 0x3a
jne 0x4ad15ecc
cmp word [ebp - 8], 0x5c
jne 0x4ad15ecc
xor eax, eax
jmp 0x4ad15f1c
mov edi, dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push ebx
call edi
test eax, eax
jne 0x4ad15f19
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 5
mov dword [ebp - 4], eax
jne 0x4ad15f19
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4ad15f19
test al, 1
je 0x4ad15f19
and al, 0xfe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x4ad15f19
push ebx
call edi
test eax, eax
je 0x4ad15f14
and dword [ebp - 4], 0
jmp 0x4ad15f19
call esi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 4