joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405814
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
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.00405adf
test bl, 8
mov dword [ebp - 8], eax
je 0x405853
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x429288], eax
jmp 0x4059d0
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x40586d
test eax, eax
je 0x40597e
test bl, 2
je 0x40597e
mov esi, 0x4246f0
push edi
push esi
call fcn.00405f8c
cmp dword [ebp + 8], 0
je 0x40588c
push 0x40954c
push esi
call sub.KERNEL32.dll_lstrcatW
jmp 0x405892
push edi
call fcn.00405a23
cmp word [edi], 0
jne 0x4058a2
cmp word [0x4246f0], 0x5c
jne 0x4058ad
push 0x409014
push edi
call sub.KERNEL32.dll_lstrcatW
push edi
call sub.KERNEL32.dll_lstrlenW
lea ebx, [edi + eax*2]
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x405973
cmp word [ebp - 0x22c], 0x2e
jne 0x4058f7
cmp word [ebp - 0x22a], 0
je 0x405956
cmp word [ebp - 0x22a], 0x2e
jne 0x4058f7
cmp word [ebp - 0x228], 0
je 0x405956
lea eax, [ebp - 0x22c]
push eax
push ebx
call fcn.00405f8c
test byte [ebp - 0x258], 0x10
je 0x405922
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405956
push dword [ebp + 0xc]
push edi
call fcn.00405814
jmp 0x405956
push dword [ebp - 4]
push edi
call fcn.004057cc
test eax, eax
jne 0x40594e
cmp dword [ebp - 4], eax
je 0x405946
push edi
push 0xfffffffffffffff1
call fcn.00405234
push 0
push edi
call fcn.00405e26
jmp 0x405956
inc dword [0x429288]
jmp 0x405956
push edi
push 0xfffffffffffffff2
call fcn.00405234
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4058cf
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x40597e
and word [ebx - 2], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x4059d0
cmp dword [ebp - 8], esi
jne 0x405992
inc dword [0x429288]
jmp 0x4059d0
push edi
call fcn.004062cf
test eax, eax
je 0x4059d0
push edi
call fcn.004059d7
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.004057cc
test eax, eax
jne 0x4059c8
cmp dword [ebp - 4], esi
je 0x40598a
push edi
push 0xfffffffffffffff1
call fcn.00405234
push esi
push edi
call fcn.00405e26
jmp 0x4059d0
push edi
push 0xffffffffffffffe5
call fcn.00405234
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x405adf
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x424ef0
push esi
call fcn.00405f8c
push esi
call fcn.00405a82
mov edi, eax
test edi, edi
jne 0x405b00
xor eax, eax
jmp 0x405b58
push edi
call fcn.00406220
test byte [0x429218], 0x80
je 0x405b1d
mov ax, word [edi]
test ax, ax
je 0x405afc
cmp ax, 0x5c
je 0x405afc
sub edi, esi
sar edi, 1
jmp 0x405b37
call fcn.004062cf
test eax, eax
je 0x405b31
test byte [eax], 0x10
je 0x405afc
push esi
call fcn.00405a23
push esi
call sub.KERNEL32.dll_lstrlenW
cmp eax, edi
push esi
jg 0x405b23
call fcn.004059d7
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

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

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

Function at 0x405bf8
Capabilities:
Get file attributes

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

Function at 0x405c27
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 [0x409558]
dec edi
mov dword [ebp - 8], eax
mov eax, dword [0x40955c]
mov dword [ebp - 4], 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 word [ebp - 4], dx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x405c77
test edi, edi
jne 0x405c34
and word [esi], di
pop edi
pop esi
leave
ret 8
mov eax, esi
jmp 0x405c71
Function at 0x405caa
Capabilities:
Get file size
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov ebx, 0x425d88
push 0x40957c
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [esp + 0x1c]
mov ebp, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test esi, esi
mov edi, 0x400
je 0x405cf9
push 1
push 0
push esi
call fcn.00405bf8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebx
push esi
call ebp
test eax, eax
je 0x405e20
cmp eax, edi
jg 0x405e20
mov esi, 0x426588
push edi
push esi
push dword [esp + 0x20]
call ebp
test eax, eax
je 0x405e20
cmp eax, edi
jg 0x405e20
push esi
push ebx
push str._ls_ls_r_n
push 0x425988
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x429210]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.00405fae
push 4
push 0xc0000000
push esi
call fcn.00405bf8
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x1c], ebp
je 0x405e20
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 0x405e19
push edi
push esi
push ebp
call fcn.00405c7b
test eax, eax
je 0x405e19
push str._Rename__r_n
push esi
call fcn.00405b5d
test eax, eax
jne 0x405daf
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x405de4
add eax, 0xa
push 0x409560
push eax
call fcn.00405b5d
mov ebp, eax
test ebp, ebp
je 0x405de0
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x405dd1
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x405dcb
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x1c]
jmp 0x405de6
mov ebp, dword [esp + 0x1c]
mov eax, edi
push ebx
add eax, esi
push 0x425988
push eax
call fcn.00405bb3
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

Function at 0x405e59
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
lea eax, [ebp + 0x18]
push edi
push eax
mov eax, dword [ebp + 0x18]
xor edi, edi
neg eax
sbb eax, eax
mov esi, dword [ebp + 0x14]
and eax, 0x100
or eax, 0x20019
mov word [esi], di
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405ecd
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x800
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push edi
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405eba
cmp dword [ebp + 0x14], 1
je 0x405ebd
cmp dword [ebp + 0x14], 2
je 0x405ebd
mov word [esi], di
push dword [ebp + 0x18]
mov word [esi + 0x7fe], di
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
ret 0x14
Function at 0x4063a4
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x426d8c], 0
push esi
jne 0x4063db
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 0x4063b5
mov dword [ecx*4 + 0x426d88], eax
inc ecx
cmp ecx, 0x100
jl 0x4063b0
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x40640c
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x426d88]
xor eax, esi
inc ecx
dec edx
jne 0x4063ee
pop edi
not eax
pop esi
ret 0xc

Function at 0x226abde
Capabilities:
Execute anti-debugging instructions

Disassembly:
dec ecx
stc
clc
rol ecx, 1
stc
add ecx, 0x32e6364b
cmc
stc
ror ecx, 1
stc
xor ebx, ecx
clc
add edi, ecx
push edi
ret
push edx
seta dl
xchg dx, dx
push edi
movsx edi, di
not edi
setno dl
push eax
cdq
cwd
cwde
push ebp
movsx ax, bh
cwde
rdtsc
push ebx
rdtsc
push esi
cwd
push ecx
cbw
pushfd
setnp ah
movzx ecx, si
cmovae dx, si
mov edx, 0
mov ah, 0x2a
bswap ax
push edx
mov edi, edi
not ah
mov ebp, dword [esp + 0x28]
dec edi
xchg edi, eax
dec ebp
bts esi, esi
rcr bl, 0x1f
rol ebp, 3
inc ebp
movzx esi, bp
btc si, di
rol ebp, 1
lea ebp, [ebp - 0x3b1316b3]
neg ebx
xor ebp, 0x723c22fa
bswap di
add ebp, edx
xchg esi, eax
bsf bx, si
movzx bx, dh
mov esi, esp
lea esp, [esp - 0xc0]
shld eax, esi, 0x6b
mov ebx, ebp
mov eax, 0
mov edi, esp
sub ebx, eax
shr ch, cl
lea edi, [0x226ac6f]
lea ebp, [ebp - 4]
clc
mov ecx, dword [ebp]
clc
xor ecx, ebx
cmc
xor ecx, 0x1312493e
jmp 0x1c11e88
Function at 0x402a36
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 [0x7c5790]
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 0x402aca
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x402a87
cmp dword [ebp + 0x10], ebx
jne 0x402abe
lea eax, [ebp - 0x10c]
push ebx
push eax
push dword [ebp - 4]
call fcn.00402a36
test eax, eax
jne 0x402a99
lea eax, [ebp - 0x10c]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x402a6e
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
call fcn.00405e8b
cmp eax, ebx
je 0x402ad1
push ebx
push dword [0x7c5790]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x402aca
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 [0x7c5790], ebx
jne 0x402ac7
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x402ac7
jmp 0x402aca
Function at 0x402f1b
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 ebx
push esi
push edi
xor edi, edi
cmp eax, edi
jl 0x402f48
mov ecx, dword [0x7c5738]
push edi
add eax, ecx
push edi
push eax
mov dword [0x79e484], eax
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.00403046
cmp eax, edi
jl 0x40303f
lea eax, [ebp - 4]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
push eax
lea eax, [ebp + 8]
push esi
push eax
push dword [0x409018]
call ebx
test eax, eax
je 0x40303c
cmp dword [ebp - 4], esi
jne 0x40303c
push dword [ebp + 8]
add dword [0x79e484], esi
call fcn.00403046
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x40303f
cmp dword [ebp + 0x10], edi
jne 0x40300b
cmp dword [ebp + 8], edi
jle 0x403037
mov esi, 0x79a480
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x402fbb
mov edi, dword [ebp + 8]
lea eax, [ebp - 4]
push 0
push eax
push edi
push esi
push dword [0x409018]
call ebx
test eax, eax
je 0x40303c
cmp edi, dword [ebp - 4]
jne 0x40303c
lea eax, [ebp + 0x14]
push 0
push eax
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403007
cmp dword [ebp + 0x14], edi
jne 0x403007
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x79e484], eax
cmp dword [ebp + 8], 0
jg 0x402fae
jmp 0x403037
push 0xfffffffffffffffe
jmp 0x40303e
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x403016
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 4]
push edi
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x409018]
call ebx
test eax, eax
je 0x40303c
mov eax, dword [ebp - 4]
add dword [0x79e484], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x40303f
push 0xfffffffffffffffd
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x403046
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [0x79e484]
sub esi, dword [0x413bb0]
push edi
add esi, dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, ebx
add eax, 0x1f4
cmp esi, ebx
mov dword [0x7c56ec], eax
jle 0x4031b0
push dword [0x7a6494]
call fcn.004031f4
push ebx
push ebx
push dword [0x413bb0]
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x7a6490], esi
mov dword [0x79e480], ebx
mov ebp, 0x792480
mov eax, dword [0x79e488]
mov edi, 0x4000
sub eax, dword [0x7a6494]
cmp eax, edi
jg 0x4030bb
mov edi, eax
mov esi, 0x79a480
push edi
push esi
call fcn.004031c2
test eax, eax
je 0x4031a2
add dword [0x7a6494], edi
mov dword [0x413bb8], esi
mov dword [0x413bbc], edi
cmp dword [0x7c56f0], ebx
je 0x403112
cmp dword [0x7c5780], ebx
jne 0x403112
mov eax, dword [0x7a6490]
push ebx
sub eax, dword [0x79e484]
sub eax, dword [esp + 0x1c]
add eax, dword [0x413bb0]
mov dword [0x79e480], eax
call fcn.00402bd3
pop ecx
push 0x413bb8
mov dword [0x413bc0], ebp
mov dword [0x413bc4], 0x8000
call fcn.00405f65
test eax, eax
jl 0x4031ab
mov esi, dword [0x413bc0]
sub esi, ebp
je 0x40316c
lea eax, [esp + 0x10]
push ebx
push eax
push esi
push ebp
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4031a7
cmp esi, dword [esp + 0x10]
jne 0x4031a7
add dword [0x413bb0], esi
cmp dword [0x413bbc], ebx
jne 0x4030e1
jmp 0x403178
cmp dword [0x413bbc], ebx
jne 0x4031ab
cmp edi, ebx
je 0x4031ab
mov eax, dword [0x79e484]
mov ecx, eax
sub ecx, dword [0x413bb0]
add ecx, dword [esp + 0x18]
test ecx, ecx
jg 0x4030a5
push ebx
push ebx
push eax
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4031b0
or eax, 0xffffffff
jmp 0x4031ba
push 0xfffffffffffffffe
jmp 0x4031ad
push 0xfffffffffffffffd
pop eax
jmp 0x4031ba
push 1
call fcn.00402bd3
pop ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4
Function at 0x4053c9
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [0x7bcce8], 0x44
push eax
xor eax, eax
push 0x7bcce8
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 0x405404
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x40548e
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.0040573d
test byte [ebp + 0xc], 8
mov dword [ebp - 8], eax
je 0x4054c2
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x7c5768], eax
jmp 0x405656
push ebx
mov ebx, dword [ebp + 0xc]
and ebx, 1
mov dword [ebp - 4], ebx
je 0x4054e0
test eax, eax
je 0x405601
test byte [ebp + 0xc], 2
je 0x405601
mov esi, 0x7b84e8
push edi
push esi
call fcn.00405b69
test ebx, ebx
je 0x4054fd
push 0x409348
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x405503
push edi
call fcn.004056a3
cmp byte [edi], 0
jne 0x405511
cmp byte [0x7b84e8], 0x5c
jne 0x40551c
push 0x409010
push edi
call sub.KERNEL32.dll_lstrcatA
push edi
call sub.KERNEL32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x148]
push eax
push esi
add ebx, edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x4055f7
lea eax, [ebp - 0x11c]
push 0x3f
push eax
lea esi, [ebp - 0x11c]
call fcn.00405687
cmp byte [eax], 0
je 0x405562
cmp byte [ebp - 0x18], 0
je 0x405562
lea esi, [ebp - 0x18]
cmp byte [esi], 0x2e
jne 0x405578
mov al, byte [esi + 1]
test al, al
je 0x4055d6
cmp al, 0x2e
jne 0x405578
cmp byte [esi + 2], 0
je 0x4055d6
push esi
push ebx
call fcn.00405b69
test byte [ebp - 0x148], 0x10
je 0x40559d
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x4055d6
push dword [ebp + 0xc]
push edi
call fcn.0040548e
jmp 0x4055d6
push edi
call fcn.00405821
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4055ce
test byte [ebp + 0xc], 4
je 0x4055c6
push edi
push 0xfffffffffffffff1
call fcn.00404f07
push 0
push edi
call fcn.004058b7
jmp 0x4055d6
inc dword [0x7c5768]
jmp 0x4055d6
push edi
push 0xfffffffffffffff2
call fcn.00404f07
lea eax, [ebp - 0x148]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405540
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 4], 0
je 0x405601
and byte [ebx - 1], 0
xor esi, esi
pop ebx
cmp dword [ebp - 4], esi
je 0x405656
cmp dword [ebp - 8], esi
jne 0x405616
inc dword [0x7c5768]
jmp 0x405656
push edi
call fcn.00405e64
test eax, eax
je 0x405656
push edi
call fcn.0040565c
push edi
call fcn.00405821
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x40564e
test byte [ebp + 0xc], 4
je 0x40560e
push edi
push 0xfffffffffffffff1
call fcn.00404f07
push esi
push edi
call fcn.004058b7
jmp 0x405656
push edi
push 0xffffffffffffffe5
call fcn.00404f07
pop edi
pop esi
leave
ret 8
Function at 0x40573d
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x7ba4e8
push esi
call fcn.00405b69
push esi
call fcn.004056f0
mov edi, eax
test edi, edi
jne 0x40575e
xor eax, eax
jmp 0x4057b0
push edi
call fcn.00405dcb
test byte [0x7c56f8], 0x80
je 0x405777
mov al, byte [edi]
test al, al
je 0x40575a
cmp al, 0x5c
je 0x40575a
sub edi, esi
jmp 0x40578f
call fcn.00405e64
test eax, eax
je 0x405789
test byte [eax], 0x10
je 0x40575a
push esi
call fcn.004056a3
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x40577b
call fcn.0040565c
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 0x405821
Capabilities:
Check if file exists
Get file attributes
Set file attributes

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

Function at 0x405840
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 0x40586f
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
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 0x4058b3
test edi, edi
jne 0x40587a
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x4058ad
Function at 0x4058b7
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push 1
call fcn.00405e8b
test eax, eax
mov esi, dword [esp + 0x18]
je 0x4058db
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x405a14
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x7bce70], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x7bce70
je 0x40591f
push 1
push 0
push esi
call fcn.00405840
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x405a1a
cmp eax, edi
jg 0x405a1a
mov esi, 0x7bc8e8
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x405a1a
cmp eax, edi
jg 0x405a1a
push esi
push ebp
push str._s_s_r_n
push 0x7bc4e8
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x7c56f0]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.00405b8b
push 4
push 0xc0000000
push esi
call fcn.00405840
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x405a14
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 0x405a0d
lea eax, [esp + 0x18]
push 0
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405a0d
cmp edi, dword [esp + 0x18]
jne 0x405a0d
push str._Rename__r_n
push esi
call fcn.004057b5
test eax, eax
jne 0x405a21
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.00405b69
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x7bc4e8
push eax
call fcn.00405801
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x18]
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]
inc dword [0x7c5770]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x409350
push eax
call fcn.004057b5
test eax, eax
je 0x4059d8
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x405a48
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x405a3d
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x4059da
Function at 0x405a50
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0x18]
push esi
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
mov esi, dword [ebp + 0x14]
and eax, 0x100
or eax, 0x20019
mov byte [esi], bl
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405ac1
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x2000
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405ab0
cmp dword [ebp + 0x14], 1
je 0x405ab2
cmp dword [ebp + 0x14], 2
je 0x405ab2
mov byte [esi], bl
push dword [ebp + 0x18]
mov byte [esi + 0x1fff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x14
Function at 0x405ef7
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x7bd274], 0
push esi
jne 0x405f2e
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 0x405f08
mov dword [ecx*4 + 0x7bd270], eax
inc ecx
cmp ecx, 0x100
jl 0x405f03
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405f5f
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x7bd270]
xor eax, esi
inc ecx
dec edx
jne 0x405f41
pop edi
not eax
pop esi
ret 0xc