joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40f1b0
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x41a8a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0040b08a
mov dword [ebp - 0x14], eax
cmp dword [0x41c708], esi
jne 0x40f2a3
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x40f230
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40f383
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x40f383
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40f383
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x41c708], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x41c70c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x41c710], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x41c718], eax
test eax, eax
je 0x40f2a0
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x41c714], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40f2c8
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40f2bb
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x40f2dd
push 4
pop eax
jmp 0x40f385
cmp dword [ebp - 0x14], esi
je 0x40f2dd
push dword [0x41c708]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x40f2c2
mov eax, dword [0x41c714]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x40f33b
cmp dword [0x41c718], edi
je 0x40f33b
push eax
call ebx
push dword [0x41c718]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40f33b
test eax, eax
je 0x40f33b
call ecx
test eax, eax
je 0x40f330
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x40f330
test byte [ebp - 8], 1
jne 0x40f33b
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x40f36b
mov eax, dword [0x41c70c]
cmp eax, edi
je 0x40f368
push eax
call ebx
test eax, eax
je 0x40f368
call eax
mov esi, eax
test esi, esi
je 0x40f368
mov eax, dword [0x41c710]
cmp eax, edi
je 0x40f368
push eax
call ebx
test eax, eax
je 0x40f368
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x41c708]
call ebx
test eax, eax
je 0x40f383
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x40f385
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407d45
mov esp, ebp
pop ebp
ret
Function at 0x401630
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
sub esp, 0x20c
mov eax, dword [0x414044]
xor eax, esp
mov dword [esp + 0x208], eax
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0xa]
push ecx
mov word [esp + 0xc], ax
call fcn.00407050
add esp, 0xc
lea edx, [esp]
push edx
push 0
push 0
push 0x1c
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jge 0x40168b
xor eax, eax
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.00403084
add esp, 0x20c
ret
lea eax, [esp]
push eax
push str._sADSSO
push 0x208
push 0x415f80
call fcn.00403093
add esp, 0x10
push 0x415f80
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
je 0x4016c8
push 0
push 0x415f80
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, 1
jne 0x401674
mov ecx, dword [esp + 0x208]
xor ecx, esp
mov eax, 1
call fcn.00403084
add esp, 0x20c
ret

Function at 0x4016f0
Capabilities:
Get session information
Get session user name

Disassembly:
sub esp, 8
mov eax, dword [0x414f6c]
mov ecx, dword [eax + 4]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 0x30
push 0x415b20
push 0xffffffffffffffff
push ecx
push 0
push 0xfde9
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
call esi
mov edx, dword [0x414f6c]
mov eax, dword [edx + 8]
push eax
call fcn.004033ff
mov ecx, dword [0x414f6c]
mov edx, dword [ecx + 0xc]
push edx
mov word [0x415b14], ax
call fcn.004033ff
mov word [0x415b18], ax
mov eax, dword [0x414f6c]
mov ecx, dword [eax + 0x10]
push ecx
call fcn.004033ff
add esp, 0xc
mov word [0x415b1c], ax
cmp ax, 3
jbe 0x40177c
mov edx, 3
mov word [0x415b1c], dx
mov eax, dword [0x414f6c]
mov ecx, dword [eax + 0x14]
push 0
push 0
push 0x20
push 0x415b50
push 0xffffffffffffffff
push ecx
push 0
push 0xfde9
call esi
mov eax, dword [0x414f6c]
mov edx, dword [eax + 0x14]
mov ecx, dword [eax + 0x10]
push edx
mov edx, dword [eax + 0xc]
push ecx
mov ecx, dword [eax + 8]
push edx
mov edx, dword [eax + 4]
push ecx
push edx
push str._s__s__s__s__s
push 0x208
push 0x415b70
call fcn.00403093
add esp, 0x20
lea eax, [esp + 8]
push eax
lea ecx, [esp + 8]
push ecx
push 5
push 0xffffffffffffffff
push 0
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
pop esi
test eax, eax
jne 0x4017ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.get_login_name_fail__errorcode:_d
call fcn.00401ae0
add esp, 8
xor eax, eax
add esp, 8
ret
mov edx, dword [esp]
push edx
push 0x208
push 0x415d78
call fcn.0040340a
mov eax, dword [esp + 0xc]
add esp, 0xc
push eax
call sub.WTSAPI32.dll_WTSFreeMemory
push str.administrator
push 0x415d78
call fcn.00403611
add esp, 8
test eax, eax
jne 0x401848
push str.Login_user_is_ad_server_account_
call fcn.00401ae0
add esp, 4
xor eax, eax
add esp, 8
ret
push 0x208
push 0x416188
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x401871
push str.Get_current_module_path_failed
call fcn.00401ae0
add esp, 4
xor eax, eax
add esp, 8
ret
mov eax, 1
add esp, 8
ret
Function at 0x401960
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x61c
mov eax, dword [0x414044]
xor eax, esp
mov dword [esp + 0x618], eax
push esi
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x41e]
push ecx
mov word [esp + 0x420], ax
call fcn.00407050
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x1a]
push eax
mov word [esp + 0x1c], dx
call fcn.00407050
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x22e]
push edx
mov word [esp + 0x230], cx
call fcn.00407050
add esp, 0x24
lea esi, [esp + 0x20c]
call fcn.00401880
pop esi
cmp eax, 1
je 0x4019f2
xor eax, eax
mov ecx, dword [esp + 0x618]
xor ecx, esp
call fcn.00403084
add esp, 0x61c
ret
mov eax, dword [0x414f6c]
mov ecx, dword [eax + 0xc]
push ecx
call fcn.004033ff
add esp, 4
test eax, eax
jne 0x401a27
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea edx, [esp + 0x20c]
push edx
push str.LOG_LOGON__s__u.txt
push 0x208
lea eax, [esp + 0x10]
push eax
jmp 0x401a45
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea ecx, [esp + 0x20c]
push ecx
push str.LOG_LOGOFF__s__u.txt
push 0x208
lea edx, [esp + 0x10]
push edx
call fcn.00403093
add esp, 0x14
lea eax, [esp]
push eax
push 0x415f80
push str._s_s
lea ecx, [esp + 0x41c]
push 0x208
push ecx
call fcn.00403093
add esp, 0x14
push 0
push 0x80
push 4
push 0
push 3
push 0xc0000000
lea edx, [esp + 0x428]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x414f40], eax
cmp eax, 0xffffffff
jne 0x401abb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x401ab0
cmp eax, 0x50
jne 0x4019db
push str.The_log_file_already_exists_
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [esp + 0x618]
xor ecx, esp
mov eax, 1
call fcn.00403084
add esp, 0x61c
ret
Function at 0x401ae0
Capabilities:
Print debug messages
Write file on windows

Disassembly:
mov eax, 0x2214
call fcn.0040b000
mov eax, dword [0x414044]
xor eax, esp
mov dword [esp + 0x2210], eax
cmp dword [0x414f40], 0xffffffff
je 0x401c35
xor eax, eax
push 0x1ffe
push eax
lea ecx, [esp + 0x21a]
push ecx
mov word [esp + 0x21c], ax
call fcn.00407050
mov eax, dword [esp + 0x2224]
lea edx, [esp + 0x2228]
push edx
push eax
lea ecx, [esp + 0x224]
push 0x2000
push ecx
call fcn.00403827
lea eax, [esp + 0x22c]
add esp, 0x1c
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401b51
sub eax, edx
sar eax, 1
push esi
mov edx, 0x1000
sub edx, eax
push 0x411ddc
add edx, edx
push edx
lea eax, [esp + 0x21c]
push eax
call fcn.00403844
mov eax, dword [0x414f40]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
add esp, 0xc
push 0
lea ecx, [esp + 8]
push ecx
push 2
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x1c], 0xfeff
mov dword [esp + 0x18], 0
call esi
lea eax, [esp + 0x214]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401bb6
sub eax, edx
push 0
sar eax, 1
lea ecx, [esp + 8]
push ecx
mov ecx, dword [0x414f40]
lea edx, [eax + eax]
push edx
lea eax, [esp + 0x220]
push eax
push ecx
call esi
pop esi
test eax, eax
jne 0x401c29
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x12]
push eax
mov word [esp + 0x14], dx
call fcn.00407050
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Write_data_to_file_filed_error:_d
lea ecx, [esp + 0x10]
push 0x208
push ecx
call fcn.00403093
add esp, 0x10
lea edx, [esp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [0x414f40]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [esp + 0x2210]
xor ecx, esp
call fcn.00403084
add esp, 0x2214
ret

Function at 0x401c50
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x198
mov eax, dword [0x414044]
xor eax, esp
mov dword [esp + 0x194], eax
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x401ca5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSA_startup_fail__errorcode:_d_n
call fcn.00401ae0
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.00403084
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x194]
xor ecx, esp
mov eax, 1
call fcn.00403084
mov esp, ebp
pop ebp
ret
Function at 0x401cc0
Capabilities:
Get file version info

Disassembly:
sub esp, 0x218
mov eax, dword [0x414044]
xor eax, esp
mov dword [esp + 0x214], eax
mov eax, dword [esp + 0x21c]
push edi
mov edi, ecx
mov dword [esp + 0xc], eax
test edi, edi
jne 0x401d0b
push str.The_parameter_pszAppPath_is_null
call fcn.00401ae0
add esp, 4
xor eax, eax
pop edi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.00403084
add esp, 0x218
ret
test eax, eax
jne 0x401d34
push str.The_parameter_pszVersionNumber_is_null
call fcn.00401ae0
add esp, 4
xor eax, eax
pop edi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.00403084
add esp, 0x218
ret
push esi
push 0
push edi
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
test esi, esi
jne 0x401d70
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Get_size_of_file_version_info_failed__errorcode:_d_n
call fcn.00401ae0
add esp, 8
pop esi
xor eax, eax
pop edi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.00403084
add esp, 0x218
ret
xor ecx, ecx
mov edx, 2
mul edx
seto cl
push ebx
neg ecx
or ecx, eax
push ecx
call fcn.0040392b
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x401db7
push str.The_version_info_buffer_malloc_filed_
call fcn.00401ae0
add esp, 4
pop ebx
pop esi
xor eax, eax
pop edi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.00403084
add esp, 0x218
ret
lea ecx, [esi + esi]
mov edx, ecx
call fcn.00401000
push ebx
push esi
push 0
push edi
call sub.VERSION.dll_GetFileVersionInfoW
cmp eax, 1
je 0x401e04
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Get_file_version_info_failed__errorcode:_d_n
call fcn.00401ae0
push ebx
call fcn.00403990
add esp, 0xc
pop ebx
pop esi
xor eax, eax
pop edi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.00403084
add esp, 0x218
ret
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
push 0x412058
push ebx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
call sub.VERSION.dll_VerQueryValueW
cmp eax, 1
je 0x401e35
push 0x41205c
jmp 0x401ea3
mov eax, dword [esp + 0xc]
mov esi, dword [eax + 8]
mov edi, dword [eax + 0xc]
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x22]
push eax
mov word [esp + 0x24], dx
call fcn.00407050
movzx ecx, di
push ecx
movzx edx, si
shr edi, 0x10
push edi
push edx
shr esi, 0x10
push esi
push str._u._u._u._u
lea eax, [esp + 0x38]
push 0x208
push eax
call fcn.00403093
lea eax, [esp + 0x40]
add esp, 0x28
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401e84
sub eax, edx
sar eax, 1
lea ecx, [eax + eax]
cmp ecx, 0x208
jb 0x401ecb
push str.The_version_number_buffer_too_small
call fcn.00401ae0
push ebx
call fcn.00403990
add esp, 8
pop ebx
pop esi
xor eax, eax
pop edi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.00403084
add esp, 0x218
ret
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
push 0x208
push eax
call fcn.0040340a
push ebx
call fcn.00403990
mov ecx, dword [esp + 0x230]
add esp, 0x10
pop ebx
pop esi
pop edi
xor ecx, esp
mov eax, 1
call fcn.00403084
add esp, 0x218
ret
Function at 0x401f10
Capabilities:
Enumerate processes
Terminate process

Disassembly:
sub esp, 0x234
mov eax, dword [0x414044]
xor eax, esp
mov dword [esp + 0x230], eax
xor eax, eax
cmp eax, str.CheckNet.exe
jne 0x401f51
push str.The_parameter_pszProcessName_is_null
call fcn.00401ae0
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x230]
xor ecx, esp
call fcn.00403084
add esp, 0x234
ret
push esi
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
mov dword [esp + 4], esi
cmp esi, 0xffffffff
jne 0x401f92
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_process_snapshot_failed__errorcode:_d_n
call fcn.00401ae0
add esp, 8
xor eax, eax
pop esi
mov ecx, dword [esp + 0x230]
xor ecx, esp
call fcn.00403084
add esp, 0x234
ret
lea ecx, [esp + 8]
push ecx
push esi
mov dword [esp + 0x10], 0x22c
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x401fdc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Get_first_process_failed__errorcode:_d_n
call fcn.00401ae0
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
mov ecx, dword [esp + 0x230]
xor ecx, esp
call fcn.00403084
add esp, 0x234
ret
push ebx
lea edx, [esp + 0xc]
push edx
push esi
call sub.KERNEL32.dll_Process32NextW
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40209c
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_OpenProcess]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_TerminateProcess]
lea ecx, [esp + 0x38]
mov eax, str.CheckNet.exe
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x402036
test dx, dx
je 0x402032
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x402036
add eax, 4
add ecx, 4
test dx, dx
jne 0x402010
xor eax, eax
jmp 0x40203b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x402087
mov eax, dword [esp + 0x1c]
push eax
push 0
push 0x1fffff
call ebp
mov esi, eax
test esi, esi
jne 0x40206e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CheckNet.exe
push str.Open__s_process_handle_failed__errorcode:_d_n
call fcn.00401ae0
add esp, 0xc
jmp 0x402083
push 0
push esi
call edi
push str.stop_.....checknet.exe_n
call fcn.00401ae0
add esp, 4
push esi
call ebx
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x402004
pop edi
pop ebp
push esi
call ebx
mov ecx, dword [esp + 0x238]
pop ebx
pop esi
xor ecx, esp
mov eax, 1
call fcn.00403084
add esp, 0x234
ret
Function at 0x4020c0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
test esi, esi
jne 0x4020da
push str.The_parameter_pszAppPath_is_null
call fcn.00401ae0
add esp, 4
xor eax, eax
add esp, 0x54
ret
push 0x40
lea eax, [esp + 0x18]
push 0
push eax
mov dword [esp + 0x1c], 0x44
call fcn.00407050
add esp, 0xc
xor ecx, ecx
lea edx, [esp]
push edx
lea eax, [esp + 0x14]
push eax
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push esi
push ecx
mov dword [esp + 0x64], 1
mov word [esp + 0x68], cx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
cmp eax, 1
je 0x402138
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_process_failed__errorcode:_d_n
call fcn.00401ae0
add esp, 8
xor eax, eax
add esp, 0x54
ret
mov eax, 1
add esp, 0x54
ret

Function at 0x402150
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
sub esp, 8
lea eax, [esp + 4]
push eax
lea ecx, [esp + 4]
push ecx
push 0
push 0xf013f
push 0
push 0
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push closesocket
mov dword [esp + 0x28], 1
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x402199
push str.Create_reg_key_failed_
call fcn.00401ae0
add esp, 4
xor eax, eax
add esp, 8
ret
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp]
push edx
push eax
push 1
push 0
push str.ADSSO_RUN
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x4021cd
push str.Set_reg_key_value_failed_
call fcn.00401ae0
add esp, 4
xor eax, eax
add esp, 8
ret
mov edx, dword [esp]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
add esp, 8
ret

Function at 0x4021e0
Capabilities:
Persist via run registry key
Query or enumerate registry value

Disassembly:
sub esp, 8
lea eax, [esp]
push eax
push 0x101
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push closesocket
mov dword [esp + 0x18], 0x208
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40221d
push str.Open_reg_key_failed_
call fcn.00401ae0
add esp, 4
xor eax, eax
add esp, 8
ret
mov edx, dword [esp + 0xc]
mov eax, dword [esp]
lea ecx, [esp + 4]
push ecx
push edx
push 0
push 0
push str.ADSSO_RUN
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x402251
push str.Query_value_failed_
call fcn.00401ae0
add esp, 4
xor eax, eax
add esp, 8
ret
mov ecx, dword [esp]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
add esp, 8
ret
Function at 0x402600
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
sub esp, 8
push 0xf0000000
push 0x18
push 0
push 0
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x402678
mov edx, dword [esp + 4]
lea ecx, [esp]
push ecx
push 4
push edx
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
test eax, eax
je 0x40266d
mov ecx, dword [esp + 4]
mov eax, 0x2040811
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 6
imul eax, eax, 0xffffff81
add ecx, eax
mov dword [esp + 4], ecx
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov al, byte [esp]
add esp, 8
ret
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
or al, 0xff
add esp, 8
ret

Function at 0x402770
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
sub esp, 8
push esi
mov eax, 1
push eax
push 0
push 0
push 0x11
push 2
push 2
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4027b4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSA_socket_failed__errorcode:_d_n
call fcn.00401ae0
add esp, 8
or eax, esi
pop esi
add esp, 8
ret
push 4
lea eax, [esp + 8]
push eax
push 4
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x4027f1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.set_socket_failed__errorcode:_d_n
call fcn.00401ae0
add esp, 8
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop esi
add esp, 8
ret
lea ecx, [esp + 8]
push ecx
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x402815
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.ioctl_socket_failed__errorcode:_d_n
jmp 0x4027da
mov eax, esi
pop esi
add esp, 8
ret
Function at 0x402a90
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x8c
mov eax, dword [0x414044]
xor eax, esp
mov dword [esp + 0x88], eax
push ebx
push ebp
push esi
push edi
push 0x7f
xor ebp, ebp
lea eax, [esp + 0x1d]
mov esi, ecx
mov edi, edx
push ebp
xor ebx, ebx
push eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], edi
mov byte [esp + 0x24], bl
call fcn.00407050
add esp, 0xc
test esi, esi
jne 0x402ae4
push str.The_parameter_pszIpList_is_null
call fcn.00401ae0
add esp, 4
xor eax, eax
jmp 0x402bb7
test edi, edi
jne 0x402afc
push str.The_parameter_pulIpCount_is_null
call fcn.00401ae0
add esp, 4
xor eax, eax
jmp 0x402bb7
push 0x80
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x402b2c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.get_host_name_failed__errorcode:_d_n
call fcn.00401ae0
add esp, 8
xor eax, eax
jmp 0x402bb7
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
test esi, esi
jne 0x402b55
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.get_host_by_name_failed__errorcode:_d_n
call fcn.00401ae0
add esp, 8
xor eax, eax
jmp 0x402bb7
mov eax, dword [esi + 0xc]
cmp dword [eax], ebx
je 0x402bac
lea esp, [esp]
cmp ebx, 8
jae 0x402bac
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
test eax, eax
je 0x402bac
mov ecx, eax
lea edi, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x402b80
sub ecx, edi
mov edi, ecx
mov ecx, dword [esp + 0x14]
push eax
add ecx, ebp
push 0x30
push ecx
call fcn.00403b39
add dword [esi + 0xc], 4
mov edx, dword [esi + 0xc]
add esp, 0xc
add ebp, edi
inc ebx
cmp dword [edx], 0
jne 0x402b60
mov eax, dword [esp + 0x10]
mov dword [eax], ebx
mov eax, 1
mov ecx, dword [esp + 0x98]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00403084
add esp, 0x8c
ret