joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402dd0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x402e8c
cmp byte [esi + 0x3d], 0
je 0x402e8c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x402e7a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x402e41
sub eax, 1
je 0x402e45
sub eax, 2
jne 0x402e7a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004034a2
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x402e63
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x402e7a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004034a2
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004034a2
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.004034a2
mov esp, ebp
pop ebp
ret

Function at 0x403d48
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x403d87
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x403d87
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x403d87
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x403d87
cmp dword [ecx + 0x74], 0xe
jbe 0x403d87
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x10008880
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov eax, dword [0x10028164]
xor eax, ebp
mov dword [ebp + 0x398], eax
mov edx, dword [ebp + 0x3a8]
mov eax, dword [ebp + 0x3a4]
push ebx
push esi
xor esi, esi
mov dword [ebp - 0x70], edx
mov edx, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x78], edx
mov dword [ebp - 0x7c], ecx
mov dword [ebp - 0x80], esi
mov dword [ebp - 0x6c], esi
push edi
test eax, eax
je 0x10008a43
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100088d1
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 1]
mov ecx, 2
imul ecx
mov edi, eax
test edx, edx
jg 0x10008977
jl 0x100088fe
cmp edi, 0x7fffffff
ja 0x10008977
cmp edx, 0xffffffff
jl 0x10008977
jg 0x1000890d
cmp edi, 0x80000000
jb 0x10008977
cmp edi, 0x400
jg 0x1000892d
push edi
call fcn.1001a393
add esp, 4
test al, al
je 0x1000892d
mov eax, edi
call fcn.1000bf00
mov ebx, esp
jmp 0x10008951
mov eax, edi
not eax
cmp eax, 8
jb 0x10008a91
lea eax, [edi + 8]
push eax
call fcn.1001a393
add esp, 4
test eax, eax
je 0x10008977
mov dword [eax], esi
lea ebx, [eax + 8]
mov esi, eax
test ebx, ebx
je 0x10008977
push 0
push 0
push edi
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x74]
mov byte [ebx], 0
push 0
push 3
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov edi, eax
neg edi
sbb edi, edi
and edi, ebx
jmp 0x10008979
xor edi, edi
test edi, edi
je 0x10008a43
push 0x60
push 0
push edi
call dword [sym.imp.kernel32.dll_LoadLibraryExA]
mov ebx, eax
test ebx, ebx
jne 0x100089ae
push 2
push eax
push edi
call dword [sym.imp.kernel32.dll_LoadLibraryExA]
mov ebx, eax
test ebx, ebx
jne 0x100089ae
call fcn.10003920
mov edi, eax
jmp 0x10008a48
push dword [ebp - 0x78]
push dword [ebp - 0x70]
push ebx
call dword [sym.imp.kernel32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x100089c8
call fcn.10003920
jmp 0x10008a34
push edi
push ebx
call dword [sym.imp.kernel32.dll_LoadResource]
mov dword [ebp - 0x70], eax
test eax, eax
jne 0x100089de
call fcn.10003920
jmp 0x10008a34
push edi
push ebx
call dword [sym.imp.kernel32.dll_SizeofResource]
mov edi, eax
lea eax, [edi + 1]
cmp eax, edi
jae 0x100089f6
mov edi, 0x8007000e
jmp 0x10008a36
push eax
lea ecx, [ebp - 0x6c]
call fcn.100033c0
cmp dword [ebp - 0x6c], 0
jne 0x10008a0c
mov edi, 0x8007000e
jmp 0x10008a36
push edi
push dword [ebp - 0x70]
push edi
push dword [ebp - 0x6c]
call fcn.1000aa30
mov eax, dword [ebp - 0x6c]
lea ecx, [ebp - 0x80]
add esp, 0x10
mov byte [eax + edi], 0
push dword [ebp + 0x3b0]
push dword [ebp - 0x6c]
call fcn.100086f0
mov edi, eax
test ebx, ebx
je 0x10008a48
push ebx
call dword [sym.imp.kernel32.dll_FreeLibrary]
jmp 0x10008a48
mov edi, 0x8007000e
lea eax, [ebp - 0x68]
cmp dword [ebp - 0x6c], eax
je 0x10008a58
lea ecx, [ebp - 0x6c]
call fcn.10005750
test esi, esi
je 0x10008a6f
nop dword [eax]
push esi
mov esi, dword [esi]
call fcn.1001a393
add esp, 4
test esi, esi
jne 0x10008a60
mov eax, edi
lea esp, [ebp - 0x8c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x398]
xor ecx, ebp
call fcn.1000bc54
lea esp, [ebp + 0x39c]
pop ebp
ret 0x10
push 0x80070216
call fcn.100013a0
int3
Function at 0x1000aeb0
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x1000aeb9
ret
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x28]
push eax
call dword [sym.imp.kernel32.dll_CreateProcessA]
ret

Function at 0x1001a393
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
pushal
call 0x1001a3a2
pop dword [ebp - 0x44]
mov eax, 0xfb860cb0
sub eax, 0xeb84690e
sub dword [ebp - 0x44], eax
push 0x40
push 0x1000
push 0x3c3d6
push 0
mov eax, 0x56cba460
add eax, 0xb9363cfc
add eax, dword [ebp - 0x44]
call dword [eax]
mov ecx, 0xdde01aaa
sub ecx, 0xdddfcd24
mov esi, eax
mov edx, 0x9feb646c
sub edx, 0x8fe8826c
add edx, dword [ebp - 0x44]
mov edi, 0x3652ebd0
sub dword [ebp - 0x30], 0xd6f8b1f0
mov ebx, dword [edx]
xor dword [ebp - 0x24], 0x18e7a3f1
xor ebx, edi
xor dword [ebp - 0x10], edi
mov dword [esi], ebx
sub dword [ebp - 0xc], 0xfa9b802e
add esi, 0x73c6f45f
add esi, 0x8c390ba5
add edx, 0x4b922f4a
sub edx, 0x4b922f46
loop 0x1001a3fb
add eax, 0x128eb
xor ebx, ebx
add ebx, eax
add eax, 5
mov ecx, 0x10000000
add ecx, dword [ebp - 0x44]
call ebx
leave
ret
Function at 0x100024be
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
pushal
call 0x100024cd
pop dword [ebp - 0x34]
mov eax, 0x100024cd
sub dword [ebp - 0x34], eax
mov dword [ebp - 0x44], 0xe0c931f
add dword [ebp - 0x44], 0x4045b22c
mov dword [ebp - 0x40], 0x23329847
add dword [ebp - 0x40], 0xf00b3fe
mov dword [ebp - 0x3c], 0x1949ea57
add dword [ebp - 0x3c], 0x330259d7
mov dword [ebp - 0x38], 0x3b6ec4e5
sub dword [ebp - 0x38], 0x3b6ec4e5
lea eax, [ebp - 0x44]
push eax
mov eax, 0x25208562
add eax, 0xeadfbae6
add eax, dword [ebp - 0x34]
call dword [eax]
mov dword [ebp - 0x44], 0x53275a83
add dword [ebp - 0x44], 0x214b0ed3
mov dword [ebp - 0x40], 0x871e4f45
add dword [ebp - 0x40], 0xba4e1230
mov dword [ebp - 0x3c], 0x7afd6d55
add dword [ebp - 0x3c], 0xe871ff17
mov dword [ebp - 0x38], 0x61293b9
add dword [ebp - 0x38], 0xf9ed6c47
lea ebx, [ebp - 0x44]
push ebx
push eax
mov eax, 0x76a5953
add eax, 0x895e729
add eax, dword [ebp - 0x34]
call dword [eax]
push 0x40
push 0x1000
push 0x39183
push 0
call eax
mov ecx, 0x7cef55d2
sub ecx, 0x7cef03a7
xor ebx, ebx
add ebx, eax
mov esi, 0xaa56f4af
sub esi, 0x9a565eaf
add esi, dword [ebp - 0x34]
mov edi, 0x7d47feff
add dword [ebp - 0x24], ecx
mov edx, dword [esi]
add dword [ebp - 0x2c], edi
sub edx, edi
xor dword [ebp - 0x10], edx
mov dword [ebx], edx
add dword [ebp - 0x2c], 0x72af9b9c
add ebx, 0xcfe7d85b
sub ebx, 0xcfe7d857
add esi, 0xf3b680b5
add esi, 0xc497f4f
loop 0x100025e6
add eax, 0xa0140a37
sub eax, 0xa012ceb8
mov ebx, eax
add eax, 0x749f3fbd
sub eax, 0x749f3fb8
mov ecx, 0x8b24004e
add ecx, 0x84dbffb2
add ecx, dword [ebp - 0x34]
call ebx
leave
ret

Function at 0x100032c8
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x10007040]
jne 0x100032d2
repz ret
jmp fcn.100036ab
Function at 0x401557
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push ebx
push esi
push edi
lea eax, [ebp - 4]
push eax
mov eax, dword [0x4746b0]
or eax, 8
push eax
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x4015ec
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov edi, 0x105
jmp 0x4015a9
cmp dword [ebp + 0x10], ebx
jne 0x4015e0
push ebx
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 4]
call fcn.00401557
test eax, eax
jne 0x4015bb
push edi
lea eax, [ebp - 0x210]
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x401590
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
call fcn.00406145
cmp eax, ebx
je 0x4015f3
push ebx
push dword [0x4746b0]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x4015ec
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp dword [0x4746b0], ebx
jne 0x4015e9
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x4015e9
jmp 0x4015ec
Function at 0x402ffa
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [0x42e1e4]
sub esi, dword [0x4321f0]
push edi
add esi, dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 0x1f4
xor ebx, ebx
cmp esi, ebx
mov dword [0x474620], eax
jle 0x403158
push dword [0x4321ec]
call fcn.00402fe3
push ebx
push ebx
push dword [0x4321f0]
push dword [0x40a014]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x42e1e0], esi
mov dword [0x41e154], ebx
mov ebp, 0x4261e0
mov eax, dword [0x4321e8]
sub eax, dword [0x4321ec]
mov edi, 0x4000
cmp eax, edi
jg 0x40306f
mov edi, eax
push edi
mov esi, 0x42e1e8
push esi
call fcn.00402fb1
test eax, eax
je 0x40316a
add dword [0x4321ec], edi
mov dword [0x426170], esi
mov dword [0x426174], edi
cmp dword [0x4745dc], ebx
je 0x4030c6
cmp dword [0x4746a0], ebx
jne 0x4030c6
mov eax, dword [0x42e1e0]
sub eax, dword [0x42e1e4]
push ebx
sub eax, dword [esp + 0x1c]
add eax, dword [0x4321f0]
mov dword [0x41e154], eax
call fcn.00402f0f
pop ecx
mov ecx, 0x426158
mov dword [0x426178], ebp
mov dword [0x42617c], 0x8000
call fcn.00406d50
test eax, eax
jl 0x40316f
mov esi, dword [0x426178]
sub esi, ebp
je 0x403124
push ebx
lea eax, [esp + 0x14]
push eax
push esi
push ebp
push dword [0x40a014]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403174
cmp esi, dword [esp + 0x10]
jne 0x403174
add dword [0x4321f0], esi
cmp dword [0x426174], ebx
jne 0x403095
jmp 0x403130
cmp dword [0x426174], ebx
jne 0x40316f
cmp edi, ebx
je 0x40316f
mov eax, dword [0x42e1e4]
mov ecx, eax
sub ecx, dword [0x4321f0]
add ecx, dword [esp + 0x18]
test ecx, ecx
jg 0x403059
push ebx
push ebx
push eax
push dword [0x40a014]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
call fcn.00402f0f
pop ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4
or eax, 0xffffffff
jmp 0x403162
push 0xfffffffffffffffd
pop eax
jmp 0x403162
push 0xfffffffffffffffe
jmp 0x403171
Function at 0x403178
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 0x4031a4
mov ecx, dword [0x474618]
push edi
add eax, ecx
push edi
push eax
push dword [0x40a014]
mov dword [0x42e1e4], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.00402ffa
cmp eax, edi
jl 0x40329d
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 [0x40a014]
call ebx
test eax, eax
je 0x403299
cmp dword [ebp - 4], esi
jne 0x403299
push dword [ebp + 8]
add dword [0x42e1e4], esi
call fcn.00402ffa
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x40329c
cmp dword [ebp + 0x10], edi
jne 0x403268
cmp dword [ebp + 8], edi
jle 0x403294
mov esi, 0x42e1e8
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x403218
mov edi, dword [ebp + 8]
push 0
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [0x40a014]
call ebx
test eax, eax
je 0x403299
cmp edi, dword [ebp - 4]
jne 0x403299
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 0x403264
cmp dword [ebp + 0x14], edi
jne 0x403264
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x42e1e4], eax
cmp dword [ebp + 8], 0
jg 0x40320b
jmp 0x403294
push 0xfffffffffffffffe
jmp 0x40329b
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x403273
mov eax, dword [ebp + 0x14]
push edi
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x40a014]
call ebx
test eax, eax
je 0x403299
mov eax, dword [ebp - 4]
add dword [0x42e1e4], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x40329c
push 0xfffffffffffffffd
pop eax
pop ebx
pop edi
pop esi
leave
ret 0x10
Function at 0x405ba5
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
push eax
push 0x45a298
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push dword [ebp + 8]
mov dword [0x45a298], 0x44
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x405be0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x405e12
and eax, 0xfffffffe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
ret 4

Function at 0x405e15
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
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_CreateFileW]
ret 0xc

Function at 0x405e44
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
mov eax, dword [0x40894c]
mov dword [ebp - 8], eax
mov eax, dword [0x408950]
dec edi
mov dword [ebp - 4], eax
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 word [ebp - 4], dx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x405e94
test edi, edi
jne 0x405e51
mov word [esi], ax
pop edi
pop esi
leave
ret 8
mov eax, esi
jmp 0x405e8e

Function at 0x405e98
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0x14]
xor eax, eax
mov word [esi], ax
lea eax, [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x18]
neg eax
sbb eax, eax
and eax, 0x100
or eax, 0x20019
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405f11
lea eax, [ebp + 0xc]
push eax
push esi
lea eax, [ebp + 0x14]
push eax
push 0
push dword [ebp + 0x10]
mov dword [ebp + 0xc], 0x4008
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405efa
cmp dword [ebp + 0x14], 1
je 0x405eff
cmp dword [ebp + 0x14], 2
je 0x405eff
xor eax, eax
mov word [esi], ax
push dword [ebp + 0x18]
xor eax, eax
mov word [esi + 0x4006], ax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebp
ret 0x14
Function at 0x4065c8
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x45a2e0
push esi
call fcn.00405fcf
push esi
call fcn.00405cc0
mov edi, eax
test edi, edi
jne 0x4065e9
xor eax, eax
jmp 0x406647
push edi
call fcn.0040606d
test byte [0x474628], 0x80
je 0x406606
movzx eax, word [edi]
test ax, ax
je 0x4065e5
cmp ax, 0x5c
je 0x4065e5
sub edi, esi
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
sar edi, 1
jmp 0x406628
push esi
call fcn.0040611e
test eax, eax
je 0x406622
test byte [eax], 0x10
je 0x40664c
push esi
call fcn.0040659b
push esi
call ebx
cmp eax, edi
jg 0x406613
push esi
call fcn.0040656c
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop ebx
pop edi
pop esi
ret 4
xor eax, eax
jmp 0x406646
Function at 0x4068e1
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
push 0x408a34
mov ebx, 0x45e2e8
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov edi, dword [esp + 0x1c]
xor ebp, ebp
mov esi, 0x400
cmp edi, ebp
je 0x40692f
push 1
push ebp
push edi
call fcn.00405e15
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
cmp eax, ebp
je 0x406aa6
cmp eax, esi
jg 0x406aa6
push esi
mov edi, 0x463940
push edi
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
cmp eax, ebp
je 0x406aa6
cmp eax, esi
jg 0x406aa6
push ebp
push ebp
push esi
push 0x45eae8
push 0xffffffffffffffff
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebp
push ebp
call ebx
test eax, eax
je 0x406aa6
push ebp
push ebp
push esi
mov esi, 0x45f138
push esi
push 0xffffffffffffffff
push edi
push ebp
push ebp
call ebx
test eax, eax
je 0x406aa6
push esi
push 0x45eae8
push str._s_s_r_n
push 0x45f538
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ebx, eax
mov eax, dword [0x4745dc]
push dword [eax + 0x128]
push edi
call fcn.00406650
push 4
push 0xc0000000
push edi
call fcn.00405e15
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
je 0x406aa6
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
cmp esi, ebp
je 0x406a9c
push ebp
lea eax, [esp + 0x14]
push eax
push edi
push esi
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406a9c
cmp edi, dword [esp + 0x10]
jne 0x406a9c
push str._Rename__r_n
push esi
call fcn.00405d1d
cmp eax, ebp
jne 0x406a33
push str._Rename__r_n
lea eax, [esi + edi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x406a64
push 0x408a28
add eax, 0xa
push eax
call fcn.00405d1d
mov ebp, eax
test ebp, ebp
je 0x406a62
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x406a55
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x406a4f
sub ebp, esi
inc ebp
mov eax, ebp
xor ebp, ebp
jmp 0x406a66
xor ebp, ebp
mov eax, edi
push ebx
push 0x45f538
add eax, esi
push eax
call fcn.00405dd1
push ebp
push ebp
push ebp
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebp
lea eax, [esp + 0x14]
push eax
add edi, ebx
push edi
push esi
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x406adf
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push ebx
mov ebx, dword [ebp + 8]
push ebx
call fcn.004065c8
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
test cl, 8
je 0x406b14
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x474688], eax
jmp 0x406cba
mov dword [ebp + 8], ecx
and dword [ebp + 8], 1
push esi
je 0x406b2f
test eax, eax
je 0x406c65
test cl, 2
je 0x406c65
push edi
push ebx
mov esi, 0x45f938
push esi
call fcn.00405fcf
cmp dword [ebp + 8], 0
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
je 0x406b52
push str..
push esi
call edi
jmp 0x406b58
push ebx
call fcn.0040659b
cmp word [ebx], 0
jne 0x406b68
cmp word [0x45f938], 0x5c
jne 0x406b70
push 0x4082d0
push ebx
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebx + eax*2]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x25c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x406c54
lea esi, [ebp - 0x230]
push 0x3f
mov eax, esi
push eax
call fcn.00405c6c
xor edi, edi
cmp word [eax], di
je 0x406bb7
cmp word [ebp - 0x28], di
je 0x406bb7
lea esi, [ebp - 0x28]
cmp word [esi], 0x2e
jne 0x406bd2
movzx eax, word [esi + 2]
cmp ax, di
je 0x406c31
cmp ax, 0x2e
jne 0x406bd2
cmp word [esi + 4], di
je 0x406c31
push esi
push dword [ebp - 4]
call fcn.00405fcf
test byte [ebp - 0x25c], 0x10
je 0x406bf9
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x406c31
push dword [ebp + 0xc]
push ebx
call fcn.00406adf
jmp 0x406c31
push ebx
call fcn.00405df5
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x406c29
test byte [ebp + 0xc], 4
je 0x406c21
push ebx
push 0xfffffffffffffff1
call fcn.00404e92
push edi
push ebx
call fcn.00406aac
jmp 0x406c31
inc dword [0x474688]
jmp 0x406c31
push ebx
push 0xfffffffffffffff2
call fcn.00404e92
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x406b97
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x406c56
xor edi, edi
cmp dword [ebp + 8], edi
pop edi
je 0x406c65
mov ecx, dword [ebp - 4]
xor eax, eax
mov word [ecx - 2], ax
xor esi, esi
cmp dword [ebp + 8], esi
je 0x406cb9
cmp dword [ebp - 0xc], esi
je 0x406ca9
push ebx
call fcn.0040611e
test eax, eax
je 0x406cb9
push ebx
call fcn.0040656c
push ebx
call fcn.00405df5
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x406cb1
test byte [ebp + 0xc], 4
je 0x406ca9
push ebx
push 0xfffffffffffffff1
call fcn.00404e92
push esi
push ebx
call fcn.00406aac
jmp 0x406cb9
inc dword [0x474688]
jmp 0x406cb9
push ebx
push 0xffffffffffffffe5
call fcn.00404e92
pop esi
pop ebx
leave
ret 8