joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001cd24
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.100163d6
and dword [ebp - 4], 0
cmp dword [0x1002d398], 0
mov ebx, eax
jne 0x1001cdd5
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x1001ce86
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x1001ce86
push eax
call fcn.10016364
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x1002d398], eax
call esi
push eax
call fcn.10016364
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x1002d39c], eax
call esi
push eax
call fcn.10016364
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x1002d3a0], eax
call esi
push eax
call fcn.10016364
pop ecx
mov dword [0x1002d3a8], eax
test eax, eax
je 0x1001cdd5
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.10016364
pop ecx
mov dword [0x1002d3a4], eax
mov eax, dword [0x1002d3a4]
cmp eax, ebx
je 0x1001ce2d
cmp dword [0x1002d3a8], ebx
je 0x1001ce2d
push eax
call fcn.100163df
push dword [0x1002d3a8]
mov esi, eax
call fcn.100163df
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x1001ce2d
test edi, edi
je 0x1001ce2d
call esi
test eax, eax
je 0x1001ce24
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x1001ce24
test byte [ebp - 0xc], 1
jne 0x1001ce2d
or dword [ebp + 0x10], 0x200000
jmp 0x1001ce66
mov eax, dword [0x1002d39c]
cmp eax, ebx
je 0x1001ce66
push eax
call fcn.100163df
pop ecx
test eax, eax
je 0x1001ce66
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x1001ce66
mov eax, dword [0x1002d3a0]
cmp eax, ebx
je 0x1001ce66
push eax
call fcn.100163df
pop ecx
test eax, eax
je 0x1001ce66
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x1002d398]
call fcn.100163df
pop ecx
test eax, eax
je 0x1001ce86
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x1001ce88
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403fe0
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
mov eax, dword [0x52965c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
cmp dword [ebx], 0
jne 0x4040a1
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.00474bb0
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x40408b
push edi
push 0x104
lea edi, [ebx + 4]
push 0
push edi
call fcn.00474bb0
add esp, 0xc
lea eax, [ebp - 0x108]
push edi
push 0
push 0x4f1910
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push str..bat
push edi
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionA]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0x80
push 4
push 0
push 7
push 0xc01200a0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebx], eax
pop edi
cmp dword [ebx], 0
jne 0x4040a1
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e5d8
mov esp, ebp
pop ebp
ret
push 0x208
lea eax, [ebp - 0x310]
push 0
push eax
call fcn.00474bb0
add esp, 0xc
mov dword [ebp - 0x314], 0
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 0xc]
lea eax, [ebp - 0x310]
push 0x207
push eax
call fcn.00404170
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call fcn.0048f5b1
or ecx, 0xffffffff
add esp, 0x1c
test eax, eax
cmovs eax, ecx
test eax, eax
js 0x404101
cmp eax, 0x207
ja 0x404101
jne 0x404108
mov byte [ebp - 0x109], 0
lea ecx, [ebp - 0x310]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404111
push 0
lea eax, [ebp - 0x314]
sub ecx, edx
push eax
push ecx
lea eax, [ebp - 0x310]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0045e5d8
mov esp, ebp
pop ebp
ret
Function at 0x4043e0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e40c0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x52965c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x24], ecx
mov eax, dword [ebp + 0xc]
xor edi, edi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x1c]
push eax
push 0xffffffffffffffff
push 0x404b00
push 0x404a50
push 0x404b20
push 0x404ac0
push 0x404a70
push 0x404b70
push 0x404b60
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
call sub.Cabinet.dll_FDICreate
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x40453d
push dword [ebp - 0x20]
push edi
push 0x404b80
push edi
push dword [ebp - 0x28]
push esi
push ebx
call sub.Cabinet.dll_FDICopy
add esp, 0x1c
test eax, eax
jne 0x4044d3
lea ecx, [ebp - 0x20]
call fcn.00404180
mov esi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x24]
push esi
mov dword [ebp - 4], edi
call fcn.00404560
push eax
push esi
lea eax, [ebp - 0x20]
push str.FDICopy_failed_with_error_code__d_:__s
push eax
call fcn.004046e0
mov esi, dword [ebp - 0x20]
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4044d8
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4044d8
mov edi, 1
push ebx
call sub.Cabinet.dll_FDIDestroy
add esp, 4
cmp eax, 1
je 0x40453d
lea ecx, [ebp - 0x20]
call fcn.00404180
mov esi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x24]
push esi
mov dword [ebp - 4], 1
call fcn.00404560
push eax
push esi
lea eax, [ebp - 0x20]
push str.FDIDestroy_failed_with_error_code__d_:__s
push eax
call fcn.004046e0
mov esi, dword [ebp - 0x20]
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40453d
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045e5d8
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4065c0
Capabilities:
Check os version

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x160
mov eax, dword [0x52965c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [0x528048]
test ecx, ecx
js 0x406608
xor eax, eax
test ecx, ecx
setne al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e5d8
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push 0x118
xorps xmm0, xmm0
mov dword [0x528048], 0
lea eax, [ebp - 0x124]
movaps xmmword [ebp - 0x160], xmm0
push 0
push eax
movaps xmmword [ebp - 0x150], xmm0
mov dword [ebp - 0x140], 0
call fcn.00474bb0
add esp, 0xc
mov dword [ebp - 0x128], 0x11c
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x406679
lea eax, [ebp - 0x128]
mov dword [ebp - 0x128], 0x114
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x4066d0
push str.GetNativeSystemInfo
push 0x4f1cc4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4066d0
lea ecx, [ebp - 0x160]
push ecx
call eax
mov ax, word [ebp - 0x160]
cmp ax, 9
je 0x4066b0
cmp ax, 6
jne 0x4066d0
mov dword [0x528048], 1
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e5d8
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
call fcn.0045e5d8
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret

Function at 0x406b90
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x406be9
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x406be9
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x406bda
cmp esi, edx
jae 0x406be9
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x406bc8
cmp esi, edx
jae 0x406be9
cmp word [esi], 0
je 0x406be9
mov eax, esi
pop esi
pop ebp
ret
xor eax, eax
pop esi
pop ebp
ret

Function at 0x407610
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
push esi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
jne 0x407631
mov eax, 0x80004003
pop esi
pop ebp
ret
push ebx
push edi
push 0xf01ff
push dword [ebp + 8]
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x40765b
push esi
mov ebx, 0x80004005
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
mov eax, ebx
pop ebx
pop esi
pop ebp
ret
push dword [ebp + 0xc]
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
neg eax
push edi
sbb ebx, ebx
and ebx, 0x7fffbffb
add ebx, 0x80004005
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
mov eax, ebx
pop ebx
pop esi
pop ebp
ret
Function at 0x407840
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push esi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
jne 0x407861
mov eax, 0x80004003
pop esi
pop ebp
ret
push ebx
push edi
push 0xf01ff
push dword [ebp + 8]
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x40788b
push esi
mov ebx, 0x80004005
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
mov eax, ebx
pop ebx
pop esi
pop ebp
ret
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
neg eax
push edi
sbb ebx, ebx
and ebx, 0x7fffbffb
add ebx, 0x80004005
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
mov eax, ebx
pop ebx
pop esi
pop ebp
ret

Function at 0x4079b0
Capabilities:
Accept command line arguments
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e4241
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
mov eax, dword [0x52965c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push 0xf003f
push 0
push 0
mov dword [ebp - 0x118], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0x124], esi
mov dword [ebp - 4], 0
test esi, esi
jne 0x407a16
mov eax, 0x80004003
jmp 0x407b0e
push 0xf01ff
push edi
push esi
mov byte [ebp - 4], 1
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
mov dword [ebp - 0x128], edi
test edi, edi
jne 0x407a3d
mov ebx, 0x80004005
jmp 0x407b05
push dword [ebp - 0x118]
lea ecx, [ebp - 0x114]
mov dword [ebp - 0x11c], 0
xor ebx, ebx
call fcn.00407110
push dword [eax]
lea ecx, [ebp - 0x120]
mov byte [ebp - 4], 2
call fcn.00407070
mov eax, dword [ebp - 0x114]
lea ecx, [ebp - 0x110]
mov byte [ebp - 4], 1
cmp eax, ecx
je 0x407a88
push eax
call fcn.0048faa8
add esp, 4
mov eax, dword [ebp - 0x120]
cmp dword [eax - 0xc], 0
je 0x407aa4
lea ecx, [ebp - 0x11c]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ebx, eax
push ebx
push dword [ebp - 0x11c]
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
mov dword [ebp - 0x118], eax
test ebx, ebx
je 0x407ac9
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x118]
xor ecx, ecx
mov ebx, 0x80004005
test eax, eax
cmovne ebx, ecx
mov ecx, dword [ebp - 0x120]
add ecx, 0xfffffff0
or eax, 0xffffffff
mov dword [ebp - 0x118], ecx
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x407afe
mov ecx, dword [ecx]
push dword [ebp - 0x118]
mov edx, dword [ecx]
call dword [edx + 4]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045e5d8
mov esp, ebp
pop ebp
ret
Function at 0x407e90
Capabilities:
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x52965c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
jne 0x407ecf
pop edi
mov eax, 0x80004003
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e5d8
mov esp, ebp
pop ebp
ret
push ebx
push 0xf01ff
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
jne 0x407eea
mov edi, 0x80004005
jmp 0x407f21
lea eax, [ebp - 0x20]
mov dword [ebp - 8], 0
push eax
xorps xmm0, xmm0
push 1
push ebx
movups xmmword [ebp - 0x20], xmm0
movq qword [ebp - 0x10], xmm0
call dword [sym.imp.ADVAPI32.dll_ControlService]
neg eax
push ebx
sbb edi, edi
and edi, 0x7fffbffb
add edi, 0x80004005
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
mov eax, edi
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.0045e5d8
mov esp, ebp
pop ebp
ret
Function at 0x408590
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2024
call fcn.0045ea30
mov eax, dword [0x52965c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
test esi, esi
jne 0x4085c0
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e5d8
mov esp, ebp
pop ebp
ret
push 0x2000
xorps xmm0, xmm0
mov dword [ebp - 0x200c], 0
lea eax, [ebp - 0x2004]
movq qword [ebp - 0x2014], xmm0
push 0
movups xmmword [ebp - 0x2024], xmm0
push eax
mov word [ebp - 0x2008], 0
mov dword [ebp - 0x2020], 3
call fcn.00474bb0
push 0x1000
lea eax, [ebp - 0x2004]
push esi
push eax
call fcn.00490d4b
lea eax, [ebp - 0x2004]
add esp, 0x18
mov dword [ebp - 0x201c], eax
mov eax, 0x614
mov word [ebp - 0x2014], ax
lea eax, [ebp - 0x2024]
push eax
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
mov ecx, dword [ebp - 4]
mov eax, 1
xor ecx, ebp
pop esi
call fcn.0045e5d8
mov esp, ebp
pop ebp
ret
Function at 0x408650
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x668
mov eax, dword [0x52965c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x408863
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x408863
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408683
sub ecx, edx
sar ecx, 1
cmp ecx, 3
jbe 0x408863
push ebx
push edi
push 0x208
lea eax, [ebp - 0x20c]
mov edi, 1
push 0
push eax
call fcn.00474bb0
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.00474bb0
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x414]
add esp, 0x18
push esi
push eax
call ebx
push 0x4f32c4
lea eax, [ebp - 0x414]
push eax
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x408704
test al, 1
je 0x408704
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x664]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x668], eax
cmp eax, 0xffffffff
je 0x408849
lea ecx, [ebp - 0x664]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x40883d
nop dword [eax]
test byte [ebp - 0x664], 0x10
je 0x4087b8
cmp word [ebp - 0x638], 0x2e
jne 0x408777
mov ax, word [ebp - 0x636]
test ax, ax
je 0x408822
cmp ax, 0x2e
jne 0x408777
cmp word [ebp - 0x634], 0
je 0x408822
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00474bb0
add esp, 0xc
lea eax, [ebp - 0x20c]
push esi
push eax
call ebx
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x20c]
push eax
call ebx
lea eax, [ebp - 0x20c]
push eax
call fcn.00408650
add esp, 4
jmp 0x408820
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00474bb0
add esp, 0xc
lea eax, [ebp - 0x20c]
push esi
push eax
call ebx
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x20c]
push eax
call ebx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40880f
test al, 1
je 0x40880f
and eax, 0xfffffffe
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
and edi, eax
lea eax, [ebp - 0x664]
push eax
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x408740
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
and eax, edi
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e5d8
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.0045e5d8
mov esp, ebp
pop ebp
ret
Function at 0x408880
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4088d8
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4088d8
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x4088b8
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4088d8
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4088d3
test al, 0x10
je 0x4088d3
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4088d8
xor eax, eax
pop esi
pop ebp
ret
mov eax, 1
pop esi
pop ebp
ret
Function at 0x408fc0
Capabilities:
Check if file exists
Delete file
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x408fef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.delete__s_failed__error_d
call fcn.00435160
add esp, 0xc
mov eax, 1
pop esi
pop ebp
ret
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x408fe7
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x409015
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x408fd2
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
xor eax, eax
pop esi
pop ebp
ret
Function at 0x409030
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e43a6
mov eax, dword fs:[0]
push eax
sub esp, 0x880
mov eax, dword [0x52965c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
test ebx, ebx
jne 0x40906c
xor eax, eax
jmp 0x409272
cmp word [ebx], 0
je 0x409065
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409077
sub ecx, edx
sar ecx, 1
cmp ecx, 0x104
jge 0x409065
push 0x410
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.00474bb0
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x4f3344
push ebx
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4090d2
test al, 1
je 0x4090d2
and eax, 0xfffffffe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, 0x5c
mov dword [ebp - 0x428], 0
mov word [ebp - 0x42c], ax
mov dword [ebp - 0x424], 0
lea eax, [ebp - 0x420]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x884]
call fcn.004088e0
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x409222
cmp dword [ebp - 0x424], 0
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
je 0x409181
mov eax, dword [ebp - 0x884]
shr eax, 4
and eax, 1
je 0x409181
cmp word [ebp - 0x858], 0x2e
jne 0x409181
mov ax, word [ebp - 0x856]
test ax, ax
je 0x40915c
cmp ax, 0x2e
jne 0x409181
cmp word [ebp - 0x854], 0
jne 0x409181
mov eax, dword [ebp - 0x428]
test eax, eax
je 0x40928e
lea ecx, [ebp - 0x884]
push ecx
push eax
call edi
mov edi, eax
mov dword [ebp - 0x424], edi
jmp 0x409214
lea eax, [ebp - 0x888]
push eax
lea ecx, [ebp - 0x884]
call fcn.00408a20
cmp dword [ebp - 0x424], 0
mov byte [ebp - 4], 1
je 0x4091bc
mov eax, dword [ebp - 0x884]
shr eax, 4
and eax, 1
je 0x4091bc
mov esi, dword [ebp - 0x888]
push esi
call fcn.00409030
jmp 0x4091c8
mov esi, dword [ebp - 0x888]
push esi
call fcn.00408fc0
mov eax, dword [ebp - 0x428]
add esp, 4
test eax, eax
jne 0x4091d9
xor edi, edi
jmp 0x4091f8
cmp dword [ebp - 0x424], 0
jne 0x4091e6
xor edi, edi
jmp 0x4091f8
lea ecx, [ebp - 0x884]
push ecx
push eax
call edi
mov edi, eax
mov dword [ebp - 0x424], edi
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x409214
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
jne 0x409119
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x428]
mov dword [ebp - 0x424], 0
test eax, eax
je 0x409248
cmp eax, 0xffffffff
je 0x409248
push eax
call esi
mov dword [ebp - 0x428], 0
push ebx
call fcn.00408590
mov eax, dword [ebp - 0x428]
add esp, 4
mov dword [ebp - 0x424], 0
test eax, eax
je 0x40926d
cmp eax, 0xffffffff
je 0x40926d
push eax
call esi
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045e5d8
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp - 0x424], 0
jmp 0x409248