joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40740f
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x444c
call fcn.0041bda0
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x240]
mov esi, edx
call fcn.00403621
push 8
pop ecx
xor eax, eax
lea edi, [esp + 0x20]
push 0x4000
rep stosd dword es:[edi], eax
xor ebx, ebx
lea eax, [esp + 0x45c]
push ebx
push eax
call fcn.0041cc70
mov eax, dword [esi + 4]
add esp, 0xc
mov dword [esp + 0x10], ebx
mov dword [esi + 8], ebx
test eax, eax
je 0x407461
xor ecx, ecx
mov word [eax], cx
push 0x43
lea eax, [esp + 0x244]
push str.._c:
push eax
call fcn.004011fb
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push dword [esp + 0x25c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov edi, eax
cmp edi, 0xffffffff
je 0x4074c7
push ebx
lea eax, [esp + 0x14]
push eax
push 0x20
lea eax, [esp + 0x2c]
push eax
push ebx
push ebx
push 0x560000
push edi
call ebp
push edi
test eax, eax
jne 0x4074c1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40762e
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x28]
lea eax, [esp + 0x244]
push str..PHYSICALDRIVE_u
push eax
call fcn.004011fb
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push dword [esp + 0x25c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x407616
push ebx
lea eax, [esp + 0x14]
mov dword [esp + 0x20], ebx
push eax
push 0x4000
lea eax, [esp + 0x464]
mov dword [esp + 0x20], ebx
push eax
push 0xc
lea eax, [esp + 0x28]
mov dword [esp + 0x2c], ebx
push eax
push 0x2d1400
push edi
call ebp
test eax, eax
je 0x40760f
cmp dword [esp + 0x10], 0x28
jb 0x40760f
mov ebp, 0x100
lea eax, [esp + 0x140]
push ebp
push ebx
push eax
call fcn.0041cc70
push ebp
lea eax, [esp + 0x50]
push ebx
push eax
call fcn.0041cc70
mov eax, dword [esp + 0x47c]
add esp, 0x18
test eax, eax
je 0x40758f
lea ecx, [esp + 0x458]
push 0xff
add eax, ecx
push eax
lea eax, [esp + 0x148]
push ebp
push eax
call fcn.00428d83
add esp, 0x10
mov eax, dword [esp + 0x468]
test eax, eax
je 0x4075b7
lea ecx, [esp + 0x458]
push 0xff
add eax, ecx
push eax
lea eax, [esp + 0x48]
push ebp
push eax
call fcn.00428d83
add esp, 0x10
mov ebp, 0x46fc3c
cmp byte [esp + 0x140], bl
je 0x4075fa
cmp byte [esp + 0x40], bl
je 0x4075e8
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x144]
push eax
push str._S__S
push esi
call fcn.004011fb
add esp, 0x10
jmp 0x40760f
lea eax, [esp + 0x140]
push eax
push ebp
push esi
call fcn.004011fb
add esp, 0xc
cmp byte [esp + 0x40], bl
je 0x40760f
lea eax, [esp + 0x40]
push eax
push ebp
push esi
call fcn.004011fb
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
cmp dword [esi + 8], eax
jb 0x40762a
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x40762a
cmp word [ecx], bx
jne 0x40762c
mov al, bl
mov bl, al
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x444c
ret
Function at 0x407ecb
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x21c
push esi
mov esi, ecx
lea ecx, [esp + 8]
call fcn.00403621
push dword [esp + 0x14]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x407ef9
xor al, al
jmp 0x407f23
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x407f17
push dword [esp + 0x14]
push ecx
call fcn.0041ea7c
pop ecx
pop ecx
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x10], eax
jmp 0x407f1c
and dword [esp + 0x10], 0
mov edx, esi
call fcn.00407b0d
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x408129
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x4014
call fcn.0041bda0
push ebx
push ebp
push esi
push edi
mov edi, edx
xor ebp, ebp
mov eax, dword [edi + 4]
mov dword [edi + 8], ebp
test eax, eax
je 0x40814a
xor edx, edx
mov word [eax], dx
push ebp
push ebp
push 3
push ebp
push 3
push ebp
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4081ce
mov ebx, 0x4000
mov dword [esp + 0x10], ebp
push ebx
lea eax, [esp + 0x24]
mov dword [esp + 0x20], ebp
push ebp
push eax
call fcn.0041cc70
add esp, 0xc
mov dword [esp + 0x14], ebp
lea eax, [esp + 0x10]
mov dword [esp + 0x18], ebp
push ebp
push eax
push ebx
lea eax, [esp + 0x2c]
push eax
push 0xc
lea eax, [esp + 0x28]
push eax
push 0x2d1400
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4081c7
mov eax, dword [esp + 0x10]
cmp eax, 0x28
jb 0x4081c7
lea edx, [esp + 0x20]
lea ecx, [esp + 0x20]
add edx, eax
add ecx, dword [esp + 0x38]
push edi
call fcn.004082fa
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4014
ret

Function at 0x408947
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x21c
push esi
mov esi, ecx
lea ecx, [esp + 8]
call fcn.00403621
push dword [esp + 0x14]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x408975
xor al, al
jmp 0x40899f
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x408993
push dword [esp + 0x14]
push ecx
call fcn.0041ea7c
pop ecx
pop ecx
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x10], eax
jmp 0x408998
and dword [esp + 0x10], 0
mov edx, esi
call fcn.00408589
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4089a4
Capabilities:
Generate random numbers via winapi

Disassembly:
push ecx
push ecx
push ebp
push esi
mov esi, ecx
mov ebp, edx
test esi, esi
je 0x408a7d
push ebx
push edi
push 0
call fcn.0042a7a8
pop ecx
push 2
mov edi, eax
mov ebx, edx
push 8
lea eax, [esp + 0x18]
add edi, 0xab5b7200
push eax
push 0
adc ebx, 0xffffffff
call dword [sym.imp.bcrypt.dll_BCryptGenRandom]
test eax, eax
je 0x4089f2
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov ecx, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
jmp 0x4089f6
mov ecx, dword [esp + 0x10]
and ecx, 0x1ffffff
xor eax, eax
or ecx, ebx
or eax, edi
or ecx, 0x44000000
push ecx
push eax
push str._I64u
push 0xffffffffffffffff
push ebp
push esi
call fcn.00401ea4
add esp, 0x18
mov ebx, reloc.OLEAUT32.dll_SysReAllocString
mov ecx, ebx
call fcn.00403d4d
mov edi, str.SOFTWAREMetaQuotes_Software
test al, al
jne 0x408a3b
push ecx
mov edx, edi
mov ecx, ebx
call fcn.00403cf5
pop ecx
push ecx
push esi
push ecx
mov ebp, 0x46d090
mov edx, edi
push ebp
mov ecx, ebx
call fcn.00403cc0
add esp, 0x10
mov ebx, closesocket
mov ecx, ebx
call fcn.00403d4d
test al, al
jne 0x408a6b
push ecx
mov edx, edi
mov ecx, ebx
call fcn.00403cf5
pop ecx
push ecx
push esi
push ecx
push ebp
mov edx, edi
mov ecx, ebx
call fcn.00403cc0
add esp, 0x10
pop edi
pop ebx
pop esi
pop ebp
pop ecx
pop ecx
ret

Function at 0x408ad1
Capabilities:
Get common file path
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
xor eax, eax
push esi
mov dword [ebp - 4], eax
mov esi, 0x100
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x214]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x408b43
push 3
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x14]
push 4
push eax
call fcn.0042939a
add esp, 0x10
xor eax, eax
mov word [ebp - 0xe], ax
lea eax, [ebp - 0x214]
push esi
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
mov eax, dword [ebp - 4]
pop esi
leave
ret
Function at 0x40948d
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
test esi, esi
je 0x4094b7
xor edi, edi
cmp word [esi], di
je 0x4094b7
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4094be
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4094d0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
ret
test bl, 0x10
jne 0x4094d5
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4094b7
jmp 0x4094ab
push 0x10
pop eax
jmp 0x4094ba
test bl, 1
je 0x4094e5
xor ebx, 1
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, ebx
jmp 0x4094ba

Function at 0x4096bb
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
mov dword [ebp - 0xc], 4
mov dword [ebp - 8], ebx
call fcn.00408b46
cmp eax, 0x258
jl 0x409720
lea eax, [ebp - 4]
push eax
push 0x20019
push ebx
push str.SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x409720
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.EnableLUA
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 4]
test eax, eax
je 0x409725
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
pop ebx
leave
ret
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x10], 4
jne 0x409738
cmp dword [ebp - 8], ebx
je 0x409738
mov bl, 1
mov al, bl
jmp 0x409722
Function at 0x40e4bc
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x20
or dword [esp + 0x14], 0xffffffff
push ebx
push ebp
push esi
push edi
push ecx
push 3
mov ebx, ecx
mov dword [esp + 0x28], 0x4679a8
push 3
push closesocket
push dword [esp + 0x44]
and dword [ebx + 8], 0
lea ecx, [esp + 0x34]
and dword [ebx + 0xc], 0
mov dword [esp + 0x3c], ebx
call fcn.00401442
mov esi, dword [esp + 0x24]
test al, al
je 0x40e64a
xorps xmm0, xmm0
movlpd qword [esp + 0x18], xmm0
cmp esi, 0xffffffff
je 0x40e529
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40e529
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
jmp 0x40e53a
xorps xmm0, xmm0
movlpd qword [esp + 0x20], xmm0
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x20]
mov ecx, edi
mov eax, ebp
add ecx, 2
adc eax, 0
push eax
push ecx
mov ecx, ebx
call fcn.00403a10
test al, al
je 0x40e63b
cmp esi, 0xffffffff
je 0x40e601
mov eax, dword [ebx]
test eax, eax
je 0x40e601
test ebp, ebp
jne 0x40e575
cmp edi, 1
jb 0x40e601
xorps xmm0, xmm0
mov ebx, eax
movlpd qword [esp + 0x20], xmm0
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x14], edx
mov dword [esp + 0x34], ecx
and dword [esp + 0x18], 0
mov eax, edi
sub eax, ecx
mov dword [esp + 0x20], eax
mov eax, ebp
sbb eax, edx
test eax, eax
jb 0x40e5b8
ja 0x40e5b1
cmp dword [esp + 0x20], 0xfffffff
jbe 0x40e5b8
mov eax, 0xfffffff
jmp 0x40e5bc
mov eax, edi
sub eax, ecx
push 0
lea edx, [esp + 0x1c]
push edx
push eax
lea eax, [ecx + ebx]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x14]
test eax, eax
je 0x40e5fb
cmp dword [esp + 0x18], 0
je 0x40e5fb
add ecx, dword [esp + 0x18]
mov dword [esp + 0x34], ecx
adc edx, 0
mov dword [esp + 0x14], edx
cmp edx, ebp
jb 0x40e590
ja 0x40e5fb
cmp ecx, edi
jb 0x40e590
mov ebx, dword [esp + 0x28]
jmp 0x40e612
xorps xmm0, xmm0
movlpd qword [esp + 0x28], xmm0
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
cmp ecx, edi
jne 0x40e63b
cmp edx, ebp
jne 0x40e63b
cmp esi, 0xffffffff
je 0x40e629
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
mov ecx, ebx
mov dword [ebx + 8], edi
mov dword [ebx + 0xc], ebp
call fcn.004039c4
xor ebx, ebx
inc ebx
jmp 0x40e64c
cmp esi, 0xffffffff
je 0x40e64a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
xor bl, bl
cmp esi, 0xffffffff
je 0x40e658
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x20
ret 0xc
Function at 0x40e988
Capabilities:
Delete file
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x660
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x24], 0x10
jbe 0x40ea5c
push 0x250
lea eax, [esp + 0xc]
push 0
push eax
call fcn.0041cc70
add esp, 0xc
lea ecx, [esp + 0x258]
call fcn.00404959
push dword [esi + 0x20]
mov eax, ecx
push str._s.
push eax
call fcn.004011fb
add esp, 0xc
lea eax, [esp + 8]
push eax
push dword [esp + 0x260]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40ea51
test byte [esp + 8], 0x10
jne 0x40ea31
lea eax, [esp + 0x34]
push eax
push dword [esi + 0x20]
lea eax, [esp + 0x260]
push 0x470f00
push eax
call fcn.004011fb
add esp, 0x10
mov ecx, esi
push dword [esp + 0x25c]
call fcn.0040e664
test al, al
je 0x40ea31
push dword [esp + 0x25c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [esi + 0xce79], 0
jne 0x40ea4a
lea eax, [esp + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40e9ee
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esi + 0x95d8]
mov eax, dword [ecx]
call dword [eax + 0xc]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40ebdc
Capabilities:
Reference wmi statements

Disassembly:
sub esp, 0x130
push ebx
push ebp
push esi
mov esi, dword [esp + 0x140]
mov ebp, ecx
push edi
test esi, esi
je 0x40eda7
lea eax, [esp + 0x40]
mov dword [esp + 0x3c], 0x80
mov dword [esp + 0x34], eax
lea ecx, [esp + 0x1c]
xor eax, eax
mov dword [esp + 0x30], 0x46fb98
mov word [esp + 0x40], ax
xor ebx, ebx
mov eax, dword [esi]
push str.SELECT__FROM_Win32_VideoController
mov dword [esp + 0x18], ebx
mov dword [esp + 0x3c], ebx
mov eax, dword [eax + 0x50]
mov dword [esp + 0x1c], eax
call fcn.0040ea8e
mov edi, dword [eax]
test edi, edi
je 0x40ec41
mov edi, dword [edi]
jmp 0x40ec43
mov edi, ebx
push 0x471b70
lea ecx, [esp + 0x14]
call fcn.0040ea8e
mov eax, dword [eax]
test eax, eax
je 0x40ec5b
mov eax, dword [eax]
jmp 0x40ec5d
mov eax, ebx
lea ecx, [esp + 0x14]
push ecx
push ebx
push 0x30
push edi
push eax
push esi
call dword [esp + 0x30]
lea ecx, [esp + 0x10]
mov esi, eax
call fcn.0040eb00
lea ecx, [esp + 0x1c]
call fcn.0040eb00
test esi, esi
js 0x40eda3
jmp 0x40ed7f
lea edx, [esp + 0x18]
mov dword [esp + 0x18], ebx
push edx
lea edx, [esp + 0x14]
mov dword [esp + 0x14], ebx
mov eax, dword [ecx]
push edx
push 1
push 0xffffffffffffffff
push ecx
call dword [eax + 0x10]
test eax, eax
jne 0x40ed93
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x40ed93
cmp dword [esp + 0x18], ebx
je 0x40ed8d
lea edi, [esp + 0x20]
mov esi, str.Caption
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ecx]
lea edx, [esp + 0x20]
push ebx
push ebx
push edx
push ebx
push esi
push ecx
call dword [eax + 0x10]
test eax, eax
jns 0x40ecee
push str.n_a
jmp 0x40ed3b
movzx eax, word [esp + 0x20]
cmp eax, 3
je 0x40ed21
mov ecx, ebp
cmp eax, 8
je 0x40ed06
push str.n_a
jmp 0x40ed3d
cmp dword [esp + 0x28], ebx
mov eax, 0x471b78
cmovne eax, dword [esp + 0x28]
push eax
call fcn.0040eb2e
push 0x471c00
jmp 0x40ed3b
push dword [esp + 0x28]
lea eax, [esp + 0x34]
push 0x471b80
push eax
call fcn.004011fb
add esp, 0xc
push dword [esp + 0x34]
mov ecx, ebp
call fcn.0040eb2e
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40ed52
sub ecx, edx
sar ecx, 1
lea esi, [esi + ecx*2]
add esi, 2
cmp word [esi], bx
je 0x40ed75
mov ecx, dword [esp + 0x10]
jmp 0x40ecd4
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ecx, dword [esp + 0x14]
test ecx, ecx
jne 0x40ec8d
jmp 0x40eda1
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x40eda1
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov bl, 1
mov al, bl
jmp 0x40eda9
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x130
ret 0xc
Function at 0x40edb6
Capabilities:
Connect to wmi namespace via wbemlocator

Disassembly:
sub esp, 0x10
xor eax, eax
mov edx, str.SOFTWAREMetaQuotes_Software
push ebx
push ebp
push esi
push edi
push 0x100
mov edi, ecx
mov ebp, 0x471c04
push 0x3fe
push edi
push ebp
mov ecx, closesocket
mov word [edi], ax
call fcn.00403d81
add esp, 0x10
xor ebx, ebx
test al, al
je 0x40edf6
cmp word [edi], bx
jne 0x40ef5c
push ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jns 0x40ee0d
cmp eax, 0x80010106
jne 0x40eee6
push ebx
push ebx
push ebx
push 3
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push ebx
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
test eax, eax
jns 0x40ee2d
cmp eax, 0x80010119
jne 0x40eee0
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebx
push eax
push 0x45f8ac
push 1
push ebx
push 0x45f8bc
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x40eee0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40eee0
mov dword [esp + 0x14], ebx
lea ecx, [esp + 0x1c]
mov eax, dword [eax]
push str.ROOTCIMV2
mov esi, dword [eax + 0xc]
call fcn.0040ea8e
mov eax, dword [eax]
test eax, eax
je 0x40ee7e
mov eax, dword [eax]
jmp 0x40ee80
mov eax, ebx
lea ecx, [esp + 0x14]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
push dword [esp + 0x38]
call esi
lea ecx, [esp + 0x1c]
mov esi, eax
call fcn.0040eb00
test esi, esi
js 0x40eed6
cmp dword [esp + 0x14], ebx
je 0x40eed6
push ebx
push ebx
push 3
push 3
push ebx
push ebx
push 0xa
push dword [esp + 0x30]
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
test eax, eax
js 0x40eecc
push ecx
push ecx
push dword [esp + 0x1c]
mov ecx, edi
call fcn.0040ebdc
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40eeeb
sub ecx, edx
sar ecx, 1
je 0x40ef10
cmp word [edi + ecx*2 - 2], 0x7c
jne 0x40ef10
sub ecx, 1
push 0
pop eax
mov word [edi + ecx*2], ax
jne 0x40eefc
mov esi, 0x471c00
jmp 0x40ef1d
push 0x2c
pop ecx
mov word [eax], cx
push esi
push edi
call fcn.0041bf6e
pop ecx
pop ecx
test eax, eax
jne 0x40ef17
mov esi, edi
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, bx
jne 0x40ef2f
sub esi, ecx
mov edx, str.SOFTWAREMetaQuotes_Software
sar esi, 1
push ecx
lea eax, [esi*2 + 2]
push eax
push edi
push ecx
push ebp
mov ecx, closesocket
call fcn.00403c53
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 4
Function at 0x40ef68
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [0x4bb668]
sub esp, 0x604
push ebx
push esi
push edi
test eax, eax
jne 0x40ef9a
push 0x45f8cc
push 0x200000
call fcn.0041adbd
mov dword [0x4bb668], eax
pop ecx
pop ecx
test eax, eax
je 0x40ef9f
xor ecx, ecx
mov word [eax], cx
xor ebx, ebx
cmp dword [0x4c6f1c], ebx
jne 0x40efc1
push 4
push 0x3000
push 0x22000
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x4c6f1c], eax
push dword [0x4ba0c0]
mov dword [0x4c6f20], ebx
push ebx
push ebx
push 0x1a
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov esi, 0x4ba0bc
mov ecx, esi
call fcn.00403f28
push 0x46ffc0
mov ecx, esi
call fcn.00403806
push dword [0x4ba0c0]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call edi
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, 0xffffffff
jne 0x40f012
push ebx
push dword [0x4ba0c0]
call esi
push str.Crashes
mov ecx, 0x4ba0bc
call fcn.00403806
push dword [0x4ba0c0]
call edi
cmp eax, 0xffffffff
jne 0x40f037
push ebx
push dword [0x4ba0c0]
call esi
push str.MT5WEBSETUP
mov ecx, 0x4ba2d4
call fcn.00403485
push str.MetaTrader_Web_Setup
mov ecx, 0x4ba4ec
call fcn.00403485
mov eax, 0xdde
mov dword [0x4bb600], 0x1f4
mov dword [0x4bb604], eax
mov ecx, 0x4ba704
mov dword [0x4bb608], 0x2685
push ebx
mov dword [0x4c6f50], eax
call fcn.00403485
mov eax, dword [0x4bb660]
or eax, dword [0x4bb664]
jne 0x40f0a2
push ebx
call fcn.0042a7a8
pop ecx
mov dword [0x4bb660], eax
mov dword [0x4bb664], edx
push str.16_Dec_2022
mov ecx, 0x4bb60c
call fcn.00403485
mov edi, 0x4baf64
mov ecx, edi
call fcn.00401b89
test al, al
je 0x40f18a
push 0x200
lea eax, [esp + 0x14]
push ebx
push eax
call fcn.0041cc70
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [esp + 0x1c]
add esp, 0xc
push 0x100
push eax
push str.CLIENTNAME
call esi
test eax, eax
jne 0x40f108
push 0x100
lea eax, [esp + 0x14]
push eax
push str.COMPUTERNAME
call esi
test eax, eax
je 0x40f141
lea eax, [esp + 0x10]
mov ecx, edi
push eax
call fcn.00403485
push 0x100
lea eax, [esp + 0x14]
push eax
push str.USERDOMAIN
call esi
test eax, eax
je 0x40f141
push 0x46cfb0
mov ecx, edi
call fcn.00403806
lea eax, [esp + 0x10]
mov ecx, edi
push eax
call fcn.00403806
push 0x100
push 0x1fe
lea eax, [esp + 0x18]
mov edx, str.SOFTWAREMetaQuotes_SoftwareSettings
push eax
push str.MQL5.Login
mov ecx, closesocket
call fcn.00403d81
add esp, 0x10
test al, al
je 0x40f18a
cmp word [esp + 0x10], bx
je 0x40f18a
push str._for
mov ecx, edi
call fcn.00403806
lea eax, [esp + 0x10]
mov ecx, edi
push eax
call fcn.00403806
mov esi, 0x400
lea eax, [esp + 0x210]
push esi
push ebx
push eax
call fcn.0041cc70
pop ecx
pop ecx
lea ecx, [esp + 0x214]
call fcn.0040edb6
lea eax, [esp + 0x210]
mov ecx, 0x4bb17c
push eax
call fcn.00403485
lea eax, [esp + 0x210]
mov byte [eax], bl
inc eax
sub esi, 1
jne 0x40f1c5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20
Function at 0x40f639
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push esi
mov esi, ecx
push edi
test esi, esi
je 0x40f6b5
xor edi, edi
cmp word [esi], di
je 0x40f6b5
call fcn.0040f30f
test al, al
je 0x40f6b5
push 0x471c20
push esi
push str._scheckwritepermissions._s
push 0xffffffffffffffff
lea eax, [ebp - 0x208]
push 0x103
push eax
call fcn.00401ea4
add esp, 0x18
lea eax, [ebp - 0x208]
push edi
push 0x80
push 2
push edi
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x40f6b5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov al, 1
jmp 0x40f6b7
xor al, al
pop edi
pop esi
leave
ret
Function at 0x41002b
Capabilities:
Get file version info

Disassembly:
sub esp, 0xc
cmp dword [esp + 0x10], 0
push ebx
push esi
je 0x410102
lea eax, [esp + 0xc]
xor ebx, ebx
push eax
push dword [esp + 0x1c]
mov dword [esp + 0x14], ebx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov esi, eax
test esi, esi
je 0x410102
mov eax, dword [0x4c6f24]
cmp esi, dword [0x4c6f28]
jbe 0x4100a2
test eax, eax
je 0x41007e
push 0x8000
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [0x4c6f24], ebx
push 4
push 0x3000
push esi
push ebx
mov dword [0x4c6f28], ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x4c6f24], eax
test eax, eax
je 0x410102
mov dword [0x4c6f28], esi
push eax
push esi
push ebx
push dword [esp + 0x24]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], ebx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x4100fe
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x14]
push eax
push 0x46cfbc
push dword [0x4c6f24]
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x4100fe
mov edx, dword [esp + 0x10]
test edx, edx
je 0x4100fe
mov eax, dword [esp + 0x1c]
mov ecx, dword [edx + 0x10]
mov edx, dword [edx + 0x14]
mov dword [eax], ecx
mov eax, dword [esp + 0x20]
mov dword [eax], edx
test ecx, ecx
je 0x4100fe
test edx, edx
je 0x4100fe
mov bl, 1
mov al, bl
jmp 0x410104
xor al, al
pop esi
pop ebx
add esp, 0xc
ret 0xc