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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43f5ca
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x459624]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
xor ebx, ebx
lea esi, [esp + 0x14]
mov dword [esp + 0x14], ebx
call fcn.0041b7b4
mov cl, byte [eax + 4]
mov edi, dword [eax]
mov byte [esp + 0x10], cl
mov dword [esp + 0x1c], edi
mov byte [eax + 4], bl
mov dword [esp + 0x2c], edi
mov byte [esp + 0x30], cl
mov dword [esp + 0x50], ebx
cmp byte [esp + 0x18], bl
je 0x41effb
push dword [esp + 0x14]
mov byte [esp + 0x1c], bl
call fcn.004243d7
pop ecx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov esi, 0x100001
lea eax, [esp + 0x34]
mov byte [esp + 0x50], 1
call fcn.0040791c
push edi
mov edi, dword [esp + 0x38]
dec esi
push esi
push 1
push edi
call fcn.0042b17b
add esp, 0x10
mov dword [esp + 0x14], eax
cmp eax, esi
jbe 0x41f04f
push 0xc8
lea esi, [esp + 0x20]
call fcn.004161e0
push 0x4509a4
mov eax, esi
push eax
call fcn.0042ba04
push dword [esp + 0x1c]
call fcn.0042af09
pop ecx
test eax, eax
je 0x41f074
push 0x133
lea esi, [esp + 0x20]
call fcn.004161e0
push 0x4509a4
mov eax, esi
jmp 0x41f049
push dword [esp + 0x1c]
call fcn.0042aee1
pop ecx
test eax, eax
jne 0x41f099
push 0x13b
lea esi, [esp + 0x20]
call fcn.004161e0
push 0x4509a4
mov eax, esi
jmp 0x41f049
mov esi, dword [esp + 0x14]
mov ecx, esi
mov eax, edi
call fcn.0041ef5c
lea eax, [edi + esi]
mov esi, dword [ebp + 8]
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
mov byte [esi], bl
cmp edi, eax
je 0x41f0c7
sub eax, edi
push eax
push edi
mov ecx, esi
call fcn.00402f2f
cmp edi, ebx
je 0x41f0d2
push edi
call fcn.00425455
pop ecx
cmp byte [esp + 0x10], bl
je 0x41f0e2
push dword [esp + 0x1c]
call fcn.004243d7
pop ecx
mov eax, esi
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x420629
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov ebx, eax
xor ecx, ecx
cmp dword [ebp + 0x14], ecx
jl 0x4206a9
jg 0x420655
cmp esi, ecx
jbe 0x4206a9
cmp dword [ebp + 0x14], ecx
jg 0x420655
jl 0x420651
cmp esi, 0x7fffffff
jae 0x420655
mov eax, esi
jmp 0x42065a
mov eax, 0x7fffffff
cmp dword [ebp + 8], 0xffffffff
mov dword [ebp - 4], ecx
je 0x42069a
push ecx
lea ecx, [ebp - 4]
push ecx
push eax
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x420684
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x4206a4
jmp 0x42069a
mov eax, dword [ebp - 4]
test eax, eax
jle 0x420695
add ebx, eax
cdq
sub esi, eax
sbb dword [ebp + 0x14], edx
jmp 0x420635
cmp eax, 0xffffffff
jne 0x4206a4
call fcn.0042a0aa
cmp dword [eax], 4
je 0x420635
or eax, 0xffffffff
jmp 0x4206ab
xor eax, eax
pop esi
pop ebx
leave
ret
Function at 0x425460
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x459624]
jne 0x42546a
repz ret
jmp fcn.0042e092

Function at 0x4389ab
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x459624]
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.0042f7f8
and dword [ebp - 0x14], 0
cmp dword [0x45ca00], 0
mov dword [ebp - 0x18], eax
jne 0x438a5e
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x438b06
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x438b06
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x45ca00], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x45ca04], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x45ca08], eax
call edi
push eax
call esi
mov dword [0x45ca10], eax
test eax, eax
je 0x438a5e
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x45ca0c], eax
mov eax, dword [0x45ca0c]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x438ab7
cmp dword [0x45ca10], ecx
je 0x438ab7
push eax
call esi
push dword [0x45ca10]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x438ab7
test ebx, ebx
je 0x438ab7
call edi
test eax, eax
je 0x438aae
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x438aae
test byte [ebp - 8], 1
jne 0x438ab7
or dword [ebp + 0x10], 0x200000
jmp 0x438aea
mov eax, dword [0x45ca04]
cmp eax, dword [ebp - 0x18]
je 0x438aea
push eax
call esi
test eax, eax
je 0x438aea
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x438aea
mov eax, dword [0x45ca08]
cmp eax, dword [ebp - 0x18]
je 0x438aea
push eax
call esi
test eax, eax
je 0x438aea
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x45ca00]
call esi
test eax, eax
je 0x438b06
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x438b08
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00425460
leave
ret
Function at 0x401b7a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x44435c]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x418], 0
xor eax, eax
push esi
push 0x40e
push eax
mov word [ebp - 0x414], ax
mov esi, ecx
lea eax, [ebp - 0x412]
push eax
call fcn.004188f0
add esp, 0xc
lea eax, [ebp - 0x414]
push eax
push 0x208
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x401bea
lea eax, [ebp - 0x414]
mov ecx, esi
push eax
call fcn.00412bfc
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004183eb
mov esp, ebp
pop ebp
ret
call fcn.004128b0
push eax
call fcn.00413028
int3

Function at 0x401c82
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42fe47
mov eax, dword fs:[0]
push eax
mov eax, 0x2018
call fcn.0042b440
mov eax, dword [0x44435c]
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 esi, edx
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x2024], ebx
xor eax, eax
mov dword [ebp - 4], ebx
push 0x1ffe
mov word [ebp - 0x2010], ax
lea eax, [ebp - 0x200e]
push ebx
push eax
call fcn.004188f0
add esp, 0xc
lea eax, [ebp - 0x2010]
push 0x1000
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
setne al
test al, al
jne 0x401d66
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x90
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov esi, esp
call fcn.00412f7e
push eax
mov ecx, esi
call fcn.0040f3c2
lea ecx, [ebp - 0x2020]
call fcn.004130db
lea eax, [ebp - 0x2020]
mov byte [ebp - 4], 1
push eax
mov ecx, edi
call fcn.00402691
mov ecx, dword [ebp - 0x2018]
add ecx, 0xfffffff0
call fcn.004130bf
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
jmp 0x401d8d
lea eax, [ebp - 0x2010]
mov ecx, esi
push eax
call fcn.00412bd1
mov dword [edi], ebx
mov dword [edi + 4], ebx
call fcn.00412f7e
push eax
lea ecx, [edi + 8]
call fcn.0040f3c2
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.004130bf
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.004183eb
mov esp, ebp
pop ebp
ret
Function at 0x401ecc
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push 0x20
mov eax, 0x42fe7f
call fcn.0041be63
mov esi, edx
mov edi, ecx
xor ebx, ebx
push esi
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x401f2b
call fcn.004128b0
push 0xc7
push eax
push ecx
mov esi, esp
call fcn.00412f7e
push eax
mov ecx, esi
call fcn.0040f3c2
lea ecx, [ebp - 0x2c]
call fcn.004130db
push eax
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.00402691
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.004130bf
jmp 0x401fb1
test al, 1
jne 0x401f37
mov dword [edi], 1
jmp 0x401fa0
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne al
test al, al
jne 0x401f9e
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0xcd
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov esi, esp
call fcn.00412f7e
push eax
mov ecx, esi
call fcn.0040f3c2
lea ecx, [ebp - 0x20]
call fcn.004130db
lea eax, [ebp - 0x20]
mov dword [ebp - 4], 1
push eax
mov ecx, edi
call fcn.00402691
mov ecx, dword [ebp - 0x18]
jmp 0x401f1e
mov dword [edi], ebx
mov dword [edi + 4], ebx
call fcn.00412f7e
push eax
lea ecx, [edi + 8]
call fcn.0040f3c2
mov eax, edi
call fcn.0041be31
ret
Function at 0x401fe5
Capabilities:
Delete directory
Enumerate files on windows
Enumerate files recursively

Disassembly:
push 0x268
mov eax, 0x42fec3
call fcn.0041be96
mov ebx, ecx
and dword [ebp - 4], 0
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], 0
jne 0x40201b
test ebx, ebx
je 0x402011
push 0x43acc8
call fcn.00412bd1
mov edi, 0x80070057
jmp 0x4021eb
push 0x4399c0
lea edx, [ebp + 8]
xor edi, edi
lea ecx, [ebp - 0x26c]
call fcn.0040e5b7
pop ecx
lea eax, [ebp - 0x260]
mov byte [ebp - 4], 1
push eax
push dword [ebp - 0x26c]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x268], eax
cmp eax, 0xffffffff
je 0x402186
mov esi, eax
push 0x43acc8
lea edx, [ebp + 8]
lea ecx, [ebp - 0x270]
call fcn.0040e5b7
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 2
push ecx
mov edx, eax
lea ecx, [ebp - 0x264]
call fcn.0040e5b7
pop ecx
pop ecx
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x270]
lea ecx, [ecx - 0x10]
call fcn.004130bf
test byte [ebp - 0x260], 0x10
je 0x402103
lea eax, [ebp - 0x234]
push eax
push 0x4399c8
call fcn.00418a8b
pop ecx
pop ecx
test eax, eax
je 0x402157
lea eax, [ebp - 0x234]
push eax
push 0x4399d0
call fcn.00418a8b
pop ecx
pop ecx
test eax, eax
je 0x402157
push ecx
mov ecx, dword [ebp - 0x264]
mov esi, esp
lea ecx, [ecx - 0x10]
call fcn.00413040
add eax, 0x10
mov ecx, ebx
mov dword [esi], eax
call fcn.00401fe5
mov esi, dword [ebp - 0x268]
pop ecx
test eax, eax
jns 0x402157
mov edi, eax
jmp 0x402157
mov ecx, dword [ebp - 0x264]
call fcn.00401fb9
test eax, eax
jne 0x402157
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
test ecx, ecx
jns 0x402140
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x402145
mov edi, 0x80004005
test ebx, ebx
je 0x402157
lea eax, [ebp - 0x264]
mov ecx, ebx
push eax
call fcn.00412862
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x264]
lea ecx, [ecx - 0x10]
call fcn.004130bf
lea eax, [ebp - 0x260]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x402059
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x26c]
lea ecx, [ecx - 0x10]
call fcn.004130bf
test edi, edi
js 0x4021eb
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4021eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
test ecx, ecx
jns 0x4021d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x4021dc
mov edi, 0x80004005
test ebx, ebx
je 0x4021eb
lea eax, [ebp + 8]
mov ecx, ebx
push eax
call fcn.00412862
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.004130bf
mov eax, edi
call fcn.0041be45
ret
Function at 0x402a66
Capabilities:
Write file on windows

Disassembly:
push 0x1c
mov eax, 0x430092
call fcn.0041be63
mov dword [ebp - 0x14], edx
mov ebx, ecx
xor edi, edi
mov dword [ebp - 0x18], edi
push edi
push edi
push 2
push edi
push edi
push 2
mov dword [ebp - 4], edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 1
cmp esi, 0xffffffff
je 0x402b87
test esi, esi
je 0x402b87
push edi
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], edi
mov edi, dword [ebp + 0xc]
push eax
push edi
push dword [ebp - 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
setne al
test al, al
jne 0x402b24
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x2e4
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov edi, esp
call fcn.00412f7e
push eax
mov ecx, edi
call fcn.0040f3c2
lea ecx, [ebp - 0x28]
call fcn.004130db
mov byte [ebp - 4], 3
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.00402691
mov ecx, dword [ebp - 0x20]
lea ecx, [ecx - 0x10]
call fcn.004130bf
jmp 0x402bcc
cmp dword [ebp - 0x10], edi
sete al
test al, al
jne 0x402b70
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x2e5
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov edi, esp
call fcn.00412f7e
push eax
mov ecx, edi
call fcn.0040f3c2
lea ecx, [ebp - 0x28]
call fcn.004130db
mov byte [ebp - 4], 4
jmp 0x402b09
and dword [ebx], 0
and dword [ebx + 4], 0
call fcn.00412f7e
push eax
lea ecx, [ebx + 8]
call fcn.0040f3c2
jmp 0x402bcc
call fcn.004128b0
push 0x2e1
push eax
push ecx
lea eax, [ebp + 8]
mov ecx, esp
push eax
mov edx, 0x4399f8
call fcn.0040e61c
pop ecx
lea ecx, [ebp - 0x28]
call fcn.004130db
push eax
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.00402691
mov ecx, dword [ebp - 0x20]
lea ecx, [ecx - 0x10]
call fcn.004130bf
cmp esi, 0xffffffff
je 0x402bd3
test esi, esi
je 0x402bd3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.004130bf
mov eax, ebx
call fcn.0041be31
ret
Function at 0x402cc3
Capabilities:
Get file size
Read file on windows

Disassembly:
push 0x24
mov eax, 0x430128
call fcn.0041be63
mov dword [ebp - 0x10], edx
mov ebx, ecx
xor eax, eax
mov dword [ebp - 0x18], eax
push eax
push eax
push 3
push eax
push 1
push 1
mov dword [ebp - 4], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 1
cmp esi, 0xffffffff
je 0x402eaf
test esi, esi
je 0x402eaf
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
setne al
test al, al
jne 0x402d77
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x30e
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov edi, esp
call fcn.00412f7e
push eax
mov ecx, edi
call fcn.0040f3c2
lea ecx, [ebp - 0x30]
call fcn.004130db
mov byte [ebp - 4], 3
lea eax, [ebp - 0x30]
push eax
mov ecx, ebx
call fcn.00402691
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.004130bf
jmp 0x402ef4
cmp dword [ebp + 0xc], 0
mov edi, dword [ebp - 0x24]
je 0x402db5
cmp dword [ebp - 0x20], 0
jl 0x402db5
jg 0x402d8d
cmp edi, dword [ebp + 0xc]
jbe 0x402db5
push 0x313
push 0x80004005
push ecx
mov edi, esp
call fcn.00412f7e
push eax
mov ecx, edi
call fcn.0040f3c2
lea ecx, [ebp - 0x30]
call fcn.004130db
mov byte [ebp - 4], 4
jmp 0x402d5c
push ecx
mov ecx, dword [ebp - 0x10]
push edi
call fcn.00412689
test al, al
jne 0x402dee
push 0x31c
push 0x8007000e
push ecx
mov edi, esp
call fcn.00412f7e
push eax
mov ecx, edi
call fcn.0040f3c2
lea ecx, [ebp - 0x30]
call fcn.004130db
mov byte [ebp - 4], 5
jmp 0x402d5f
test edi, edi
jne 0x402e0c
and dword [ebx], 0
and dword [ebx + 4], 0
call fcn.00412f7e
push eax
lea ecx, [ebx + 8]
call fcn.0040f3c2
jmp 0x402ef4
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push 0
push eax
push edi
push ecx
mov ecx, dword [ebp - 0x10]
call fcn.0040fc81
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne al
test al, al
jne 0x402e76
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x323
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov edi, esp
call fcn.00412f7e
push eax
mov ecx, edi
call fcn.0040f3c2
lea ecx, [ebp - 0x30]
call fcn.004130db
mov byte [ebp - 4], 6
jmp 0x402d5c
cmp dword [ebp - 0x14], edi
sete al
test al, al
jne 0x402df2
push 0x324
push 0x80004005
push ecx
mov edi, esp
call fcn.00412f7e
push eax
mov ecx, edi
call fcn.0040f3c2
lea ecx, [ebp - 0x30]
call fcn.004130db
mov byte [ebp - 4], 7
jmp 0x402d5c
call fcn.004128b0
push 0x308
push eax
push ecx
lea eax, [ebp + 8]
mov ecx, esp
push eax
mov edx, str.Error_opening_file:
call fcn.0040e61c
pop ecx
lea ecx, [ebp - 0x30]
call fcn.004130db
push eax
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.00402691
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.004130bf
cmp esi, 0xffffffff
je 0x402efb
test esi, esi
je 0x402efb
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.004130bf
mov eax, ebx
call fcn.0041be31
ret
Function at 0x402f0e
Capabilities:
Get file size
Read file on windows

Disassembly:
push 0x24
mov eax, 0x43017b
call fcn.0041be63
mov dword [ebp - 0x10], edx
mov ebx, ecx
xor eax, eax
mov dword [ebp - 0x18], eax
push eax
push eax
push 3
push eax
push 1
push 1
mov dword [ebp - 4], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 1
cmp esi, 0xffffffff
je 0x4030c5
test esi, esi
je 0x4030c5
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
setne al
test al, al
jne 0x402fc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x343
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov edi, esp
call fcn.00412f7e
push eax
mov ecx, edi
call fcn.0040f3c2
lea ecx, [ebp - 0x30]
call fcn.004130db
mov byte [ebp - 4], 3
lea eax, [ebp - 0x30]
mov ecx, ebx
push eax
call fcn.00402691
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.004130bf
jmp 0x40310a
cmp dword [ebp + 0xc], 0
mov edi, dword [ebp - 0x24]
je 0x403000
cmp dword [ebp - 0x20], 0
jl 0x403000
jg 0x402fd8
cmp edi, dword [ebp + 0xc]
jbe 0x403000
push 0x348
push 0x80004005
push ecx
mov edi, esp
call fcn.00412f7e
push eax
mov ecx, edi
call fcn.0040f3c2
lea ecx, [ebp - 0x30]
call fcn.004130db
mov byte [ebp - 4], 4
jmp 0x402fa7
mov ecx, dword [ebp - 0x10]
push edi
call fcn.0040e893
test edi, edi
jne 0x403027
and dword [ebx], 0
and dword [ebx + 4], 0
call fcn.00412f7e
push eax
lea ecx, [ebx + 8]
call fcn.0040f3c2
jmp 0x40310a
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push 0
push eax
mov eax, dword [ebp - 0x10]
push edi
push dword [eax]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne al
test al, al
jne 0x40308c
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x355
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov edi, esp
call fcn.00412f7e
push eax
mov ecx, edi
call fcn.0040f3c2
lea ecx, [ebp - 0x30]
call fcn.004130db
mov byte [ebp - 4], 5
jmp 0x402fa7
cmp dword [ebp - 0x14], edi
sete al
test al, al
jne 0x40300d
push 0x356
push 0x80004005
push ecx
mov edi, esp
call fcn.00412f7e
push eax
mov ecx, edi
call fcn.0040f3c2
lea ecx, [ebp - 0x30]
call fcn.004130db
mov byte [ebp - 4], 6
jmp 0x402fa7
call fcn.004128b0
push 0x33d
push eax
push ecx
lea eax, [ebp + 8]
mov ecx, esp
push eax
mov edx, str.Error_opening_file:
call fcn.0040e61c
pop ecx
lea ecx, [ebp - 0x30]
call fcn.004130db
push eax
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.00402691
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.004130bf
cmp esi, 0xffffffff
je 0x403111
test esi, esi
je 0x403111
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.004130bf
mov eax, ebx
call fcn.0041be31
ret
Function at 0x4035a4
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x1c
mov eax, 0x43026c
call fcn.0041becc
mov eax, edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], ecx
xor esi, esi
lea edx, [ebp - 0x18]
push edx
push esi
lea edx, [ebp - 0x14]
mov dword [ebp - 4], esi
push edx
push esi
push eax
push ecx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x4035f6
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
jmp 0x4036a3
cmp dword [ebp - 0x14], 1
je 0x40360c
cmp dword [ebp - 0x14], 2
je 0x40360c
mov eax, 0x80004005
jmp 0x4036a3
mov edi, dword [ebp - 0x18]
test edi, edi
jne 0x403622
mov ecx, dword [ebp + 8]
call fcn.00412b10
xor eax, eax
jmp 0x4036a3
cmp edi, 1
je 0x403602
mov ebx, dword [ebp + 8]
mov ecx, ebx
shr edi, 1
lea eax, [edi + 1]
push eax
call fcn.00412d5f
mov dword [ebp - 0x1c], eax
mov ecx, ebx
lea eax, [edi + 1]
push eax
call fcn.00412c40
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
push eax
push esi
push dword [ebp - 0x20]
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x403674
push esi
mov ecx, ebx
call fcn.00412c40
mov eax, dword [ebp - 0x24]
jmp 0x4035d9
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
mov word [eax + edi*2], cx
mov eax, dword [ebx]
test eax, eax
je 0x403690
push dword [eax - 8]
push eax
call fcn.00418a26
pop ecx
pop ecx
mov esi, eax
push esi
mov ecx, ebx
call fcn.00412c40
jmp 0x40361b
call fcn.0041be31
ret
Function at 0x4037be
Capabilities:
Timestomp file

Disassembly:
push 0x20
mov eax, 0x4302da
call fcn.0041be63
mov ebx, ecx
xor edi, edi
mov dword [ebp - 0x10], edi
push edi
push edi
push 3
push edi
push 7
push 0x100
mov dword [ebp - 4], edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 1
cmp esi, 0xffffffff
je 0x403896
test esi, esi
je 0x403896
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], edi
push eax
mov dword [ebp - 0x1c], edi
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
lea eax, [ebp - 0x20]
push eax
push edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
setne al
test al, al
jne 0x403881
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x662
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov edi, esp
call fcn.00412f7e
push eax
mov ecx, edi
call fcn.0040f3c2
lea ecx, [ebp - 0x2c]
call fcn.004130db
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 3
push eax
mov ecx, ebx
call fcn.00402691
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.004130bf
jmp 0x4038d9
mov dword [ebx], edi
mov dword [ebx + 4], edi
call fcn.00412f7e
push eax
lea ecx, [ebx + 8]
call fcn.0040f3c2
jmp 0x4038d9
call fcn.004128b0
push 0x65d
push eax
push ecx
mov edi, esp
call fcn.00412f7e
push eax
mov ecx, edi
call fcn.0040f3c2
lea ecx, [ebp - 0x2c]
call fcn.004130db
push eax
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.00402691
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.004130bf
cmp esi, 0xffffffff
je 0x4038e0
test esi, esi
je 0x4038e0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.004130bf
mov eax, ebx
call fcn.0041be31
ret

Function at 0x40392a
Capabilities:
Check if file exists
Delete file
Get file attributes

Disassembly:
push 0x10
mov eax, 0x430320
call fcn.0041be63
mov esi, ecx
mov dword [ebp - 0x10], esi
and dword [ebp - 4], 0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403973
test al, 0x10
jne 0x403973
test al, 1
je 0x40396b
mov edx, dword [esi]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.00401ecc
pop ecx
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.004130bf
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [esi]
sub ecx, 0x10
call fcn.004130bf
call fcn.0041be31
ret