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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push 0x4154d4
push dword [ebp + 8]
call fcn.00407d9f
mov esi, eax
xor ebx, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], esi
cmp esi, ebx
jne 0x403fa6
push 6
pop eax
pop esi
pop ebx
leave
ret
push 2
push ebx
push esi
call fcn.00407c65
add esp, 0xc
test eax, eax
je 0x403fbf
push esi
call fcn.00407707
pop ecx
jmp 0x403f9f
push edi
push esi
call fcn.00407b76
mov edi, eax
pop ecx
cmp edi, ebx
jg 0x403fde
push 6
pop esi
push dword [ebp - 0xc]
call fcn.00407707
pop ecx
mov eax, esi
pop edi
jmp 0x403fa2
lea eax, [edi + 1]
push eax
call fcn.00405805
mov esi, eax
pop ecx
mov dword [ebp - 0x18], esi
push ebx
cmp esi, ebx
jne 0x403ffc
call fcn.00405771
pop ecx
push 0xa
jmp 0x403fcf
push ebx
push dword [ebp - 0xc]
call fcn.00407c65
add esp, 0xc
test eax, eax
je 0x404015
push esi
call fcn.00405771
pop ecx
jmp 0x403fcd
push dword [ebp - 0xc]
push edi
push 1
push esi
call fcn.004079c5
add esp, 0x10
cmp eax, edi
jne 0x40400c
mov byte [esi + edi], bl
mov dword [ebp - 0x10], esi
mov byte [ebp - 1], bl
xor esi, esi
jmp 0x404131
mov cl, byte [eax]
cmp cl, 0x23
je 0x404131
cmp cl, 0x3b
je 0x404131
mov edi, 0x4154c4
call fcn.00403f07
mov cl, byte [eax]
mov dword [ebp - 8], eax
test cl, cl
je 0x404131
cmp cl, 0x5b
jne 0x4040ba
inc eax
push 0x4154c8
lea ebx, [ebp - 8]
mov dword [ebp - 8], eax
mov edi, eax
call fcn.00403f2f
pop ecx
test eax, eax
je 0x4040b4
push 0x4154c4
call fcn.00403f2f
pop ecx
test eax, eax
jne 0x4040b4
cmp dword [ebp + 0x18], eax
je 0x4040ad
push dword [ebp + 0x18]
push edi
call fcn.00407360
neg eax
sbb al, al
pop ecx
inc al
pop ecx
mov byte [ebp - 1], al
jmp 0x404131
push str.Strings
jmp 0x404097
mov byte [ebp - 1], 0
jmp 0x404131
cmp byte [ebp - 1], 0
je 0x404131
push 0x4154c0
lea ebx, [ebp - 8]
mov dword [ebp - 0x14], eax
call fcn.00403f2f
pop ecx
test eax, eax
je 0x404131
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x404131
xor edi, edi
jmp 0x4040fb
push ebx
push dword [ebp - 0x14]
call fcn.00407360
pop ecx
pop ecx
test eax, eax
je 0x40415f
push ebx
call fcn.00405890
pop ecx
lea ebx, [ebx + eax + 1]
inc edi
cmp byte [ebx], 0
jne 0x4040e0
or eax, 0xffffffff
test eax, eax
js 0x404131
cmp eax, dword [ebp + 0x10]
jae 0x404131
mov ecx, dword [ebp + 0x14]
imul eax, eax, 0x258
push 0x257
push dword [ebp - 8]
lea ebx, [eax + ecx]
push ebx
call fcn.00406ea0
add esp, 0xc
mov byte [ebx + 0x257], 0
inc esi
push 0x4154bc
lea ebx, [ebp - 0x10]
call fcn.00403f2f
pop ecx
test eax, eax
jne 0x404038
sub esi, dword [ebp + 0x10]
push dword [ebp - 0x18]
neg esi
sbb esi, esi
and esi, 5
call fcn.00405771
pop ecx
jmp 0x403fd0
mov eax, edi
jmp 0x404103
Function at 0x4042ee
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x41a0a0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
xor eax, eax
push 0x208
mov word [ebp - 0x230], ax
xor esi, esi
lea eax, [ebp - 0x22e]
push esi
push eax
call fcn.00405140
push 0x104
lea eax, [ebp - 0x230]
push edi
push eax
call fcn.004052e9
lea eax, [ebp - 0x230]
push str.update.status
push eax
call fcn.004042ba
add esp, 0x20
test eax, eax
jne 0x404351
xor eax, eax
jmp 0x4043c9
push esi
push esi
push 2
push esi
push esi
push 0x40000000
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40434d
push ebx
push dword [ebp + 0xc]
lea eax, [ebp - 0x24]
push str.failed:__d
push eax
call fcn.00407db6
lea eax, [ebp - 0x24]
push eax
call fcn.00405890
add esp, 0x10
mov ebx, eax
push esi
lea eax, [ebp - 0x234]
push eax
push ebx
lea eax, [ebp - 0x24]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
mov dword [ebp - 0x238], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x238], esi
je 0x4043c6
cmp dword [ebp - 0x234], ebx
jne 0x4043c6
xor eax, eax
inc eax
jmp 0x4043c8
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004051ba
leave
ret
Function at 0x4043d7
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x41a0a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 5
xor edi, edi
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
mov dword [ebp - 0x34], ebx
cmp ebx, edi
jne 0x40442c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x404422
xor ecx, ecx
cmp eax, 0x429
setne cl
lea eax, [ecx + 0xfe]
jmp 0x404517
mov eax, 0xfd
jmp 0x404517
push 4
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x30], eax
cmp eax, edi
jne 0x404494
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
sub eax, 5
je 0x40448a
dec eax
je 0x404480
sub eax, 0x75
je 0x404476
sub eax, 0x3a9
je 0x40446c
mov eax, 0xef
jmp 0x404517
mov eax, 0xee
jmp 0x404517
mov eax, 0xed
jmp 0x404517
mov eax, 0xec
jmp 0x404517
mov eax, 0xeb
jmp 0x404517
mov esi, dword [ebp + 0xc]
imul esi, esi, 0x3e8
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x24], 0xcf
cmp esi, edi
jbe 0x404502
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x32
pop ebx
lea eax, [ebp - 0x38]
push eax
push 0x24
lea eax, [ebp - 0x28]
push eax
push 0
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x404526
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7c
jbe 0x40453d
cmp eax, 0x41c
je 0x40452c
cmp eax, 0x424
jbe 0x4044fb
cmp eax, 0x426
jbe 0x40452c
mov dword [ebp - 0x24], 0xde
cmp eax, 0x45b
je 0x404502
mov dword [ebp - 0x24], 0xdf
push dword [ebp - 0x30]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [ebp - 0x24]
call esi
push dword [ebp - 0x34]
call esi
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004051ba
leave
ret
cmp dword [ebp - 0x24], 1
je 0x404502
add dword [ebp - 0x2c], ebx
push ebx
call edi
cmp dword [ebp - 0x2c], esi
jb 0x4044b4
jmp 0x404502
je 0x404575
sub eax, 5
je 0x40456c
dec eax
je 0x404563
sub eax, 0x51
je 0x40455a
sub eax, 0x23
jne 0x4044fb
mov dword [ebp - 0x24], 0xdb
jmp 0x404502
mov dword [ebp - 0x24], 0xdc
jmp 0x404502
mov dword [ebp - 0x24], 0xd9
jmp 0x404502
mov dword [ebp - 0x24], 0xda
jmp 0x404502
mov dword [ebp - 0x24], 0xdd
jmp 0x404502
Function at 0x40457e
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x41a0a0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov edi, eax
cmp edi, 0xffffffff
jne 0x4045ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004051ba
leave
ret
lea eax, [ebp - 0x230]
push eax
push edi
mov dword [ebp - 0x230], 0x22c
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x4045e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x4045ac
lea eax, [ebp - 0x20c]
push eax
push esi
call fcn.0041262f
pop ecx
pop ecx
test eax, eax
je 0x404613
lea eax, [ebp - 0x230]
push eax
push edi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x4045e8
mov esi, 0x490
jmp 0x4045dd
xor esi, esi
jmp 0x4045dd

Function at 0x40464e
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x41a0a0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
xor eax, eax
push 0x208
push eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.00405140
push edi
call fcn.00404fa8
mov ecx, 0x104
add esp, 0x10
cmp eax, ecx
jbe 0x40469a
xor eax, eax
jmp 0x4046d2
push ecx
lea eax, [ebp - 0x210]
push edi
push eax
call fcn.004052e9
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathStripToRootW]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
sub eax, 3
neg eax
sbb eax, eax
inc eax
mov dword [esi], eax
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004051ba
leave
ret
Function at 0x4051ba
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x41a0a0]
jne 0x4051c4
repz ret
jmp fcn.00409828

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x4080d2
call fcn.00409c81
mov dword [eax], esi
call fcn.00409c6e
push 0x16
pop esi
mov dword [eax], esi
call fcn.00409c1c
mov eax, esi
jmp 0x408127
test dword [ebp + 0xc], 0xfffffff9
jne 0x4080b8
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4080ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00409c94
pop ecx
call fcn.00409c6e
mov eax, dword [eax]
jmp 0x408127
test al, 0x10
jne 0x408125
test al, 1
je 0x408125
test byte [ebp + 0xc], 2
je 0x408125
call fcn.00409c81
mov dword [eax], 5
call fcn.00409c6e
mov dword [eax], 0xd
jmp 0x4080f6
xor eax, eax
pop esi
pop ebp
ret
Function at 0x40eb8f
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x41a0a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00408ecf
and dword [ebp - 0x14], 0
cmp dword [0x41bd6c], 0
mov dword [ebp - 0x18], eax
jne 0x40ec42
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x40ecea
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x40ecea
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x41bd6c], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x41bd70], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x41bd74], eax
call edi
push eax
call esi
mov dword [0x41bd7c], eax
test eax, eax
je 0x40ec42
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x41bd78], eax
mov eax, dword [0x41bd78]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x40ec9b
cmp dword [0x41bd7c], ecx
je 0x40ec9b
push eax
call esi
push dword [0x41bd7c]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x40ec9b
test ebx, ebx
je 0x40ec9b
call edi
test eax, eax
je 0x40ec92
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x40ec92
test byte [ebp - 8], 1
jne 0x40ec9b
or dword [ebp + 0x10], 0x200000
jmp 0x40ecce
mov eax, dword [0x41bd70]
cmp eax, dword [ebp - 0x18]
je 0x40ecce
push eax
call esi
test eax, eax
je 0x40ecce
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40ecce
mov eax, dword [0x41bd74]
cmp eax, dword [ebp - 0x18]
je 0x40ecce
push eax
call esi
test eax, eax
je 0x40ecce
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x41bd6c]
call esi
test eax, eax
je 0x40ecea
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x40ecec
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004051ba
leave
ret
Function at 0x401bbf
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [sym.imp.kernel32.dll_GetProcAddress]
push edi
mov edi, eax
push str.PyImport_ImportModule
push edi
call esi
push str.PyObject_SetAttrString
push edi
mov ebx, eax
call esi
push str.PyObject_GetAttrString
push edi
mov dword [ebp - 0xc], eax
call esi
push str.PyCFunction_New
push edi
mov dword [ebp - 4], eax
call esi
push str.Py_BuildValue
push edi
mov dword [ebp - 8], eax
call esi
push str.PyArg_ParseTuple
push edi
mov dword [ebp - 0x10], eax
call esi
push str.PyErr_Format
push edi
mov dword [ebp - 0x14], eax
call esi
push str.PyLong_FromVoidPtr
push edi
mov dword [ebp - 0x18], eax
call esi
xor esi, esi
mov dword [ebp - 0x1c], eax
cmp ebx, esi
je 0x401cc6
cmp dword [ebp - 4], esi
je 0x401cc6
cmp dword [ebp - 0xc], esi
je 0x401cc6
cmp dword [ebp - 8], esi
je 0x401cc6
cmp dword [ebp - 0x10], esi
je 0x401cc6
cmp dword [ebp - 0x14], esi
je 0x401cc6
cmp dword [ebp - 0x18], esi
je 0x401cc6
push str.builtins
call ebx
mov edi, eax
pop ecx
cmp edi, esi
je 0x401ca2
push str.ValueError
push edi
call dword [ebp - 4]
push str.OSError
push edi
mov dword [0x43259c], eax
call dword [ebp - 4]
add esp, 0x10
push 6
mov dword [0x432924], eax
mov esi, 0x42f0e8
pop ebx
push 0
push esi
call dword [ebp - 8]
push eax
push dword [esi]
push edi
call dword [ebp - 0xc]
add esp, 0x14
add esi, 0x10
dec ebx
jne 0x401c8c
mov eax, dword [ebp - 0x10]
mov dword [0x432810], eax
mov eax, dword [ebp - 0x14]
mov dword [0x431544], eax
mov eax, dword [ebp - 0x18]
mov dword [0x431548], eax
mov eax, dword [ebp - 0x1c]
mov dword [0x43258c], eax
xor eax, eax
jmp 0x401cc9
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x401cce
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
pushal
call 0x401cdd
pop dword [ebp - 0x34]
mov eax, 0x89416b58
sub eax, 0x89014e7b
sub dword [ebp - 0x34], eax
push 0x40
push 0x1000
push 0x3b687
push 0
mov eax, 0xe3759114
add eax, 0x1cccc104
add eax, dword [ebp - 0x34]
call dword [eax]
mov ecx, 0x3e83
xor ebx, ebx
add ebx, eax
mov esi, 0x435400
add esi, dword [ebp - 0x34]
mov edx, 0x48f03050
add edx, 0x9287e09a
xor dword [ebp - 0x2c], esi
mov edi, dword [esi]
sub dword [ebp - 0x24], esi
sub edi, edx
mov dword [ebx], edi
add dword [ebp - 0x18], eax
add ebx, 0xf11c827b
sub ebx, 0xf11c8277
add esi, 0xe4e5ed75
add esi, 0x1b1a128f
loop 0x401d32
add eax, 0x16ff6272
add eax, 0xe9018a6d
mov ebx, eax
add eax, 5
mov ecx, 0x7f77ed3
sub ecx, 0x7b77ed3
add ecx, dword [ebp - 0x34]
call ebx
leave
ret
Function at 0x4400c9
Capabilities:
Encrypt data using dpapi

Disassembly:
push esi
push edi
push 0x46c6d0
push str.AdvApi32.dll
call main
mov edi, dword [sym.imp.kernel32.dll_GetProcAddress]
mov esi, eax
test esi, esi
js 0x44010c
push str.SystemFunction040
push dword [0x46c6d0]
call edi
push str.SystemFunction041
push dword [0x46c6d0]
mov dword [0x46c6c0], eax
call edi
mov dword [0x46c6c4], eax
jmp 0x440111
mov eax, dword [0x46c6c4]
cmp dword [0x46c6c0], 0
je 0x440122
test eax, eax
jne 0x4401c9
push 0x46c6d4
push str.Crypt32.dll
call main
mov esi, eax
test esi, esi
js 0x4401d3
push str.CryptProtectMemory
push dword [0x46c6d4]
call edi
cmp dword [0x46c6c0], 0
mov dword [0x46c6c8], eax
jne 0x440187
test eax, eax
jne 0x440187
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x440171
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x440178
mov esi, 0x80004005
push esi
push 0x28
push str.c:_agent_work138_s_srclibsdutilcryputil.cpp
call fcn.004038f5
jmp 0x4401d3
push str.CryptUnprotectMemory
push dword [0x46c6d4]
call edi
cmp dword [0x46c6c4], 0
mov dword [0x46c6cc], eax
jne 0x4401c9
test eax, eax
jne 0x4401c9
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4401bd
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x4401c4
mov esi, 0x80004005
push esi
push 0x2d
jmp 0x44017b
mov dword [0x46c6d8], 1
pop edi
mov eax, esi
pop esi
ret

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

Disassembly:
mov eax, section..pdata
nop
mov ebx, 0x408f6c
nop
nop
mov ecx, 0x21856091
nop
nop
test eax, eax
nop
nop
je 0x43004e
nop
nop
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x430024
nop
nop
nop
mov eax, section..pdata_1
nop
mov ebx, 0x42e3d0
nop
nop
mov ecx, 0x3ed43e21
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x430084
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
add eax, 4
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x43006c
nop
nop
nop
nop
nop
popal
nop
jmp 0x401219
Function at 0x402ded
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x45b010]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
test esi, esi
je 0x402e54
cmp byte [esi], 0xe9
jne 0x402e54
and dword [ebp - 0x10], 0
lea eax, [ebp - 0x10]
push eax
push 0x40
push 5
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 5
push esi
mov dword [ebp - 0xc], 0x8b55ff8b
mov byte [ebp - 8], 0xec
call dword [sym.imp.KERNEL32.dll_IsBadWritePtr]
test eax, eax
jne 0x402e44
push 5
lea eax, [ebp - 0xc]
push eax
push esi
call dword [sym.imp.VCRUNTIME140.dll_memcpy]
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push 5
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00431fdc
mov esp, ebp
pop ebp
ret

Function at 0x4031d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x45b010]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ecx]
push esi
cmp dword [eax], 0xc0000005
jne 0x403242
cmp dword [eax + 0x14], 1
jne 0x403242
mov dword [ebp - 0xc], 0x8b55ff8b
mov byte [ebp - 8], 0xec
mov esi, dword [eax + 0xc]
push 5
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x403242
push 5
lea eax, [ebp - 0xc]
push eax
push esi
call dword [sym.imp.VCRUNTIME140.dll_memcmp]
add esp, 0xc
test eax, eax
jne 0x403242
lea eax, [ebp - 0x10]
push eax
push 0x40
push 5
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 5
push esi
call dword [sym.imp.KERNEL32.dll_IsBadWritePtr]
neg eax
sbb eax, eax
and eax, 2
dec eax
jmp 0x403244
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00431fdc
mov esp, ebp
pop ebp
ret
Function at 0x403430
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push 0x248
mov eax, 0x438daf
call fcn.004385bc
mov esi, ecx
push ecx
push ecx
call fcn.004040eb
mov ecx, eax
call fcn.00406f8b
lea eax, [ebp - 0x234]
push eax
call fcn.004040eb
mov ecx, eax
call fcn.00406187
xor edi, edi
mov dword [ebp - 4], edi
cmp dword [eax + 0x14], 8
jb 0x40346f
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x250]
call fcn.00406958
push edi
push 1
lea ecx, [ebp - 0x234]
call fcn.004069d5
mov dword [ebp - 0x228], edi
mov dword [ebp - 0x224], edi
mov dword [ebp - 0x220], edi
push 0x2001f
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x228]
push dword [ebp - 0x250]
push SysStringLen
call fcn.00405e1e
test eax, eax
jne 0x403512
push 0x20a
lea eax, [ebp - 0x21c]
push edi
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x254], 0x105
lea eax, [ebp - 0x254]
lea ecx, [ebp - 0x228]
push eax
lea eax, [ebp - 0x21c]
push eax
push str.SnapshotPath
call fcn.00405d48
test eax, eax
jne 0x403512
lea eax, [ebp - 0x21c]
mov ecx, esi
push eax
call fcn.0040692c
jmp 0x4035aa
push 0x20a
lea eax, [ebp - 0x21c]
push edi
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x21c]
push 1
push 0x23
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x403552
lea eax, [ebp - 0x21c]
mov ecx, esi
push eax
call fcn.0040692c
push str.TencentTxGameAssistantSnapshot
jmp 0x403590
lea eax, [ebp - 0x24c]
push eax
call fcn.004040eb
mov ecx, eax
call fcn.00405d28
mov byte [ebp - 4], 4
cmp dword [eax + 0x14], 8
jb 0x403571
mov eax, dword [eax]
push eax
mov ecx, esi
call fcn.0040692c
push edi
push 1
lea ecx, [ebp - 0x24c]
mov byte [ebp - 4], 3
call fcn.004069d5
push str.Snapshot
mov ecx, esi
call fcn.0040422f
push ecx
push dword [esi]
lea ecx, [ebp - 0x228]
push str.SnapshotPath
call fcn.00405cee
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4035bb
test al, 0x10
jne 0x4035c2
mov ecx, esi
call fcn.0040ee8b
lea ecx, [ebp - 0x228]
call fcn.00405e7c
mov ecx, dword [ebp - 0x250]
add ecx, 0xfffffff0
call fcn.00406620
xor eax, eax
inc eax
call fcn.00438566
ret

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

Disassembly:
push 4
mov eax, 0x438e0c
call fcn.00438588
mov esi, ecx
test esi, esi
jne 0x403699
xor eax, eax
jmp 0x4036cd
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4036a9
test al, 0x10
jne 0x403695
push esi
lea ecx, [ebp - 0x10]
call fcn.00406958
and dword [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.0040ee8b
mov ecx, dword [ebp - 0x10]
mov esi, eax
add ecx, 0xfffffff0
call fcn.00406620
mov eax, esi
call fcn.00438551
ret
Function at 0x403d3f
Capabilities:
Set registry value

Disassembly:
push 0x2c
mov eax, 0x438e95
call fcn.004385bc
mov ebx, edx
mov esi, ecx
xor eax, eax
test esi, esi
je 0x403e1a
mov edi, eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x28]
push eax
call fcn.004040eb
mov ecx, eax
call fcn.00405a51
mov byte [ebp - 4], 1
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x34]
push 0x2001f
cmovae eax, dword [ebp - 0x28]
push eax
push 0x80000001
call fcn.00405e1e
test eax, eax
je 0x403dde
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
sub esp, 0x14
push eax
push ecx
lea ecx, [ebp - 0x34]
call fcn.004059ee
test eax, eax
je 0x403dde
cmp byte [0x45b042], 0
je 0x403dfc
push eax
push 0x43f2cc
push str.Error
push str.__s__s:_Create_Key_failed._retcode__d_
push edi
push edi
call fcn.004104e8
add esp, 0x18
jmp 0x403dfc
push 4
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], ebx
push eax
push 4
push 0
push esi
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x403dfc
xor edi, edi
inc edi
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.004069d5
lea ecx, [ebp - 0x34]
call fcn.00405e7c
lea ecx, [ebp - 0x34]
call fcn.00405e7c
mov eax, edi
call fcn.00438566
ret

Function at 0x4064a8
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x406503
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4064f4
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [ebp + 8]
lea ecx, [esi + eax]
and edx, 0xf
jbe 0x4064f0
cmp esi, ecx
jae 0x4064f4
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub edx, 1
jne 0x4064de
cmp esi, ecx
jb 0x4064f8
xor eax, eax
jmp 0x406502
xor eax, eax
cmp word [esi], ax
cmove esi, eax
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret