joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407a2b
Capabilities:
Connect pipe
Read file on windows
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1010
call fcn.00407fc0
mov eax, dword [0x40ca24]
push ebx
xor ebx, ebx
cmp eax, 0xffffffff
mov dword [ebp - 0xc], ebx
je 0x407b39
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x407a71
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x217
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 8], eax
je 0x407b39
push edi
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0x80f]
mov byte [ebp - 0x810], bl
push 2
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 8]
mov dword [ebp - 8], 0xa
push eax
lea eax, [ebp - 0x810]
push eax
call sub.MSVCRT.dll_memcpy
push dword [ebp + 8]
call sub.MSVCRT.dll_strlen
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push 4
push eax
lea eax, [ebp - 0x80e]
push eax
call sub.MSVCRT.dll_memcpy
push dword [ebp - 4]
lea eax, [ebp - 0x80a]
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x28
lea eax, [ebp - 0xc]
push ebx
push eax
mov eax, dword [ebp - 4]
add eax, 6
push eax
lea eax, [ebp - 0x810]
push eax
push dword [0x40ca24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0x100f]
mov byte [ebp - 0x1010], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x10]
push ebx
push eax
lea eax, [ebp - 0x1010]
push 0x800
push eax
push dword [0x40ca24]
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [0x40ca24]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
pop edi
pop ebx
leave
ret
Function at 0x401000
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
mov eax, dword [0x40c114]
shl eax, 2
mov dword [0x40c118], eax
push edi
push ecx
xor eax, eax
mov edi, 0x42bf40
mov ecx, 0x42f7c8
cmp ecx, edi
jbe 0x401024
sub ecx, edi
cld
rep stosb byte es:[edi], al
pop ecx
pop edi
push edx
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov edx, eax
call fcn.0040284c
pop edx
call fcn.00401a24
call fcn.00402850
push 0
call fcn.00403494
pop ecx
push 0x40c0dc
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [0x40c11c], eax
push 0
jmp fcn.00408f78

Function at 0x40251c
Capabilities:
Get memory capacity

Disassembly:
add esp, 0xffffffe0
mov dword [esp], 0x20
push esp
call sub.KERNEL32.DLL_GlobalMemoryStatus
mov eax, dword [esp + 0xc]
add esp, 0x20
ret

Function at 0x403724
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x403740
call fcn.00404a54
pop ebx
pop ebp
ret
test byte [ebp + 0xc], 2
je 0x40375c
test bl, 1
je 0x40375c
call fcn.004084a0
mov dword [eax], 5
or eax, 0xffffffff
pop ebx
pop ebp
ret
xor eax, eax
pop ebx
pop ebp
ret
Function at 0x403928
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
call fcn.00404628
test byte [ebp + 0xd], 0xc0
jne 0x40394c
mov eax, dword [0x42a628]
mov edx, dword [eax]
and edx, 0xc000
or dword [ebp + 0xc], edx
test byte [ebp + 0xd], 0x80
jne 0x403959
or dword [ebp + 0xc], 0x4000
mov ecx, dword [ebp + 0xc]
and ecx, 0x700
cmp ecx, 0x500
jg 0x403986
je 0x403998
sub ecx, 0x100
je 0x4039a6
sub ecx, 0x100
je 0x4039ad
sub ecx, 0x100
je 0x40399f
jmp 0x4039b4
sub ecx, 0x600
je 0x4039ad
sub ecx, 0x100
je 0x403998
jmp 0x4039b4
mov edi, 1
jmp 0x4039b9
mov edi, 2
jmp 0x4039b9
mov edi, 4
jmp 0x4039b9
mov edi, 5
jmp 0x4039b9
mov edi, 3
test byte [ebp + 0xd], 1
je 0x4039e0
lea eax, [ebp + 0x10]
add eax, 4
mov eax, dword [eax - 4]
and eax, dword [0x42a0a4]
test al, 0x80
je 0x4039d9
mov ebx, 0x80
jmp 0x4039f2
mov ebx, 1
jmp 0x4039f2
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x4039f2
xor ebx, ebx
mov eax, dword [ebp + 0xc]
and eax, 3
sub eax, 1
jb 0x403a04
je 0x403a0d
dec eax
je 0x403a16
jmp 0x403a1f
mov dword [ebp - 4], 0x80000000
jmp 0x403a2e
mov dword [ebp - 4], 0x40000000
jmp 0x403a2e
mov dword [ebp - 4], 0xc0000000
jmp 0x403a2e
push 1
call fcn.004049e8
pop ecx
mov ebx, eax
jmp 0x403b1a
mov eax, dword [ebp + 0xc]
and eax, 0x70
sub eax, 0x10
je 0x403a4a
sub eax, 0x10
je 0x403a51
sub eax, 0x10
je 0x403a5a
sub eax, 0x10
je 0x403a63
jmp 0x403a63
xor edx, edx
mov dword [ebp - 8], edx
jmp 0x403a6a
mov dword [ebp - 8], 1
jmp 0x403a6a
mov dword [ebp - 8], 2
jmp 0x403a6a
mov dword [ebp - 8], 3
mov dword [ebp - 0x14], 0xc
xor ecx, ecx
mov dword [ebp - 0x10], ecx
lea ecx, [ebp - 0x14]
mov eax, dword [ebp + 0xc]
and eax, 0x80
cmp eax, 1
sbb edx, edx
neg edx
mov dword [ebp - 0xc], edx
push 0
push ebx
push edi
push ecx
mov eax, dword [ebp - 8]
push eax
mov edx, dword [ebp - 4]
push edx
mov ecx, dword [ebp + 8]
push ecx
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
cmp eax, 0xffffffff
jne 0x403ad3
call sub.KERNEL32.DLL_GetLastError
mov ebx, eax
and ebx, 0xffff
cmp ebx, 0x6e
jne 0x403ac8
test byte [ebp + 0xd], 1
mov ebx, 0x50
jne 0x403ac8
add ebx, 0xffffffb2
push ebx
call fcn.004049e8
pop ecx
mov ebx, eax
jmp 0x403b1a
mov edi, esi
push edi
call fcn.0040388c
pop ecx
test eax, eax
je 0x403ae7
or dword [ebp + 0xc], 0x2000
test bl, 1
jne 0x403af3
or dword [ebp + 0xc], 0x100
and dword [ebp + 0xc], 0xfffff8ff
mov eax, dword [ebp + 0xc]
push eax
push edi
call fcn.00404728
add esp, 8
mov ebx, eax
inc eax
jne 0x403b1a
push 4
call fcn.004049e8
pop ecx
push esi
call sub.KERNEL32.DLL_CloseHandle
call fcn.0040465c
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4081ac
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
cmp dword [0x42b458], 0
push ebx
push esi
mov esi, dword [ebp + 8]
jne 0x408264
cmp byte [0x40c113], 0
je 0x40821e
push 0x50
lea eax, [ebp - 0x54]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0x5c
lea edx, [ebp - 0x54]
push edx
call fcn.004080f8
add esp, 8
mov ebx, eax
test eax, eax
jne 0x408207
push 0x3a
lea edx, [ebp - 0x54]
push edx
call fcn.004080f8
add esp, 8
mov ebx, eax
test eax, eax
jne 0x408207
lea ebx, [ebp - 0x54]
jmp 0x408208
inc ebx
call fcn.00408164
or eax, 0x10010
push eax
push ebx
push esi
push 0
call sub.USER32.DLL_MessageBoxA
jmp 0x408285
push 0xfffffffffffffff4
call sub.KERNEL32.DLL_GetStdHandle
mov ebx, eax
lea eax, [ebp - 4]
push 0
push eax
push 2
push 0x42b45c
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea edx, [ebp - 4]
push edx
push esi
call fcn.004029c4
pop ecx
push eax
push esi
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea ecx, [ebp - 4]
push ecx
push 2
push 0x42b45f
push ebx
call sub.KERNEL32.DLL_WriteFile
jmp 0x408285
cmp dword [0x42b458], 0xffffffff
je 0x408285
mov eax, dword [0x42b458]
test eax, eax
je 0x408285
cmp byte [eax], 0
je 0x408285
push esi
push eax
call fcn.00408304
add esp, 8
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x408304
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov ebx, eax
test eax, eax
je 0x408366
call fcn.004082b4
mov esi, eax
lea eax, [ebp - 4]
push 0
push eax
push esi
call fcn.004029c4
pop ecx
push eax
push esi
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea edx, [ebp - 4]
push edx
push edi
call fcn.004029c4
pop ecx
push eax
push edi
push ebx
call sub.KERNEL32.DLL_WriteFile
push ebx
call sub.KERNEL32.DLL_CloseHandle
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret
Function at 0x408940
Capabilities:
Query environment variable

Disassembly:
push ebx
push esi
push edi
push ebp
push ecx
cmp dword [0x42c754], 0
jne 0x4089c1
cmp dword [0x42c770], 0
jne 0x408970
call sub.KERNEL32.DLL_GetEnvironmentStrings
mov dword [0x42c770], eax
test eax, eax
jne 0x408970
push str.GetEnvironmentStrings_failed
call fcn.0040829c
pop ecx
xor ebp, ebp
xor esi, esi
mov ebx, dword [0x42c770]
jmp 0x408984
lea eax, [edi + 1]
inc esi
add ebp, eax
add ebx, eax
push ebx
call fcn.004029c4
pop ecx
mov edi, eax
test eax, eax
jne 0x40897c
lea edi, [ebp + 1]
push edi
call fcn.00401934
pop ecx
mov ebx, eax
mov dword [0x42c758], ebx
test ebx, ebx
jne 0x4089ae
xor eax, eax
jmp 0x408a84
push edi
mov edx, dword [0x42c770]
push edx
push ebx
call fcn.00402874
add esp, 0xc
jmp 0x4089e1
xor esi, esi
mov ebx, dword [0x42c754]
jmp 0x4089db
push eax
call fcn.004029c4
pop ecx
test eax, eax
jne 0x4089d7
dec esi
inc esi
add ebx, 4
mov eax, dword [ebx]
test eax, eax
jne 0x4089cb
lea ebx, [esi + 4]
push 4
mov dword [0x42c75c], ebx
inc ebx
push ebx
call fcn.004015bc
add esp, 8
test eax, eax
mov dword [esp], eax
jne 0x408a04
xor eax, eax
jmp 0x408a84
cmp dword [0x42c754], 0
jne 0x408a35
xor esi, esi
mov ebx, dword [0x42c758]
mov eax, dword [esp]
mov ebp, eax
jmp 0x408a26
mov dword [ebp], ebx
add ebp, 4
inc esi
inc edi
add ebx, edi
push ebx
call fcn.004029c4
pop ecx
mov edi, eax
test eax, eax
jne 0x408a1c
jmp 0x408a66
xor esi, esi
mov ebx, dword [0x42c754]
mov eax, dword [esp]
mov edi, eax
jmp 0x408a60
push eax
call fcn.004029c4
pop ecx
test eax, eax
je 0x408a55
mov eax, dword [ebx]
mov dword [edi], eax
jmp 0x408a59
dec esi
add edi, 0xfffffffc
add edi, 4
inc esi
add ebx, 4
mov eax, dword [ebx]
test eax, eax
jne 0x408a44
mov eax, dword [0x42c754]
test eax, eax
je 0x408a76
push eax
call fcn.00401944
pop ecx
mov edx, dword [esp]
mov eax, 1
mov dword [0x42c754], edx
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x405d4b
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x42ce3c], 0
push esi
jne 0x405d82
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 0x405d5c
mov dword [ecx*4 + 0x42ce38], eax
inc ecx
cmp ecx, 0x100
jl 0x405d57
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405db3
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 + 0x42ce38]
xor eax, esi
inc ecx
dec edx
jne 0x405d95
pop edi
not eax
pop esi
ret 0xc

Function at 0x45f85c
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
xor ebx, ebx
push 8
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x45f8ce
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x45f8a7
cmp dword [ebp + 0x10], ebx
jne 0x45f8d5
lea eax, [ebp - 0x10c]
push ebx
push eax
push dword [ebp - 4]
call fcn.0045f85c
test eax, eax
jne 0x45f8b9
lea eax, [ebp - 0x10c]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x45f88e
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
pop edi
pop esi
pop ebx
leave
ret 0xc
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
jmp 0x45f8ce
Function at 0x45fc3a
Capabilities:
Check for time delay via gettickcount
Read 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 0x45fc57
mov dword [ebp - 8], 0x8000
and dword [ebp - 4], 0
mov ebx, edi
test edi, edi
jne 0x45fc66
mov ebx, 0x40f0f0
mov eax, dword [ebp + 8]
test eax, eax
jl 0x45fc7b
mov ecx, dword [0x424798]
add ecx, eax
push ecx
call fcn.0045fe69
lea eax, [ebp + 0x14]
push 4
push eax
call fcn.0045fe37
test eax, eax
je 0x45fde2
test byte [ebp + 0x17], 0x80
je 0x45fdcb
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x40b020
mov dword [ebp - 0xc], eax
call fcn.00462b01
and dword [ebp + 0x14], 0x7fffffff
mov eax, dword [ebp + 0x14]
mov dword [ebp + 8], eax
jle 0x45fe2d
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x45fccb
mov esi, dword [ebp + 0x14]
mov edi, 0x40b0f0
push esi
push edi
call fcn.0045fe37
test eax, eax
je 0x45fde2
sub dword [ebp + 0x14], esi
mov dword [0x40b038], edi
mov dword [0x40b03c], esi
mov eax, dword [ebp - 8]
mov ecx, 0x40b020
mov dword [0x40b040], ebx
mov dword [0x40b044], eax
call fcn.00462b21
test eax, eax
mov dword [ebp - 0x14], eax
jl 0x45fdc3
mov esi, dword [0x40b040]
sub esi, ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [0x40929c], 1
mov edi, eax
je 0x45fd6d
sub eax, dword [ebp - 0xc]
cmp eax, 0xc8
ja 0x45fd3a
cmp dword [ebp + 0x14], 0
jne 0x45fd6d
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 [0x40725c]
add esp, 0xc
lea eax, [ebp - 0x54]
push eax
push 0
call fcn.00461ad0
mov dword [ebp - 0xc], edi
xor eax, eax
cmp esi, eax
je 0x45fdb8
cmp dword [ebp + 0x10], eax
jne 0x45fd96
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45fdc7
cmp dword [ebp - 0x10], esi
jne 0x45fdc7
add dword [ebp - 4], esi
jmp 0x45fdac
sub dword [ebp - 8], esi
add dword [ebp - 4], esi
cmp dword [ebp - 8], 1
mov ebx, dword [0x40b040]
jl 0x45fe2d
cmp dword [ebp - 0x14], 1
jne 0x45fcee
jmp 0x45fe2d
cmp dword [ebp + 0x14], eax
jg 0x45fcbe
jmp 0x45fe2d
push 0xfffffffffffffffc
jmp 0x45fde4
push 0xfffffffffffffffe
jmp 0x45fde4
test edi, edi
je 0x45fe22
cmp dword [ebp + 0x14], esi
jge 0x45fdd7
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.0045fe37
test eax, eax
jne 0x45fe2a
push 0xfffffffffffffffd
pop eax
jmp 0x45fe30
mov esi, dword [ebp - 8]
cmp dword [ebp + 0x14], esi
jge 0x45fdf2
mov esi, dword [ebp + 0x14]
mov edi, 0x40b0f0
push esi
push edi
call fcn.0045fe37
test eax, eax
je 0x45fde2
lea eax, [ebp + 0x10]
push 0
push eax
push esi
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45fdc7
cmp esi, dword [ebp + 0x10]
jne 0x45fdc7
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x45fde7
jmp 0x45fe2d
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x461ad0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x423f24]
push ebx
xor ebx, ebx
push esi
cmp eax, ebx
push edi
mov dword [ebp - 4], eax
je 0x461b9b
mov eax, dword [0x40929c]
mov esi, 0x420518
mov edi, eax
mov dword [ebp - 8], eax
and edi, 1
jne 0x461b08
push dword [ebp + 8]
push esi
call fcn.0046275e
push esi
call sub.KERNEL32.dll_lstrcatA
cmp dword [ebp + 0xc], ebx
mov dword [ebp + 8], eax
je 0x461b31
push dword [ebp + 0xc]
call sub.KERNEL32.dll_lstrcatA
add eax, dword [ebp + 8]
cmp eax, 0x800
jae 0x461b9b
push dword [ebp + 0xc]
push esi
call sub.KERNEL32.dll_GetSystemDirectoryA
test byte [ebp - 8], 4
je 0x461b44
push esi
push dword [0x423f08]
call dword [sym.imp.USER32.dll_PostQuitMessage]
test byte [ebp - 8], 2
je 0x461b8e
push ebx
push ebx
push 0x1004
mov dword [ebp - 0x1c], esi
push dword [ebp - 4]
mov esi, dword [sym.imp.USER32.dll_DefWindowProcA]
mov dword [ebp - 0x30], 1
call esi
sub eax, edi
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x30]
push eax
mov eax, 0x1007
sub eax, edi
push ebx
push eax
push dword [ebp - 4]
call esi
push ebx
push dword [ebp - 0x2c]
push 0x1013
push dword [ebp - 4]
call esi
cmp edi, ebx
je 0x461b9b
mov eax, dword [ebp + 8]
mov byte [eax + 0x420518], bl
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x461fb4
Capabilities:
Check if file exists
Delete directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push dword [ebp + 0xc]
mov dword [0x422d48], 0x44
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
je 0x461fd8
test al, 0x10
jne 0x461fdb
mov dword [ebp + 0xc], ecx
lea eax, [ebp - 0x10]
push eax
push 0x422d48
push dword [ebp + 0xc]
push ecx
push ecx
push ecx
push ecx
push ecx
push dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
je 0x462006
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 8
Function at 0x46206e
Capabilities:
Copy file
Delete file
Enumerate files on windows
Enumerate files recursively
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push ebx
mov ebx, dword [ebp + 8]
push esi
push ebx
call fcn.0046230f
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], eax
test cl, 8
je 0x4620a4
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x4247c8], eax
jmp 0x462229
mov dword [ebp + 8], ecx
push edi
and dword [ebp + 8], 1
je 0x4620bf
test eax, eax
je 0x4621d4
test cl, 2
je 0x4621d4
mov esi, 0x421d48
push ebx
push esi
call fcn.0046273c
cmp dword [ebp + 8], 0
je 0x4620de
push str..
push esi
call sub.KERNEL32.dll_GetSystemDirectoryA
jmp 0x4620e4
push ebx
call fcn.00462276
push 0x409010
push ebx
call sub.KERNEL32.dll_GetSystemDirectoryA
push ebx
call sub.KERNEL32.dll_lstrcatA
mov edi, eax
lea eax, [ebp - 0x148]
push eax
push esi
add edi, ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x4621ca
lea eax, [ebp - 0x11c]
push 0x3f
push eax
lea esi, [ebp - 0x11c]
call fcn.0046225a
cmp byte [eax], 0
je 0x462135
cmp byte [ebp - 0x18], 0
je 0x462135
lea esi, [ebp - 0x18]
cmp byte [esi], 0x2e
jne 0x46214b
mov al, byte [esi + 1]
test al, al
je 0x4621a9
cmp al, 0x2e
jne 0x46214b
cmp byte [esi + 2], 0
je 0x4621a9
push esi
push edi
call fcn.0046273c
test byte [ebp - 0x148], 0x10
je 0x462170
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x4621a9
push dword [ebp + 0xc]
push ebx
call fcn.0046206e
jmp 0x4621a9
push ebx
call fcn.004623f3
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4621a1
test byte [ebp + 0xc], 4
je 0x462199
push ebx
push 0xfffffffffffffff1
call fcn.00461ad0
push 0
push ebx
call fcn.00462489
jmp 0x4621a9
inc dword [0x4247c8]
jmp 0x4621a9
push ebx
push 0xfffffffffffffff2
call fcn.00461ad0
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
test eax, eax
jne 0x462113
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
cmp dword [ebp + 8], 0
je 0x4621d4
and byte [edi - 1], 0
xor esi, esi
pop edi
cmp dword [ebp + 8], esi
je 0x462229
cmp dword [ebp - 8], esi
jne 0x4621e9
inc dword [0x4247c8]
jmp 0x462229
push ebx
call fcn.004629f8
test eax, eax
je 0x462229
push ebx
call fcn.0046222f
push ebx
call fcn.004623f3
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
test eax, eax
jne 0x462221
test byte [ebp + 0xc], 4
je 0x4621e1
push ebx
push 0xfffffffffffffff1
call fcn.00461ad0
push esi
push ebx
call fcn.00462489
jmp 0x462229
push ebx
push 0xffffffffffffffe5
call fcn.00461ad0
pop esi
pop ebx
leave
ret 8

Function at 0x46222f
Capabilities:
Get common file path

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call sub.KERNEL32.dll_lstrcatA
add eax, esi
push eax
push esi
call dword [sym.imp.USER32.dll_DispatchMessageA]
cmp byte [eax], 0x5c
je 0x462254
push 0x409010
push esi
call sub.KERNEL32.dll_GetSystemDirectoryA
mov eax, esi
pop esi
ret 4
Function at 0x46230f
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x422148
push esi
call fcn.0046273c
push esi
call fcn.004622c2
mov edi, eax
test edi, edi
jne 0x462330
xor eax, eax
jmp 0x462382
push edi
call fcn.0046295f
test byte [0x424750], 0x80
je 0x462349
mov al, byte [edi]
test al, al
je 0x46232c
cmp al, 0x5c
je 0x46232c
sub edi, esi
jmp 0x462361
call fcn.004629f8
test eax, eax
je 0x46235b
test byte [eax], 0x10
je 0x46232c
push esi
call fcn.00462276
push esi
call sub.KERNEL32.dll_lstrcatA
cmp eax, edi
push esi
jg 0x46234d
call fcn.0046222f
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 0x4623f3
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 0x46240f
and al, 0xfe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x462412
Capabilities:
Get common file path
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_GetTempFileNameA]
ret 0xc
Function at 0x462489
Capabilities:
Accept command line arguments
Get common file path
Get file size
Read file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push str.MoveFileExA
push str.KERNEL32.dll
call fcn.00462a36
test eax, eax
mov esi, dword [esp + 0x18]
je 0x4624b5
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x4625f4
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x422ed0], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x422ed0
je 0x4624f9
push 1
push 0
push esi
call fcn.00462412
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x4625fa
cmp eax, edi
jg 0x4625fa
mov esi, 0x422948
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x4625fa
cmp eax, edi
jg 0x4625fa
push esi
push ebp
push str._s_s_r_n
push 0x422548
call dword [0x40725c]
add esp, 0x10
mov ebx, eax
push 0x3f0
push esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push str.wininit.ini
push esi
call sub.KERNEL32.dll_GetSystemDirectoryA
push 4
push 0xc0000000
push esi
call fcn.00462412
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x4625f4
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_WaitForSingleObject]
mov esi, eax
test esi, esi
je 0x4625ed
lea eax, [esp + 0x18]
push 0
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x4625ed
cmp edi, dword [esp + 0x18]
jne 0x4625ed
push str._Rename__r_n
push esi
call fcn.00462387
test eax, eax
jne 0x462601
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.0046273c
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x422548
push eax
call fcn.004623d3
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [esp + 0x18]
push 0
add edi, ebx
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [0x4247d0]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x409304
push eax
call fcn.00462387
test eax, eax
je 0x4625b8
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x462628
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x46261d
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x4625ba
Function at 0x462630
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x14]
xor ebx, ebx
push eax
push 0x20019
push ebx
push dword [ebp + 0xc]
mov byte [esi], bl
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x462694
lea eax, [ebp + 8]
mov dword [ebp + 8], 0x400
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x462683
cmp dword [ebp + 0x14], 1
je 0x462685
cmp dword [ebp + 0x14], 2
je 0x462685
mov byte [esi], bl
push dword [ebp + 0xc]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x10

Function at 0x46273c
Capabilities:
Get disk size

Disassembly:
push 0x400
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
ret 8