joyce8/EMBER2024-capa huggingface dataset:
Function at 0x457758
Capabilities:
Encrypt data using twofish

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffe4
mov dword [esp + 0x18], pe_nt_image_headers32
mov esi, 0x462e04
mov ebx, 0x467c18
movzx edi, byte [esi]
mov dword [esp], edi
mov eax, edi
call fcn.004566b8
mov dword [esp + 8], eax
mov eax, edi
call fcn.004566c8
mov dword [esp + 0x10], eax
movzx edi, byte [esi + 0x100]
mov dword [esp + 4], edi
mov eax, edi
call fcn.004566b8
mov dword [esp + 0xc], eax
mov eax, edi
call fcn.004566c8
mov ebp, eax
mov dword [esp + 0x14], ebp
mov eax, edi
mov edx, dword [esp + 0xc]
shl edx, 8
or eax, edx
mov edx, ebp
shl edx, 0x10
or eax, edx
mov edx, ebp
shl edx, 0x18
or eax, edx
mov dword [ebx], eax
mov eax, dword [esp + 0x10]
mov edx, eax
mov ecx, eax
shl ecx, 8
or edx, ecx
mov ecx, dword [esp + 8]
shl ecx, 0x10
or edx, ecx
mov ecx, dword [esp]
shl ecx, 0x18
or edx, ecx
mov dword [ebx + 0x400], edx
mov edx, dword [esp + 0xc]
shl ebp, 8
or edx, ebp
shl edi, 0x10
or edx, edi
mov ecx, dword [esp + 0x14]
shl ecx, 0x18
or edx, ecx
mov dword [ebx + 0x800], edx
mov edx, dword [esp + 8]
mov ecx, dword [esp]
shl ecx, 8
or edx, ecx
shl eax, 0x10
or edx, eax
mov eax, dword [esp + 8]
shl eax, 0x18
or edx, eax
mov dword [ebx + 0xc00], edx
add ebx, 4
inc esi
dec dword [esp + 0x18]
jne 0x457771
add esp, 0x1c
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x45bdf0
Capabilities:
Hash data with md5

Disassembly:
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
xor edx, edx
mov dword [eax + 0x10], edx
xor edx, edx
mov dword [eax + 0x14], edx
add eax, 0x18
mov edx, 0x40
call fcn.00406a10
ret

Function at 0x460dfc
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff9c
xor ecx, ecx
mov dword [ebp - 0x64], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040449c
mov eax, dword [ebp - 8]
call fcn.0040449c
xor eax, eax
push ebp
push 0x460ed1
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x50]
push eax
call sub.KERNEL32.DLL_GetStartupInfoA
mov dword [ebp - 0x24], 1
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x50]
push eax
push 0
push 0
push 0x30
push 0
push 0
push 0
push dword [ebp - 4]
push 0x460ee8
push dword [ebp - 8]
lea eax, [ebp - 0x64]
mov edx, 3
call fcn.0040436c
mov eax, dword [ebp - 0x64]
call fcn.004044ac
push eax
push 0
call sub.KERNEL32.DLL_CreateProcessA
test eax, eax
jne 0x460e84
mov dword [ebp - 0xc], 0xffffffff
jmp 0x460eae
push 0xffffffffffffffff
mov eax, dword [ebp - 0x60]
push eax
call sub.KERNEL32.DLL_WaitForSingleObject
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x60]
push eax
call sub.KERNEL32.DLL_GetExitCodeProcess
mov eax, dword [ebp - 0x60]
push eax
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 0x5c]
push eax
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x460ed8
lea eax, [ebp - 0x64]
call fcn.00403fec
lea eax, [ebp - 8]
mov edx, 2
call fcn.00404010
ret
Function at 0x408fc0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x12c
mov eax, dword [0x447d10]
mov dword [esp + 0x128], eax
mov al, byte [0x449d54]
test al, al
jne 0x4090da
lea eax, [esp]
push eax
mov dword [esp + 0x24], 0xf
mov dword [esp + 0x20], 0
mov byte [esp + 0x10], 0
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
lea ecx, [esp + 4]
push ecx
push 5
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x409031
mov eax, dword [esp + 4]
lea edx, [esp + 0x24]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
mov edx, dword [esp + 4]
mov eax, dword [esp]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x14]
jmp 0x409043
lea eax, [esp + 0x24]
push 0x4398b8
push eax
call fcn.00416f3f
add esp, 8
mov eax, dword [esp]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea eax, [esp + 0x24]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409053
sub eax, edx
push eax
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x10]
call fcn.00403ef0
push 8
push str.KONAMI_
lea ecx, [esp + 0x10]
call fcn.00408870
push 0x16
push 0x439894
lea ecx, [esp + 0x10]
call fcn.00408870
push 1
push 0x439890
lea ecx, [esp + 0x10]
call fcn.00408870
cmp dword [esp + 0x20], 0x10
mov eax, dword [esp + 0xc]
jae 0x4090aa
lea eax, [esp + 0xc]
push 0x410
push eax
push 0x449388
call fcn.004171a0
mov eax, dword [esp + 0x2c]
add esp, 0xc
cmp eax, 0x10
mov byte [0x449d54], 1
jb 0x4090da
mov eax, dword [esp + 0xc]
push eax
call fcn.0042cfc9
add esp, 4
mov ecx, dword [esp + 0x128]
mov eax, 0x449388
call fcn.004164ae
add esp, 0x12c
ret

Function at 0x40c553
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40c568
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40c57a
xor eax, eax
jmp 0x40c5ac
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x40c59e
cmp esi, eax
jae 0x40c576
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x40c590
cmp esi, eax
jae 0x40c576
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop ebp
ret
Function at 0x433e4e
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x433e7c
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x433e9a
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00433db8
jmp 0x433e9a
mov eax, dword [esi + 0x14]
test eax, eax
je 0x433e9a
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
push eax
mov ecx, esi
call fcn.00433db8
test edi, edi
mov eax, edi
jne 0x433e84
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
mov ecx, dword [0x44ba64]
test ecx, ecx
je 0x433f4d
jmp 0x433e4d
ret 8

Function at 0x401930
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov eax, 0x10
mov ebp, esp
push ebx
sub esp, 0x64
and esp, 0xfffffff0
call fcn.00401e90
call sym.___main
call sub.KERNEL32.dll_GetCommandLineA
mov ebx, eax
lea eax, [ebp - 0x58]
mov dword [esp], eax
call sub.KERNEL32.dll_GetStartupInfoA
sub esp, 4
test ebx, ebx
jne 0x401968
jmp 0x401a06
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete al
cmp cl, 9
sete dl
or eax, edx
test al, 1
jne 0x401967
cmp cl, 0x22
je 0x4019c0
cmp cl, 0x20
setne al
xor edx, edx
cmp cl, 9
setne dl
test eax, edx
je 0x4019e0
lea esi, [esi]
lea edi, [edi]
test cl, cl
je 0x4019e0
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
setne al
xor edx, edx
cmp cl, 9
setne dl
test eax, edx
jne 0x4019a0
jmp 0x4019e0
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x22
setne al
xor edx, edx
test cl, cl
setne dl
test eax, edx
jne 0x4019c0
cmp cl, 0x22
je 0x401a42
lea esi, [esi]
cmp cl, 0x20
sete al
cmp cl, 9
sete dl
jmp 0x401a00
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete dl
cmp cl, 9
sete al
or eax, edx
test al, 1
jne 0x4019f0
mov dword [esp], 0
call sub.KERNEL32.dll_GetModuleHandleA
sub esp, 4
test byte [ebp - 0x2c], 1
mov edx, 0xa
je 0x401a24
movzx edx, word [ebp - 0x28]
mov dword [esp + 8], ebx
xor ebx, ebx
mov dword [esp + 4], ebx
mov dword [esp + 0xc], edx
mov dword [esp], eax
call sym._WinMain_16
sub esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
inc ebx
movzx ecx, byte [ebx]
jmp 0x4019e0

Function at 0x402210
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp sym.___do_sjlj_init
Function at 0x49cd42
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x49cd81
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x49cd81
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x49cd81
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x49cd81
cmp dword [ecx + 0x74], 0xe
jbe 0x49cd81
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4a27a3
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 0x4a2840
push ebx
push esi
call fcn.004a276c
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.004a2700
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x4a27ed
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4a283f
push edi
push eax
call fcn.004a33c0
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x4a280d
call fcn.004a1261
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4a283e
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004a2700
add esp, 0x20
test eax, eax
jne 0x4a282c
push edi
call fcn.004a1261
jmp 0x4a2834
push ebx
call fcn.004a1261
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 0x4a3b3d
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4f6cc0
push 0x4f6cb8
push str.FlsAlloc
push 0x1f
call fcn.004a39fc
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4a3b71
push dword [ebp + 8]
mov ecx, esi
call dword [0x4aa134]
call esi
jmp 0x4a3b77
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4a3bbb
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4f6cd0
push 0x4f6cc8
push str.FlsGetValue
push 0x21
call fcn.004a39fc
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4a3bf2
push dword [ebp + 8]
mov ecx, esi
call dword [0x4aa134]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4a3bfa
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4f6cd8
push 0x4f6cd0
push str.FlsSetValue
push 0x22
call fcn.004a39fc
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4a3c34
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x4aa134]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x4a9090
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4a90bd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4a90bd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401517
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x22c]
push ebx
sub esp, 0x25c
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov dword [esp + 0xc], eax
mov esi, dword [ebp + 0xc]
and edi, 0x300
mov dword [esp], ebx
mov eax, edi
mov dword [esp + 4], esi
or eax, 9
mov dword [esp + 8], eax
call fcn.00408845
sub esp, 0x10
test eax, eax
jne 0x40168f
mov eax, dword [ebp - 0x22c]
test byte [ebp + 0x10], 2
je 0x4015c1
lea edx, [ebp - 0x228]
mov dword [esp + 0x1c], 0
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x222]
mov dword [ebp - 0x228], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
sub esp, 0x20
cmp eax, 0x103
jne 0x40162e
mov eax, dword [ebp + 0x10]
and eax, 1
mov dword [ebp - 0x23c], eax
jmp 0x4015e9
mov ecx, dword [ebp + 0x10]
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 8], ecx
call fcn.00401517
sub esp, 0xc
test eax, eax
jne 0x401645
mov eax, dword [ebp - 0x22c]
lea edx, [ebp - 0x222]
mov dword [esp + 0xc], 0x105
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
lea edx, [ebp - 0x222]
sub esp, 0x10
test eax, eax
jne 0x401645
cmp dword [ebp - 0x23c], 0
mov eax, dword [ebp - 0x22c]
je 0x4015cf
mov eax, dword [ebp - 0x22c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x3eb
push ecx
jmp 0x40168f
mov eax, dword [ebp - 0x22c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
mov dword [esp], 3
call fcn.00409960
push edx
test eax, eax
jne 0x401677
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push edx
push edx
jmp 0x40168f
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call eax
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
Function at 0x404315
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x440180]
cmp dword [ebp + 8], 0
je 0x404340
test eax, eax
je 0x404334
mov dword [esp], eax
call dword [sym.imp.USER32.dll_DestroyWindow]
push ecx
mov dword [0x440180], 0
jmp 0x4043aa
test eax, eax
je 0x404353
mov dword [esp], 0
call fcn.004099d2
push edx
jmp 0x4043aa
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, dword [0x42c120]
jbe 0x4043aa
mov eax, dword [0x449d88]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x40425c
mov dword [esp + 8], 0
mov dword [esp + 4], 0x6f
mov dword [esp], eax
call dword [sym.imp.USER32.dll_CreateDialogParamW]
sub esp, 0x14
mov dword [0x440180], eax
mov dword [esp + 4], 5
mov dword [esp], eax
call dword [sym.imp.USER32.dll_ShowWindow]
push eax
push eax
leave
ret
Function at 0x40812c
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x38]
lea edi, [ebp - 0x2c]
push ebx
sub esp, 0x3c
mov esi, dword [ebp + 8]
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x2c], 0x40001
mov dword [ebp - 0x28], 0x40d9b0
mov dword [ebp - 0x24], 0x40d9b0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0x40d9a0
mov dword [ebp - 0x38], 0xc
mov dword [ebp - 0x30], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push edx
push edx
test eax, eax
je 0x408189
xor eax, eax
jmp 0x4081b6
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0xb7
jne 0x4081b6
mov dword [esp + 8], edi
mov dword [esp + 4], 0x80000007
mov dword [esp], esi
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
sub esp, 0xc
test eax, eax
jne 0x408185
call ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 4

Function at 0x4081ee
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [0x488d20], 0x44
lea eax, [ebp - 0x18]
mov dword [esp + 0x20], 0x488d20
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x4000000
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edx, eax
sub esp, 0x28
xor eax, eax
test edx, edx
je 0x40826c
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
mov eax, dword [ebp - 0x18]
leave
ret 4

Function at 0x408270
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov dword [eax], 0x3c
mov dword [eax + 0x24], 0
pop ebp
jmp dword [sym.imp.SHELL32.dll_ShellExecuteExW]

Function at 0x4084e8
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov esi, dword [ebp + 8]
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
inc eax
push edx
je 0x408516
mov eax, ebx
mov dword [esp], esi
and eax, 0xfffffffe
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push eax
push eax
lea esp, [ebp - 8]
mov eax, ebx
pop ebx
pop esi
pop ebp
ret 4

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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [esp], ebx
call fcn.004084e8
push ecx
cmp eax, 0xffffffff
jne 0x408542
xor edi, edi
jmp 0x40857f
mov dword [esp], ebx
mov esi, eax
test edi, 1
je 0x408577
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push edx
test eax, eax
jne 0x408570
and edi, 4
jne 0x40853e
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push eax
push eax
jmp 0x40857f
mov edi, 1
jmp 0x40857f
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x408555
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret 8
Function at 0x40858b
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x24
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push edx
cmp eax, 0xffffffff
jne 0x4085a6
xor eax, eax
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], ebx
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [ebp - 4]
sub esp, 0x1c
leave
ret 0xc

Function at 0x4085e3
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, 0x65
push ebx
sub esp, 0x20
mov ebx, dword [ebp + 8]
dec esi
je 0x40863f
mov dword [ebp - 0x10], 0x73006e
mov dword [ebp - 0xc], 0x61
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x1a
xor edx, edx
mov dword [esp + 0xc], ebx
div ecx
mov dword [esp + 8], 0
lea eax, [ebp - 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
add word [ebp - 0xc], dx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
sub esp, 0x10
test eax, eax
je 0x4085f3
jmp 0x408646
mov word [ebx], 0
xor ebx, ebx
lea esp, [ebp - 8]
mov eax, ebx
pop ebx
pop esi
pop ebp
ret 8

Function at 0x408651
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp - 0xc]
sub esp, 0x34
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], 0
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x408690
xor eax, eax
cmp dword [ebp - 0xc], ebx
sete al
mov ebx, dword [ebp - 4]
leave
ret 0xc

Function at 0x408697
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp - 0xc]
sub esp, 0x34
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], 0
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x4086d6
xor eax, eax
cmp dword [ebp - 0xc], ebx
sete al
mov ebx, dword [ebp - 4]
leave
ret 0xc
Function at 0x408909
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
lea eax, [ebp - 0x14]
sub esp, 0x30
mov dword [ebp - 0x10], 0x4000
mov ebx, dword [ebp + 0x14]
mov dword [esp + 0xc], eax
xor eax, eax
cmp dword [ebp + 0x18], 0
setne al
shl eax, 8
or eax, 0x20019
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00408845
sub esp, 0x10
test eax, eax
je 0x408957
mov word [ebx], 0
jmp 0x4089ac
lea eax, [ebp - 0x10]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
lea eax, [ebp - 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
mov eax, dword [ebp - 0x14]
sub esp, 0x18
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
mov word [ebx + 0x3ffe], 0
test esi, esi
jne 0x408950
mov eax, dword [ebp - 0xc]
dec eax
cmp eax, 1
ja 0x408950
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret 0x14
Function at 0x408f62
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov esi, dword [ebp + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov dword [0x480520], 0x55004e
mov dword [0x480524], 0x4c
test esi, esi
jne 0x408fbb
mov eax, dword [ebp + 8]
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0x47fd20
mov dword [esp], eax
call ebx
sub esp, 0xc
test eax, eax
je 0x4091af
cmp eax, 0x400
jle 0x40900c
jmp 0x4091af
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], esi
call fcn.0040858b
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0x480520
mov dword [esp], esi
call ebx
sub esp, 0xc
test eax, eax
je 0x4091af
cmp eax, 0x400
jle 0x408f8c
jmp 0x4091af
mov dword [esp + 0xc], 0x47fd20
mov dword [esp + 8], 0x480520
mov dword [esp + 4], str._ls_ls_r_n
mov dword [esp], 0x47f920
call dword [sym.imp.USER32.dll_wsprintfA]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x42c130]
mov eax, dword [eax + 0x128]
mov dword [esp], 0x47fd20
mov dword [esp + 4], eax
call fcn.00408c3e
push edi
push edi
mov dword [esp + 8], 4
mov dword [esp + 4], 0xc0000000
mov dword [esp], 0x47fd20
call fcn.0040858b
sub esp, 0xc
mov edi, eax
cmp eax, 0xffffffff
je 0x4091af
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov eax, dword [ebp - 0x1c]
push ecx
push ecx
add eax, ebx
mov dword [ebp - 0x24], eax
add eax, 0xa
mov dword [esp + 4], eax
mov dword [esp], 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push esi
push esi
mov esi, eax
test eax, eax
je 0x4091a5
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00408651
sub esp, 0xc
test eax, eax
je 0x4091a5
mov dword [esp + 4], str._Rename__r_n
mov dword [esp], esi
call fcn.00408460
push edx
push edx
lea edx, [esi + ebx]
test eax, eax
jne 0x409106
mov dword [esp + 4], str._Rename__r_n
add ebx, 0xa
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, ebx
push eax
push eax
jmp 0x409145
add eax, 0xa
mov dword [esp + 4], 0x40d3cb
mov dword [esp], eax
mov dword [ebp - 0x28], edx
call fcn.00408460
mov dword [ebp - 0x20], eax
push ecx
push ecx
mov ecx, ebx
test eax, eax
je 0x409145
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
add ecx, esi
cmp edx, dword [ebp - 0x20]
jbe 0x40913d
mov al, byte [edx]
dec edx
dec ecx
mov byte [ecx + 1], al
jmp 0x40912f
mov eax, dword [ebp - 0x20]
sub eax, esi
lea ecx, [eax + 1]
mov eax, dword [ebp - 0x1c]
add ecx, esi
mov dword [esp + 4], 0x47f920
mov dword [esp], ecx
mov dword [esp + 8], eax
call fcn.004084cb
add ebx, dword [ebp - 0x1c]
sub esp, 0xc
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub esp, 0x10
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.00408697
sub esp, 0xc
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push edx
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret