joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46bbb9
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x5c50b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x46bc04
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.0046bea9
test al, al
jne 0x46bbfe
sub edx, 2
cmp edx, edi
jne 0x46bbe4
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x46bc26
lea eax, [edi + 2]
cmp edx, eax
je 0x46bc26
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.0046bb05
add esp, 0x10
jmp 0x46bd1e
push esi
lea ecx, [ebp - 0x255]
call fcn.0046bea9
sub edx, edi
xor ecx, ecx
sar edx, 1
inc edx
test al, al
lea eax, [ebp - 0x254]
cmovne ecx, edx
xor ebx, ebx
push ebx
push ebx
push ebx
push eax
push ebx
push edi
mov dword [ebp - 0x260], ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x46bc67
push dword [ebp - 0x25c]
jmp 0x46bc16
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x46bca4
cmp word [ebp - 0x226], 0
je 0x46bcc5
cmp word [ebp - 0x226], ax
jne 0x46bca4
cmp word [ebp - 0x224], 0
je 0x46bcc5
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.0046bb05
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x46bd11
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x46bc7e
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x46bcf9
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x46bd1e
push 0x46bee7
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00476870
add esp, 0x10
jmp 0x46bcee
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004010cb
leave
ret
Function at 0x46d31b
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x46d3b8
push ebx
push esi
call fcn.0046d41e
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00461433
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x46d365
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x46d3b7
push edi
push eax
call fcn.00461320
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x46d385
call fcn.004612d0
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x46d3b6
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00461433
add esp, 0x20
test eax, eax
jne 0x46d3a4
push edi
call fcn.004612d0
jmp 0x46d3ac
push ebx
call fcn.004612d0
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x46d3bb
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x46d3cc
pop esi
ret
push ebx
push edi
push esi
call fcn.0046d41e
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00461320
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x46d3f4
push ebx
push esi
push edi
call fcn.004282c0
add esp, 0xc
push 0
call fcn.004612d0
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x46d4ba
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0046d747

Function at 0x46ddcd
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0046de56
Function at 0x4759cf
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x18
mov eax, dword [eax + 0xc]
nop
shr eax, 3
test al, 1
je 0x4759e9
mov al, 1
leave
ret
mov eax, dword [ebp + 8]
push ebx
push esi
mov eax, dword [eax + 0xc]
nop
test al, 0xc0
mov eax, dword [ebp + 8]
je 0x475a00
mov ecx, dword [eax]
cmp ecx, dword [eax + 4]
je 0x475a58
mov eax, dword [eax + 0x10]
nop
push eax
call fcn.0046df78
mov esi, eax
pop ecx
cmp esi, 0xffffffff
je 0x475a58
xor ebx, ebx
lea eax, [ebp - 0x10]
inc ebx
xorps xmm0, xmm0
push ebx
push eax
movlpd qword [ebp - 8], xmm0
push dword [ebp - 4]
push dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x475a58
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x475a58
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x475a52
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
je 0x475a54
xor bl, bl
mov al, bl
jmp 0x475a5a
xor al, al
pop esi
pop ebx
leave
ret
Function at 0x479708
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov edx, dword [ebp + 8]
mov ecx, edx
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, edx
sar ecx, 6
and eax, 0x3f
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x5c7a18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x47974a
cmp byte [ebx], 0xa
jne 0x47974a
or byte [edi + eax + 0x28], 4
jmp 0x47974f
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x479852
mov cl, byte [eax]
cmp cl, 0x1a
je 0x47982d
lea ebx, [eax + 1]
mov dword [ebp - 8], ebx
mov ebx, dword [ebp + 0xc]
cmp cl, 0xd
je 0x47977e
mov eax, dword [ebp - 8]
jmp 0x47979e
mov edx, dword [ebp - 0x10]
cmp dword [ebp - 8], edx
mov edx, dword [ebp + 8]
jae 0x4797ba
mov ebx, dword [ebp - 8]
cmp byte [ebx], 0xa
jne 0x479798
add eax, 2
mov cl, 0xa
jmp 0x47979b
mov eax, dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
mov byte [esi], cl
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], esi
mov esi, dword [ebp - 0xc]
add esi, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jb 0x479760
jmp 0x479852
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x479828
cmp dword [ebp - 0x10], 0
je 0x479828
mov edx, dword [ebp - 0x18]
mov eax, dword [edx*4 + 0x5c7a18]
test byte [eax + edi + 0x28], 0x48
je 0x479807
mov cl, byte [ebp - 1]
cmp cl, 0xa
jne 0x4797f7
mov byte [esi], 0xa
jmp 0x479851
mov byte [esi], 0xd
mov eax, dword [edx*4 + 0x5c7a18]
mov byte [eax + edi + 0x2a], cl
jmp 0x479851
cmp byte [ebp - 1], 0xa
jne 0x479811
cmp esi, ebx
je 0x4797f2
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00478a6b
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x479852
mov byte [esi], 0xd
jmp 0x479851
mov eax, edx
and edx, 0x3f
sar eax, 6
imul edx, edx, 0x38
mov edi, dword [eax*4 + 0x5c7a18]
mov al, byte [edi + edx + 0x28]
test al, 0x40
jne 0x47984f
or al, 2
mov byte [edi + edx + 0x28], al
jmp 0x479852
mov byte [esi], cl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x47985b
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
and eax, 0x3f
push ebx
mov ebx, dword [ebp + 0xc]
sar edx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [edx*4 + 0x5c7a18]
mov dword [ebp - 8], edx
mov edx, dword [eax + edi + 0x18]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x47989f
push 0xa
pop esi
cmp word [ebx], si
jne 0x47989f
or byte [eax + edi + 0x28], 4
jmp 0x4798a4
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + edx*2]
mov eax, ebx
mov dword [ebp - 0x10], edx
mov esi, ebx
cmp ebx, edx
jae 0x479a0f
movzx edx, word [eax]
mov ecx, edx
mov dword [ebp - 0xc], ecx
movzx ecx, cx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 8]
cmp edx, 0x1a
je 0x4799e7
lea ebx, [eax + 2]
mov dword [ebp - 4], ebx
push 0xd
pop ebx
cmp dx, bx
mov ebx, dword [ebp + 0xc]
je 0x4798f1
mov ebx, dword [ebp - 0x14]
mov edx, esi
mov eax, dword [ebp - 4]
movzx ebx, bx
mov dword [ebp - 4], ebx
jmp 0x47991b
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x10]
jae 0x47993a
push 0xa
pop ebx
cmp word [edx], bx
jne 0x479908
push ebx
add eax, 4
pop edx
jmp 0x479910
mov eax, edx
mov edx, dword [ebp - 0xc]
movzx edx, dx
movzx edx, dx
mov dword [ebp - 4], edx
mov edx, esi
mov dword [ebp - 0x14], esi
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], 2
mov word [esi], cx
mov esi, dword [ebp - 0xc]
add esi, edx
cmp eax, dword [ebp - 0x10]
jb 0x4798b6
jmp 0x479a0f
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4799e2
cmp dword [ebp - 0x14], 0
je 0x4799e2
mov eax, dword [ebp - 8]
push 0xa
mov eax, dword [eax*4 + 0x5c7a18]
test byte [eax + edi + 0x28], 0x48
pop eax
je 0x4799be
mov dx, word [ebp - 4]
cmp dx, ax
jne 0x479986
mov word [esi], ax
jmp 0x479a0c
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebp - 8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov eax, dword [eax*4 + 0x5c7a18]
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x5c7a18]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x5c7a18]
pop ecx
mov byte [eax + edi + 0x2c], cl
jmp 0x479a0c
cmp word [ebp - 4], ax
jne 0x4799c8
cmp esi, ebx
je 0x47997e
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00478a6b
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x479a0f
push 0xd
pop eax
jmp 0x47997e
mov eax, ecx
and ecx, 0x3f
sar eax, 6
imul ecx, ecx, 0x38
mov edi, dword [eax*4 + 0x5c7a18]
mov al, byte [edi + ecx + 0x28]
test al, 0x40
jne 0x479a09
or al, 2
mov byte [edi + ecx + 0x28], al
jmp 0x479a0f
mov word [esi], dx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x42e004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
mov eax, section..text
nop
nop
nop
nop
push 4
nop
pop edi
nop
nop
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x42e072
mov ebx, 0x407ef8
nop
nop
mov ecx, ebx
nop
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
pop eax
nop
nop
nop
nop
nop
nop
mov esi, 0x5ae04952
nop
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
loop 0x42e060
nop
nop
mov eax, section..data
nop
nop
nop
cmp eax, 0
nop
nop
je 0x42e0d2
nop
nop
nop
mov ebx, 0x42cd70
nop
nop
nop
nop
mov ecx, ebx
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
pop eax
nop
nop
nop
nop
nop
mov esi, 0x69081a3b
nop
nop
nop
nop
xor dword [eax], esi
nop
nop
add eax, edi
nop
nop
nop
loop 0x42e0c0
nop
nop
nop
nop
nop
popal
nop
nop
nop
nop
jmp 0x401219
Function at 0x402a47
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
lea eax, [ebp - 4]
push edi
push eax
mov eax, dword [0x423f70]
or al, 8
xor ebx, ebx
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x402adb
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x402a98
cmp dword [ebp + 0x10], ebx
jne 0x402acf
lea eax, [ebp - 0x10c]
push ebx
push eax
push dword [ebp - 4]
call fcn.00402a47
test eax, eax
jne 0x402aaa
lea eax, [ebp - 0x10c]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x402a7f
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
call fcn.00405e94
cmp eax, ebx
je 0x402ae2
push ebx
push dword [0x423f70]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x402adb
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 [0x423f70], ebx
jne 0x402ad8
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x402ad8
jmp 0x402adb
Function at 0x402e6c
Capabilities:
Check for time delay via gettickcount
Write file on windows

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 0x402e89
mov dword [ebp - 8], 0x8000
and dword [ebp - 4], 0
mov ebx, edi
test edi, edi
jne 0x402e98
mov ebx, 0x40f070
mov eax, dword [ebp + 8]
test eax, eax
jl 0x402ead
mov ecx, dword [0x423f18]
add ecx, eax
push ecx
call fcn.00403091
lea eax, [ebp + 0x14]
push 4
push eax
call fcn.0040305f
test eax, eax
je 0x40300a
test byte [ebp + 0x17], 0x80
je 0x402ff3
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x40afe0
mov dword [ebp - 0xc], eax
call fcn.00405f74
and dword [ebp + 0x14], 0x7fffffff
mov eax, dword [ebp + 0x14]
mov dword [ebp + 8], eax
jle 0x403055
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x402efd
mov esi, dword [ebp + 0x14]
mov edi, 0x40b070
push esi
push edi
call fcn.0040305f
test eax, eax
je 0x40300a
sub dword [ebp + 0x14], esi
mov dword [0x40aff8], edi
mov dword [0x40affc], esi
mov eax, dword [ebp - 8]
mov ecx, 0x40afe0
mov dword [0x40b000], ebx
mov dword [0x40b004], eax
call fcn.00405f94
test eax, eax
mov dword [ebp - 0x14], eax
jl 0x402feb
mov esi, dword [0x40b000]
sub esi, ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [0x423f74], 1
mov edi, eax
je 0x402f9f
sub eax, dword [ebp - 0xc]
cmp eax, 0xc8
ja 0x402f6c
cmp dword [ebp + 0x14], 0
jne 0x402f9f
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.00404e76
mov dword [ebp - 0xc], edi
xor eax, eax
cmp esi, eax
je 0x402fe0
cmp dword [ebp + 0x10], eax
jne 0x402fc8
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402fef
cmp dword [ebp - 0x10], esi
jne 0x402fef
add dword [ebp - 4], esi
jmp 0x402fd4
add dword [ebp - 4], esi
sub dword [ebp - 8], esi
mov ebx, dword [0x40b000]
cmp dword [ebp - 0x14], 1
jne 0x402f20
jmp 0x403055
cmp dword [ebp + 0x14], eax
jg 0x402ef0
jmp 0x403055
push 0xfffffffffffffffc
jmp 0x40300c
push 0xfffffffffffffffe
jmp 0x40300c
test edi, edi
je 0x40304a
cmp dword [ebp + 0x14], esi
jge 0x402fff
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.0040305f
test eax, eax
jne 0x403052
push 0xfffffffffffffffd
pop eax
jmp 0x403058
mov esi, dword [ebp - 8]
cmp dword [ebp + 0x14], esi
jge 0x40301a
mov esi, dword [ebp + 0x14]
mov edi, 0x40b070
push esi
push edi
call fcn.0040305f
test eax, eax
je 0x40300a
lea eax, [ebp + 0x10]
push 0
push eax
push esi
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402fef
cmp esi, dword [ebp + 0x10]
jne 0x402fef
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x40300f
jmp 0x403055
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x405339
Capabilities:
Create process on windows

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

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

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.004057f2
mov edi, eax
cmp edi, 0xffffffff
je 0x40543f
test byte [esp + 0x10], 1
push esi
je 0x405421
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x405427
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x405430
xor eax, eax
inc eax
jmp 0x405441
test byte [esp + 0x10], 4
jne 0x40543f
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x405446
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.00405704
test bl, 8
mov dword [ebp - 0xc], eax
je 0x405485
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x423f48], eax
jmp 0x40560f
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x40549f
test eax, eax
je 0x4055bd
test bl, 2
je 0x4055bd
mov esi, 0x4214c8
push edi
push esi
call fcn.00405b69
cmp dword [ebp + 8], 0
je 0x4054be
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x4054c4
push edi
call fcn.0040565d
cmp byte [edi], 0
jne 0x4054d2
cmp byte [0x4214c8], 0x5c
jne 0x4054dd
push 0x409014
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 0x4055b3
lea eax, [ebp - 0x120]
push 0x3f
push eax
lea esi, [ebp - 0x120]
call fcn.00405641
cmp byte [eax], 0
je 0x405523
cmp byte [ebp - 0x1c], 0
je 0x405523
lea esi, [ebp - 0x1c]
cmp byte [esi], 0x2e
jne 0x405539
mov al, byte [esi + 1]
test al, al
je 0x405592
cmp al, 0x2e
jne 0x405539
cmp byte [esi + 2], 0
je 0x405592
push esi
push ebx
call fcn.00405b69
test byte [ebp - 0x14c], 0x10
je 0x40555e
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405592
push dword [ebp + 0xc]
push edi
call fcn.00405446
jmp 0x405592
push dword [ebp - 4]
push edi
call fcn.004053fe
test eax, eax
jne 0x40558a
cmp dword [ebp - 4], eax
je 0x405582
push edi
push 0xfffffffffffffff1
call fcn.00404e76
push 0
push edi
call fcn.00405a1d
jmp 0x405592
inc dword [0x423f48]
jmp 0x405592
push edi
push 0xfffffffffffffff2
call fcn.00404e76
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405501
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x4055bd
and byte [ebx - 1], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x40560f
cmp dword [ebp - 0xc], esi
jne 0x4055d1
inc dword [0x423f48]
jmp 0x40560f
push edi
call fcn.00405e6d
test eax, eax
je 0x40560f
push edi
call fcn.00405616
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.004053fe
test eax, eax
jne 0x405607
cmp dword [ebp - 4], esi
je 0x4055c9
push edi
push 0xfffffffffffffff1
call fcn.00404e76
push esi
push edi
call fcn.00405a1d
jmp 0x40560f
push edi
push 0xffffffffffffffe5
call fcn.00404e76
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x405704
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x4218c8
push esi
call fcn.00405b69
push esi
call fcn.004056af
mov edi, eax
test edi, edi
jne 0x405725
xor eax, eax
jmp 0x405777
push edi
call fcn.00405dd4
test byte [0x423ed8], 0x80
je 0x40573e
mov al, byte [edi]
test al, al
je 0x405721
cmp al, 0x5c
je 0x405721
sub edi, esi
jmp 0x405756
call fcn.00405e6d
test eax, eax
je 0x405750
test byte [eax], 0x10
je 0x405721
push esi
call fcn.0040565d
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x405742
call fcn.00405616
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 0x4057f2
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 0x405811
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 0x405817
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 0x405846
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 [0x409368]
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 0x40588b
test edi, edi
jne 0x405851
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x405885
Function at 0x40588f
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, 0x422250
push 0x409384
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [esp + 0x1c]
mov ebp, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test esi, esi
mov ebx, 0x400
je 0x4058de
push 1
push 0
push esi
call fcn.00405817
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push edi
push esi
call ebp
test eax, eax
je 0x405a17
cmp eax, ebx
jg 0x405a17
mov esi, 0x422650
push ebx
push esi
push dword [esp + 0x20]
call ebp
test eax, eax
je 0x405a17
cmp eax, ebx
jg 0x405a17
push esi
push edi
push str._s_s_r_n
push 0x421e50
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x423ed0]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.00405b8b
push 4
push 0xc0000000
push esi
call fcn.00405817
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x1c], ebp
je 0x405a17
push 0
push ebp
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
test esi, esi
je 0x405a10
lea eax, [esp + 0x10]
push 0
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405a10
cmp edi, dword [esp + 0x10]
jne 0x405a10
push str._Rename__r_n
push esi
call fcn.0040577c
test eax, eax
jne 0x4059a6
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x4059db
add eax, 0xa
push 0x40936c
push eax
call fcn.0040577c
mov ebp, eax
test ebp, ebp
je 0x4059d7
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x4059c8
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x4059c2
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x1c]
jmp 0x4059dd
mov ebp, dword [esp + 0x1c]
mov eax, edi
push ebx
add eax, esi
push 0x421e50
push eax
call fcn.004057d2
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x10]
push 0
add edi, ebx
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret