joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4481f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x4660c4]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x208
push 0
lea eax, [ebp - 0x20c]
push eax
call fcn.0044b610
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x20c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x210], eax
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x210]
push ecx
call fcn.004486c0
mov dword [ebp - 0x218], 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
push eax
call fcn.0044a106
add esp, 4
mov dword [ebp - 0x214], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x214]
mov dword [ecx], edx
push 0
lea eax, [ebp - 0x218]
push eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
mov edx, dword [ebp - 0x210]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00449e87
mov esp, ebp
pop ebp
ret 8

Function at 0x4486c0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x4486f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4486f2
xor al, al
jmp 0x44870f
xor edx, edx
mov eax, dword [ebp - 4]
mov cl, 0x20
call fcn.00449f00
xor ecx, ecx
add eax, dword [ebp - 8]
adc edx, ecx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov al, 1
mov esp, ebp
pop ebp
ret 8
Function at 0x44f73c
Capabilities:
Parse pe header

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

Function at 0x451cb0
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x45ee74
push 0x45ee6c
push str.FlsAlloc
push 0x1f
call fcn.00451b8c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x451ce4
push dword [ebp + 8]
mov ecx, esi
call dword [0x45b25c]
call esi
jmp 0x451cea
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x451d2e
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x45ee84
push 0x45ee7c
push str.FlsGetValue
push 0x21
call fcn.00451b8c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x451d65
push dword [ebp + 8]
mov ecx, esi
call dword [0x45b25c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x451d6d
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x45ee8c
push 0x45ee84
push str.FlsSetValue
push 0x22
call fcn.00451b8c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x451da7
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x45b25c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x453342
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x4533df
push ebx
push esi
call fcn.0045330b
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.004519aa
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x45338c
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4533de
push edi
push eax
call fcn.004515c1
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x4533ac
call fcn.00451587
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4533dd
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004519aa
add esp, 0x20
test eax, eax
jne 0x4533cb
push edi
call fcn.00451587
jmp 0x4533d3
push ebx
call fcn.00451587
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x401000
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x154
mov dword [ebp - 0xa8], 0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0xac], 0x40e274
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x18], 0x3c67
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x50], 0x8a645fd3
mov word [ebp - 0xa4], 0
mov dword [ebp - 0x14], 0x5199b1eb
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 0x14]
test ecx, ecx
jne 0x4010a6
xor edx, edx
test edx, edx
je 0x4010a6
push 0
call dword [sym.imp.KERNEL32.dll_LockResource]
push 4
push 0x1000
push 0x100
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xb0], eax
push 0
push 0
mov eax, dword [ebp - 0xac]
push eax
call sub.LZ32.dll_LZOpenFileA
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x1c4], eax
mov edx, dword [ebp - 0xc]
cmp dword [edx + 0x1c4], 0
jne 0x4010da
lea eax, [ebp - 0xa4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x4010da
mov word [ebp - 0x4c], 0
mov dword [ebp - 0x1c], 0x42f
mov dword [ebp - 0x10], 0
mov word [ebp - 0x92], 0x64
mov dword [ebp - 0x20], 0xa05bfd62
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0x1c4], 0
je 0x4011fa
mov dword [ebp - 0xc4], 0
mov dword [ebp - 0xc0], 0x9038
mov dword [ebp - 0xb0], 0
push 0x96
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x1c4]
add eax, dword [ebp - 0xc0]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0xbc], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
mov dword [edx + 0x214], eax
push 4
lea ecx, [ebp - 0xbc]
push ecx
mov edx, dword [ebp - 0xc]
add edx, 0x1a4
push edx
call fcn.00401e24
add esp, 0xc
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
mov dword [eax + 0x220], ecx
mov edx, dword [ebp - 0xc]
cmp dword [edx + 0x1c4], 0
jne 0x40119c
push 0x8000
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, dword [ebp - 0xb0]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [ebp - 0xc4], 0x1e7
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x1c4]
add eax, dword [ebp - 0xc0]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
mov dword [ecx + 0x7c], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0x21c], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [0x409030]
mov dword [edx + 0xc], eax
mov dword [ebp - 8], 1
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x50]
mov dword [ecx + 0x1a0], edx
jmp 0x40120e
mov dword [ebp - 0xd4], 0
mov dword [ebp - 0xcc], 0
mov dword [ebp - 0xb4], 0x8764efd3
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x1c4]
mov dword [eax + 0x10c], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xb4]
mov dword [eax + 0x1dc], ecx
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x110], 0x7654fde1
cmp dword [ebp - 8], 0
je 0x401258
mov eax, dword [ebp - 0xc]
push eax
call fcn.004049f9
add esp, 4
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x405b89
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x40e388
cmp edx, dword [eax]
je 0x405bab
add eax, 8
inc ecx
cmp eax, 0x40e418
jl 0x405b9c
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x40e388]
jne 0x405cd9
mov eax, dword [0x40e8f8]
cmp eax, 1
je 0x405cb3
test eax, eax
jne 0x405bdc
cmp dword [0x40e2dc], 1
je 0x405cb3
cmp edx, 0xfc
je 0x405cd9
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x405c13
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00406130
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004062a0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x405c56
lea eax, [ebp - 0x1a4]
push eax
call fcn.004062a0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x408410
push edi
call fcn.00406f30
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00406130
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00406140
lea eax, [ebp - 0xa0]
push 0x4083f0
push eax
call fcn.00406140
push dword [esi + 0x40e38c]
lea eax, [ebp - 0xa0]
push eax
call fcn.00406140
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00406e9e
add esp, 0x2c
pop edi
jmp 0x405cd9
lea eax, [ebp + 8]
lea esi, [esi + 0x40e38c]
push 0
push eax
push dword [esi]
call fcn.004062a0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x402d3b
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, esi
lea eax, [ebp - 4]
and esi, 0x300
push eax
mov eax, esi
and edi, 1
or al, 9
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040620e
xor ebx, ebx
cmp eax, ebx
jne 0x402e1e
test byte [ebp + 0x10], 2
je 0x402d9c
push ebx
push ebx
push ebx
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x110]
mov dword [ebp - 8], ebx
push eax
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, 0x103
jne 0x402e03
lea eax, [ebp - 0x110]
push 0x105
push eax
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
jmp 0x402dd8
test edi, edi
jne 0x402e03
push dword [ebp + 0x10]
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 4]
call fcn.00402d3b
test eax, eax
jne 0x402de1
lea eax, [ebp - 0x110]
push 0x105
push eax
push edi
push dword [ebp - 4]
call ebx
test eax, eax
je 0x402db1
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 3
call fcn.00406794
test eax, eax
jne 0x402e13
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
jmp 0x402e1e
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x3eb
jmp 0x402e1e
push 0
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x4031fd
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
cmp eax, esi
jl 0x403228
mov ecx, dword [0x424798]
push esi
add eax, ecx
push esi
push eax
mov dword [0x41f8fc], eax
push dword [0x40a01c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
call fcn.00403305
cmp eax, esi
jl 0x4032ff
lea eax, [ebp + 8]
push 4
push eax
push dword [0x40a01c]
call fcn.00405f93
test eax, eax
je 0x4032ef
push dword [ebp + 8]
add dword [0x41f8fc], 4
call fcn.00403305
mov ebx, eax
cmp ebx, esi
jl 0x4032fd
cmp dword [ebp + 0x10], esi
jne 0x4032cb
cmp dword [ebp + 8], esi
jle 0x4032fd
mov esi, 0x4138f8
cmp dword [ebp + 8], 0x4000
mov eax, dword [ebp + 8]
jl 0x40328d
mov eax, 0x4000
push eax
push esi
push dword [0x40a01c]
mov dword [ebp - 4], eax
call fcn.00405f93
test eax, eax
je 0x4032ef
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call fcn.00405fc2
test eax, eax
je 0x4032c7
mov eax, dword [ebp - 4]
sub dword [ebp + 8], eax
add dword [0x41f8fc], eax
add ebx, eax
cmp dword [ebp + 8], 0
jg 0x40327c
jmp 0x4032fd
push 0xfffffffffffffffe
jmp 0x4032f1
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x4032d6
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 4]
push esi
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x40a01c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4032f4
push 0xfffffffffffffffd
pop eax
jmp 0x4032ff
mov ebx, dword [ebp - 4]
add dword [0x41f8fc], ebx
mov eax, ebx
pop esi
pop ebx
leave
ret 0x10
Function at 0x40596f
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, 0x408384
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], 0x408374
mov dword [ebp - 0xc], 0xc
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x4059c0
xor eax, eax
jmp 0x4059e7
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
jne 0x4059e7
lea eax, [ebp - 0x20]
push eax
push 0x80000007
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
test eax, eax
jne 0x4059bc
call esi
pop esi
leave
ret 4

Function at 0x405a21
Capabilities:
Create process on windows

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

Function at 0x405a64
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 4]
push eax
and dword [eax + 0x24], 0
mov dword [eax], 0x3c
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
ret 4

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

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00405ef6
mov edi, eax
cmp edi, 0xffffffff
je 0x405b43
test byte [esp + 0x10], 1
push esi
je 0x405b25
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x405b2b
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x405b34
xor eax, eax
inc eax
jmp 0x405b45
test byte [esp + 0x10], 4
jne 0x405b43
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x405b4a
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.00405e08
test bl, 8
mov dword [ebp - 0xc], eax
je 0x405b89
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x4247c8], eax
jmp 0x405d13
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x405ba3
test eax, eax
je 0x405cc1
test bl, 2
je 0x405cc1
mov esi, 0x421d58
push edi
push esi
call fcn.00406388
cmp dword [ebp + 8], 0
je 0x405bc2
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x405bc8
push edi
call fcn.00405d61
cmp byte [edi], 0
jne 0x405bd6
cmp byte [0x421d58], 0x5c
jne 0x405be1
push 0x40a014
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 0x405cb7
lea eax, [ebp - 0x120]
push 0x3f
push eax
lea esi, [ebp - 0x120]
call fcn.00405d45
cmp byte [eax], 0
je 0x405c27
cmp byte [ebp - 0x1c], 0
je 0x405c27
lea esi, [ebp - 0x1c]
cmp byte [esi], 0x2e
jne 0x405c3d
mov al, byte [esi + 1]
test al, al
je 0x405c96
cmp al, 0x2e
jne 0x405c3d
cmp byte [esi + 2], 0
je 0x405c96
push esi
push ebx
call fcn.00406388
test byte [ebp - 0x14c], 0x10
je 0x405c62
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405c96
push dword [ebp + 0xc]
push edi
call fcn.00405b4a
jmp 0x405c96
push dword [ebp - 4]
push edi
call fcn.00405b02
test eax, eax
jne 0x405c8e
cmp dword [ebp - 4], eax
je 0x405c86
push edi
push 0xfffffffffffffff1
call fcn.004054a9
push 0
push edi
call fcn.00406161
jmp 0x405c96
inc dword [0x4247c8]
jmp 0x405c96
push edi
push 0xfffffffffffffff2
call fcn.004054a9
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405c05
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x405cc1
and byte [ebx - 1], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x405d13
cmp dword [ebp - 0xc], esi
jne 0x405cd5
inc dword [0x4247c8]
jmp 0x405d13
push edi
call fcn.004066ff
test eax, eax
je 0x405d13
push edi
call fcn.00405d1a
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.00405b02
test eax, eax
jne 0x405d0b
cmp dword [ebp - 4], esi
je 0x405ccd
push edi
push 0xfffffffffffffff1
call fcn.004054a9
push esi
push edi
call fcn.00406161
jmp 0x405d13
push edi
push 0xffffffffffffffe5
call fcn.004054a9
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x405e08
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x422158
push esi
call fcn.00406388
push esi
call fcn.00405db3
mov edi, eax
test edi, edi
jne 0x405e29
xor eax, eax
jmp 0x405e7b
push edi
call fcn.00406666
test byte [0x424758], 0x80
je 0x405e42
mov al, byte [edi]
test al, al
je 0x405e25
cmp al, 0x5c
je 0x405e25
sub edi, esi
jmp 0x405e5a
call fcn.004066ff
test eax, eax
je 0x405e54
test byte [eax], 0x10
je 0x405e25
push esi
call fcn.00405d61
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x405e46
call fcn.00405d1a
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 0x405ef6
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 0x405f15
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 0x405f1b
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 0x405f4a
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 [0x40a3ec]
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 0x405f8f
test edi, edi
jne 0x405f55
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x405f89
Function at 0x405ff1
Capabilities:
Get file size

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
test esi, esi
mov dword [0x422ae0], 0x4c554e
mov edi, 0x400
mov ebp, 0x422ae0
je 0x40603d
push 1
push 0
push esi
call fcn.00405f1b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x40615c
cmp eax, edi
jg 0x40615c
mov esi, 0x422ee0
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x40615c
cmp eax, edi
jg 0x40615c
push esi
push ebp
push str._s_s_r_n
push 0x4226e0
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x424750]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.0040641b
push 4
push 0xc0000000
push esi
call fcn.00405f1b
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x18], ebp
je 0x40615c
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 0x406155
push edi
push esi
push ebp
call fcn.00405f93
test eax, eax
je 0x406155
push str._Rename__r_n
push esi
call fcn.00405e80
test eax, eax
jne 0x4060f3
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x406128
add eax, 0xa
push 0x40a3f0
push eax
call fcn.00405e80
mov ebp, eax
test ebp, ebp
je 0x406124
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x406115
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x40610f
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x18]
jmp 0x40612a
mov ebp, dword [esp + 0x18]
mov eax, edi
push ebx
add eax, esi
push 0x4226e0
push eax
call fcn.00405ed6
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.00405fc2
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 0x406161
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 0x406184
push dword [esp + 8]
push dword [esp + 8]
call fcn.00405ff1
pop ecx
pop ecx
inc dword [0x4247d0]
ret 8

Function at 0x40626f
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp + 0x18]
push esi
push eax
mov eax, dword [ebp + 0x18]
neg eax
sbb eax, eax
mov dword [ebp - 4], 0x400
and eax, 0x100
or eax, 0x20019
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040620e
mov esi, dword [ebp + 0x14]
test eax, eax
jne 0x4062de
lea eax, [ebp - 4]
push edi
push eax
lea eax, [ebp + 0xc]
push esi
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp + 0x18]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and byte [esi + 0x3ff], 0
test edi, edi
pop edi
jne 0x4062de
cmp dword [ebp + 0xc], 1
je 0x4062e1
cmp dword [ebp + 0xc], 2
je 0x4062e1
and byte [esi], 0
pop esi
leave
ret 0x14
Function at 0x406726
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 0x40674a
xor eax, eax
test eax, eax
je 0x40675c
cmp byte [ebp + eax - 0x121], 0x5c
je 0x40675c
xor ecx, ecx
jmp 0x40675f
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx + 0x40a014]
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 0x40684b
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x4232e4], 0
push esi
jne 0x406882
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 0x40685c
mov dword [ecx*4 + 0x4232e0], eax
inc ecx
cmp ecx, 0x100
jl 0x406857
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x4068b3
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 + 0x4232e0]
xor eax, esi
inc ecx
dec edx
jne 0x406895
pop edi
not eax
pop esi
ret 0xc