joyce8/EMBER2024-capa huggingface dataset:
Function at 0x7800e030
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
test ebp, ebp
push edi
je 0x7800e1ea
push 0x3d
push ebp
call sym.MSVCRT.dll_wcschr
mov esi, eax
add esp, 8
test esi, esi
je 0x7800e1ea
cmp ebp, esi
je 0x7800e1ea
xor eax, eax
mov ecx, dword [sym.MSVCRT.dll___winitenv]
cmp word [esi + 2], ax
sete al
mov edi, eax
mov eax, dword [sym.MSVCRT.dll__wenviron]
cmp eax, ecx
mov dword [esp + 0x10], edi
jne 0x7800e08a
push eax
call fcn.7800e2c0
add esp, 4
mov dword [sym.MSVCRT.dll__wenviron], eax
test eax, eax
jne 0x7800e10a
mov ecx, dword [esp + 0x1c]
test ecx, ecx
mov ecx, dword [sym.MSVCRT.dll__environ]
je 0x7800e0b2
test ecx, ecx
je 0x7800e0b2
call fcn.7800cca0
test eax, eax
je 0x7800e105
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test edi, edi
je 0x7800e0be
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ecx, ecx
jne 0x7800e0e4
push 4
call sym.MSVCRT.dll_malloc
add esp, 4
mov dword [sym.MSVCRT.dll__environ], eax
test eax, eax
je 0x7800e1ea
mov dword [eax], 0
mov eax, dword [sym.MSVCRT.dll__wenviron]
test eax, eax
jne 0x7800e10a
push 4
call sym.MSVCRT.dll_malloc
add esp, 4
mov dword [sym.MSVCRT.dll__wenviron], eax
test eax, eax
je 0x7800e1ea
mov dword [eax], 0
mov eax, dword [sym.MSVCRT.dll__wenviron]
mov ecx, dword [esp + 0x18]
sub esi, ebp
mov ebp, esi
mov ebx, eax
sar ebp, 1
push ebp
push ecx
call fcn.7800e240
mov esi, eax
add esp, 8
test esi, esi
jl 0x7800e1fc
cmp dword [ebx], 0
je 0x7800e1fc
test edi, edi
je 0x7800e1f3
mov edx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push edx
call sym.MSVCRT.dll_free
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x7800e163
mov eax, edi
mov ecx, dword [eax + 4]
add eax, 4
mov dword [edi], ecx
inc esi
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
jne 0x7800e152
lea edx, [esi*4]
push edx
push ebx
call sym.MSVCRT.dll_realloc
add esp, 8
test eax, eax
je 0x7800e17d
mov dword [sym.MSVCRT.dll__wenviron], eax
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x7800e1e2
mov eax, dword [esp + 0x18]
push eax
call sym.MSVCRT.dll_wcslen
add esp, 4
lea ecx, [eax + eax + 4]
push ecx
call sym.MSVCRT.dll_malloc
mov esi, eax
add esp, 4
test esi, esi
je 0x7800e1e2
mov edx, dword [esp + 0x18]
push edx
push esi
call sym.MSVCRT.dll_wcscpy
add esp, 8
lea eax, [esi + ebp*2 + 2]
neg edi
sbb edi, edi
mov word [esi + ebp*2], 0
not edi
and edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push esi
call sym.MSVCRT.dll_free
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x18]
mov dword [ebx + esi*4], eax
jmp 0x7800e181
test edi, edi
jne 0x7800e1e2
test esi, esi
jge 0x7800e206
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call sym.MSVCRT.dll_realloc
add esp, 8
test eax, eax
je 0x7800e1ea
mov edx, dword [esp + 0x18]
mov dword [eax + esi*4], edx
mov dword [eax + esi*4 + 4], 0
mov dword [sym.MSVCRT.dll__wenviron], eax
jmp 0x7800e181
Function at 0x780111e0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x7801120c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x430]
mov eax, ecx
sar eax, 5
lea edi, [eax*4 + sym.MSVCRT.dll___pioinfo]
mov eax, ecx
and eax, 0x1f
mov dword [esp + 0x24], edi
mov edx, dword [edi]
lea esi, [eax + eax*8]
shl esi, 2
mov dword [esp + 0x14], esi
test byte [esi + edx + 4], 0x20
je 0x78011247
push 2
push ebp
push ecx
call fcn.780115a0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x780113a9
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x780112f1
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x780112a2
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x7801128f
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x78011272
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x7801139a
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x780112ed
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x7801126e
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x78011389
mov eax, dword [esp + 0x18]
test eax, eax
je 0x78011345
cmp eax, 5
jne 0x7801132e
call sym.MSVCRT.dll__errno
mov dword [eax], 9
call sym.MSVCRT.dll___doserrno
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.7800a850
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x78011365
cmp byte [ebp], 0x1a
jne 0x78011365
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call sym.MSVCRT.dll__errno
mov dword [eax], 0x1c
call sym.MSVCRT.dll___doserrno
mov dword [eax], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x780112ed
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x780113da
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x780112f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x780112f1
Function at 0x78012890
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [0x7804147c]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
push edi
test eax, eax
jne 0x780128d8
push 0
push 0
push 1
push 0
call esi
test eax, eax
je 0x780128b8
mov eax, 1
jmp 0x780128d3
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x780129a9
mov eax, 2
mov dword [0x7804147c], eax
cmp eax, 1
jne 0x780128f8
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push ecx
push edx
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x780129bb
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x78012913
mov ecx, dword [sym.MSVCRT.dll___lc_codepage]
mov dword [esp + 0x24], ecx
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
push 0
push 0
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov esi, eax
test esi, esi
jne 0x78012932
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call sym.MSVCRT.dll_malloc
mov edi, eax
add esp, 4
test edi, edi
jne 0x78012946
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
push edi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x780129a0
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x78012984
mov edx, dword [esp + 0x24]
push eax
push eax
push 0xffffffffffffffff
push edi
push 1
push edx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
test esi, esi
je 0x780129a0
push edi
call sym.MSVCRT.dll_free
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x20]
push eax
push 0xffffffffffffffff
push edi
push 1
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
test esi, esi
jne 0x780129b0
push edi
call sym.MSVCRT.dll_free
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
call sym.MSVCRT.dll_free
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x780129c0
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [0x78041480]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
push edi
test eax, eax
jne 0x78012a08
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x780129ec
mov eax, 1
jmp 0x78012a03
push 0
push 0
push 1
push 0
call esi
test eax, eax
je 0x78012ae8
mov eax, 2
mov dword [0x78041480], eax
cmp eax, 2
jne 0x78012a28
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push ecx
push edx
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 1
jne 0x78012afa
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x78012a43
mov ecx, dword [sym.MSVCRT.dll___lc_codepage]
mov dword [esp + 0x24], ecx
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
push 0
push 0
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov edi, eax
test edi, edi
jne 0x78012a62
pop edi
pop esi
pop ebp
pop ebx
ret
lea edx, [edi + edi]
push edx
call sym.MSVCRT.dll_malloc
mov esi, eax
add esp, 4
test esi, esi
jne 0x78012a79
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
push esi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x78012adf
mov eax, dword [esp + 0x20]
push 0
test eax, eax
push 0
jne 0x78012ac0
mov eax, dword [esp + 0x2c]
push 0
push 0
push 0xffffffffffffffff
push esi
push 0x220
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x78012adf
push esi
call sym.MSVCRT.dll_free
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
push eax
push ecx
push 0xffffffffffffffff
push esi
push 0x220
push edx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
jne 0x78012aef
push esi
call sym.MSVCRT.dll_free
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call sym.MSVCRT.dll_free
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x780166d0
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x7801688e
push 0x3d
push edi
call sym.MSVCRT.dll__mbschr
mov esi, eax
add esp, 8
test esi, esi
je 0x7801688e
cmp edi, esi
je 0x7801688e
mov dl, byte [esi + 1]
mov ecx, dword [sym.MSVCRT.dll___initenv]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [sym.MSVCRT.dll__environ]
cmp eax, ecx
jne 0x78016727
push eax
call fcn.78016960
add esp, 4
mov dword [sym.MSVCRT.dll__environ], eax
test eax, eax
jne 0x780167a2
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x7801674e
mov eax, dword [sym.MSVCRT.dll__wenviron]
test eax, eax
je 0x7801674e
call fcn.78016650
test eax, eax
je 0x7801679d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x7801675a
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call sym.MSVCRT.dll_malloc
add esp, 4
mov dword [sym.MSVCRT.dll__environ], eax
test eax, eax
je 0x7801688e
mov dword [eax], 0
mov eax, dword [sym.MSVCRT.dll__wenviron]
test eax, eax
jne 0x7801679d
push 4
call sym.MSVCRT.dll_malloc
add esp, 4
mov dword [sym.MSVCRT.dll__wenviron], eax
test eax, eax
je 0x7801688e
mov dword [eax], 0
mov eax, dword [sym.MSVCRT.dll__environ]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.780168e0
mov esi, eax
add esp, 8
test esi, esi
jl 0x7801689f
cmp dword [ebx], 0
je 0x7801689f
test ebp, ebp
je 0x78016897
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call sym.MSVCRT.dll_free
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x780167f9
mov eax, edi
mov edx, dword [eax + 4]
add eax, 4
mov dword [edi], edx
inc esi
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
jne 0x780167e8
lea eax, [esi*4]
push eax
push ebx
call sym.MSVCRT.dll_realloc
add esp, 8
test eax, eax
je 0x78016813
mov dword [sym.MSVCRT.dll__environ], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x78016886
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call sym.MSVCRT.dll_malloc
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x78016886
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x10]
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
neg ebp
rep movsb byte es:[edi], byte [esi]
sbb ebp, ebp
mov byte [ebx + eax], 0
lea eax, [ebx + eax + 1]
not ebp
and ebp, eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call sym.MSVCRT.dll_free
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [ebx + esi*4], edi
jmp 0x78016817
test ebp, ebp
jne 0x78016886
test esi, esi
jge 0x780168a9
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call sym.MSVCRT.dll_realloc
add esp, 8
test eax, eax
je 0x7801688e
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [sym.MSVCRT.dll__environ], eax
jmp 0x78016817
Function at 0x780185e0
Capabilities:
Get disk size

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x780185ec
xor ecx, ecx
jmp 0x78018610
cmp eax, 0x1a
jbe 0x780185f7
mov eax, 0x57
ret
add al, 0x40
lea ecx, [esp + 4]
mov byte [esp + 4], al
mov byte [esp + 5], 0x3a
mov byte [esp + 6], 0x5c
mov byte [esp + 7], 0
mov eax, dword [esp + 8]
push eax
lea edx, [eax + 4]
push edx
lea edx, [eax + 0xc]
add eax, 8
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
jne 0x78018632
jmp dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
ret

Function at 0x78018ae0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x78018b03
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.7800a850
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x78018b28
test byte [esp + 8], 2
je 0x78018b28
call sym.MSVCRT.dll__errno
mov dword [eax], 0xd
call sym.MSVCRT.dll___doserrno
mov dword [eax], 5
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x78018b30
Capabilities:
Get common file path
Set current directory
Set environment variable

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x10c
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x78018bb0
lea ecx, [esp + 4]
push ecx
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x78018bb0
mov eax, dword [esp + 4]
cmp al, 0x5c
je 0x78018b65
cmp al, 0x2f
jne 0x78018b72
cmp al, ah
jne 0x78018b72
xor eax, eax
add esp, 0x10c
ret
and eax, 0xff
mov byte [esp], 0x3d
push eax
call sym.MSVCRT.dll__mbctoupper
add esp, 4
mov byte [esp + 1], al
lea edx, [esp + 4]
lea eax, [esp]
push edx
push eax
mov byte [esp + 0xa], 0x3a
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x78018bb0
xor eax, eax
add esp, 0x10c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.7800a850
add esp, 4
or eax, 0xffffffff
add esp, 0x10c
ret

Function at 0x78018bd0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
lea eax, [esp]
push esi
push eax
push 0x104
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x78018c09
mov eax, dword [esp + 4]
cmp ah, 0x3a
jne 0x78018c09
and eax, 0xff
push eax
call sym.MSVCRT.dll_toupper
mov esi, eax
add esp, 4
sub esi, 0x40
mov eax, esi
pop esi
add esp, 0x104
ret
Function at 0x78018c20
Capabilities:
Set current directory

Disassembly:
push ebx
mov ebx, dword [esp + 8]
cmp ebx, 1
jl 0x78018c85
cmp ebx, 0x1f
jg 0x78018c85
push 0xc
call sym.MSVCRT.dll__lock
add esp, 4
lea eax, [esp + 8]
add bl, 0x40
mov byte [esp + 9], 0x3a
push eax
mov byte [esp + 0xc], bl
mov byte [esp + 0xe], 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x78018c67
push 0xc
call sym.MSVCRT.dll__unlock
add esp, 4
xor eax, eax
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.7800a850
add esp, 4
push 0xc
call sym.MSVCRT.dll__unlock
add esp, 4
or eax, 0xffffffff
pop ebx
ret
call sym.MSVCRT.dll__errno
mov dword [eax], 0xd
call sym.MSVCRT.dll___doserrno
mov dword [eax], 0xf
or eax, 0xffffffff
pop ebx
ret

Function at 0x78018ca0
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x78018cca
test byte [esp + 0xc], 0x80
je 0x78018cbc
and al, 0xfe
jmp 0x78018cbe
or al, 1
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x78018cde
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.7800a850
add esp, 4
or eax, 0xffffffff
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x78018e30
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push esi
push edi
test ebx, ebx
je 0x78018ea5
push ebx
call fcn.78018f60
add esp, 4
test eax, eax
jne 0x78018e73
call sym.MSVCRT.dll___doserrno
mov dword [eax], 0xf
call sym.MSVCRT.dll__errno
mov dword [eax], 0xd
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x14]
add bl, 0x40
push 0x104
push edx
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], 0x3a
mov byte [esp + 0x1e], 0x2e
mov byte [esp + 0x1f], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x78018eb5
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x78018f4f
inc eax
cmp eax, 0x104
ja 0x78018f4f
mov edx, dword [esp + 0x120]
mov ecx, dword [esp + 0x124]
test edx, edx
jne 0x78018f07
cmp eax, ecx
jg 0x78018ee1
mov eax, ecx
push eax
call sym.MSVCRT.dll_malloc
mov edx, eax
add esp, 4
test edx, edx
jne 0x78018f22
call sym.MSVCRT.dll__errno
mov dword [eax], 0xc
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, ecx
jle 0x78018f22
call sym.MSVCRT.dll__errno
mov dword [eax], 0x22
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
mov eax, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10c
ret
Function at 0x78018f60
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x78018f6e
mov eax, 1
ret
add al, 0x40
mov byte [esp + 5], 0x3a
mov byte [esp + 4], al
lea eax, [esp + 4]
push eax
mov byte [esp + 0xa], 0x5c
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x78018f9d
cmp eax, 1
je 0x78018f9d
mov eax, 1
ret
xor eax, eax
ret

Function at 0x78018fb0
Capabilities:
Create directory

Disassembly:
mov eax, dword [esp + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x78018fc9
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x78018fcb
xor eax, eax
test eax, eax
je 0x78018fdc
push eax
call fcn.7800a850
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x78018fe0
Capabilities:
Delete directory

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x78018ff7
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x78018ff9
xor eax, eax
test eax, eax
je 0x7801900a
push eax
call fcn.7800a850
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x78019800
Capabilities:
Delete file

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x78019817
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x78019819
xor eax, eax
test eax, eax
je 0x7801982a
push eax
call fcn.7800a850
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x78019840
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x78019863
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.7800a850
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x78019888
test byte [esp + 8], 2
je 0x78019888
call sym.MSVCRT.dll__errno
mov dword [eax], 0xd
call sym.MSVCRT.dll___doserrno
mov dword [eax], 5
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x78019890
Capabilities:
Get common file path
Set current directory
Set environment variable

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x214
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x78019919
lea ecx, [esp + 8]
push ecx
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x78019919
mov eax, dword [esp + 8]
cmp ax, 0x5c
je 0x780198c9
cmp ax, 0x2f
jne 0x780198d9
cmp ax, word [esp + 0xa]
jne 0x780198d9
xor eax, eax
add esp, 0x214
ret
push eax
mov word [esp + 4], 0x3d
call sym.MSVCRT.dll_towupper
add esp, 4
mov word [esp + 2], ax
lea edx, [esp + 8]
lea eax, [esp]
push edx
push eax
mov word [esp + 0xc], 0x3a
mov word [esp + 0xe], 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
je 0x78019919
xor eax, eax
add esp, 0x214
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.7800a850
add esp, 4
or eax, 0xffffffff
add esp, 0x214
ret

Function at 0x78019940
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x7801996a
test byte [esp + 0xc], 0x80
je 0x7801995c
and al, 0xfe
jmp 0x7801995e
or al, 1
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x7801997e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.7800a850
add esp, 4
or eax, 0xffffffff
pop esi
ret
xor eax, eax
pop esi
ret