joyce8/EMBER2024-capa huggingface dataset:
Function at 0x101482f0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 4], ecx
call dword [sym.imp.USER32.dll_GetFocus]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x10148335
call dword [sym.imp.USER32.dll_GetFocus]
mov ecx, dword [ebp - 4]
cmp eax, dword [ecx + 4]
jne 0x10148326
mov edx, dword [ebp + 0x14]
mov dword [edx], 1
xor eax, eax
jmp 0x101483ad
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.USER32.dll_GetParent]
mov dword [ebp - 8], eax
jmp 0x10148302
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.USER32.dll_DefWindowProcW]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x10]
cmp dword [ecx + 0x590], 0
jne 0x1014839b
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x10]
add eax, 0x588
push eax
push 0
push 0x466
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x10]
mov dword [ecx + 0x590], 1
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x10]
call fcn.101483e0
push 0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret 0x10
Function at 0x1015cea0
Capabilities:
Get keyboard layout
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x101ef110]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x21c], ecx
mov dword [ebp - 0x218], 0
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push 0
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyExW]
mov dword [ebp - 0x210], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x214], ecx
mov edx, dword [ebp - 0x214]
sub edx, 0x21
mov dword [ebp - 0x214], edx
cmp dword [ebp - 0x214], 0xd
ja case.0x1015cf0c.8
mov eax, dword [ebp - 0x214]
movzx ecx, byte [eax + 0x1015cfac]
jmp dword [ecx*4 + 0x1015cfa4]
mov edx, dword [ebp - 0x210]
or edx, 0x100
mov dword [ebp - 0x210], edx
cmp dword [ebp + 0x10], 0
je 0x1015cf3c
mov eax, dword [ebp - 0x210]
or eax, 0x1000000
mov dword [ebp - 0x210], eax
push 0x208
push 0
lea ecx, [ebp - 0x20c]
push ecx
call fcn.101652e0
add esp, 0xc
push 0x104
lea edx, [ebp - 0x20c]
push edx
mov eax, dword [ebp - 0x210]
shl eax, 0x10
push eax
call dword [sym.imp.USER32.dll_GetKeyNameTextW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x20c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.100dd710
mov edx, dword [ebp - 0x218]
or edx, 1
mov dword [ebp - 0x218], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1016100c
mov esp, ebp
pop ebp
ret 0xc

Function at 0x1015cf13
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x101ef110]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x21c], ecx
mov dword [ebp - 0x218], 0
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push 0
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyExW]
mov dword [ebp - 0x210], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x214], ecx
mov edx, dword [ebp - 0x214]
sub edx, 0x21
mov dword [ebp - 0x214], edx
cmp dword [ebp - 0x214], 0xd
ja case.0x1015cf0c.8
mov eax, dword [ebp - 0x214]
movzx ecx, byte [eax + 0x1015cfac]
jmp dword [ecx*4 + 0x1015cfa4]
mov edx, dword [ebp - 0x210]
or edx, 0x100
mov dword [ebp - 0x210], edx
cmp dword [ebp + 0x10], 0
je 0x1015cf3c
mov eax, dword [ebp - 0x210]
or eax, 0x1000000
mov dword [ebp - 0x210], eax
push 0x208
push 0
lea ecx, [ebp - 0x20c]
push ecx
call fcn.101652e0
add esp, 0xc
push 0x104
lea edx, [ebp - 0x20c]
push edx
mov eax, dword [ebp - 0x210]
shl eax, 0x10
push eax
call dword [sym.imp.USER32.dll_GetKeyNameTextW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x20c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.100dd710
mov edx, dword [ebp - 0x218]
or edx, 1
mov dword [ebp - 0x218], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1016100c
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10163590
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x101ef110]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x410
push 0
lea eax, [ebp - 0x414]
push eax
call fcn.101652e0
add esp, 0xc
mov dword [ebp - 0x418], 0
lea ecx, [ebp - 0x418]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x101635de
xor al, al
jmp 0x10163637
lea eax, [ebp - 0x414]
push eax
mov ecx, dword [ebp - 0x418]
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
jne 0x10163610
cmp dword [ebp - 0x418], 0
je 0x1016360c
mov edx, dword [ebp - 0x418]
push edx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor al, al
jmp 0x10163637
lea eax, [ebp - 0x414]
push eax
mov ecx, dword [ebp + 0xc]
call fcn.1000e1e0
cmp dword [ebp - 0x418], 0
je 0x10163635
mov ecx, dword [ebp - 0x418]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1016100c
mov esp, ebp
pop ebp
ret

Function at 0x10163880
Capabilities:
Check os version

Disassembly:
sub esp, 0x118
mov eax, dword [0x101ef110]
xor eax, esp
mov dword [esp + 0x114], eax
push 0x110
lea eax, [esp + 8]
mov dword [esp + 4], 0x114
push 0
push eax
call fcn.101652e0
add esp, 0xc
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x101638e7
mov eax, dword [esp + 4]
cmp eax, 5
ja 0x101638d0
jne 0x101638e7
cmp dword [esp + 8], 0
jbe 0x101638e7
mov al, 1
mov ecx, dword [esp + 0x114]
xor ecx, esp
call fcn.1016100c
add esp, 0x118
ret
mov ecx, dword [esp + 0x114]
xor al, al
xor ecx, esp
call fcn.1016100c
add esp, 0x118
ret

Function at 0x10163900
Capabilities:
Check os version

Disassembly:
sub esp, 0x118
mov eax, dword [0x101ef110]
xor eax, esp
mov dword [esp + 0x114], eax
push 0x110
lea eax, [esp + 8]
mov dword [esp + 4], 0x114
push 0
push eax
call fcn.101652e0
add esp, 0xc
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x10163967
mov eax, dword [esp + 4]
cmp eax, 6
jbe 0x1016395e
mov al, 1
mov ecx, dword [esp + 0x114]
xor ecx, esp
call fcn.1016100c
add esp, 0x118
ret
jb 0x10163967
cmp dword [esp + 8], 1
jae 0x10163947
mov ecx, dword [esp + 0x114]
xor al, al
xor ecx, esp
call fcn.1016100c
add esp, 0x118
ret

Function at 0x10163980
Capabilities:
Check os version

Disassembly:
sub esp, 0x120
mov eax, dword [0x101ef110]
xor eax, esp
mov dword [esp + 0x11c], eax
push 0x118
lea eax, [esp + 8]
mov dword [esp + 4], 0x11c
push 0
push eax
call fcn.101652e0
add esp, 0xc
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x101639f6
mov eax, dword [esp + 4]
cmp eax, 6
ja 0x101639df
jne 0x101639f6
mov eax, dword [esp + 8]
cmp eax, 1
ja 0x101639df
jne 0x101639f6
cmp word [esp + 0x114], 1
jb 0x101639f6
mov al, 1
mov ecx, dword [esp + 0x11c]
xor ecx, esp
call fcn.1016100c
add esp, 0x120
ret
mov ecx, dword [esp + 0x11c]
xor al, al
xor ecx, esp
call fcn.1016100c
add esp, 0x120
ret
Function at 0x10163e50
Capabilities:
Get session user name

Disassembly:
sub esp, 0x214
mov eax, dword [0x101ef110]
xor eax, esp
mov dword [esp + 0x210], eax
push esi
mov esi, ecx
mov dword [esi], 0
cmp dword [0x101ef138], 0
jne 0x10163ed2
push 0x20a
lea eax, [esp + 0xc]
push 0
push eax
call fcn.101652e0
add esp, 0xc
mov dword [esp + 4], 0x104
lea eax, [esp + 4]
push eax
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
xor eax, eax
lea ecx, [esp + 8]
mov word [esp + 0x20e], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10163eb3
sub ecx, edx
lea eax, [esp + 8]
sar ecx, 1
push ecx
push eax
mov ecx, 0x101ef128
call fcn.100054b0
mov ecx, dword [esp + 0x214]
mov eax, esi
pop esi
xor ecx, esp
call fcn.1016100c
add esp, 0x214
ret

Function at 0x10163f80
Capabilities:
Get session user name

Disassembly:
push ebp
lea ebp, [esp - 0x210]
sub esp, 0x210
push 0xffffffffffffffff
push 0x101a4a38
mov eax, dword fs:[0]
push eax
sub esp, 0xc
mov eax, dword [0x101ef110]
xor eax, ebp
mov dword [ebp + 0x20c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [0x101f379c]
test eax, eax
jle 0x10163fd1
inc eax
mov dword [0x101f379c], eax
mov al, 1
jmp 0x101640c3
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x10], 0
xor bh, bh
mov dword [ebp - 0x14], 0
call fcn.10013ea0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x18]
call fcn.10014d50
mov bl, al
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.10013f20
test bl, bl
je 0x101640b3
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x101640b3
push str.ImpersonateLoggedOnUser
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push dword [ebp - 0x10]
call eax
test eax, eax
je 0x101640ac
inc dword [0x101f379c]
mov eax, dword [edi]
test eax, eax
je 0x10164056
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
mov bh, 1
mov dword [edi], eax
cmp dword [0x101ef150], 0
mov dword [ebp - 0x10], 0
jne 0x101640ac
push 0x20a
lea eax, [ebp]
push 0
push eax
call fcn.101652e0
add esp, 0xc
mov dword [ebp - 0x14], 0x104
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
xor eax, eax
mov ecx, 0x101ef140
mov word [ebp + 0x206], ax
lea eax, [ebp]
push eax
call fcn.1000e1e0
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x101640c1
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bh
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x20c]
xor ecx, ebp
call fcn.1016100c
lea esp, [ebp + 0x210]
pop ebp
ret

Function at 0x1017d76d
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1017d5ec

Function at 0x1018152c
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.101811ec
Function at 0x4031dd
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x407018]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0040311c
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x40322c
cmp dword [ebp - 0x1c], 5
jb 0x403244
jmp 0x403240
cmp dword [ebp - 0x10], 1
jne 0x403244
cmp dword [ebp - 0x1c], 4
ja 0x403240
jne 0x403244
cmp dword [ebp - 0x18], 0
jbe 0x403244
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x40523c
call fcn.004010e0
test eax, eax
jge 0x403265
mov byte [0x407580], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004034ec
add ebp, 0x78
leave
ret

Function at 0x4034ec
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x407018]
jne 0x4034f6
repz ret
jmp fcn.00403994
Function at 0x401540
Capabilities:
Create thread

Disassembly:
sub esp, 0x14
push esi
mov esi, ecx
push edi
or edi, 0xffffffff
cmp dword [esi + 0x10], edi
jne 0x401634
mov ax, word [esi + 4]
cmp ax, 1
jne 0x401563
push 6
push 1
jmp 0x40156c
test ax, ax
jne 0x401577
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x10], eax
cmp dword [esi + 0x10], edi
jne 0x401584
pop edi
xor eax, eax
pop esi
add esp, 0x14
ret
mov cx, word [esi + 6]
xor eax, eax
mov dword [esp + 0xc], eax
push ecx
mov dword [esp + 0x14], eax
mov word [esp + 0x10], 2
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0xe], ax
mov eax, dword [esi + 0x10]
lea edx, [esp + 0xc]
push 0x10
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, edi
jne 0x4015d7
mov ecx, dword [esi + 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x10], edi
pop edi
xor eax, eax
pop esi
add esp, 0x14
ret
mov ax, word [esi + 4]
cmp ax, 1
jne 0x401615
mov edx, dword [esi + 0x10]
push 0x10
push edx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, edi
jne 0x401606
mov eax, dword [esi + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x10], edi
pop edi
xor eax, eax
pop esi
add esp, 0x14
ret
lea ecx, [esp + 8]
push ecx
push 0
push esi
push 0x401ee0
jmp 0x401627
test ax, ax
jne 0x401634
lea edx, [esp + 8]
push edx
push 0
push esi
push 0x401f90
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0xc], eax
pop edi
mov eax, 1
pop esi
add esp, 0x14
ret
Function at 0x401b50
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
sub esp, 0x434
push ebx
push ebp
push esi
push edi
push eax
push ecx
call fcn.00401d40
mov ebp, eax
add esp, 8
cmp ebp, 0xffffffff
je 0x401c73
mov ecx, 5
mov esi, 0x4122a0
lea edi, [esp + 0x30]
lea edx, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
xor ebx, ebx
push ebx
push eax
lea eax, [esp + 0x38]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_send]
push ebx
lea ecx, [esp + 0x48]
push 0x400
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_recv]
push ebp
mov edi, eax
call dword [sym.imp.WS2_32.dll_closesocket]
cmp edi, 0xffffffff
je 0x401c73
cmp edi, 3
jl 0x401c73
mov eax, 4
xor edx, edx
cmp edi, eax
mov byte [esp + edi + 0x44], bl
mov byte [esp + 0x20], bl
mov byte [esp + 0x10], bl
jle 0x401c06
lea esi, [esp + 0x20]
lea ecx, [esp + 0x48]
sub esi, ecx
mov cl, byte [esp + eax + 0x44]
cmp cl, 0x20
je 0x401c06
lea ebp, [esi + eax]
inc edx
inc eax
cmp eax, edi
mov byte [esp + ebp + 0x44], cl
jl 0x401bf0
cmp eax, edi
mov byte [esp + edx + 0x20], bl
jge 0x401c2e
sub edi, eax
lea esi, [esp + eax + 0x44]
mov eax, edi
lea edi, [esp + 0x10]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [esp + eax + 0x10], bl
lea eax, [esp + 0x20]
push 0x41229c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
mov esi, dword [esp + 0x450]
push 0xa
neg eax
sbb eax, eax
lea ecx, [esp + 0x14]
inc eax
push ebx
push ecx
mov word [esi], ax
call fcn.00409585
add esp, 0xc
mov word [esi + 2], ax
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x434
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x434
ret 0xc

Function at 0x401c90
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
sub esp, 0x414
push esi
push eax
push ecx
call fcn.00401d40
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
jne 0x401cbc
xor eax, eax
pop esi
add esp, 0x414
ret 8
mov edx, dword [0x4122b4]
mov eax, dword [0x4122b8]
mov ecx, dword [0x4122bc]
mov dword [esp + 4], edx
mov edx, dword [0x4122c0]
mov dword [esp + 8], eax
mov ax, word [0x4122c4]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov cl, byte [0x4122c6]
lea edx, [esp + 4]
mov word [esp + 0x14], ax
push edx
mov byte [esp + 0x1a], cl
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
push eax
lea eax, [esp + 0xc]
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
push 0
lea ecx, [esp + 0x1c]
push 0x400
push ecx
push esi
call dword [sym.imp.WS2_32.dll_recv]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 1
pop esi
add esp, 0x414
ret 8
Function at 0x401d40
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 4], edi
jne 0x401d6b
or eax, eax
lea esp, [ebp - 0x20]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 8]
test ebx, ebx
jne 0x401d76
xor esi, esi
jmp 0x401da8
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.00408a80
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
mov word [ebp - 0x14], 2
push eax
call dword [sym.imp.WS2_32.dll_htons]
push esi
mov word [ebp - 0x12], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x401e07
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x401dea
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
lea esp, [ebp - 0x20]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov eax, ecx
lea edi, [ebp - 0x10]
mov esi, dword [edx]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 4]
lea ecx, [ebp - 0x14]
push 0x10
push ecx
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x401e2a
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 4]
lea esp, [ebp - 0x20]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

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

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
and eax, 0xffff
push edi
push eax
push ecx
call fcn.00401d40
mov edi, eax
add esp, 8
cmp edi, 0xffffffff
jne 0x4022a3
xor eax, eax
pop edi
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebp
push esi
mov esi, dword [esp + 0x1c]
push 0
push esi
call ebx
push eax
push esi
push edi
call dword [sym.imp.WS2_32.dll_send]
push edi
mov ebp, eax
call dword [sym.imp.WS2_32.dll_closesocket]
push esi
call ebx
xor edx, edx
cmp ebp, eax
pop esi
pop ebp
sete dl
pop ebx
mov eax, edx
pop edi
ret
Function at 0x4022e0
Capabilities:
Create udp socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 4], edi
jne 0x40230b
xor eax, eax
lea esp, [ebp - 0x20]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 8]
test ebx, ebx
jne 0x402316
xor esi, esi
jmp 0x402348
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.00408a80
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
mov word [ebp - 0x14], 2
push eax
call dword [sym.imp.WS2_32.dll_htons]
push esi
mov word [ebp - 0x12], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x4023a6
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x402389
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
lea esp, [ebp - 0x20]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov eax, ecx
lea edi, [ebp - 0x10]
mov esi, dword [edx]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 4]
mov esi, dword [ebp + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp - 0x14]
push 0x10
push ecx
push 0
push esi
call ebx
push eax
push esi
push edi
call dword [sym.imp.WS2_32.dll_sendto]
push edi
mov dword [ebp + 8], eax
call dword [sym.imp.WS2_32.dll_closesocket]
push esi
call ebx
mov ecx, dword [ebp + 8]
xor edx, edx
lea esp, [ebp - 0x20]
cmp ecx, eax
sete dl
pop edi
pop esi
mov eax, edx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x402600
Capabilities:
Create thread

Disassembly:
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 0x10]
test eax, eax
je 0x402613
mov eax, 1
pop esi
pop ecx
ret
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x40262b
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esi + 0xc], eax
lea eax, [esp + 4]
push eax
push 0
push esi
push 0x4023f0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
xor ecx, ecx
mov dword [esi + 0x10], eax
test eax, eax
setne cl
mov eax, ecx
pop esi
pop ecx
ret
Function at 0x4029c0
Capabilities:
Access the windows event log

Disassembly:
sub esp, 0x104
mov ecx, dword [esp + 0x10c]
lea eax, [esp + 0x110]
push esi
push eax
lea edx, [esp + 0xc]
push ecx
push edx
call fcn.00409a08
lea eax, [esp + 0x14]
add esp, 0xc
mov dword [esp + 4], eax
mov eax, dword [esp + 0x10c]
mov ecx, dword [eax + 0x1a8]
test ecx, ecx
je 0x402a3a
add eax, 0x84
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
test esi, esi
je 0x402a47
lea ecx, [esp + 4]
push 0
push ecx
push 0
push 1
push 0
push 0
push 0
push 4
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop esi
add esp, 0x104
ret
lea edx, [esp + 8]
push edx
call fcn.00409990
add esp, 4
pop esi
add esp, 0x104
ret
Function at 0x403250
Capabilities:
Create service

Disassembly:
sub esp, 0x120
push ebx
push ebp
push esi
mov ebp, ecx
call fcn.00402970
test eax, eax
jne 0x403327
push 0xf003f
push eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x40329b
add ebp, 0x84
push eax
push ebp
push str.Couldnt_open_service_manager
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret
push edi
lea eax, [esp + 0x2c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, 6
mov esi, str.Kingdee_iMTS_Event_Server
lea edi, [esp + 0x10]
push 0
rep movsd dword es:[edi], dword [esi]
push 0
push str.RPCSS
push 0
lea ecx, [esp + 0x3c]
push 0
push ecx
push 1
push 3
movsw word es:[edi], word [esi]
push 0x110
lea edx, [esp + 0x34]
lea esi, [ebp + 0x84]
push 0xf01ff
push edx
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
pop edi
jne 0x40331b
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0
push esi
push str.Couldnt_create_service
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
push ebx
call esi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x120
ret

Function at 0x403340
Capabilities:
Delete service
Stop service

Disassembly:
sub esp, 0x1c
push ebp
push esi
push edi
mov ebp, ecx
call fcn.00402970
test eax, eax
jne 0x40335d
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x1c
ret
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x40338f
add ebp, 0x84
push eax
push ebp
push str.Couldnt_open_service_manager
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x1c
ret
add ebp, 0x84
push 0x10020
push ebp
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x4033c6
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
push ebp
push str.Couldnt_open_service
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x1c
ret
lea eax, [esp + 0xc]
push ebx
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, eax
call esi
push edi
call esi
test ebx, ebx
pop ebx
je 0x4033fb
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x1c
ret
push 0
push ebp
push str.Service_could_not_be_deleted
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x1c
ret