joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4054a8
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.00405757
test byte [ebp + 0xc], 8
mov dword [ebp - 8], eax
je 0x4054dc
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x42eca8], eax
jmp 0x405670
push ebx
mov ebx, dword [ebp + 0xc]
and ebx, 1
mov dword [ebp - 4], ebx
je 0x4054fa
test eax, eax
je 0x40561b
test byte [ebp + 0xc], 2
je 0x40561b
mov esi, 0x42b0a8
push edi
push esi
call fcn.00405b83
test ebx, ebx
je 0x405517
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x40551d
push edi
call fcn.004056bd
cmp byte [edi], 0
jne 0x40552b
cmp byte [0x42b0a8], 0x5c
jne 0x405536
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 0x405611
lea eax, [ebp - 0x11c]
push 0x3f
push eax
lea esi, [ebp - 0x11c]
call fcn.004056a1
cmp byte [eax], 0
je 0x40557c
cmp byte [ebp - 0x18], 0
je 0x40557c
lea esi, [ebp - 0x18]
cmp byte [esi], 0x2e
jne 0x405592
mov al, byte [esi + 1]
test al, al
je 0x4055f0
cmp al, 0x2e
jne 0x405592
cmp byte [esi + 2], 0
je 0x4055f0
push esi
push ebx
call fcn.00405b83
test byte [ebp - 0x148], 0x10
je 0x4055b7
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x4055f0
push dword [ebp + 0xc]
push edi
call fcn.004054a8
jmp 0x4055f0
push edi
call fcn.0040583b
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4055e8
test byte [ebp + 0xc], 4
je 0x4055e0
push edi
push 0xfffffffffffffff1
call fcn.00404e6f
push 0
push edi
call fcn.004058d1
jmp 0x4055f0
inc dword [0x42eca8]
jmp 0x4055f0
push edi
push 0xfffffffffffffff2
call fcn.00404e6f
lea eax, [ebp - 0x148]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40555a
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 4], 0
je 0x40561b
and byte [ebx - 1], 0
xor esi, esi
pop ebx
cmp dword [ebp - 4], esi
je 0x405670
cmp dword [ebp - 8], esi
jne 0x405630
inc dword [0x42eca8]
jmp 0x405670
push edi
call fcn.00405e7e
test eax, eax
je 0x405670
push edi
call fcn.00405676
push edi
call fcn.0040583b
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x405668
test byte [ebp + 0xc], 4
je 0x405628
push edi
push 0xfffffffffffffff1
call fcn.00404e6f
push esi
push edi
call fcn.004058d1
jmp 0x405670
push edi
push 0xffffffffffffffe5
call fcn.00404e6f
pop edi
pop esi
leave
ret 8
Function at 0x405757
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x42b4a8
push esi
call fcn.00405b83
push esi
call fcn.0040570a
mov edi, eax
test edi, edi
jne 0x405778
xor eax, eax
jmp 0x4057ca
push edi
call fcn.00405de5
test byte [0x42ec38], 0x80
je 0x405791
mov al, byte [edi]
test al, al
je 0x405774
cmp al, 0x5c
je 0x405774
sub edi, esi
jmp 0x4057a9
call fcn.00405e7e
test eax, eax
je 0x4057a3
test byte [eax], 0x10
je 0x405774
push esi
call fcn.004056bd
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x405795
call fcn.00405676
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 0x40583b
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 0x405857
and al, 0xfe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x40585a
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 0x405889
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 0x4058cd
test edi, edi
jne 0x405894
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x4058c7
Function at 0x4058d1
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push 2
call fcn.00405f0f
test eax, eax
mov esi, dword [esp + 0x18]
je 0x4058f5
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x405a2e
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x42c230], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x42c230
je 0x405939
push 1
push 0
push esi
call fcn.0040585a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x405a34
cmp eax, edi
jg 0x405a34
mov esi, 0x42bca8
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x405a34
cmp eax, edi
jg 0x405a34
push esi
push ebp
push str._s_s_r_n
push 0x42b8a8
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x42ec30]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.00405ba5
push 4
push 0xc0000000
push esi
call fcn.0040585a
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x405a2e
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 0x405a27
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 0x405a27
cmp edi, dword [esp + 0x18]
jne 0x405a27
push str._Rename__r_n
push esi
call fcn.004057cf
test eax, eax
jne 0x405a3b
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.00405b83
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x42b8a8
push eax
call fcn.0040581b
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 [0x42ecb0]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x4093e4
push eax
call fcn.004057cf
test eax, eax
je 0x4059f2
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x405a62
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x405a57
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x4059f4
Function at 0x405a6a
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 0x405adb
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x400
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 0x405aca
cmp dword [ebp + 0x14], 1
je 0x405acc
cmp dword [ebp + 0x14], 2
je 0x405acc
mov byte [esi], bl
push dword [ebp + 0x18]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x14
Function at 0x405ea5
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
push esi
mov esi, 0x104
lea eax, [ebp - 0x120]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp eax, esi
pop esi
jbe 0x405ec9
xor eax, eax
test eax, eax
je 0x405edb
cmp byte [ebp + eax - 0x121], 0x5c
je 0x405edb
xor ecx, ecx
jmp 0x405ede
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx + 0x409010]
lea eax, [ebp + eax - 0x120]
push ecx
push str._s_s.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
leave
ret 4

Function at 0x405f7e
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x42c634], 0
push esi
jne 0x405fb5
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 0x405f8f
mov dword [ecx*4 + 0x42c630], eax
inc ecx
cmp ecx, 0x100
jl 0x405f8a
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405fe6
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 + 0x42c630]
xor eax, esi
inc ecx
dec edx
jne 0x405fc8
pop edi
not eax
pop esi
ret 0xc
Function at 0x405f14
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, str.C:UsersADMINI1AppDataLocalTemp_nskBAEF.tmp
push esi
call fcn.0040653d
push esi
call fcn.00405eb7
mov edi, eax
test edi, edi
jne 0x405f35
xor eax, eax
jmp 0x405f8d
push edi
call fcn.004067c4
test byte [0x47af18], 0x80
je 0x405f52
mov ax, word [edi]
test ax, ax
je 0x405f31
cmp ax, 0x5c
je 0x405f31
sub edi, esi
sar edi, 1
jmp 0x405f6c
call fcn.00406873
test eax, eax
je 0x405f66
test byte [eax], 0x10
je 0x405f31
push esi
call fcn.00405e58
push esi
call sub.KERNEL32.dll_lstrlenW
cmp eax, edi
push esi
jg 0x405f58
call fcn.00405e0c
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 0x406008
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 0x406027
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 0x40602d
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 0x40605c
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 [0x40a578]
dec edi
mov dword [ebp - 8], eax
mov eax, dword [0x40a57c]
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 0x4060ac
test edi, edi
jne 0x406069
and word [esi], di
pop edi
pop esi
leave
ret 8
mov eax, esi
jmp 0x4060a6
Function at 0x401491
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
push edi
lea eax, [ebp - 4]
push eax
mov eax, dword [0x423cb0]
or eax, 8
push eax
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x401526
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x4014e3
cmp dword [ebp + 0x10], ebx
jne 0x40151a
push ebx
lea eax, [ebp - 0x10c]
push eax
push dword [ebp - 4]
call fcn.00401491
test eax, eax
jne 0x4014f5
push edi
lea eax, [ebp - 0x10c]
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x4014ca
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
call fcn.004058b6
cmp eax, ebx
je 0x40152d
push ebx
push dword [0x423cb0]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x401526
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 [0x423cb0], ebx
jne 0x401523
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x401523
jmp 0x401526
Function at 0x402d96
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [0x41ad7c]
sub esi, dword [0x41ed88]
push edi
add esi, dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 0x1f4
xor ebx, ebx
cmp esi, ebx
mov dword [0x423c20], eax
jle 0x402ef4
push dword [0x41ed84]
call fcn.00402d7f
push ebx
push ebx
push dword [0x41ed88]
push dword [0x409014]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x41ad78], esi
mov dword [0x40acec], ebx
mov ebp, 0x412d78
mov eax, dword [0x41ed80]
sub eax, dword [0x41ed84]
mov edi, 0x4000
cmp eax, edi
jg 0x402e0b
mov edi, eax
push edi
mov esi, 0x41ad80
push esi
call fcn.00402d4d
test eax, eax
je 0x402f06
add dword [0x41ed84], edi
mov dword [0x412d08], esi
mov dword [0x412d0c], edi
cmp dword [0x423bcc], ebx
je 0x402e62
cmp dword [0x423ca0], ebx
jne 0x402e62
mov eax, dword [0x41ad78]
sub eax, dword [0x41ad7c]
push ebx
sub eax, dword [esp + 0x1c]
add eax, dword [0x41ed88]
mov dword [0x40acec], eax
call fcn.00402cae
pop ecx
mov ecx, 0x412cf0
mov dword [0x412d10], ebp
mov dword [0x412d14], 0x8000
call fcn.0040609c
test eax, eax
jl 0x402f0b
mov esi, dword [0x412d10]
sub esi, ebp
je 0x402ec0
push ebx
lea eax, [esp + 0x14]
push eax
push esi
push ebp
push dword [0x409014]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402f10
cmp esi, dword [esp + 0x10]
jne 0x402f10
add dword [0x41ed88], esi
cmp dword [0x412d0c], ebx
jne 0x402e31
jmp 0x402ecc
cmp dword [0x412d0c], ebx
jne 0x402f0b
cmp edi, ebx
je 0x402f0b
mov eax, dword [0x41ad7c]
mov ecx, eax
sub ecx, dword [0x41ed88]
add ecx, dword [esp + 0x18]
test ecx, ecx
jg 0x402df5
push ebx
push ebx
push eax
push dword [0x409014]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
call fcn.00402cae
pop ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4
or eax, 0xffffffff
jmp 0x402efe
push 0xfffffffffffffffd
pop eax
jmp 0x402efe
push 0xfffffffffffffffe
jmp 0x402f0d
Function at 0x402f14
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push esi
push edi
xor edi, edi
cmp eax, edi
jl 0x402f40
mov ecx, dword [0x423c18]
push edi
add eax, ecx
push edi
push eax
push dword [0x409014]
mov dword [0x41ad7c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.00402d96
cmp eax, edi
jl 0x403039
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp + 8]
push eax
push dword [0x409014]
call ebx
test eax, eax
je 0x403035
cmp dword [ebp - 4], esi
jne 0x403035
push dword [ebp + 8]
add dword [0x41ad7c], esi
call fcn.00402d96
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x403038
cmp dword [ebp + 0x10], edi
jne 0x403004
cmp dword [ebp + 8], edi
jle 0x403030
mov esi, 0x41ad80
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x402fb4
mov edi, dword [ebp + 8]
push 0
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [0x409014]
call ebx
test eax, eax
je 0x403035
cmp edi, dword [ebp - 4]
jne 0x403035
push 0
lea eax, [ebp + 0x14]
push eax
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403000
cmp dword [ebp + 0x14], edi
jne 0x403000
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x41ad7c], eax
cmp dword [ebp + 8], 0
jg 0x402fa7
jmp 0x403030
push 0xfffffffffffffffe
jmp 0x403037
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x40300f
mov eax, dword [ebp + 0x14]
push edi
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x409014]
call ebx
test eax, eax
je 0x403035
mov eax, dword [ebp - 4]
add dword [0x41ad7c], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x403038
push 0xfffffffffffffffd
pop eax
pop ebx
pop edi
pop esi
leave
ret 0x10
Function at 0x4054a1
Capabilities:
Create process on windows

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

Function at 0x405623
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 0x405640
and eax, 0xfffffffe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x405643
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
inc ecx
push 0
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc

Function at 0x405672
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
pop ecx
xor edx, edx
div ecx
push esi
push 0
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x4056b6
test edi, edi
jne 0x40567d
mov byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x4056b0

Function at 0x4056ba
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0x14]
lea eax, [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
and eax, 0x100
or eax, 0x20019
push eax
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 0x40572b
lea eax, [ebp + 0xc]
push eax
push esi
lea eax, [ebp + 0x14]
push eax
push ebx
push dword [ebp + 0x10]
mov dword [ebp + 0xc], 0x400
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40571a
cmp dword [ebp + 0x14], 1
je 0x40571c
cmp dword [ebp + 0x14], 2
je 0x40571c
mov byte [esi], bl
push dword [ebp + 0x18]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x14
Function at 0x405974
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x421218
push esi
call fcn.004057d3
push esi
call fcn.004055ac
mov edi, eax
test edi, edi
jne 0x405995
xor eax, eax
jmp 0x4059ed
push edi
call fcn.004057f5
test byte [0x423c28], 0x80
je 0x4059ae
mov al, byte [edi]
test al, al
je 0x405991
cmp al, 0x5c
je 0x405991
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
sub edi, esi
jmp 0x4059ce
push esi
call fcn.0040588f
test eax, eax
je 0x4059c8
test byte [eax], 0x10
je 0x4059f2
push esi
call fcn.0040594d
push esi
call ebx
cmp eax, edi
jg 0x4059b9
push esi
call fcn.00405920
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop ebx
pop edi
pop esi
ret 4
xor eax, eax
jmp 0x4059ec
Function at 0x405ca6
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.004058b6
mov esi, dword [esp + 0x18]
test eax, eax
je 0x405cca
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x405e03
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x421618], 0x4c554e
mov edi, 0x400
mov ebp, 0x421618
test esi, esi
je 0x405d0e
push 1
push 0
push esi
call fcn.00405643
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x405e09
cmp eax, edi
jg 0x405e09
push edi
mov esi, 0x421f58
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x405e09
cmp eax, edi
jg 0x405e09
push esi
push ebp
push str._s_s_r_n
push 0x421a18
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ebx, eax
mov eax, dword [0x423bcc]
push dword [eax + 0x128]
push esi
call fcn.00405a4c
push 4
push 0xc0000000
push esi
call fcn.00405643
mov ebp, eax
mov dword [esp + 0x14], ebp
cmp ebp, 0xffffffff
je 0x405e03
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 0x405dfc
push 0
lea eax, [esp + 0x1c]
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405dfc
cmp edi, dword [esp + 0x18]
jne 0x405dfc
push str._Rename__r_n
push esi
call fcn.004059f6
test eax, eax
jne 0x405e10
push str._Rename__r_n
lea eax, [esi + edi]
push eax
call fcn.004057d3
add edi, 0xa
mov eax, edi
push ebx
push 0x421a18
add eax, esi
push eax
call fcn.004055ff
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x1c]
push eax
add edi, ebx
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 [0x423c90]
pop edi
pop esi
pop ebp
pop ebx
ret 8
push 0x40762c
add eax, 0xa
push eax
call fcn.004059f6
test eax, eax
je 0x405dc7
inc eax
lea ecx, [esi + edi]
mov ebp, eax
cmp eax, ecx
jae 0x405e37
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x405e2c
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x405dc9