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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push edi
mov edi, ecx
cmp dword [edi + 0x38], 0
je 0x40ba9b
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040bb57
jmp 0x40bb52
mov eax, dword [edi + 0x1c]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov eax, dword [eax]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], eax
test eax, eax
je 0x40babc
mov eax, dword [edi + 0x2c]
mov eax, dword [eax]
jmp 0x40babe
xor eax, eax
cdq
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test ebx, ebx
jl 0x40bb46
jg 0x40bad1
test esi, esi
je 0x40bb46
test ecx, ecx
jl 0x40bb13
jg 0x40badb
test eax, eax
je 0x40bb13
cmp ebx, ecx
jg 0x40baed
jl 0x40bae5
cmp esi, eax
jae 0x40baed
mov eax, esi
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], ebx
push eax
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.0042b6a0
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov eax, dword [edi + 0x2c]
add dword [ebp + 8], ecx
sub esi, ecx
sbb ebx, dword [ebp - 4]
sub dword [eax], ecx
mov eax, dword [edi + 0x1c]
add dword [eax], ecx
jmp 0x40bb19
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
test ebx, ebx
jl 0x40bb46
jg 0x40bb23
test esi, esi
je 0x40bb46
cmp dword [edi + 0x4c], 0
je 0x40bb46
mov ecx, edi
call fcn.0040ae13
push dword [edi + 0x4c]
push esi
push 1
push dword [ebp + 8]
call fcn.00433dec
add esp, 0x10
sub esi, eax
sbb ebx, 0
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
sub eax, esi
pop esi
sbb edx, ebx
pop ebx
pop edi
leave
ret 0xc

Function at 0x40bc26
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x40bc48
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040bcfa
jmp 0x40bcf5
mov eax, dword [ebx + 0x20]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov eax, dword [eax]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], eax
test eax, eax
je 0x40bc69
mov eax, dword [ebx + 0x30]
mov eax, dword [eax]
jmp 0x40bc6b
xor eax, eax
cdq
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test edi, edi
jl 0x40bce9
jg 0x40bc7e
test esi, esi
je 0x40bce9
test ecx, ecx
jl 0x40bcc2
jg 0x40bc88
test eax, eax
je 0x40bcc2
cmp edi, ecx
jg 0x40bc9a
jl 0x40bc92
cmp esi, eax
jae 0x40bc9a
mov eax, esi
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], edi
push eax
push dword [ebp + 8]
push dword [ebp - 8]
call fcn.0042b6a0
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x30]
add edx, ecx
sub esi, ecx
sbb edi, dword [ebp - 4]
sub dword [eax], ecx
mov eax, dword [ebx + 0x20]
add dword [eax], ecx
jmp 0x40bcc5
mov edx, dword [ebp + 8]
test edi, edi
jl 0x40bce9
jg 0x40bccf
test esi, esi
je 0x40bce9
cmp dword [ebx + 0x4c], 0
je 0x40bce9
push dword [ebx + 0x4c]
push esi
push 1
push edx
call fcn.00434454
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x40be2c
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x46d0e4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0x18]
xor esi, esi
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40be91
lea eax, [ebp - 0x10]
mov dword [ebp - 0x14], 1
push eax
push 0x455538
push esi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push esi
push esi
push 0x10
lea eax, [ebp - 0x14]
mov dword [ebp - 8], 2
push eax
push esi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push dword [ebp - 0x18]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00417f15
leave
ret 4
Function at 0x40c015
Capabilities:
Enumerate process modules

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x468e58
push 0x42d610
mov eax, dword fs:[0]
push eax
push ecx
push ecx
mov eax, 0x2a1c
call fcn.00418040
mov eax, dword [0x46d0e4]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, dword [ebp + 8]
mov dword [ebp - 0x2a34], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2a28], eax
test eax, eax
je 0x40c1e6
mov ecx, eax
lea edx, [ecx + 2]
xor esi, esi
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x40c075
sub ecx, edx
sar ecx, 1
mov dword [ebp - 0x2a30], ecx
cmp ecx, 4
jl 0x40c1e6
mov ebx, 0x104
cmp ecx, ebx
jg 0x40c1e6
mov dword [ebp - 4], esi
mov eax, dword [edi]
push edi
call dword [eax + 4]
mov dword [ebp - 4], 0xfffffffe
jmp 0x40c0cd
push 0x800
push esi
lea eax, [ebp - 0xa24]
push eax
call fcn.0042c1a0
mov dword [ebp - 0x2a2c], esi
push 0x2000
push esi
lea eax, [ebp - 0x2a24]
push eax
call fcn.0042c1a0
add esp, 0x18
lea eax, [ebp - 0x2a2c]
push eax
push 0x800
lea eax, [ebp - 0x2a24]
push eax
call sub.KERNEL32.dll_K32EnumProcesses
test eax, eax
je 0x40c1e6
push 0x208
push esi
lea eax, [ebp - 0x224]
push eax
call fcn.0042c1a0
add esp, 0xc
push dword [ebp - 0x2a28]
push ebx
lea eax, [ebp - 0x224]
push eax
call fcn.00407d61
push ebx
lea eax, [ebp - 0x224]
push eax
call fcn.00434ac0
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ebx, eax
push ebx
mov ecx, edi
call fcn.0040bea2
mov ecx, eax
mov dword [ebp - 0x2a28], ecx
cmp dword [ebp - 0x2a2c], 0
jbe 0x40c1e6
mov eax, dword [ebp + esi*4 - 0x2a24]
cmp ebx, eax
je 0x40c1dd
cmp ecx, eax
je 0x40c1dd
push 0x400
lea ecx, [ebp - 0xa24]
push ecx
push eax
mov ecx, edi
call fcn.0040bf1d
test eax, eax
je 0x40c1d7
push 0x400
lea eax, [ebp - 0xa24]
push eax
call fcn.00434ac0
push dword [ebp - 0x2a30]
lea eax, [ebp - 0xa24]
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.0043488b
add esp, 0x14
test eax, eax
jne 0x40c1d7
push dword [ebp + esi*4 - 0x2a24]
push edi
call fcn.0040c590
mov ecx, dword [ebp - 0x2a28]
inc esi
cmp esi, dword [ebp - 0x2a2c]
jb 0x40c172
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00417f15
leave
ret 8
Function at 0x40c204
Capabilities:
Enumerate process modules

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x468e38
push 0x42d610
mov eax, dword fs:[0]
push eax
push ecx
push ecx
mov eax, 0x2a14
call fcn.00418040
mov eax, dword [0x46d0e4]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2a28], eax
cmp dword [ebp + 0xc], 0
je 0x40c3c0
mov ecx, dword [ebp + 0xc]
lea edx, [ecx + 2]
xor esi, esi
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x40c25e
sub ecx, edx
sar ecx, 1
mov edi, 0x104
cmp ecx, edi
ja 0x40c3c0
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x2a28]
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
mov dword [ebp - 4], 0xfffffffe
jmp 0x40c2a7
mov ebx, 0x800
push ebx
push esi
lea eax, [ebp - 0xa24]
push eax
call fcn.0042c1a0
mov dword [ebp - 0x2a2c], esi
push 0x2000
push esi
lea eax, [ebp - 0x2a24]
push eax
call fcn.0042c1a0
add esp, 0x18
lea eax, [ebp - 0x2a2c]
push eax
push ebx
lea eax, [ebp - 0x2a24]
push eax
call sub.KERNEL32.dll_K32EnumProcesses
test eax, eax
je 0x40c3c0
push 0x208
push esi
lea eax, [ebp - 0x224]
push eax
call fcn.0042c1a0
add esp, 0xc
push dword [ebp + 0xc]
push edi
lea eax, [ebp - 0x224]
push eax
call fcn.00407d61
push edi
lea eax, [ebp - 0x224]
push eax
call fcn.00434ac0
pop ecx
pop ecx
mov edi, esi
cmp dword [ebp - 0x2a2c], 0
jbe 0x40c3c0
mov ebx, 0x400
push ebx
lea eax, [ebp - 0xa24]
push eax
push dword [ebp + edi*4 - 0x2a24]
mov ecx, dword [ebp - 0x2a28]
call fcn.0040bf1d
test eax, eax
je 0x40c3b3
push ebx
lea eax, [ebp - 0xa24]
push eax
call fcn.00434ac0
pop ecx
pop ecx
lea ecx, [ebp - 0xa24]
lea eax, [ebp - 0x224]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40c398
test dx, dx
je 0x40c394
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40c398
add eax, 4
add ecx, 4
test dx, dx
jne 0x40c372
mov eax, esi
jmp 0x40c39d
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40c3b3
push dword [ebp + edi*4 - 0x2a24]
push dword [ebp - 0x2a28]
call fcn.0040c590
inc edi
cmp edi, dword [ebp - 0x2a2c]
jb 0x40c339
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00417f15
leave
ret 8
Function at 0x40c3de
Capabilities:
Check if file exists
Create process on windows

Disassembly:
push 0x848
push 0x468e78
call fcn.004180e0
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 0x20]
xor eax, eax
mov dword [ebp - 4], eax
test esi, esi
je 0x40c510
cmp word [esi], ax
je 0x40c510
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 4]
jne 0x40c411
sub ecx, edx
sar ecx, 1
cmp ecx, 0x104
ja 0x40c510
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40c510
push 0x800
xor eax, eax
push eax
lea eax, [ebp - 0x81c]
push eax
call fcn.0042c1a0
push esi
push str.__s_
push 0x3ff
lea eax, [ebp - 0x81c]
push eax
call fcn.0040c52b
push 0x3c
pop esi
push esi
xor eax, eax
push eax
lea eax, [ebp - 0x858]
push eax
call fcn.0042c1a0
add esp, 0x28
mov dword [ebp - 0x858], esi
lea eax, [ebp - 0x81c]
mov dword [ebp - 0x848], eax
mov dword [ebp - 0x84c], 0x455568
mov dword [ebp - 0x844], ebx
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x83c], eax
mov dword [ebp - 0x854], 0x440
lea eax, [ebp - 0x858]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov esi, eax
test esi, esi
je 0x40c4d9
cmp dword [ebp + 0x1c], 0
je 0x40c4d9
push 0xffffffffffffffff
push dword [ebp - 0x820]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test edi, edi
je 0x40c4ee
test esi, esi
je 0x40c4fe
push edi
push dword [ebp - 0x820]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test esi, esi
je 0x40c4fe
push dword [ebp - 0x820]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
jmp 0x40c519
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 0x1c

Function at 0x40c590
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push dword [ebp + 0xc]
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x40c5bd
push esi
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop edi
pop ebp
ret 8
Function at 0x40d2b8
Capabilities:
Check if file exists
Get common file path
Move file
Set file attributes

Disassembly:
push 0x428
mov eax, 0x4510c8
call fcn.00417f91
mov esi, ecx
mov dword [ebp - 0x430], esi
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x434], eax
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jne 0x40d2ea
xor eax, eax
jmp 0x40d45f
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call ebx
test eax, eax
je 0x40d2e3
and dword [ebp - 4], 0
call fcn.00401cc5
push eax
lea ecx, [ebp - 0x424]
call fcn.00401501
xor eax, eax
inc eax
push 0x208
mov dword [ebp - 0x42c], eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0042c1a0
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.0042c1a0
add esp, 0x18
lea eax, [ebp - 0x420]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x420]
push eax
call fcn.00434a56
pop ecx
push 0
mov ecx, edi
call fcn.0040ce24
movzx eax, ax
push eax
call fcn.00434e42
movzx eax, ax
pop ecx
cmp word [ebp - 0x420], ax
jne 0x40d393
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x40d3e4
push 0
mov ecx, edi
call fcn.0040ce24
movzx eax, ax
push eax
push str._c:.temp
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0040c52b
add esp, 0x10
lea eax, [ebp - 0x218]
push eax
call ebx
test eax, eax
jne 0x40d3e4
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 2
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x428]
call fcn.0040158b
lea eax, [ebp - 0x424]
mov byte [ebp - 4], 2
push eax
push 0
lea eax, [ebp - 0x428]
mov ecx, esi
push eax
call fcn.0040d639
mov ecx, dword [ebp - 0x428]
mov byte [ebp - 4], 1
lea ecx, [ecx - 0x10]
call fcn.00402009
mov esi, dword [ebp - 0x424]
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40d44a
push dword [edi]
call ebx
test eax, eax
je 0x40d467
mov ecx, dword [ebp - 0x430]
push esi
call fcn.0040dd08
and dword [ebp - 0x42c], 0
lea ecx, [esi - 0x10]
call fcn.00402009
mov eax, dword [ebp - 0x42c]
call fcn.00417f3b
ret 8
mov ecx, dword [ebp - 0x434]
lea eax, [ebp - 0x424]
push eax
call fcn.0040169a
jmp 0x40d451

Function at 0x40d47b
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40d4d2
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d4d2
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40d4b3
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40d4d2
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40d4ce
test al, 0x10
je 0x40d4ce
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x40d4d2
xor eax, eax
jmp 0x40d4d5
xor eax, eax
inc eax
pop esi
pop ebp
ret 4
Function at 0x40d639
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1108
call fcn.00418040
mov eax, dword [0x46d0e4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [eax]
mov dword [ebp - 0x1108], ecx
cmp dword [edi - 0xc], 0x104
jg 0x40d742
xor eax, eax
push 0x800
push eax
lea eax, [ebp - 0x1104]
push eax
call fcn.0042c1a0
push 0x800
xor ecx, ecx
lea eax, [ebp - 0x904]
push ecx
push eax
call fcn.0042c1a0
push edi
lea eax, [ebp - 0x1104]
push 0x400
push eax
call fcn.00432c57
add esp, 0x24
test esi, esi
je 0x40d6c7
xor eax, eax
cmp word [esi], ax
je 0x40d6c7
push esi
lea eax, [ebp - 0x1104]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0x100
xor esi, esi
lea eax, [ebp - 0x104]
push esi
push eax
call fcn.0042c1a0
mov edi, dword [ebp - 0x1108]
add esp, 0xc
push 0x80
lea eax, [ebp - 0x104]
mov ecx, edi
push eax
call fcn.0040da93
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x1104]
push eax
lea eax, [ebp - 0x904]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push str..tmp
lea eax, [ebp - 0x904]
push 0x400
push eax
call fcn.00434e72
add esp, 0xc
lea eax, [ebp - 0x904]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d755
inc esi
cmp esi, 0xa
jl 0x40d6e4
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00417f15
leave
ret 0xc
lea edx, [ebp - 0x904]
xor ecx, ecx
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, cx
jne 0x40d760
sub edx, esi
lea eax, [ebp - 0x904]
sar edx, 1
mov ecx, ebx
push edx
push eax
call fcn.00402058
xor eax, eax
inc eax
jmp 0x40d744

Function at 0x40d783
Capabilities:
Check if file exists

Disassembly:
push 0xd0
mov eax, 0x45115c
call fcn.00417f91
mov esi, ecx
mov eax, dword [esi + 0x38]
xor ebx, ebx
cmp dword [eax - 0xc], ebx
je 0x40d7d1
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d7d1
lea ecx, [ebp - 0x44]
call fcn.0040bdc3
push dword [esi + 0x38]
lea eax, [ebp - 0x44]
mov dword [ebp - 4], 3
push eax
call fcn.0040c015
lea ecx, [ebp - 0x44]
call fcn.0040bdcc
jmp 0x40d87e
mov dword [esi + 0x3c], 1
call fcn.00416cc0
push 1
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov ecx, eax
call edx
movzx eax, al
sub eax, 1
jne 0x40d87e
push 0xf
pop esi
push 0x3c
push str.e:workspace_aichat_aichat_updateupdateupdatorfunction.cpp
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], esi
mov byte [ebp - 0x40], bl
call fcn.0040610e
push 3
push 0x45476c
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], esi
mov byte [ebp - 0x28], bl
call fcn.0040610e
push 0x27
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0xdc]
call fcn.00403218
mov esi, eax
push 0x4557b8
push esi
mov byte [ebp - 4], 2
call fcn.00403ac5
pop ecx
pop ecx
call fcn.00416cc0
push esi
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x1c]
lea ecx, [ebp - 0xdc]
call fcn.00403cc7
lea ecx, [ebp - 0x28]
call fcn.00405f18
lea ecx, [ebp - 0x40]
call fcn.00405f18
call fcn.00417f3b
ret
Function at 0x40dbb1
Capabilities:
Check if file exists
Move file

Disassembly:
push 0x82c
mov eax, 0x4511fd
call fcn.00417f91
mov esi, ecx
mov ebx, dword [ebp + 8]
xor eax, eax
test ebx, ebx
je 0x40dcce
push 7
pop ecx
lea edi, [ebp - 0x838]
rep stosd dword es:[edi], eax
push 0x800
stosw word es:[edi], ax
lea eax, [ebp - 0x810]
xor edi, edi
push edi
push eax
call fcn.0042c1a0
lea edx, [ebp - 0x810]
mov dword [ebp - 0x834], 3
add esp, 0xc
mov ecx, ebx
sub edx, ebx
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x40dc07
lea eax, [ebp - 0x810]
mov dword [ebp - 0x830], eax
mov eax, 0x614
mov word [ebp - 0x828], ax
lea eax, [ebp - 0x838]
push eax
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40dccb
push ebx
mov ecx, esi
call fcn.0040d47b
test eax, eax
jne 0x40dccb
mov dword [ebp - 4], edi
call fcn.00401cc5
push eax
lea ecx, [ebp - 0x818]
call fcn.00401501
push ebx
lea ecx, [ebp - 0x814]
mov dword [ebp - 4], 1
call fcn.0040158b
lea eax, [ebp - 0x818]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x814]
mov ecx, esi
push eax
call fcn.0040d2b8
mov ecx, dword [ebp - 0x814]
mov esi, eax
add ecx, 0xfffffff0
call fcn.00402009
push 4
test esi, esi
mov esi, dword [ebp - 0x818]
push edi
je 0x40dcb6
push esi
jmp 0x40dcb7
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [esi - 0x10]
mov edi, eax
call fcn.00402009
mov eax, edi
jmp 0x40dcce
xor eax, eax
inc eax
call fcn.00417f3b
ret 4
Function at 0x40dd08
Capabilities:
Check if file exists
Delete file
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40dd4f
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40dd4f
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40dd40
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40dd4f
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
xor eax, eax
jmp 0x40dd52
xor eax, eax
inc eax
pop esi
pop ebp
ret 4
Function at 0x415320
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x451ae1
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x46d0e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], 0
mov dword [ebp - 4], 1
mov dword [ebp - 0x1c], 0
mov dword [edi], 0
call fcn.00401cc5
mov ecx, eax
test ecx, ecx
je 0x4154b4
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi], eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x24], 1
push eax
push 0xf003f
push 0
push dword [ebp + 0x10]
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x415475
lea eax, [ebp - 0x14]
xorps xmm0, xmm0
push eax
push 0
lea eax, [ebp - 0x18]
movlpd qword [ebp - 0x18], xmm0
push eax
push 0
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x415467
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x415475
add eax, 0x10
push 0x4596ec
push eax
mov dword [ebp - 0x20], eax
call fcn.00418468
mov esi, eax
add esp, 8
test esi, esi
je 0x415475
push dword [ebp - 0x20]
push 0
push esi
call fcn.0042c1a0
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
push esi
push 0
push 0
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x41542a
push esi
call fcn.004180ce
add esp, 4
jmp 0x415475
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415430
sub ecx, edx
sar ecx, 1
je 0x41545e
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415446
sub ecx, edx
sar ecx, 1
push ecx
push esi
mov ecx, edi
call fcn.00402058
push esi
call fcn.004180ce
add esp, 4
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x415475
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp + 0x10]
or eax, 0xffffffff
mov byte [ebp - 4], 0
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x415494
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00417f15
mov esp, ebp
pop ebp
ret 0x10
push 0x80004005
call fcn.004018c3
int3
Function at 0x4154c0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x46d0e4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x14]
mov esi, edi
mov dword [ebp - 0xc], eax
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4154e4
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0xf003f
push 0
push dword [ebp + 0xc]
sub esi, edx
push ecx
sar esi, 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
xor ebx, ebx
test eax, eax
sete bl
test eax, eax
jne 0x415546
lea eax, [esi*2 + 2]
push eax
push edi
push 1
push 0
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
neg eax
sbb ebx, ebx
mov eax, dword [ebp - 8]
inc ebx
test eax, eax
je 0x415546
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0xc]
or ecx, 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x415561
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00417f15
mov esp, ebp
pop ebp
ret 0x10