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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x248
cmp dword [ebp + 0xc], 0
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
je 0x406056
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x406056
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x406056
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x406056
mov eax, dword [ebp + 8]
test eax, eax
jl 0x406056
cmp eax, 0x1a
jge 0x406056
add eax, 0x41
push eax
lea eax, [ebp - 0x10]
push str._c:_
push eax
call fcn.004b00aa
add esp, 0xc
mov eax, 0x105
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x1c], 0x104
push eax
push ecx
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x18]
push ecx
push eax
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.DLL_GetVolumeInformationA]
test eax, eax
je 0x406056
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x140]
push eax
call fcn.004c6033
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
mov dword [ebx], eax
lea eax, [ebp - 0x14]
push eax
call fcn.00405e26
test eax, eax
je 0x406004
cmp dword [ebp - 0x14], 0
je 0x406004
push str.KERNEL32.DLL
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
test eax, eax
mov dword [ebp + 0xc], eax
je 0x406051
push str.GetDiskFreeSpaceExA
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
test eax, eax
je 0x405fa8
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x10]
push ecx
call eax
test eax, eax
jle 0x405ff9
mov eax, dword [ebp - 0x24]
mov dword [edi], eax
mov eax, dword [ebp - 0x20]
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esi], eax
mov eax, dword [ebp - 0x28]
mov dword [esi + 4], eax
jmp 0x405ff9
lea eax, [ebp + 0x18]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.DLL_GetDiskFreeSpaceA]
test eax, eax
je 0x406056
mov eax, dword [ebp + 0x10]
mul dword [ebp + 0x14]
mov ebx, eax
push edx
push ebx
push 0
push dword [ebp + 0x18]
mov dword [ebp - 4], edx
call fcn.004af6a0
push dword [ebp - 4]
mov dword [edi], eax
mov dword [edi + 4], edx
push ebx
push 0
push dword [ebp + 8]
call fcn.004af6a0
mov dword [esi], eax
mov dword [esi + 4], edx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
jmp 0x406051
lea eax, [ebp + 0x18]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.DLL_GetDiskFreeSpaceA]
test eax, eax
je 0x406056
mov eax, dword [ebp + 0x10]
mul dword [ebp + 0x14]
mov ebx, eax
push edx
push ebx
push 0
push dword [ebp + 0x18]
mov dword [ebp - 4], edx
call fcn.004af6a0
push dword [ebp - 4]
mov dword [edi], eax
mov dword [edi + 4], edx
push ebx
push 0
push dword [ebp + 8]
call fcn.004af6a0
mov dword [esi], eax
mov dword [esi + 4], edx
push 1
pop eax
jmp 0x406058
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14
Function at 0x406780
Capabilities:
Encrypt data using blowfish

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
xor esi, esi
push edi
mov dword [ebp - 0x10], ecx
xor eax, eax
mov edx, dword [ecx]
mov edi, dword [eax + 0x50f778]
mov dword [eax + edx], edi
add eax, 4
cmp eax, 0x48
jb 0x406790
xor eax, eax
mov edx, pe_nt_image_headers32
mov edi, dword [ecx + 4]
mov ebx, dword [eax + 0x50f7c0]
mov dword [eax + edi], ebx
add eax, 4
dec edx
jne 0x4067aa
cmp eax, 0x1000
jb 0x4067a5
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 4], esi
jmp 0x4067d1
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx]
mov ecx, dword [ebp - 4]
add ecx, eax
lea eax, [esi + 1]
xor edx, edx
mov dword [ebp + 0xc], ecx
div ebx
xor ecx, ecx
lea eax, [esi + 2]
add dword [ebp - 4], 4
mov cl, byte [edx + edi]
xor edx, edx
div ebx
mov ch, byte [esi + edi]
shl ecx, 8
movzx eax, byte [edx + edi]
or ecx, eax
lea eax, [esi + 3]
xor edx, edx
div ebx
shl ecx, 8
movzx eax, byte [edx + edi]
or ecx, eax
mov eax, dword [ebp + 0xc]
xor edx, edx
xor dword [eax], ecx
lea eax, [esi + 4]
div ebx
cmp dword [ebp - 4], 0x48
mov esi, edx
jb 0x4067ce
mov esi, dword [ebp - 0x10]
xor edi, edi
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
lea eax, [ebp - 0xc]
mov ecx, esi
push eax
lea eax, [ebp - 8]
push eax
call fcn.0040609c
mov eax, dword [esi]
mov ecx, dword [ebp - 8]
mov dword [edi + eax], ecx
mov eax, dword [esi]
mov ecx, dword [ebp - 0xc]
mov dword [edi + eax + 4], ecx
add edi, 8
cmp edi, 0x48
jb 0x40682d
push 4
pop edi
mov ebx, 0x80
lea eax, [ebp - 0xc]
mov ecx, esi
push eax
lea eax, [ebp - 8]
push eax
call fcn.0040609c
mov eax, dword [esi + 4]
mov ecx, dword [ebp - 8]
mov dword [edi + eax - 4], ecx
mov eax, dword [esi + 4]
mov ecx, dword [ebp - 0xc]
mov dword [edi + eax], ecx
add edi, 8
dec ebx
jne 0x40685d
cmp edi, 0x1004
jb 0x406858
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x408d16
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags

Disassembly:
mov eax, 0x4d75bc
call fcn.004aef44
push ebx
push esi
push edi
mov esi, ecx
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], ebx
lea eax, [edi + 0x2c]
push eax
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
call fcn.004c613f
push eax
lea ecx, [esi + 4]
mov byte [ebp - 4], 1
call fcn.004c5fe3
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call fcn.004c5eaa
mov eax, dword [edi]
push 1
push ebx
push ebx
mov dword [esi + 8], eax
push dword [edi + 0x1c]
call fcn.004af6a0
mov ecx, dword [edi + 0x20]
add eax, ecx
mov dword [esi + 0x10], eax
lea eax, [esi + 0x18]
push eax
lea eax, [edi + 4]
adc edx, ebx
and dword [esi + 0x30], ebx
and dword [esi + 0x2c], ebx
push eax
mov dword [esi + 0x14], edx
call fcn.00408dc6
lea eax, [esi + 0x1c]
push eax
lea eax, [edi + 0xc]
push eax
call fcn.00408dc6
lea eax, [esi + 0x20]
add edi, 0x14
push eax
push edi
call fcn.00408dc6
mov eax, dword [ebp + 0x10]
or dword [ebp - 4], 0xffffffff
add esp, 0x18
lea ecx, [ebp + 0xc]
mov dword [esi], eax
call fcn.004c5eaa
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc
Function at 0x408efe
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, 0x4d75ec
call fcn.004aef44
sub esp, 0x140
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
push ebx
lea edi, [esi + 0x12]
push edi
call fcn.00409040
pop ecx
test eax, eax
pop ecx
je 0x408f33
push ebx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x408f3d
and byte [edi], 0
xor eax, eax
jmp 0x409031
push ebx
push edi
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
push ebx
lea ecx, [ebp + 8]
call fcn.004c5f18
mov eax, dword [0x51f03c]
and dword [ebp - 4], 0
mov dword [ebp + 0xc], eax
lea eax, [ebp + 0xc]
mov byte [ebp - 4], 1
push eax
push ebx
call fcn.00409129
pop ecx
pop ecx
push 0x510870
lea ecx, [ebp + 0xc]
call fcn.004c2c4d
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.004af56e
pop ecx
test eax, eax
pop ecx
jne 0x408f95
push 0x51086c
lea ecx, [ebp + 8]
call fcn.004c6286
lea eax, [ebp - 0x14c]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_FindFirstFileA]
cmp eax, 0xffffffff
jne 0x408fae
xor esi, esi
jmp 0x409017
push eax
call dword [sym.imp.KERNEL32.DLL_FindClose]
mov al, byte [ebp - 0x14c]
push esi
and al, 0x7f
mov byte [esi + 0x10], al
mov eax, dword [ebp - 0x130]
shl eax, 0x20
or eax, dword [ebp - 0x12c]
mov dword [esi + 0xc], eax
lea eax, [ebp - 0x148]
push eax
call fcn.00408dc6
lea edi, [esi + 8]
lea eax, [ebp - 0x140]
push edi
push eax
call fcn.00408dc6
lea ebx, [esi + 4]
lea eax, [ebp - 0x138]
push ebx
push eax
call fcn.00408dc6
add esp, 0x18
cmp dword [esi], 0
jne 0x40900b
mov eax, dword [ebx]
mov dword [esi], eax
cmp dword [edi], 0
jne 0x409014
mov eax, dword [ebx]
mov dword [edi], eax
push 1
pop esi
and byte [ebp - 4], 0
lea ecx, [ebp + 0xc]
call fcn.004c5eaa
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004c5eaa
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x409040
Capabilities:
Get disk information

Disassembly:
mov eax, 0x4d7600
call fcn.004aef44
sub esp, 0x14c
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x14]
push esi
push eax
mov esi, 0x104
push ebx
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_GetFullPathNameA]
test eax, eax
jne 0x40907f
push esi
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.DLL_lstrcpynA]
xor eax, eax
jmp 0x40911b
mov eax, dword [0x51f03c]
push edi
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
xor edi, edi
push eax
push ebx
mov dword [ebp - 4], edi
call fcn.00409129
pop ecx
mov esi, 0x510870
pop ecx
push esi
lea ecx, [ebp + 8]
call fcn.004c2c4d
push esi
lea ecx, [ebp + 8]
call fcn.004c6286
push edi
lea eax, [ebp - 0x10]
push edi
push eax
lea eax, [ebp - 0x18]
push eax
push edi
push edi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetVolumeInformationA]
test eax, eax
je 0x40910c
test byte [ebp - 0x10], 2
jne 0x4090d7
push ebx
call dword [sym.imp.USER32.dll_CharUpperA]
test byte [ebp - 0x10], 4
jne 0x409109
lea eax, [ebp - 0x158]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_FindFirstFileA]
cmp eax, 0xffffffff
je 0x409109
push eax
call dword [sym.imp.KERNEL32.DLL_FindClose]
lea eax, [ebp - 0x12c]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
push 1
pop edi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004c5eaa
mov eax, edi
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x40abde
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
mov edi, dword [ebp + 8]
xor edx, edx
mov dword [ebp - 0xc], ecx
cmp edi, edx
jne 0x40abf8
xor eax, eax
jmp 0x40aca6
xor eax, eax
cmp dword [ebp + 0xc], edx
mov dword [ebp - 4], edx
jbe 0x40aca6
push ebx
push esi
jmp 0x40ac0d
mov edi, dword [ebp + 8]
movzx esi, byte [edx + edi]
inc edx
shl esi, 8
cmp edx, dword [ebp + 0xc]
jae 0x40ac23
movzx ebx, byte [edx + edi]
or esi, ebx
inc edx
jmp 0x40ac26
inc dword [ebp - 4]
shl esi, 8
cmp edx, dword [ebp + 0xc]
jae 0x40ac37
movzx edi, byte [edx + edi]
or esi, edi
inc edx
jmp 0x40ac3a
inc dword [ebp - 4]
push 3
pop edi
cmp dword [ebp - 4], 0
je 0x40ac4d
dec dword [ebp - 4]
mov byte [ebp + edi - 8], 0x3d
jmp 0x40ac62
mov ebx, dword [str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov ecx, esi
and ecx, 0x3f
mov cl, byte [ecx + ebx]
mov byte [ebp + edi - 8], cl
mov ecx, dword [ebp - 0xc]
shr esi, 6
dec edi
jns 0x40ac3d
xor esi, esi
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x40ac87
cmp dword [ecx + 4], edi
jb 0x40ac87
mov edi, dword [ebp + 0x10]
mov byte [eax + edi], 0xd
inc eax
mov byte [eax + edi], 0xa
inc eax
and dword [ecx + 4], 0
mov edi, dword [ebp + 0x10]
mov bl, byte [ebp + esi - 8]
mov byte [eax + edi], bl
inc eax
inc esi
inc dword [ecx + 4]
cmp esi, 4
jl 0x40ac6a
cmp edx, dword [ebp + 0xc]
jb 0x40ac0a
pop esi
pop ebx
pop edi
leave
ret 0x10
Function at 0x40acab
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
xor edi, edi
cmp dword [ebp + 0xc], edi
je 0x40ad7b
mov eax, dword [ebp + 8]
mov dword [ebp + 8], edi
mov edx, dword [eax]
mov esi, dword [edx - 8]
add esi, edx
cmp edx, esi
jae 0x40ad8a
xor eax, eax
xor ebx, ebx
cmp edx, esi
jae 0x40ad39
mov cl, byte [edx]
inc edx
cmp cl, 9
jl 0x40acf0
cmp cl, 0xa
jle 0x40ad34
cmp cl, 0xd
je 0x40ad34
cmp cl, 0x20
je 0x40ad34
shl ebx, 6
cmp cl, 0x60
jle 0x40ad02
movsx ecx, cl
sub ecx, 0x47
or ebx, ecx
jmp 0x40ad33
cmp cl, 0x40
jle 0x40ad0f
movsx ecx, cl
sub ecx, 0x41
jmp 0x40acfe
cmp cl, 0x3d
jne 0x40ad17
inc edi
jmp 0x40ad33
cmp cl, 0x2f
jle 0x40ad24
movsx ecx, cl
add ecx, 4
jmp 0x40acfe
jne 0x40ad2b
or ebx, 0x3f
jmp 0x40ad33
cmp cl, 0x2b
jne 0x40ad33
or ebx, 0x3e
inc eax
cmp eax, 4
jb 0x40acd5
cmp eax, 4
jne 0x40ad7f
mov eax, dword [ebp + 8]
add eax, 3
mov ecx, eax
sub ecx, edi
cmp ecx, dword [ebp + 0x10]
ja 0x40ad7b
cmp eax, dword [ebp + 8]
je 0x40ad6e
dec eax
test edi, edi
je 0x40ad63
mov ecx, dword [ebp + 8]
sub ecx, edi
add ecx, 3
cmp eax, ecx
jae 0x40ad69
mov ecx, dword [ebp + 0xc]
mov byte [eax + ecx], bl
shr ebx, 8
jmp 0x40ad4d
push 3
pop eax
sub eax, edi
add dword [ebp + 8], eax
jmp 0x40acc9
xor eax, eax
jmp 0x40ad8d
neg eax
sbb eax, eax
not eax
and eax, dword [ebp + 8]
jmp 0x40ad8d
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
pop ebp
ret 0xc

Function at 0x40ad94
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
cmp eax, esi
push edi
je 0x40ae85
cmp dword [ebp + 0x10], esi
je 0x40ae85
mov ecx, dword [ebp + 0xc]
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], esi
lea edi, [eax + ecx]
cmp eax, edi
jae 0x40ae77
xor eax, eax
xor edx, edx
cmp dword [ebp + 8], edi
jae 0x40ae34
mov ecx, dword [ebp + 8]
inc dword [ebp + 8]
mov cl, byte [ecx]
cmp cl, 9
jl 0x40ade9
cmp cl, 0xa
jle 0x40ae2f
cmp cl, 0xd
je 0x40ae2f
cmp cl, 0x20
je 0x40ae2f
shl edx, 6
cmp cl, 0x60
jle 0x40adfb
movsx ecx, cl
sub ecx, 0x47
or edx, ecx
jmp 0x40ae2e
cmp cl, 0x40
jle 0x40ae08
movsx ecx, cl
sub ecx, 0x41
jmp 0x40adf7
cmp cl, 0x3d
jne 0x40ae12
inc dword [ebp + 0xc]
jmp 0x40ae2e
cmp cl, 0x2f
jle 0x40ae1f
movsx ecx, cl
add ecx, 4
jmp 0x40adf7
jne 0x40ae26
or edx, 0x3f
jmp 0x40ae2e
cmp cl, 0x2b
jne 0x40ae2e
or edx, 0x3e
inc eax
cmp eax, 4
jb 0x40adc8
cmp eax, 4
jne 0x40ae7b
mov ecx, dword [ebp + 0xc]
lea eax, [esi + 3]
mov ebx, eax
sub ebx, ecx
cmp ebx, dword [ebp + 0x14]
ja 0x40ae85
cmp eax, esi
je 0x40ae67
dec eax
test ecx, ecx
je 0x40ae5c
mov ebx, esi
sub ebx, ecx
add ebx, 3
cmp eax, ebx
jae 0x40ae62
mov ebx, dword [ebp + 0x10]
mov byte [eax + ebx], dl
shr edx, 8
jmp 0x40ae48
push 3
pop eax
sub eax, ecx
add esi, eax
cmp dword [ebp + 8], edi
jb 0x40adc4
mov eax, esi
jmp 0x40ae87
neg eax
sbb eax, eax
not eax
and eax, esi
jmp 0x40ae87
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x40ae8e
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
mov eax, 0x4d7a4f
call fcn.004aef44
push ecx
mov eax, dword [0x51f03c]
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
lea ebx, [esi + 4]
mov dword [ebx], eax
mov eax, dword [0x51f03c]
xor edi, edi
mov dword [ebp - 4], edi
mov dword [esi + 8], eax
mov eax, dword [0x51f03c]
mov dword [esi + 0x38], eax
lea ecx, [esi + 0x3c]
mov byte [ebp - 4], 2
call fcn.00409204
push 0xa
lea ecx, [esi + 0x70]
mov byte [ebp - 4], 3
call fcn.004c4251
mov ecx, ebx
mov byte [ebp - 4], 4
mov dword [esi], vtable.CIRCopyFiles.0
call fcn.004c5e35
lea ecx, [esi + 8]
call fcn.004c5e35
lea ecx, [esi + 0x38]
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], 1
mov dword [esi + 0x24], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x20], edi
call fcn.004c5e35
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x5c], edi
mov dword [esi + 0x60], edi
mov dword [esi + 0x64], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x30], 0x32
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x40c4cd
Capabilities:
Delete directory

Disassembly:
mov eax, 0x4d7d3c
call fcn.004aef44
sub esp, 0xc
push esi
mov eax, dword [0x51f03c]
and dword [ebp - 4], 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], eax
lea esi, [ecx + 4]
push 0x5c
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.004c2892
cmp eax, 0xffffffff
je 0x40c531
push eax
lea eax, [ebp - 0x18]
push eax
mov ecx, esi
call fcn.004c281a
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.004c5fe3
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.004c5eaa
push 0x510870
lea ecx, [ebp - 0x14]
call fcn.004c2c4d
push 0x5c
lea ecx, [ebp + 8]
call fcn.004c2892
cmp eax, 0xffffffff
pop esi
je 0x40c591
push eax
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp + 8]
call fcn.004c281a
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.004c5fe3
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.004c5eaa
push 0
push dword [ebp - 0x10]
call fcn.004b0b55
pop ecx
test eax, eax
pop ecx
jne 0x40c591
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.004afa15
pop ecx
test eax, eax
pop ecx
je 0x40c591
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_RemoveDirectoryA]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.004c5eaa
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.004c5eaa
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004c5eaa
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret 4
Function at 0x40ca76
Capabilities:
Create directory
Get common file path
Set current directory

Disassembly:
mov eax, 0x4d7e3c
call fcn.004aef44
sub esp, 0x210
push ebx
push esi
push edi
xor ebx, ebx
lea ecx, [ebp + 8]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], 1
call fcn.004c2dd9
lea ecx, [ebp + 8]
call fcn.004c2ce2
push 0x5c
lea ecx, [ebp + 8]
call fcn.004c2ca0
lea ecx, [ebp + 8]
call fcn.004c2ce2
push 0x5c
lea ecx, [ebp + 8]
call fcn.004c62ad
lea eax, [ebp - 0x21c]
mov esi, 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryA]
mov eax, dword [ebp + 8]
push esi
push ebx
mov edi, dword [eax - 8]
lea eax, [ebp - 0x118]
push eax
call fcn.004af060
add esp, 0xc
cmp edi, 2
jle 0x40cbe9
mov eax, dword [ebp + 8]
cmp byte [eax + 1], 0x3a
jne 0x40cb52
xor esi, esi
cmp edi, ebx
jle 0x40cbec
cmp dword [ebp - 0x10], ebx
je 0x40cbec
mov eax, dword [ebp + 8]
mov al, byte [esi + eax]
cmp al, 0x5c
mov byte [ebp + esi - 0x118], al
jne 0x40cb48
cmp esi, 2
je 0x40cb48
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
test eax, eax
jne 0x40cb48
lea eax, [ebp - 0x118]
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryA]
mov dword [ebp - 0x10], eax
inc esi
cmp esi, edi
jl 0x40cb07
jmp 0x40cbec
lea eax, [ebp - 0x14]
push 2
push eax
lea ecx, [ebp + 8]
call fcn.004c281a
mov eax, dword [eax]
push 0x5108dc
push eax
call fcn.004af56e
mov ebx, eax
pop ecx
neg ebx
pop ecx
sbb bl, bl
lea ecx, [ebp - 0x14]
inc bl
call fcn.004c5eaa
test bl, bl
je 0x40cbe3
push 2
push 0x510870
lea ecx, [ebp + 8]
call fcn.004c28c2
xor esi, esi
mov ebx, eax
test edi, edi
jle 0x40cbec
cmp dword [ebp - 0x10], 0
je 0x40cbec
cmp ebx, 0xffffffff
je 0x40cbec
mov eax, dword [ebp + 8]
mov al, byte [esi + eax]
cmp al, 0x5c
mov byte [ebp + esi - 0x118], al
jne 0x40cbdc
cmp esi, ebx
jle 0x40cbdc
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
test eax, eax
jne 0x40cbdc
push eax
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryA]
mov dword [ebp - 0x10], eax
inc esi
cmp esi, edi
jl 0x40cb9a
jmp 0x40cbec
and dword [ebp - 0x10], 0
jmp 0x40cbec
mov dword [ebp - 0x10], ebx
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004c5eaa
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x40d687
Capabilities:
Delete directory

Disassembly:
mov eax, 0x4d7fb8
call fcn.004aef44
sub esp, 0xc
push esi
mov eax, dword [0x51f03c]
and dword [ebp - 4], 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], eax
lea esi, [ecx + 4]
push 0x5c
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.004c2892
cmp eax, 0xffffffff
je 0x40d6eb
push eax
lea eax, [ebp - 0x18]
push eax
mov ecx, esi
call fcn.004c281a
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.004c5fe3
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.004c5eaa
push 0x510870
lea ecx, [ebp - 0x14]
call fcn.004c2c4d
push 0x5c
lea ecx, [ebp + 8]
call fcn.004c2892
cmp eax, 0xffffffff
pop esi
je 0x40d74b
push eax
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp + 8]
call fcn.004c281a
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.004c5fe3
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.004c5eaa
push 0
push dword [ebp - 0x10]
call fcn.004b0b55
pop ecx
test eax, eax
pop ecx
jne 0x40d74b
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.004afa15
pop ecx
test eax, eax
pop ecx
je 0x40d74b
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_RemoveDirectoryA]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.004c5eaa
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.004c5eaa
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004c5eaa
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret 4

Function at 0x40d77d
Capabilities:
Delete directory

Disassembly:
mov eax, 0x4d7fec
call fcn.004aef44
sub esp, 0x10
push esi
mov esi, ecx
mov eax, dword [0x51f03c]
and dword [ebp - 4], 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x14]
push eax
push ecx
lea eax, [esi + 4]
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
call fcn.004c5c1f
mov ecx, esi
call fcn.0040d296
lea eax, [ebp + 8]
lea ecx, [ebp - 0x10]
push eax
call fcn.004c5fe3
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.DLL_RemoveDirectoryA]
call esi
push 0x5c
lea ecx, [ebp - 0x10]
call fcn.004c2892
cmp eax, 0xffffffff
je 0x40d823
push eax
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x10]
call fcn.004c281a
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.004c5fe3
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.004c5eaa
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.004afa15
pop ecx
test eax, eax
pop ecx
je 0x40d7d8
push dword [ebp - 0x10]
jmp 0x40d7d6
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.004c5eaa
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.004c5eaa
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.004c5eaa
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004c5eaa
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret 4
Function at 0x40defa
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push esi
push str.kernel32.dll
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
xor esi, esi
cmp eax, esi
je 0x40df47
push str.GetDiskFreeSpaceExA
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
cmp eax, esi
je 0x40df47
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x28]
push ecx
push dword [ebp + 8]
call eax
test eax, eax
je 0x40df81
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x18]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x14]
mov dword [eax + 4], ecx
jmp 0x40df7d
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetDiskFreeSpaceA]
test eax, eax
je 0x40df81
mov eax, dword [ebp - 4]
push esi
mul dword [ebp - 8]
push dword [ebp - 0xc]
push edx
push eax
call fcn.004af6a0
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov dword [ecx + 4], edx
xor eax, eax
jmp 0x40df8c
mov eax, dword [ebp + 0xc]
push 1
mov dword [eax], esi
mov dword [eax + 4], esi
pop eax
pop esi
leave
ret