joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40df10
Capabilities:
Copy file
Delete file
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x114
push esi
push edi
lea eax, [esp + 0x18]
push 0x104
push eax
mov edi, ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov esi, dword [esp + 0x120]
push 0
lea ecx, [esp + 0x1c]
push esi
push ecx
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x40e050
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40e050
push ebx
push ebp
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, eax
push 0
push 0
lea edx, [ebx - 8]
push edx
push esi
call ebp
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x20]
push 8
push ecx
push esi
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x10], 8
jne 0x40e031
cmp dword [esp + 0x18], 0xfa123456
jne 0x40dfce
mov ecx, dword [esp + 0x1c]
mov edx, 0xfffffff8
sub edx, ecx
add ebx, edx
push 0
push 0
push ebx
push esi
call ebp
mov ecx, dword [edi + 0x15c]
mov edx, dword [edi]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x10]
push 0
push eax
push ecx
push edx
push esi
call ebx
mov eax, dword [edi + 0x15c]
mov ecx, dword [esp + 0x10]
cmp ecx, eax
jne 0x40e031
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x20]
push 8
push ecx
push esi
mov dword [esp + 0x2c], 0xfa123456
call ebx
cmp dword [esp + 0x10], 8
jne 0x40e031
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [esp + 0x14], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
pop ebp
test eax, eax
pop ebx
jne 0x40e050
mov edx, dword [esp + 0x120]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
add esp, 0x114
ret 4
Function at 0x40f9c0
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
mov eax, dword [esp + 4]
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
push edi
push 2
push eax
mov dword [ebp], eax
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
mov ebx, dword [sym.imp.USER32.dll_GetKeyState]
push 0x10
mov esi, eax
call ebx
xor ecx, ecx
push 0x14
test ax, ax
setl cl
mov edi, ecx
call ebx
and eax, 1
cmp edi, eax
jne 0x40fa16
cmp esi, 0x41
jl case.0x40fa32.60
cmp esi, 0x5a
jg case.0x40fa32.60
add esi, 0x20
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
test edi, edi
je case.0x40fa32.60
lea eax, [esi - 0x27]
cmp eax, 0x39
ja case.0x40fa32.60
xor edx, edx
mov dl, byte [eax + 0x40fba4]
jmp dword [edx*4 + 0x40fb4c]
mov esi, 0x7e
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x21
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x40
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x23
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x24
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x25
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x5e
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x26
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x2a
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x28
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x29
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x5f
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x2b
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x7b
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x7d
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x7c
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x3a
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x22
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x3c
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x3e
pop edi
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
ret
mov esi, 0x3f
mov dword [ebp + 4], esi
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x410ae0
Capabilities:
Log keystrokes via polling

Disassembly:
push esi
mov esi, dword [ecx + 0xbdc]
push edi
xor edi, edi
call dword [sym.imp.USER32.dll_GetFocus]
cmp esi, eax
jne 0x410b07
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.USER32.dll_GetKeyState]
pop edi
pop esi
movsx eax, ax
ret 4
mov eax, edi
pop edi
pop esi
ret 4
Function at 0x4406d0
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 8]
push ebx
mov eax, ecx
mov ebx, dword [esp + 0x10]
cdq
and edx, 7
push ebp
add eax, edx
and ecx, 7
sar eax, 3
push esi
mov esi, dword [esp + 0x10]
test eax, eax
mov ebp, ecx
jle 0x44071b
push edi
mov edi, eax
push 8
mov ecx, esi
call fcn.00440340
xor ecx, ecx
and eax, 0xff
mov cl, bh
xor edx, edx
xor eax, ecx
mov dh, bl
mov ebx, dword [eax*4 + 0x447b08]
xor ebx, edx
dec edi
jne 0x4406f6
pop edi
test ebp, ebp
jle 0x440747
push 1
mov ecx, esi
call fcn.00440340
mov ecx, ebx
and ebx, 0x7fff
shr ecx, 0xf
and ecx, 1
xor eax, ecx
shl ebx, 1
test eax, eax
je 0x440744
xor ebx, 0x8005
dec ebp
jne 0x44071f
pop esi
mov eax, ebx
pop ebp
pop ebx
ret
Function at 0x40120b
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
push esi
push dword [ebp + 0x10]
lea eax, [ebp - 0x100]
push dword [ebp + 0xc]
push str._s:_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x100]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp + 8]
mov byte [ebp + eax - 0xff], 0
mov byte [ebp + eax - 0xfe], 0
mov byte [ebp + eax - 0xfd], 0
mov dl, byte [ebp - 0x100]
test dl, dl
je 0x4012c6
push ebx
push edi
lea edi, [ebp - 0xfe]
movzx esi, dl
mov edx, esi
shr edx, 2
mov dl, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx], dl
movzx edx, byte [edi - 1]
mov ebx, edx
and esi, 3
shr ebx, 4
shl esi, 4
or ebx, esi
mov bl, byte [ebx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
movzx esi, byte [edi]
inc ecx
mov byte [ecx], bl
and edx, 0xf
shl edx, 2
mov ebx, esi
shr ebx, 6
or edx, ebx
mov dl, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
inc ecx
mov byte [ecx], dl
and esi, 0x3f
mov dl, byte [esi + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
inc ecx
add edi, 3
mov byte [ecx], dl
mov dl, byte [edi - 2]
inc ecx
test dl, dl
jne 0x40126a
pop edi
pop ebx
push 3
cdq
pop esi
idiv esi
pop esi
cmp edx, 2
jne 0x4012d6
mov byte [ecx], 0x3d
inc ecx
cmp edx, 1
jne 0x4012df
mov byte [ecx], 0x3d
inc ecx
mov byte [ecx], 0
leave
ret

Function at 0x4012f2
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
push edi
xor ebx, ebx
xor edi, edi
cmp eax, 0xffffffff
je 0x4013d0
cmp dword [ebp + 0x14], ebx
je 0x401345
push ebx
push ebx
push dword [ebp + 0x14]
push eax
call sub.WSOCK32.dll_WSAAsyncSelect
cmp eax, 0xffffffff
jne 0x401345
cmp dword [0x411d00], ebx
jl 0x401345
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.004012e4
add esp, 4
mov dword [0x411d00], 0xffffffeb
push 1
push dword [esi]
call sub.WSOCK32.dll_shutdown
mov edi, eax
cmp edi, 0xffffffff
je 0x4013c6
xor edi, edi
inc edi
cmp edi, 0xffffffff
je 0x40139c
push ebx
push 0x400
lea eax, [ebp - 0x400]
push eax
push dword [esi]
call sub.WSOCK32.dll_recv
cmp dword [0x411874], ebx
mov edi, eax
je 0x401398
cmp edi, ebx
jle 0x40139a
mov eax, dword [0x40904c]
cmp eax, 0xffffffff
je 0x401398
push edi
lea ecx, [ebp - 0x400]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll__lwrite]
cmp edi, ebx
jne 0x401358
mov eax, dword [0x41186c]
cmp dword [eax], ebx
je 0x4013c6
push 4
lea eax, [ebp + 8]
push eax
push 0x80
push 0xffff
push dword [esi]
mov word [ebp + 8], 1
mov word [ebp + 0xa], bx
call sub.WSOCK32.dll_setsockopt
push dword [esi]
call sub.WSOCK32.dll_closesocket
or dword [esi], 0xffffffff
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4013d7
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
push edi
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jne 0x401404
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.004012e4
add esp, 4
mov dword [0x411d00], 0xffffffe9
jmp 0x401483
push 0x33
push dword [esp + 0x14]
push dword [esp + 0x14]
push edi
call sub.WSOCK32.dll_WSAAsyncSelect
cmp eax, 0xffffffff
jne 0x401430
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.004012e4
mov dword [0x411d00], 0xffffffe8
jmp 0x401477
push esi
mov esi, dword [esp + 0xc]
push dword [esp + 0x18]
mov word [esi], 2
call sub.WSOCK32.dll_htons
push 0x10
push esi
push edi
mov word [esi + 2], ax
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
pop esi
jne 0x401483
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x401483
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.004012e4
mov dword [0x411d00], 0xffffffe7
add esp, 4
push edi
call sub.WSOCK32.dll_closesocket
or edi, 0xffffffff
mov eax, edi
pop edi
ret

Function at 0x401487
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
push esi
xor ebx, ebx
cmp dword [0x41187c], ebx
push edi
mov edi, 0x411d80
je 0x4014d1
cmp byte [0x411d80], bl
je 0x4014de
push 9
pop esi
cmp dword [section..data], 0xffffffff
je 0x401501
test esi, esi
jle 0x401501
push 0
mov eax, esi
sub eax, ebx
push eax
push edi
push dword [section..data]
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
je 0x4014e2
add ebx, eax
cmp ebx, esi
jl 0x4014b1
jmp 0x401501
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
jne 0x4014a4
xor eax, eax
jmp 0x40150e
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x401501
push eax
call fcn.004012e4
add esp, 4
mov dword [0x411d00], 0xffffffe6
cmp ebx, esi
jne 0x40150c
mov byte [0x411d80], 0
mov eax, ebx
pop edi
pop esi
pop ebx
ret
Function at 0x401512
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
push edi
mov edi, dword [esp + 0x20]
xor esi, esi
mov ebx, 0x2733
jmp 0x40155b
push 0
mov ecx, edi
sub ecx, eax
push ecx
add eax, ebp
push eax
push dword [esp + 0x20]
call sub.WSOCK32.dll_recv
mov esi, eax
cmp esi, 0xffffffff
je 0x401566
test esi, esi
je 0x401587
cmp dword [0x41187c], 0
jne 0x40155b
add dword [0x411d68], esi
push esi
call fcn.0040109b
pop ecx
mov eax, dword [0x411d68]
cmp eax, edi
jl 0x401527
jmp 0x401587
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, ebx
je 0x401587
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.004012e4
add esp, 4
mov dword [0x411d00], 0xffffffe0
cmp dword [0x41187c], 0
jne 0x4016ff
add edi, 0xfffffa4c
cmp dword [0x411d68], edi
jg 0x4015b8
cmp esi, 0xffffffff
jne 0x4015b0
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, ebx
jne 0x4015b8
test esi, esi
jne 0x4016ff
cmp dword [0x411874], 0
mov esi, ebp
jne 0x4016d1
mov dword [0x411874], 1
mov al, byte [ebp]
jmp 0x4015dd
cmp al, 9
je 0x4015e1
inc esi
mov al, byte [esi]
cmp al, 0x20
jne 0x4015d6
mov al, byte [esi]
cmp al, 0x20
je 0x4015eb
cmp al, 9
jne 0x4015ee
inc esi
jmp 0x4015e1
cmp byte [esi], 0x32
je 0x4016a1
mov eax, dword [0x41958c]
test eax, eax
mov dword [0x411d00], 0xfffffffd
je 0x4016c9
cmp dword [0x411854], 0
je 0x40162d
push str.ServerError
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [0x41958c]
add eax, 0xc
jmp 0x401641
push str._r_n_r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [0x41958c]
add eax, 4
mov cl, byte [esi]
mov edx, esi
jmp 0x401667
cmp cl, 0xd
je 0x40166b
cmp cl, 0xa
je 0x40166b
mov edi, eax
sub edi, dword [0x41958c]
cmp edi, 0xfa
jge 0x40166b
mov byte [eax], cl
inc eax
inc edx
mov cl, byte [edx]
test cl, cl
jne 0x401647
mov byte [eax], 0
cmp dword [0x411854], 0
je 0x4016c9
push 0x407200
push dword [0x41958c]
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [0x41958c]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add dword [0x41958c], eax
jmp 0x4016c9
cmp al, 0xa
je 0x4016a7
inc esi
mov al, byte [esi]
cmp al, 0xd
jne 0x40169c
mov al, byte [esi]
lea ecx, [esi + 1]
cmp al, byte [ecx]
je 0x4016c2
cmp al, byte [esi + 2]
je 0x4016c6
cmp al, 0xd
jne 0x4016bb
mov esi, ecx
cmp byte [esi], 0xa
jne 0x4016a1
jmp 0x4016a0
inc esi
inc esi
jmp 0x4016c9
add esi, 4
sub ebp, esi
add dword [0x411d68], ebp
cmp dword [esp + 0x18], 0xffffffff
je 0x4016f8
push dword [0x411d68]
push esi
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll__lwrite]
cmp eax, 0xffffffff
jne 0x4016f8
mov dword [0x411d00], 0xfffffffc
and dword [0x411d68], 0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x4028c7
Capabilities:
Hash data with crc32

Disassembly:
push 0x400
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [0x40a01c], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [0x40a020], eax
and dword [eax], 0
xor eax, eax
inc eax
push 8
mov ecx, eax
pop edx
test cl, 1
je 0x4028ff
shr ecx, 1
xor ecx, 0xedb88320
jmp 0x402901
shr ecx, 1
dec edx
jne 0x4028f0
mov edx, dword [0x40a020]
mov dword [edx + eax*4], ecx
inc eax
cmp eax, 0x100
jl 0x4028eb
ret

Function at 0x40292f
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 4]
test ecx, ecx
jne 0x40293c
or eax, 0xffffffff
jmp 0x402969
mov eax, dword [0x409050]
push esi
mov esi, dword [esp + 0xc]
test esi, esi
je 0x402968
push edi
mov edi, dword [0x40a020]
xor edx, edx
mov dl, byte [ecx]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edi + edx*4]
inc ecx
dec esi
jne 0x40294b
pop edi
pop esi
mov dword [0x409050], eax
not eax
ret 8

Function at 0x402b65
Capabilities:
Get common file path
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
push edi
mov byte [eax], 0
jne 0x402ba7
push 0x208
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push str.msi.dll
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ebx, [ebp - 0x418]
lea eax, [ebp - 0x10]
push eax
push ebx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov edi, eax
test edi, edi
je 0x402cc4
push esi
lea eax, [edi + edi + 0x1000]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
push esi
push edi
push dword [ebp - 0x10]
push ebx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x402cbc
cmp edi, 0x14
jb 0x402cbc
cmp word [esi + 4], 4
ja 0x402bf7
cmp byte [esi + 6], 0x56
je 0x402c0b
cmp byte [esi + 4], 0x56
jne 0x402cbc
cmp byte [esi + 5], 0x53
jne 0x402cbc
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.VarFileInfoTranslation
lea eax, [ebp - 0x210]
push eax
call ebx
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x210]
push eax
push esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x402cbc
cmp dword [ebp - 8], 0
je 0x402cbc
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 2]
movzx eax, word [eax]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push ecx
push eax
lea eax, [ebp - 0x210]
push str.StringFileInfo_04hX_04hXFileVersion
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x210]
push eax
push esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x402cb4
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 2]
movzx eax, word [eax]
push ecx
push eax
lea eax, [ebp - 0x210]
push str.StringFileInfo040904e4FileVersion
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x210]
push eax
push esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x402cbc
push dword [ebp + 8]
push dword [ebp + 0xc]
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop esi
pop edi
pop ebx
leave
ret
Function at 0x402cc8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
lea eax, [ebp + 8]
push eax
push 0x20019
xor ebx, ebx
push ebx
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push closesocket
xor edi, edi
mov byte [esi], bl
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402d48
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 8]
push eax
push ebx
push str.CommonFilesDir
push dword [ebp + 8]
mov dword [ebp - 4], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402d3f
cmp byte [esi], bl
je 0x402d3f
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [eax + esi - 1]
cmp byte [eax], 0x5c
jne 0x402d30
mov byte [eax], bl
push str.Wise_Installation_Wizard
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
xor edi, edi
inc edi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40302c
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
mov byte [esi], 0
cmp dword [0x409a00], 0
je 0x4030b6
push ebx
mov ebx, dword [ebp + 0xc]
push edi
push 4
pop eax
xor edi, edi
cmp ebx, eax
jle 0x403064
movzx ecx, byte [eax + 0x409d60]
add edi, ecx
cmp eax, 0xa
jne 0x40305f
push 0x12
pop eax
inc eax
cmp eax, ebx
jl 0x40304e
mov esi, dword [sym.imp.KERNEL32.dll__llseek]
push 1
push 0
push dword [0x40a010]
call esi
mov dword [ebp - 4], eax
mov eax, dword [0x409d88]
push 0
add eax, edi
push eax
push dword [0x40a010]
call esi
movzx eax, byte [ebx + 0x409d60]
push eax
push dword [ebp + 8]
push dword [0x40a010]
call dword [sym.imp.KERNEL32.dll__lread]
push 0
push dword [ebp - 4]
push dword [0x40a010]
call esi
mov esi, dword [ebp + 8]
pop edi
pop ebx
jmp 0x4030d2
push dword [ebp + 0x10]
push 0x100
push esi
push 0x40747d
push dword [ebp + 0x14]
push str.WiseInstaller
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp byte [esi], 0
jne 0x4030ec
push 0x100
push esi
push dword [ebp + 0x18]
push dword [0x409a10]
call dword [sym.imp.USER32.dll_LoadStringA]
pop esi
leave
ret
Function at 0x403230
Capabilities:
Accept command line arguments
Persist via run registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
lea eax, [ebp - 4]
push eax
push 0x20019
xor ebx, ebx
push ebx
push str.SOFTWAREMicrosoftWindowsCurrentVersionInstallerRunOnceEntries
push closesocket
xor edi, edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x40329e
lea eax, [ebp - 0x48]
push eax
push dword [ebp + 8]
call fcn.004030ef
pop ecx
pop ecx
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 4]
mov dword [ebp - 8], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403295
cmp dword [ebp - 8], 1
jbe 0x403295
inc edi
push dword [ebp - 4]
call esi
cmp edi, ebx
jne 0x4032fd
mov edi, dword [ebp + 0xc]
cmp edi, ebx
mov eax, str.SOFTWAREMicrosoftWindowsCurrentVersionRun
je 0x4032af
mov eax, str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnce
push ebx
lea ecx, [ebp - 4]
push ecx
push ebx
push 0xf003f
push ebx
push 0x40747d
push ebx
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4032fd
cmp edi, ebx
jne 0x4032dd
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push edi
push 1
push ebx
push str.WiseStubReboot
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call esi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4034f8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x1b8
and dword [ebp + 0x68], 0
push ebx
push esi
push edi
lea eax, [ebp + 0x3c]
push eax
push dword [ebp + 0x7c]
push dword [ebp + 0x78]
call fcn.004034d1
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
add esp, 0xc
cmp dword [ebp + 0x78], 0x10000
jne 0x40354a
lea eax, [ebp + 0x6c]
push eax
mov edi, 0x20019
push edi
push 0
push str.SOFTWAREMicrosoft.NETFrameworkpolicy_v1.0
jmp 0x40357b
mov dword [ebp + 0x68], 1
jmp 0x403648
push 0xb
pop ecx
push 0x15
mov esi, str.SOFTWAREMicrosoftNET_Framework_SetupNDP_
lea edi, [ebp - 0x44]
rep movsd dword es:[edi], dword [esi]
pop ecx
xor eax, eax
lea edi, [ebp - 0x18]
rep stosd dword es:[edi], eax
lea eax, [ebp + 0x3c]
push eax
lea eax, [ebp - 0x44]
push eax
call ebx
lea eax, [ebp + 0x6c]
push eax
mov edi, 0x20019
push edi
push 0
lea eax, [ebp - 0x44]
push eax
mov esi, closesocket
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40353e
push dword [ebp + 0x6c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp + 0x6c]
push eax
push edi
push 0
push str.SOFTWAREMicrosoft.NETFramework
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403648
lea eax, [ebp + 0x78]
push eax
lea eax, [ebp - 0x148]
push eax
lea eax, [ebp + 0x60]
push eax
push 0
push str.InstallRoot
push dword [ebp + 0x6c]
mov dword [ebp + 0x78], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40363f
lea eax, [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x149], 0x5c
je 0x4035fe
push 0x40779c
lea eax, [ebp - 0x148]
push eax
call ebx
lea eax, [ebp + 0x3c]
push eax
lea eax, [ebp - 0x148]
push eax
call ebx
push str.mscorlib.dll
lea eax, [ebp - 0x148]
push eax
call ebx
lea eax, [ebp + 0x64]
push eax
lea eax, [ebp + 0x5c]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00402dca
mov eax, dword [ebp + 0x7c]
add esp, 0xc
cmp dword [ebp + 0x64], eax
jae 0x40363f
mov dword [ebp + 0x68], 1
push dword [ebp + 0x6c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
cmp dword [ebp + 0x68], eax
pop edi
pop esi
sete al
pop ebx
add ebp, 0x70
leave
ret
Function at 0x403658
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
push edi
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push str.SOFTWAREMicrosoft.NETFramework
push closesocket
mov dword [ebp - 8], 0x104
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
mov edi, str.v1.0.3705
jne 0x4036f5
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push str.InstallRoot
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4036f5
push esi
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x139], 0x5c
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x4036dc
push 0x40779c
lea eax, [ebp - 0x138]
push eax
call esi
push edi
lea eax, [ebp - 0x138]
push eax
call esi
push str.mscorlib.dll
lea eax, [ebp - 0x138]
push eax
call esi
pop esi
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40370b
xor eax, eax
jmp 0x403742
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00402dca
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0xc]
push dword [ebp - 4]
call fcn.004034d1
push 9
lea eax, [ebp - 0x34]
push edi
push eax
call fcn.00401000
add esp, 0x24
neg eax
sbb eax, eax
inc eax
pop edi
leave
ret

Function at 0x403745
Capabilities:
Delete file
Terminate process

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
push edi
call fcn.00402d78
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 4
jle 0x403785
lea esi, [eax + edi - 4]
push str..TMP
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x403785
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push str..exe
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
push edi
call dword [sym.imp.KERNEL32.dll__lcreat]
mov esi, dword [esp + 0x10]
push eax
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll__lclose]
push 2
push edi
call dword [sym.imp.KERNEL32.dll__lopen]
test eax, eax
pop edi
mov dword [esi], eax
pop esi
jge 0x4037bc
push 0
call fcn.00402dac
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
xor eax, eax
inc eax
ret