joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407e80
Capabilities:
Create directory

Disassembly:
push esi
push ebx
push eax
mov eax, 0x2010
call fcn.0040f0ac
sub esp, eax
mov eax, dword [esp + eax]
mov esi, eax
mov eax, dword [0x42c0a0]
test eax, eax
je 0x407f20
xor ebx, ebx
test eax, eax
jg 0x407ebb
jmp 0x407ed8
add ebx, 1
cmp dword [0x42c0a0], ebx
jle 0x407ed8
mov eax, dword [ebx*4 + 0x42b0a0]
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x407eb0
jmp 0x407f12
mov dword [esp], esi
call sub.msvcrt.dll_wcslen
cmp eax, 2
jne 0x407eec
cmp word [esi + 2], 0x3a
je 0x407f12
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
sub esp, 8
test eax, eax
je 0x407f68
mov ebx, dword [0x42c0a0]
cmp ebx, 0x3ff
jle 0x407f80
mov eax, 1
add esp, 0x2014
pop ebx
pop esi
ret
mov ecx, 0x1000
mov edx, str.HOME
lea eax, [esp + 0x10]
call fcn.00407710
test al, al
je 0x407f9b
lea eax, [esp + 0x10]
mov ebx, dword [0x42c0a0]
mov dword [esp], eax
call sub.msvcrt.dll__wcsdup
mov dword [ebx*4 + 0x42b0a0], eax
mov eax, dword [0x42c0a0]
add eax, 1
mov dword [0x42c0a0], eax
jmp 0x407ea1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x407f04
xor eax, eax
jmp 0x407f17
mov dword [esp], esi
call sub.msvcrt.dll__wcsdup
add dword [0x42c0a0], 1
mov dword [ebx*4 + 0x42b0a0], eax
jmp 0x407f12
mov eax, str.HOME
call fcn.00407db0
lea esi, [esi]
lea esi, [esi]

Function at 0x408130
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file
Terminate process

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov eax, dword [0x424040]
test eax, eax
je 0x408169
mov dword [esp + 4], 0x1388
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
test eax, eax
jne 0x408180
mov eax, dword [0x424040]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
cmp byte [0x429080], 0
jne 0x4081a0
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [0x424040]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
sub esp, 8
jmp 0x408158
mov edx, 0x414
lea edi, [esp + 0x12]
mov dword [esp + 0x12], 0
mov esi, dword [sym.imp.SHELL32.dll_SHFileOperationW]
mov dword [esp + 0x16], 3
mov ebx, 0x14
mov dword [esp + 0x1a], 0x4290a0
mov dword [esp + 0x1e], 0x41713c
mov word [esp + 0x22], dx
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0x41713c
mov dword [esp], edi
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
sub esp, 4
jmp 0x408273
test al, 0x10
je 0x408172
mov dword [esp], 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 0x414
sub esp, 4
mov dword [esp + 0x12], 0
mov dword [esp + 0x16], 3
mov dword [esp + 0x1a], 0x4290a0
mov dword [esp + 0x1e], 0x41713c
mov word [esp + 0x22], ax
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0x41713c
mov dword [esp], edi
call esi
sub esp, 4
sub ebx, 1
je 0x408172
mov dword [esp], 0x4290a0
call ebp
sub esp, 4
cmp eax, 0xffffffff
jne 0x408208
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x40e0fc
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x24
lea eax, [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [esp], 2
call fcn.00414500
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov ebx, dword [ebp - 0xc]
mov dword [esp], 2
call fcn.00414500
mov dword [esp + 8], ebx
mov edx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort

Function at 0x40ecd0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x40ecef
mov eax, 0
jmp 0x40ed33
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x40ed12
mov eax, 0
jmp 0x40ed33
mov eax, dword [ebp - 8]
add eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
cmp ax, 0x10b
je 0x40ed2e
mov eax, 0
jmp 0x40ed33
mov eax, 1
leave
ret

Function at 0x40ed35
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0x14]
movzx edx, ax
mov eax, dword [ebp - 0xc]
add eax, edx
add eax, 0x18
mov dword [ebp - 4], eax
jmp 0x40ed94
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
cmp dword [ebp + 0xc], eax
jb 0x40ed8c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
add eax, edx
cmp dword [ebp + 0xc], eax
jae 0x40ed8c
mov eax, dword [ebp - 4]
jmp 0x40eda8
add dword [ebp - 8], 1
add dword [ebp - 4], 0x28
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 6]
movzx eax, ax
cmp dword [ebp - 8], eax
jb 0x40ed69
mov eax, 0
leave
ret

Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43200c
nop
pop eax
nop
nop
nop
nop
add eax, 0x40729f
nop
nop
sub eax, 0x407245
nop
nop
mov ebx, dword [eax]
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
jl 0x432030
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43201e
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x40213a
Capabilities:
Terminate process

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
sub esp, 0x20
mov ebx, dword [ecx + 4]
test byte [0x407018], 1
jne 0x402157
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.__d__semi_stub:_no_script_engine_clean_up_n
mov dword [esp + 8], str.Host_Quit
mov dword [esp + 4], 0x407018
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
jmp 0x40214e
Function at 0x4059e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x10
mov esi, dword [ebp + 8]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x405a3b
cmp byte [esi + ebx - 1], 0xa
je 0x405a0f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
xchg dword [0x4140c4], eax
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_fwrite]
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
Function at 0x4063e0
Capabilities:
Accept command line arguments
Get process heap force flags
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x10
mov dword [esp], 1
call sym.__configure_wide_argv
call sym.__initialize_wide_environment
call sym.___p___argc
mov esi, dword [eax]
call sym.___p___wargv
mov edi, dword [eax]
call sym.__get_initial_wide_environment
mov ebx, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x3c]
cmp word [eax + edx + 0x5c], 2
sete al
movzx eax, al
add eax, 1
mov dword [esp], eax
call sym.__set_app_type
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._wmain
mov dword [esp], eax
call sym._exit

Function at 0x406450
Capabilities:
Accept command line arguments
Encrypt data using rc4 prga

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x78
call dword [sym.imp.kernel32.dll_GetCommandLineW]
mov ebx, eax
movzx eax, word [eax]
test ax, ax
je 0x4064eb
cmp ax, 9
je 0x4064d8
cmp ax, 0x20
je 0x4064d8
mov dword [ebp - 0x6c], 0
xor edi, edi
lea esi, [esi]
cmp ax, 0x5c
je 0x406540
cmp ax, 0x22
je 0x406550
mov dword [ebp - 0x6c], 0
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
je 0x4064eb
cmp ax, 9
sete cl
cmp ax, 0x20
mov esi, ecx
sete cl
mov edx, esi
or dl, cl
je 0x406490
test edi, 1
jne 0x406490
lea esi, [esi]
movzx eax, word [ebx + 2]
add ebx, 2
cmp ax, 9
je 0x4064d8
cmp ax, 0x20
je 0x4064d8
lea eax, [ebp - 0x5c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetStartupInfoW]
sub esp, 4
test byte [ebp - 0x30], 1
je 0x406568
movzx esi, word [ebp - 0x2c]
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._wWinMain_16
sub esp, 0x10
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
add dword [ebp - 0x6c], 1
jmp 0x4064ab
and dword [ebp - 0x6c], 1
jne 0x4064a4
xor edi, 1
jmp 0x4064ab
mov eax, 1
mov esi, 1
mov word [ebp - 0x2c], ax
jmp 0x406504
Function at 0x40110c
Capabilities:
Decompress data using aplib

Disassembly:
pushal
mov edi, dword [ebx + 0x60]
mov dl, 0x80
movsb byte es:[edi], byte [esi]
mov dh, 0x80
call dword [ebx]
jae 0x401112
xor ecx, ecx
call dword [ebx]
jae 0x401135
xor eax, eax
call dword [ebx]
jae 0x401148
mov dh, 0x80
inc ecx
mov al, 0x10
call dword [ebx]
adc al, al
jae 0x40112a
jne 0x401174
stosb byte es:[edi], al
jmp 0x401115
call fcn.0040118a
add dh, dh
sbb ecx, 1
jne 0x401151
call fcn.00401188
jmp 0x401170
lodsb al, byte [esi]
shr eax, 1
je 0x401194
adc ecx, ecx
jmp 0x40116d
xchg ecx, eax
dec eax
shl eax, 8
lodsb al, byte [esi]
call fcn.00401188
cmp eax, 0x7d00
jae 0x40116d
cmp ah, 5
jae 0x40116e
cmp eax, 0x7f
ja 0x40116f
inc ecx
inc ecx
xchg ebp, eax
mov eax, ebp
mov dh, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x401115
sub edi, dword [ebx + 0x60]
mov dword [esp + 0x1c], edi
popal
ret

Function at 0x4013c1
Capabilities:
Encode data using xor

Disassembly:
mov edi, section..text
lea ebx, [edi + 0x21]
push 0xa
pop eax
push 4
pop ecx
pushal
push edi
call fcn.00401464
xchg ebp, eax
mov edx, dword [ebp + 0x3c]
mov esi, dword [edx + ebp + 0x78]
lea esi, [esi + ebp + 0x18]
lodsd eax, dword [esi]
xchg ecx, eax
lodsd eax, dword [esi]
push eax
lodsd eax, dword [esi]
add eax, ebp
xchg edx, eax
lodsd eax, dword [esi]
add eax, ebp
push eax
mov esi, edx
lodsd eax, dword [esi]
add eax, ebp
xor edx, edx
rol edx, 3
xor dl, byte [eax]
inc eax
cmp byte [eax], 0
jne 0x4013f5
mov eax, dword [esp]
add dword [esp], 2
mov edi, ebx
cmp dword [edi], edx
jne 0x401420
movzx eax, word [eax]
shl eax, 2
add eax, dword [esp + 4]
add eax, ebp
mov eax, dword [eax]
add eax, ebp
stosd dword es:[edi], eax
jmp 0x401421
scasd eax, dword es:[edi]
cmp dword [edi], 0
jne 0x401409
loop 0x4013f0
pop eax
pop eax
popal
dec eax
add edi, eax
loop 0x4013cf
mov ebp, 0x40146c
mov byte [ebp + 0x400], 0
mov esi, 0x4a2c84
push 0x93600
push ecx
call dword [ebx + 0x24]
mov dword [ebx + 0x60], eax
sub esi, 4
mov ecx, dword [esi]
jecxz 0x401460
mov dword [ebx + 0x6c], ecx
sub esi, ecx
call fcn.0040119d
jmp 0x40144d
push ecx
call dword [ebx + 0xc]
Function at 0x402d60
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, esi
lea eax, [ebp - 4]
and esi, 0x300
push eax
mov eax, esi
and edi, 1
or al, 9
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004060f0
xor ebx, ebx
cmp eax, ebx
jne 0x402e43
test byte [ebp + 0x10], 2
je 0x402dc1
push ebx
push ebx
push ebx
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x110]
mov dword [ebp - 8], ebx
push eax
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, 0x103
jne 0x402e28
lea eax, [ebp - 0x110]
push 0x105
push eax
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
jmp 0x402dfd
test edi, edi
jne 0x402e28
push dword [ebp + 0x10]
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 4]
call fcn.00402d60
test eax, eax
jne 0x402e06
lea eax, [ebp - 0x110]
push 0x105
push eax
push edi
push dword [ebp - 4]
call ebx
test eax, eax
je 0x402dd6
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 3
call fcn.00406692
test eax, eax
jne 0x402e38
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
jmp 0x402e43
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x3eb
jmp 0x402e43
push 0
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x403168
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
test edi, edi
jne 0x403185
mov dword [ebp - 8], 0x8000
and dword [ebp - 4], 0
mov dword [ebp - 0xc], edi
test edi, edi
jne 0x403197
mov dword [ebp - 0xc], 0x796118
mov eax, dword [ebp + 8]
test eax, eax
jl 0x4031ac
mov ecx, dword [0x7a2bb8]
add ecx, eax
push ecx
call fcn.0040336d
lea eax, [ebp + 0x14]
push 4
push eax
call fcn.00403357
test eax, eax
je 0x403345
test byte [ebp + 0x17], 0x80
je 0x4032f0
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
and dword [0x40b870], 0
and dword [ebp + 0x14], 0x7fffffff
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
mov byte [0x40b858], 0xb
mov dword [ebp + 8], eax
jle 0x40334d
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x403202
mov esi, dword [ebp + 0x14]
mov edi, 0x792118
push esi
push edi
call fcn.00403357
test eax, eax
je 0x403345
sub dword [ebp + 0x14], esi
mov dword [0x40b848], edi
mov dword [0x40b84c], esi
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
push 0x40b848
mov dword [0x40b850], edi
mov dword [0x40b854], eax
call fcn.004067b7
test eax, eax
mov dword [ebp - 0x14], eax
jl 0x4032e8
mov esi, dword [0x40b850]
sub esi, edi
call ebx
test byte [0x7a2c14], 1
mov edi, eax
je 0x4032a3
sub eax, dword [ebp - 0x10]
cmp eax, 0xc8
ja 0x403270
cmp dword [ebp + 0x14], 0
jne 0x4032a3
mov eax, dword [ebp + 8]
push dword [ebp + 8]
sub eax, dword [ebp + 0x14]
push 0x64
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
push eax
lea eax, [ebp - 0x54]
push str....__d__
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x54]
push eax
push 0
call fcn.004053ae
mov dword [ebp - 0x10], edi
test esi, esi
je 0x4032dc
cmp dword [ebp + 0x10], 0
jne 0x4032c2
push esi
push dword [ebp - 0xc]
push dword [ebp + 0xc]
call fcn.00405ea4
test eax, eax
je 0x4032ec
add dword [ebp - 4], esi
jmp 0x4032d0
mov eax, dword [0x40b850]
add dword [ebp - 4], esi
sub dword [ebp - 8], esi
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x14], 4
jne 0x403225
jmp 0x40334d
cmp dword [ebp + 0x14], 0
jg 0x4031f5
jmp 0x40334d
push 0xfffffffffffffffc
jmp 0x403347
push 0xfffffffffffffffe
jmp 0x403347
test edi, edi
jne 0x403332
cmp dword [ebp + 0x14], edi
jle 0x40334d
mov ebx, dword [ebp - 8]
cmp dword [ebp + 0x14], ebx
mov esi, dword [ebp + 0x14]
jl 0x403306
mov esi, ebx
mov edi, 0x792118
push esi
push edi
call fcn.00403357
test eax, eax
je 0x403345
push esi
push edi
push dword [ebp + 0xc]
call fcn.00405ea4
test eax, eax
je 0x4032ec
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x4032fc
jmp 0x40334d
cmp dword [ebp + 0x14], esi
jge 0x40333a
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.00403357
test eax, eax
jne 0x40334a
push 0xfffffffffffffffd
pop eax
jmp 0x403350
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x405903
Capabilities:
Create process on windows

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

Function at 0x405946
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 4]
push eax
and dword [eax + 0x24], 0
mov dword [eax], 0x3c
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
ret 4

Function at 0x4059e4
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00405dd8
mov edi, eax
cmp edi, 0xffffffff
je 0x405a25
test byte [esp + 0x10], 1
push esi
je 0x405a07
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x405a0d
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x405a16
xor eax, eax
inc eax
jmp 0x405a27
test byte [esp + 0x10], 4
jne 0x405a25
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x405a2c
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, ebx
and eax, 4
push edi
mov dword [ebp - 4], eax
call fcn.00405cea
test bl, 8
mov dword [ebp - 0xc], eax
je 0x405a6b
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x7a2be8], eax
jmp 0x405bf5
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x405a85
test eax, eax
je 0x405ba3
test bl, 2
je 0x405ba3
mov esi, 0x7a0168
push edi
push esi
call fcn.0040626a
cmp dword [ebp + 8], 0
je 0x405aa4
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x405aaa
push edi
call fcn.00405c43
cmp byte [edi], 0
jne 0x405ab8
cmp byte [0x7a0168], 0x5c
jne 0x405ac3
push 0x40a014
push edi
call sub.KERNEL32.dll_lstrcatA
push edi
call sub.KERNEL32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x14c]
push eax
push esi
add ebx, edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x405b99
lea eax, [ebp - 0x120]
push 0x3f
push eax
lea esi, [ebp - 0x120]
call fcn.00405c27
cmp byte [eax], 0
je 0x405b09
cmp byte [ebp - 0x1c], 0
je 0x405b09
lea esi, [ebp - 0x1c]
cmp byte [esi], 0x2e
jne 0x405b1f
mov al, byte [esi + 1]
test al, al
je 0x405b78
cmp al, 0x2e
jne 0x405b1f
cmp byte [esi + 2], 0
je 0x405b78
push esi
push ebx
call fcn.0040626a
test byte [ebp - 0x14c], 0x10
je 0x405b44
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405b78
push dword [ebp + 0xc]
push edi
call fcn.00405a2c
jmp 0x405b78
push dword [ebp - 4]
push edi
call fcn.004059e4
test eax, eax
jne 0x405b70
cmp dword [ebp - 4], eax
je 0x405b68
push edi
push 0xfffffffffffffff1
call fcn.004053ae
push 0
push edi
call fcn.00406043
jmp 0x405b78
inc dword [0x7a2be8]
jmp 0x405b78
push edi
push 0xfffffffffffffff2
call fcn.004053ae
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405ae7
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x405ba3
and byte [ebx - 1], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x405bf5
cmp dword [ebp - 0xc], esi
jne 0x405bb7
inc dword [0x7a2be8]
jmp 0x405bf5
push edi
call fcn.004065fd
test eax, eax
je 0x405bf5
push edi
call fcn.00405bfc
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.004059e4
test eax, eax
jne 0x405bed
cmp dword [ebp - 4], esi
je 0x405baf
push edi
push 0xfffffffffffffff1
call fcn.004053ae
push esi
push edi
call fcn.00406043
jmp 0x405bf5
push edi
push 0xffffffffffffffe5
call fcn.004053ae
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x405cea
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x7a0568
push esi
call fcn.0040626a
push esi
call fcn.00405c95
mov edi, eax
test edi, edi
jne 0x405d0b
xor eax, eax
jmp 0x405d5d
push edi
call fcn.00406564
test byte [0x7a2b78], 0x80
je 0x405d24
mov al, byte [edi]
test al, al
je 0x405d07
cmp al, 0x5c
je 0x405d07
sub edi, esi
jmp 0x405d3c
call fcn.004065fd
test eax, eax
je 0x405d36
test byte [eax], 0x10
je 0x405d07
push esi
call fcn.00405c43
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x405d28
call fcn.00405bfc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

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

Disassembly:
push esi
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov esi, eax
cmp esi, 0xffffffff
je 0x405df7
and al, 0xfe
push eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, esi
pop esi
ret 4

Function at 0x405dfd
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
push 0
inc ecx
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 0x405e2c
Capabilities:
Get common file path

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