joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406e70
Capabilities:
Shutdown system

Disassembly:
sub esp, 0x14
lea eax, [esp]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea ecx, [esp + 8]
push ecx
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov eax, dword [esp]
push 0
push 0
lea edx, [esp + 0xc]
push 0
push edx
push 0
push eax
mov dword [esp + 0x1c], 1
mov dword [esp + 0x28], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov eax, dword [esp + 0x18]
push 0
test eax, eax
je 0x406ed9
push 6
call dword [sym.imp.USER32.dll_ExitWindowsEx]
add esp, 0x14
ret 4
push 0xc
call dword [sym.imp.USER32.dll_ExitWindowsEx]
add esp, 0x14
ret 4
Function at 0x407a70
Capabilities:
Enumerate devices by category

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x408550
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
push edi
mov edi, dword [esp + 0x34]
xor ebx, ebx
cmp edi, ebx
jge 0x407aa9
pop edi
xor al, al
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 8
mov dword [esp + 8], ebx
lea eax, [esp + 8]
mov dword [esp + 0x2c], ebx
push eax
push 0x40a208
push 1
push ebx
push 0x40a268
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, ebx
je 0x407af8
mov eax, dword [esp + 8]
mov dword [esp + 0x2c], 0xffffffff
cmp eax, ebx
je 0x407b42
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
pop edi
xor al, al
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 8
mov dword [esp + 0x34], ebx
mov eax, dword [esp + 8]
lea ecx, [esp + 0x34]
push ebx
push ecx
mov edx, dword [eax]
push 0x40a258
push eax
mov byte [esp + 0x3c], 1
call dword [edx + 0xc]
cmp eax, ebx
je 0x407b57
mov eax, dword [esp + 0x34]
mov byte [esp + 0x2c], bl
cmp eax, ebx
je 0x407b2c
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 8]
mov dword [esp + 0x2c], 0xffffffff
cmp eax, ebx
je 0x407b42
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
pop edi
xor al, al
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 8
mov eax, dword [esp + 0x34]
push esi
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x14]
push edx
lea edx, [esp + 0x14]
mov ecx, dword [eax]
push edx
push 1
push eax
xor esi, esi
call dword [ecx + 0xc]
cmp edi, ebx
jl 0x407c16
push ebp
mov ebp, dword [esp + 0x40]
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x40]
push edx
push 0x40a288
mov ecx, dword [eax]
push ebx
push ebx
push eax
call dword [ecx + 0x24]
cmp eax, ebx
jl 0x407bec
mov eax, dword [esp + 0x40]
lea edx, [esp + 0x1c]
push ebx
mov word [esp + 0x20], 8
mov ecx, dword [eax]
push edx
push str.FriendlyName
push eax
call dword [ecx + 0xc]
cmp eax, ebx
jne 0x407be2
cmp esi, edi
jne 0x407bd7
mov eax, dword [esp + 0x14]
push ebp
push 0x40a1f8
push ebx
mov ecx, dword [eax]
push ebx
push eax
call dword [ecx + 0x20]
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esp + 0x40]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 0x14]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [esp + 0x3c]
lea edx, [esp + 0x18]
push edx
lea edx, [esp + 0x18]
mov ecx, dword [eax]
push edx
push 1
push eax
inc esi
call dword [ecx + 0xc]
cmp esi, edi
jle 0x407b87
pop ebp
mov eax, dword [esp + 0x38]
mov byte [esp + 0x30], bl
cmp eax, ebx
pop esi
je 0x407c29
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 8]
mov dword [esp + 0x2c], 0xffffffff
cmp eax, ebx
je 0x407c3f
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov ecx, dword [esp + 0x24]
pop edi
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x28
ret 8
Function at 0x407c60
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x408568
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
push edi
xor edi, edi
mov ebx, ecx
mov dword [esp + 0x10], edi
mov eax, dword [ebx + 0x14]
lea edx, [esp + 0x18]
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], edi
mov ecx, dword [eax]
push edx
push eax
mov dword [esp + 0x3c], edi
call dword [ecx + 0x30]
test eax, eax
jl 0x407d18
mov eax, dword [esp + 0x18]
push ebp
lea edx, [esp + 0x18]
push edi
mov ecx, dword [eax]
push edx
push 1
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x407d0d
mov ebp, dword [esp + 0x44]
mov eax, dword [esp + 0x18]
mov ecx, 4
mov edi, 0x40a248
xor edx, edx
lea esi, [eax + 0x2c]
repe cmpsd dword [esi], dword es:[edi]
jne 0x407cee
mov ecx, dword [eax + 0x44]
cmp dword [ecx + 0x34], ebp
jne 0x407ce6
mov edx, dword [esp + 0x48]
mov esi, dword [ecx + 0x38]
cmp esi, edx
je 0x407d07
push eax
mov ecx, ebx
call fcn.00407e60
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x18]
push 0
push edx
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0xc]
test eax, eax
je 0x407cbc
jmp 0x407d0b
mov dword [esp + 0x10], eax
xor edi, edi
mov eax, dword [esp + 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
pop ebp
mov eax, dword [ebx + 0x14]
lea ecx, [esp + 0x10]
push ecx
push 0x40a1d8
mov edx, dword [eax]
push eax
call dword [edx]
test eax, eax
jl 0x407d7e
mov ecx, dword [esp + 0xc]
cmp ecx, edi
je 0x407d4d
mov eax, dword [esp + 0x10]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0xc]
mov eax, dword [esp + 0xc]
mov ecx, ebx
push eax
call fcn.00407e60
mov eax, dword [esp + 0x10]
lea edx, [esp + 0xc]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
test eax, eax
jl 0x407d7e
mov eax, dword [esp + 0xc]
push eax
mov ecx, dword [eax + 0x44]
mov edx, dword [ecx + 0x34]
mov dword [ebx + 0x20], edx
mov ecx, dword [eax + 0x44]
mov edx, dword [ecx + 0x38]
mov ecx, ebx
mov dword [ebx + 0x24], edx
call fcn.00407e60
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [ebx + 0x10]
lea ecx, [esp + 0x1c]
push ecx
push edi
mov edx, dword [eax]
push eax
call dword [edx + 0x18]
mov esi, eax
mov eax, dword [esp + 0x10]
cmp eax, edi
mov dword [esp + 0x34], 0xffffffff
je 0x407db5
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov ecx, dword [esp + 0x2c]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret 0xc
Function at 0x401e19
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x409064], 0
push esi
jne 0x401e50
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x401e2a
mov dword [ecx*4 + 0x409060], eax
inc ecx
cmp ecx, 0x100
jl 0x401e25
mov esi, dword [esp + 0x10]
test esi, esi
mov eax, dword [esp + 8]
not eax
jbe 0x401e7c
mov ecx, dword [esp + 0xc]
xor edx, edx
mov dl, byte [ecx]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x409060]
inc ecx
dec esi
jne 0x401e62
not eax
pop esi
ret 0xc

Function at 0x402046
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
push edi
lea eax, [ebp - 4]
push eax
push 8
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x4020b8
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x402091
cmp dword [ebp + 0x10], ebx
jne 0x4020bf
push ebx
lea eax, [ebp - 0x10c]
push eax
push dword [ebp - 4]
call fcn.00402046
test eax, eax
jne 0x4020a3
push edi
lea eax, [ebp - 0x10c]
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x402078
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
pop edi
pop esi
pop ebx
leave
ret 0xc
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
jmp 0x4020b8
Function at 0x403913
Capabilities:
Check for time delay via gettickcount
Write file on windows

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
push edi
xor edi, edi
mov dword [esp + 0x10], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [0x41f188]
sub esi, dword [0x41f194]
mov ebx, eax
add esi, dword [esp + 0x38]
add ebx, 0x1f4
cmp esi, edi
jle 0x403b03
push dword [0x41f190]
call fcn.004038fc
push edi
push edi
push dword [0x41f194]
push dword [0x409010]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x41b180], esi
mov dword [0x41b178], edi
mov eax, dword [0x41f18c]
sub eax, dword [0x41f190]
mov ebp, 0x4000
cmp eax, ebp
jg 0x403987
mov ebp, eax
push ebp
mov esi, 0x41b188
push esi
call fcn.004038ca
test eax, eax
je 0x403b0f
add dword [0x41f190], ebp
mov dword [0x413108], esi
mov dword [0x41310c], ebp
cmp dword [0x423fc8], edi
je 0x403a39
cmp dword [0x424060], edi
jne 0x403a39
cmp dword [esp + 0x10], edi
je 0x403a06
mov eax, dword [0x41b180]
sub eax, dword [0x41f188]
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
sub eax, dword [esp + 0x38]
add eax, dword [0x41f194]
mov dword [0x41b178], eax
jmp 0x4039f4
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push edi
push edi
lea eax, [esp + 0x24]
push edi
push eax
call esi
test eax, eax
jne 0x4039e9
jmp 0x403a39
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, ebx
jbe 0x403a39
mov eax, dword [0x423fc0]
neg eax
sbb eax, eax
not eax
and eax, str.unpacking_data:__d__
push eax
push 0x403817
push edi
push 0x6f
push dword [0x423fc4]
call dword [sym.imp.USER32.dll_CreateDialogParamA]
mov dword [esp + 0x10], eax
mov ecx, 0x4130f0
mov dword [0x413110], 0x413178
mov dword [0x413114], 0x8000
call fcn.00401020
test eax, eax
jl 0x403b18
mov esi, dword [0x413110]
mov eax, 0x413178
sub esi, eax
je 0x403aa8
push edi
lea ecx, [esp + 0x18]
push ecx
push esi
push eax
push dword [0x409010]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403b14
cmp esi, dword [esp + 0x14]
jne 0x403b14
add dword [0x41f194], esi
cmp dword [0x41310c], edi
jne 0x4039ad
jmp 0x403ab4
cmp dword [0x41310c], edi
jne 0x403b18
cmp ebp, edi
je 0x403b18
mov eax, dword [0x41f188]
mov ecx, eax
sub ecx, dword [0x41f194]
add ecx, dword [esp + 0x38]
test ecx, ecx
jg 0x403971
push edi
push edi
push eax
push dword [0x409010]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [esp + 0x10]
cmp esi, edi
je 0x403b03
mov eax, dword [0x41b180]
push edi
push edi
push 0x113
push esi
mov dword [0x41b178], eax
call dword [sym.imp.USER32.dll_SendMessageA]
push esi
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4
or eax, 0xffffffff
jmp 0x403b05
push 0xfffffffffffffffe
jmp 0x403b1a
push 0xfffffffffffffffd
pop eax
jmp 0x403b05
Function at 0x403b1d
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push esi
push edi
xor edi, edi
cmp eax, edi
jl 0x403b49
mov ecx, dword [0x424018]
push edi
add eax, ecx
push edi
push eax
push dword [0x409010]
mov dword [0x41f188], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.00403913
cmp eax, edi
jl 0x403c42
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp + 8]
push eax
push dword [0x409010]
call ebx
test eax, eax
je 0x403c3e
cmp dword [ebp - 4], esi
jne 0x403c3e
push dword [ebp + 8]
add dword [0x41f188], esi
call fcn.00403913
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x403c41
cmp dword [ebp + 0x10], edi
jne 0x403c0d
cmp dword [ebp + 8], edi
jle 0x403c39
mov esi, 0x41b188
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x403bbd
mov edi, dword [ebp + 8]
push 0
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [0x409010]
call ebx
test eax, eax
je 0x403c3e
cmp edi, dword [ebp - 4]
jne 0x403c3e
push 0
lea eax, [ebp + 0x14]
push eax
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403c09
cmp dword [ebp + 0x14], edi
jne 0x403c09
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x41f188], eax
cmp dword [ebp + 8], 0
jg 0x403bb0
jmp 0x403c39
push 0xfffffffffffffffe
jmp 0x403c40
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x403c18
mov eax, dword [ebp + 0x14]
push edi
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x409010]
call ebx
test eax, eax
je 0x403c3e
mov eax, dword [ebp - 4]
add dword [0x41f188], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x403c41
push 0xfffffffffffffffd
pop eax
pop ebx
pop edi
pop esi
leave
ret 0x10
Function at 0x4044b5
Capabilities:
Identify system language via api

Disassembly:
cmp byte [0x42b000], 0
push ebx
push ebp
push esi
push edi
mov edi, 0xffff
mov ebx, 0x42b000
je 0x4044d4
push ebx
call fcn.0040626d
jmp 0x4044da
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
xor ecx, ecx
mov esi, dword [0x424004]
test esi, esi
je 0x40452f
mov ecx, dword [0x423fc8]
mov ecx, dword [ecx + 0x64]
mov edx, ecx
imul ecx, esi
neg edx
add ecx, dword [0x424000]
xor ebp, ebp
add ecx, edx
mov bp, word [ecx]
xor bp, ax
dec esi
and ebp, edi
test bp, bp
je 0x404514
test esi, esi
jne 0x4044fc
jmp 0x40452f
mov edx, dword [ecx + 2]
mov dword [0x42379c], edx
mov edx, dword [ecx + 6]
mov dword [0x424068], edx
lea edx, [ecx + 0xa]
mov dword [0x4237a8], edx
cmp dword [0x4237a8], 0
jne 0x40454a
cmp di, 0xffff
jne 0x404546
mov edi, 0x3ff
jmp 0x4044dc
xor edi, edi
jmp 0x4044dc
movzx eax, word [ecx]
push eax
push ebx
call fcn.00406254
push 0xfffffffffffffffe
push 0x4237c0
call fcn.004066c3
push eax
push dword [0x41fdb4]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [0x423fec]
test eax, eax
mov esi, dword [0x423fe8]
je 0x404597
mov edi, eax
mov eax, dword [esi]
test eax, eax
je 0x40458e
push eax
lea eax, [esi + 0x18]
push eax
call fcn.004066c3
add esi, 0x418
dec edi
jne 0x40457e
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x405ffa
Capabilities:
Check if file exists
Create process on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push dword [ebp + 0xc]
mov dword [0x4221d0], 0x44
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
je 0x40601e
test al, 0x10
jne 0x406021
mov dword [ebp + 0xc], ecx
lea eax, [ebp - 0x10]
push eax
push 0x4221d0
push dword [ebp + 0xc]
push ecx
push ecx
push ecx
push ecx
push ecx
push dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40604c
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 8

Function at 0x406173
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
inc ecx
push 0
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc

Function at 0x4061a2
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp + 8], 0x61736e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
pop ecx
xor edx, edx
div ecx
push esi
push 0
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x4061e6
test edi, edi
jne 0x4061ad
mov byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x4061e0

Function at 0x4061ea
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0x14]
lea eax, [ebp + 0xc]
push eax
push 0x20019
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
mov byte [esi], bl
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40624e
lea eax, [ebp + 8]
push eax
push esi
lea eax, [ebp + 0x14]
push eax
push ebx
push dword [ebp + 0x10]
mov dword [ebp + 8], 0x400
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40623d
cmp dword [ebp + 0x14], 1
je 0x40623f
cmp dword [ebp + 0x14], 2
je 0x40623f
mov byte [esi], bl
push dword [ebp + 0xc]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x406437
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push dword [esp + 8]
mov esi, 0x422218
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call fcn.00406106
test eax, eax
jne 0x406456
xor eax, eax
jmp 0x4064ad
test byte [0x424024], 0x80
je 0x40646a
mov cl, byte [eax]
test cl, cl
je 0x406452
cmp cl, 0x5c
je 0x406452
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push edi
mov edi, eax
sub edi, esi
jmp 0x40648d
push esi
call fcn.004063a6
test eax, eax
je 0x406487
test byte [eax], 0x10
je 0x4064b1
push esi
call fcn.00406411
push esi
call ebx
cmp eax, edi
jg 0x406478
push esi
call fcn.004063e4
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop ebx
pop esi
ret 4
xor eax, eax
jmp 0x4064ab
Function at 0x40650b
Capabilities:
Get common file path
Get file size

Disassembly:
push ebx
push ebp
push esi
push edi
push 0x40752c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
mov esi, dword [esp + 0x18]
je 0x406543
push str.MoveFileExA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x406543
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x406689
test esi, esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x422618], 0x4c554e
mov edi, 0x400
mov ebp, 0x422618
je 0x406587
push 1
push 0
push esi
call fcn.00406173
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x40668f
cmp eax, edi
jg 0x40668f
push edi
mov esi, 0x421dd0
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x40668f
cmp eax, edi
jg 0x40668f
push esi
push ebp
push str._s_s_r_n
push 0x4219d0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x3f0
push esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.wininit.ini
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
xor edi, edi
push edi
push 0x8000080
push 4
push edi
push edi
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x406689
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov esi, eax
lea eax, [esi + ebp + 0xa]
push eax
push edi
push 4
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, edi
mov dword [esp + 0x14], eax
je 0x406671
push edi
push edi
push edi
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
je 0x406665
push str._Rename__r_n
push edi
call fcn.004064b5
test eax, eax
jne 0x406696
push str._Rename__r_n
lea eax, [edi + esi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esi, 0xa
mov eax, esi
push ebp
push 0x4219d0
add eax, edi
push eax
call fcn.00406153
push edi
add esi, ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
push edi
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [0x424050]
pop edi
pop esi
pop ebp
pop ebx
ret 8
push 0x407554
add eax, 0xa
push eax
call fcn.004064b5
test eax, eax
je 0x40664c
inc eax
lea edx, [edi + esi]
cmp eax, edx
mov ecx, eax
jae 0x4066bf
mov dl, byte [ecx]
mov byte [ecx + ebp], dl
inc ecx
lea edx, [edi + esi]
cmp ecx, edx
jb 0x4066b2
sub eax, edi
jmp 0x40664e
Function at 0x4068f2
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
push ebx
mov ebx, dword [ebp + 8]
push ebx
call fcn.00406437
mov ecx, dword [ebp + 0xc]
test cl, 8
mov dword [ebp - 4], eax
je 0x406927
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x424048], eax
jmp 0x406a8b
mov dword [ebp + 8], ecx
and dword [ebp + 8], 1
push esi
je 0x406942
test eax, eax
je 0x406a8a
test cl, 2
je 0x406a46
push edi
push ebx
mov esi, 0x422b58
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp dword [ebp + 8], 0
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x406966
push 0x407614
push esi
call edi
jmp 0x40696c
push ebx
call fcn.00406411
push 0x407290
push ebx
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
lea eax, [ebp - 0x144]
push eax
push esi
add edi, ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x406a3b
cmp byte [ebp - 0x118], 0x2e
jne 0x4069b3
cmp byte [ebp - 0x117], 0x2e
je 0x406a1e
cmp byte [ebp - 0x117], 0
je 0x406a1e
lea eax, [ebp - 0x118]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 0x144]
test al, 0x10
je 0x4069e0
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x406a1e
push dword [ebp + 0xc]
push ebx
call fcn.004068f2
jmp 0x406a1e
and eax, 0xfffffffe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x406a16
test byte [ebp + 0xc], 4
je 0x406a0e
push ebx
push 0xfffffffffffffff1
call fcn.004053f6
push 0
push ebx
call fcn.0040650b
jmp 0x406a1e
inc dword [0x424048]
jmp 0x406a1e
push ebx
push 0xfffffffffffffff2
call fcn.004053f6
lea eax, [ebp - 0x144]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x406998
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x406a45
mov byte [edi - 1], 0
pop edi
xor esi, esi
cmp dword [ebp - 4], esi
je 0x406a8a
cmp dword [ebp + 8], esi
je 0x406a8a
push ebx
call fcn.004063e4
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x406a82
test byte [ebp + 0xc], 4
je 0x406a7a
push ebx
push 0xfffffffffffffff1
call fcn.004053f6
push esi
push ebx
call fcn.0040650b
jmp 0x406a8a
inc dword [0x424048]
jmp 0x406a8a
push ebx
push 0xffffffffffffffe5
call fcn.004053f6
pop esi
pop ebx
leave
ret 8