joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406480
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x413a95
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x41d040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x41deb4
mov dword [ebp - 0x10], 0x41deb4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
push eax
call fcn.00405f50
lea ecx, [ebp - 0x1c]
lea esi, [eax + 1]
push esi
call fcn.004066e0
lea eax, [ebp + 0xc]
mov byte [ebp - 4], 1
push eax
push ecx
push dword [ebp + 8]
mov edx, esi
mov esi, dword [ebp - 0x1c]
push ecx
mov ecx, esi
call fcn.00405f10
mov eax, dword fs:[0x2c]
add esp, 0x10
mov ebx, dword [eax]
mov edi, dword [ebx + 4]
test edi, edi
jne 0x406533
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputws]
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 0xc
push eax
push 0xa
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputwc]
add esp, 8
jmp 0x406541
push esi
mov ecx, edi
call dword [0x415204]
call edi
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [0x41df30], 0
je 0x40658a
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov edi, dword [0x41decc]
add esp, 4
cmp edi, eax
jne 0x40656f
cmp dword [ebx + 4], 0
je 0x40658a
mov edx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
push ecx
mov ecx, edi
call fcn.00405ee0
push edi
push 0xa
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputwc]
add esp, 0x10
test esi, esi
je 0x4065c0
mov ecx, dword [ebp - 0x14]
mov eax, esi
sub ecx, esi
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x4065b6
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4065b6
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push esi
call fcn.00410250
add esp, 8
push 0x41deb4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40cc40
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, edx
push edi
mov edi, ecx
mov eax, esi
mov dword [esi + 0x10], 0
cmp dword [esi + 0x14], 7
jbe 0x40cc5c
mov eax, dword [esi]
xor ecx, ecx
push ecx
push ecx
push edi
mov word [eax], cx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebx, eax
test ebx, ebx
je 0x40cc98
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00410508
add esp, 4
push ebx
mov ebx, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x40ccc9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x40ccc0
test eax, eax
jle 0x40ccb1
movzx eax, ax
or eax, 0x80070000
push eax
push edi
push str.Failed_to_read_environment_variable___s___HRESULT:_0x_X
call fcn.004065e0
add esp, 0xc
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, ebx
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ccd0
sub ecx, edx
sar ecx, 1
push ecx
push ebx
mov ecx, esi
call fcn.00404f90
push ebx
call fcn.00410503
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x410c41
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x410c80
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x410c80
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x410c80
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x410c80
cmp dword [ecx + 0x74], 0xe
jbe 0x410c80
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x4133d0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4133fd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4133fd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x9eb920
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
xor esi, esi
test edi, edi
je 0x9eb96c
mov cl, byte [ebx + esi]
mov dl, cl
mov al, cl
shr dl, 1
and al, 0xfe
not dl
movzx eax, al
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
or cl, 1
test dl, 2
movzx ecx, cl
cmove ecx, eax
mov byte [ebx + esi], cl
inc esi
cmp esi, edi
jb 0x9eb932
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x9eb9d0
Capabilities:
Hash data using md4
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0xf0000040
push 1
push 0
push 0
lea edi, [esi + 4]
mov dword [esi], 0
push esi
mov dword [edi], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x9eba22
push edi
push 0
push 0
push 0x8002
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x9eba28
push eax
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov dword [esi], 0
pop edi
xor eax, eax
pop esi
pop ebp
ret
pop edi
mov eax, 1
pop esi
pop ebp
ret

Function at 0xa03f15
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00a03bd5

Function at 0xa08d0f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00a08b8e

Function at 0xa0e2c0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0xa0e2ed
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0xa0e2ed
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

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

Disassembly:
pushal
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x408ecc
nop
mov ecx, 0x7c854363
nop
nop
test eax, eax
nop
nop
nop
nop
nop
nop
nop
je 0x43004e
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
jne 0x430024
nop
nop
nop
nop
mov eax, section..data
nop
mov ebx, 0x42e1d0
mov ecx, 0x506c50f0
nop
nop
nop
nop
nop
test eax, eax
je 0x430084
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
add eax, 4
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
nop
jne 0x43006c
nop
nop
nop
nop
nop
nop
popal
jmp 0x401219

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

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43000c
pop eax
nop
nop
nop
nop
nop
add eax, 0x403d6a
nop
sub eax, 0x403d10
nop
mov ebx, dword [eax]
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
add ebx, 4
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
jl 0x430030
nop
nop
nop
nop
nop
nop
add eax, 0xc
cmp dword [eax], 0
nop
nop
nop
nop
jne 0x43001e
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp fcn.00401219
Function at 0x402a7a
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 [0x7a1ff0]
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 0x402b0e
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x402acb
cmp dword [ebp + 0x10], ebx
jne 0x402b02
lea eax, [ebp - 0x10c]
push ebx
push eax
push dword [ebp - 4]
call fcn.00402a7a
test eax, eax
jne 0x402add
lea eax, [ebp - 0x10c]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x402ab2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 3
call fcn.004060a5
cmp eax, ebx
je 0x402b15
push ebx
push dword [0x7a1ff0]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x402b0e
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 [0x7a1ff0], ebx
jne 0x402b0b
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x402b0b
jmp 0x402b0e
Function at 0x402e9f
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
test edi, edi
jne 0x402ebc
mov dword [ebp - 8], 0x8000
and dword [ebp - 4], 0
mov dword [ebp - 0xc], edi
test edi, edi
jne 0x402ece
mov dword [ebp - 0xc], 0x78d0f8
mov eax, dword [ebp + 8]
test eax, eax
jl 0x402ee3
mov ecx, dword [0x7a1f98]
add ecx, eax
push ecx
call fcn.004030a4
lea eax, [ebp + 0x14]
push 4
push eax
call fcn.0040308e
test eax, eax
je 0x40307c
test byte [ebp + 0x17], 0x80
je 0x403027
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
and dword [0x40a858], 0
and dword [ebp + 0x14], 0x7fffffff
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
mov byte [0x40a840], 0xb
mov dword [ebp + 8], eax
jle 0x403084
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x402f39
mov esi, dword [ebp + 0x14]
mov edi, 0x7890f8
push esi
push edi
call fcn.0040308e
test eax, eax
je 0x40307c
sub dword [ebp + 0x14], esi
mov dword [0x40a830], edi
mov dword [0x40a834], esi
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
push 0x40a830
mov dword [0x40a838], edi
mov dword [0x40a83c], eax
call fcn.00406188
test eax, eax
mov dword [ebp - 0x14], eax
jl 0x40301f
mov esi, dword [0x40a838]
sub esi, edi
call ebx
test byte [0x7a1ff4], 1
mov edi, eax
je 0x402fda
sub eax, dword [ebp - 0x10]
cmp eax, 0xc8
ja 0x402fa7
cmp dword [ebp + 0x14], 0
jne 0x402fda
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.00404f25
mov dword [ebp - 0x10], edi
test esi, esi
je 0x403013
cmp dword [ebp + 0x10], 0
jne 0x402ff9
push esi
push dword [ebp - 0xc]
push dword [ebp + 0xc]
call fcn.00405a26
test eax, eax
je 0x403023
add dword [ebp - 4], esi
jmp 0x403007
mov eax, dword [0x40a838]
add dword [ebp - 4], esi
sub dword [ebp - 8], esi
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x14], 4
jne 0x402f5c
jmp 0x403084
cmp dword [ebp + 0x14], 0
jg 0x402f2c
jmp 0x403084
push 0xfffffffffffffffc
jmp 0x40307e
push 0xfffffffffffffffe
jmp 0x40307e
test edi, edi
jne 0x403069
cmp dword [ebp + 0x14], edi
jle 0x403084
mov ebx, dword [ebp - 8]
cmp dword [ebp + 0x14], ebx
mov esi, dword [ebp + 0x14]
jl 0x40303d
mov esi, ebx
mov edi, 0x7890f8
push esi
push edi
call fcn.0040308e
test eax, eax
je 0x40307c
push esi
push edi
push dword [ebp + 0xc]
call fcn.00405a26
test eax, eax
je 0x403023
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x403033
jmp 0x403084
cmp dword [ebp + 0x14], esi
jge 0x403071
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.0040308e
test eax, eax
jne 0x403081
push 0xfffffffffffffffd
pop eax
jmp 0x403087
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x4053eb
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, 0x407374
and byte [ebp - 0x1f], 0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
and dword [ebp - 0x14], 0
and dword [ebp - 4], 0
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push esi
push eax
mov byte [ebp - 0x20], 1
push dword [ebp + 8]
mov word [ebp - 0x1e], 4
mov dword [ebp - 0x10], 0x407364
mov dword [ebp - 0xc], 0xc
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x40543c
xor eax, eax
jmp 0x405463
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
jne 0x405463
lea eax, [ebp - 0x20]
push eax
push 0x80000007
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
test eax, eax
jne 0x405438
call esi
pop esi
leave
ret 4

Function at 0x40549d
Capabilities:
Create process on windows

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

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

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.0040595a
mov edi, eax
cmp edi, 0xffffffff
je 0x4055a7
test byte [esp + 0x10], 1
push esi
je 0x405589
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x40558f
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x405598
xor eax, eax
inc eax
jmp 0x4055a9
test byte [esp + 0x10], 4
jne 0x4055a7
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x4055ae
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.0040586c
test bl, 8
mov dword [ebp - 0xc], eax
je 0x4055ed
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x7a1fc8], eax
jmp 0x405777
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x405607
test eax, eax
je 0x405725
test bl, 2
je 0x405725
mov esi, 0x79f548
push edi
push esi
call fcn.00405d0c
cmp dword [ebp + 8], 0
je 0x405626
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x40562c
push edi
call fcn.004057c5
cmp byte [edi], 0
jne 0x40563a
cmp byte [0x79f548], 0x5c
jne 0x405645
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 0x40571b
lea eax, [ebp - 0x120]
push 0x3f
push eax
lea esi, [ebp - 0x120]
call fcn.004057a9
cmp byte [eax], 0
je 0x40568b
cmp byte [ebp - 0x1c], 0
je 0x40568b
lea esi, [ebp - 0x1c]
cmp byte [esi], 0x2e
jne 0x4056a1
mov al, byte [esi + 1]
test al, al
je 0x4056fa
cmp al, 0x2e
jne 0x4056a1
cmp byte [esi + 2], 0
je 0x4056fa
push esi
push ebx
call fcn.00405d0c
test byte [ebp - 0x14c], 0x10
je 0x4056c6
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x4056fa
push dword [ebp + 0xc]
push edi
call fcn.004055ae
jmp 0x4056fa
push dword [ebp - 4]
push edi
call fcn.00405566
test eax, eax
jne 0x4056f2
cmp dword [ebp - 4], eax
je 0x4056ea
push edi
push 0xfffffffffffffff1
call fcn.00404f25
push 0
push edi
call fcn.00405bc7
jmp 0x4056fa
inc dword [0x7a1fc8]
jmp 0x4056fa
push edi
push 0xfffffffffffffff2
call fcn.00404f25
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405669
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x405725
and byte [ebx - 1], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x405777
cmp dword [ebp - 0xc], esi
jne 0x405739
inc dword [0x7a1fc8]
jmp 0x405777
push edi
call fcn.00406010
test eax, eax
je 0x405777
push edi
call fcn.0040577e
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.00405566
test eax, eax
jne 0x40576f
cmp dword [ebp - 4], esi
je 0x405731
push edi
push 0xfffffffffffffff1
call fcn.00404f25
push esi
push edi
call fcn.00405bc7
jmp 0x405777
push edi
push 0xffffffffffffffe5
call fcn.00404f25
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x40586c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x79f948
push esi
call fcn.00405d0c
push esi
call fcn.00405817
mov edi, eax
test edi, edi
jne 0x40588d
xor eax, eax
jmp 0x4058df
push edi
call fcn.00405f77
test byte [0x7a1f58], 0x80
je 0x4058a6
mov al, byte [edi]
test al, al
je 0x405889
cmp al, 0x5c
je 0x405889
sub edi, esi
jmp 0x4058be
call fcn.00406010
test eax, eax
je 0x4058b8
test byte [eax], 0x10
je 0x405889
push esi
call fcn.004057c5
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x4058aa
call fcn.0040577e
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 0x40595a
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 0x405979
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 0x40597f
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 0x4059ae
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 [0x4093ac]
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 0x4059f3
test edi, edi
jne 0x4059b9
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x4059ed
Function at 0x405a55
Capabilities:
Get file size

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, 0x7a02d0
push 0x4093c8
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [esp + 0x18]
mov ebp, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test esi, esi
mov ebx, 0x400
je 0x405aa3
push 1
push 0
push esi
call fcn.0040597f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push edi
push esi
call ebp
test eax, eax
je 0x405bc2
cmp eax, ebx
jg 0x405bc2
mov esi, 0x7a06d0
push ebx
push esi
push dword [esp + 0x1c]
call ebp
test eax, eax
je 0x405bc2
cmp eax, ebx
jg 0x405bc2
push esi
push edi
push str._s_s_r_n
push 0x79fed0
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x7a1f50]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.00405d2e
push 4
push 0xc0000000
push esi
call fcn.0040597f
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x18], ebp
je 0x405bc2
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 0x405bbb
push edi
push esi
push ebp
call fcn.004059f7
test eax, eax
je 0x405bbb
push str._Rename__r_n
push esi
call fcn.004058e4
test eax, eax
jne 0x405b59
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x405b8e
add eax, 0xa
push 0x4093b0
push eax
call fcn.004058e4
mov ebp, eax
test ebp, ebp
je 0x405b8a
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x405b7b
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x405b75
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x18]
jmp 0x405b90
mov ebp, dword [esp + 0x18]
mov eax, edi
push ebx
add eax, esi
push 0x79fed0
push eax
call fcn.0040593a
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add edi, ebx
push edi
push esi
push ebp
call fcn.00405a26
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
ret

Function at 0x405bc7
Capabilities:
Move file

Disassembly:
push 5
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x405bea
push dword [esp + 8]
push dword [esp + 8]
call fcn.00405a55
pop ecx
pop ecx
inc dword [0x7a1fd0]
ret 8
Function at 0x405bf3
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 0x405c64
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 0x405c53
cmp dword [ebp + 0x14], 1
je 0x405c55
cmp dword [ebp + 0x14], 2
je 0x405c55
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 0x406037
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 0x40605b
xor eax, eax
test eax, eax
je 0x40606d
cmp byte [ebp + eax - 0x121], 0x5c
je 0x40606d
xor ecx, ecx
jmp 0x406070
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx + 0x409014]
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 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
leave
ret 4

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

Disassembly:
cmp dword [0x7a0ad4], 0
push esi
jne 0x406151
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 0x40612b
mov dword [ecx*4 + 0x7a0ad0], eax
inc ecx
cmp ecx, 0x100
jl 0x406126
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x406182
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 + 0x7a0ad0]
xor eax, esi
inc ecx
dec edx
jne 0x406164
pop edi
not eax
pop esi
ret 0xc