joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403e44
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push 0x418ea4
call fcn.00403cd9
xor esi, esi
mov dword [esp], 0x1388
push esi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
lea ecx, [ebp + 0x14]
mov dword [ebp - 4], eax
push ecx
push dword [ebp + 0x10]
push eax
call fcn.0040c9bb
mov eax, dword [ebp + 8]
add esp, 0xc
cmp dword [eax + 0x750], 2
jne 0x403ebc
push 0x418e3c
push esi
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov edi, eax
cmp edi, esi
jne 0x403ea0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x403ed0
lea eax, [ebp - 4]
push esi
push eax
push esi
push 1
push esi
push esi
push esi
push dword [ebp + 0xc]
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push edi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0x418e94
call fcn.00403cd9
pop ecx
pop edi
pop esi
leave
ret
Function at 0x405160
Capabilities:
Accept command line arguments
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x808
push esi
lea eax, [ebp - 8]
push edi
push eax
mov dword [ebp - 8], 8
mov dword [ebp - 4], 0x900
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov edi, dword [ebp + 8]
mov dword [0x41f880], edi
call fcn.0040bbe0
lea eax, [ebp - 0x808]
push eax
call fcn.0040a62e
pop ecx
call fcn.0040511a
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineA]
lea eax, [ebp - 0x808]
push eax
call esi
push eax
call fcn.00402ace
pop ecx
test eax, eax
pop ecx
jne 0x4051cb
lea eax, [ebp - 0x808]
push eax
call fcn.0040a6fe
pop ecx
push 0x4190ec
push 0x419244
call fcn.00403cd9
pop ecx
pop ecx
call esi
push eax
push 0x419234
call fcn.00403cd9
xor esi, esi
pop ecx
cmp word [0x41f30c], si
pop ecx
je 0x405203
lea eax, [ebp - 0x808]
push eax
call fcn.0040b211
pop ecx
cmp dword [ebp - 0xb8], 2
lea eax, [ebp - 0xb4]
push eax
jne 0x40522c
push dword [ebp - 0xbc]
push dword [ebp - 0xc0]
push dword [ebp - 0xc4]
push 0x4191fc
jmp 0x405245
movzx eax, word [ebp - 0xbc]
push eax
push dword [ebp - 0xc0]
push dword [ebp - 0xc4]
push 0x4191c4
call fcn.00403cd9
add esp, 0x14
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x808]
push esi
push eax
push 0x40a3ae
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0x75
push dword [0x41f880]
call dword [sym.imp.USER32.dll_LoadMenuA]
mov dword [0x41f884], eax
lea eax, [ebp - 0x808]
push eax
push dword [ebp + 0x14]
push edi
push esi
call fcn.004050d5
add esp, 0x10
test eax, eax
je 0x4052f1
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
push esi
push esi
lea eax, [ebp - 0x28]
push esi
push eax
call edi
cmp eax, 1
jne 0x4052d6
lea eax, [ebp - 0x28]
push eax
push dword [0x41f888]
call dword [sym.imp.USER32.dll_IsDialogMessageA]
test eax, eax
jne 0x4052cd
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push esi
push esi
lea eax, [ebp - 0x28]
push esi
push eax
jmp 0x40529e
push 0x4191b0
call fcn.00403cd9
lea eax, [ebp - 0x808]
push eax
call fcn.004052f7
mov eax, dword [ebp - 0x20]
pop ecx
pop ecx
pop edi
pop esi
leave
ret 0x10
Function at 0x405710
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
push dword [esi]
push dword [ebp + 0xc]
push 0x41945c
call fcn.00403cd9
mov edi, dword [ebp + 0x10]
add esp, 0xc
cmp dword [edi], 0
jne 0x405741
push dword [esi]
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [edi], eax
push dword [edi]
push 0x419450
call fcn.00403cd9
pop ecx
mov ebx, 0xea
pop ecx
mov eax, dword [esi]
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push dword [edi]
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push eax
push 0x419448
mov dword [ebp + 0x14], eax
call fcn.00403cd9
cmp dword [ebp + 0x14], ebx
pop ecx
pop ecx
jne 0x4057b0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_LocalFree]
add dword [esi], 0x400
push dword [esi]
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [edi], eax
push dword [esi]
push eax
push 0x419434
call fcn.00403cd9
add esp, 0xc
cmp dword [edi], 0
je 0x4057bc
cmp dword [ebp + 0x14], ebx
jne 0x4057d4
jmp 0x405754
push dword [edi]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x419408
call fcn.00403cd9
pop ecx
push 8
pop eax
jmp 0x4057e6
push dword [ebp + 0x14]
push 0x4193ec
call fcn.00403cd9
mov eax, dword [ebp + 0x14]
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4062c5
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push dword [ebp + 0x14]
call fcn.0040c940
mov esi, eax
pop ecx
lea eax, [ebp - 8]
inc esi
push eax
lea eax, [ebp - 4]
push eax
push 0
push 0x20006
push 0
push 0x419a68
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40631d
push esi
push dword [ebp + 0x14]
push 1
push eax
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x406321
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x40632c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
pop esi
leave
ret

Function at 0x40632f
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0xc]
push eax
push 0
push 0x20006
push 0
push 0x419a70
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40637b
lea eax, [ebp + 0x14]
push 4
push eax
push 4
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40637f
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
pop ebp
ret
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
pop ebp
ret

Function at 0x40638c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp + 0xc]
push esi
push eax
push 1
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4063d7
lea eax, [ebp + 0x18]
push eax
lea eax, [ebp + 8]
push dword [ebp + 0x14]
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp + 0xc]
mov esi, eax
test esi, esi
je 0x4063db
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x4063e3
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
pop esi
pop ebp
ret

Function at 0x4063e6
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp + 0xc]
push esi
push eax
push 1
push 0
mov dword [ebp - 4], 4
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406439
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 8]
push dword [ebp + 0x14]
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp + 0xc]
mov esi, eax
test esi, esi
je 0x40643d
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x406445
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
pop esi
leave
ret
Function at 0x406448
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
lea eax, [ebp + 0xc]
push esi
push eax
push 1
push 0
mov dword [ebp - 4], 4
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40649d
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 8]
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp + 0xc]
mov esi, eax
test esi, esi
je 0x4064a1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x4064b3
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0x14]
mov cx, word [ebp + 8]
mov word [eax], cx
mov al, 1
pop esi
leave
ret

Function at 0x4064b6
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp + 0xc]
push esi
push eax
push 2
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4064f4
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push dword [ebp + 0xc]
mov esi, eax
test esi, esi
je 0x4064f8
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x406500
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
pop esi
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1f4
push esi
push 0x41a2e4
call fcn.00403cd9
mov esi, dword [ebp + 0xc]
pop ecx
cmp dword [esi + 0x124], 0xffffffff
je 0x4083be
push dword [ebp + 0x10]
lea eax, [ebp - 0x1f4]
push 0x1f5
push 0x41a2dc
push eax
call fcn.0040c81c
lea eax, [ebp - 0x1f4]
push eax
push 0x41a2c0
call fcn.00403cd9
add esp, 0x18
lea eax, [ebp - 0x1f4]
push 0
push eax
call fcn.0040c940
pop ecx
push eax
lea eax, [ebp - 0x1f4]
push eax
push dword [esi + 0x124]
call dword [sym.imp.WSOCK32.dll_send]
cmp eax, 0xffffffff
jne 0x4083be
push 0x41a2b8
push esi
call fcn.0040b6b6
push esi
push dword [ebp + 8]
call fcn.0040bf4b
add esp, 0x10
jmp 0x4083c9
push 0x41a2a0
call fcn.00403cd9
pop ecx
pop esi
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3e8
push esi
push 0x41a330
call fcn.00403cd9
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp - 0x3e8]
push dword [ebp + 0x10]
push eax
call fcn.0040c9bb
lea eax, [ebp - 0x3e8]
push eax
push 0xc9
lea eax, [ebp - 0x1f4]
push 0x41a2dc
push eax
call fcn.0040c81c
lea eax, [ebp - 0x1f4]
push eax
push 0x41a314
call fcn.00403cd9
add esp, 0x28
lea eax, [ebp - 0x1f4]
push 0
push eax
call fcn.0040c940
mov esi, dword [ebp + 0xc]
pop ecx
push eax
lea eax, [ebp - 0x1f4]
push eax
push dword [esi + 0x124]
call dword [sym.imp.WSOCK32.dll_send]
cmp eax, 0xffffffff
jne 0x408468
push 0x41a2b8
push esi
call fcn.0040b6b6
push esi
push dword [ebp + 8]
call fcn.0040bf4b
add esp, 0x10
jmp 0x408473
push 0x41a2fc
call fcn.00403cd9
pop ecx
pop esi
leave
ret
Function at 0x408476
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push 0x41a37c
call fcn.00403cd9
push 0xfa
lea eax, [ebp - 0xc]
push 0x41a374
push eax
call fcn.0040c81c
lea eax, [ebp - 0xc]
push eax
push 0x41a35c
call fcn.00403cd9
add esp, 0x18
lea eax, [ebp - 0xc]
push 0
push eax
call fcn.0040c940
mov esi, dword [ebp + 0xc]
pop ecx
push eax
lea eax, [ebp - 0xc]
push eax
push dword [esi + 0x124]
call dword [sym.imp.WSOCK32.dll_send]
cmp eax, 0xffffffff
jne 0x4084e9
push 0x41a2b8
push esi
call fcn.0040b6b6
push esi
push dword [ebp + 8]
call fcn.0040bf4b
add esp, 0x10
jmp 0x4084f4
push 0x41a348
call fcn.00403cd9
pop ecx
pop esi
leave
ret
Function at 0x409f47
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push ebx
push esi
push edi
push 0x41b25c
call fcn.00403cd9
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x104]
push eax
push ebx
push dword [ebp + 8]
call fcn.00409cd3
add esp, 0x10
test eax, eax
je 0x40a096
push ebx
mov esi, reloc.WSOCK32.dll_bind
push 0x4186bc
push esi
call fcn.0040a791
add esp, 0xc
cmp dword [ebx + 0x750], 1
jne 0x409fce
push 0x41b244
call fcn.00403cd9
lea eax, [ebp - 0x104]
push eax
push 0x4190e0
push 0x41b20c
push esi
call fcn.004062c5
add esp, 0x14
test al, al
je 0x409feb
push 0x41b1f0
push dword [ebp + 8]
push ebx
jmp 0x40a083
push 0x41b1d4
call fcn.00403cd9
pop ecx
xor esi, esi
push 2
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
cmp edi, esi
jne 0x409ffa
push dword [ebp + 8]
push ebx
call fcn.00403ed4
pop ecx
jmp 0x40a095
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x104]
push esi
push eax
push 1
push 2
push 0x110
mov eax, 0x4190e0
push 0xf0010
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebx, eax
cmp ebx, esi
jne 0x40a03e
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.00403ed4
pop ecx
pop ecx
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40a096
push 0x41b1c0
call fcn.00403cd9
pop ecx
push esi
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x40a071
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.00403ed4
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ecx
pop ecx
push ebx
call esi
push edi
call esi
jmp 0x40a096
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x41b1a8
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.00403df2
add esp, 0xc
push 0x41b18c
call fcn.00403cd9
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a09b
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 0x41b2f4
call fcn.00403cd9
mov ebx, dword [ebp + 0xc]
pop ecx
cmp dword [ebx + 0x750], 1
jne 0x40a0e9
push 0x41b2dc
call fcn.00403cd9
mov dword [esp], 0x4190e0
push 0x41b20c
push reloc.WSOCK32.dll_bind
call fcn.004064b6
add esp, 0xc
test al, al
je 0x40a10a
push 0x41b2c0
jmp 0x40a169
push 0x41b2ac
call fcn.00403cd9
mov dword [esp], 0x40000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x40a117
push dword [ebp + 8]
push ebx
call fcn.00403ed4
pop ecx
pop ecx
jmp 0x40a191
push 0x10000
push 0x4190e0
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x40a142
push dword [ebp + 8]
push ebx
call fcn.00403ed4
pop ecx
pop ecx
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40a191
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x40a158
push dword [ebp + 8]
push ebx
call fcn.00403ed4
pop ecx
pop ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
push 0x41b294
push dword [ebp + 8]
push ebx
call fcn.00403df2
add esp, 0xc
push 0x4186bc
push reloc.WSOCK32.dll_bind
call fcn.00406503
push 0x41b278
call fcn.00403cd9
add esp, 0xc
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x40a460
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
push edi
push 0x41b44c
call fcn.00403cd9
mov eax, dword [ebp + 0xc]
pop ecx
cmp dword [eax + 0x750], 1
je 0x40a4e9
push closesocket
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x40a4e9
push 4
push 0x4190e0
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x40a4b1
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40a4e9
lea eax, [ebp - 0x1c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jne 0x40a4ce
call esi
push edi
call esi
jmp 0x40a4e9
call esi
push edi
call esi
cmp dword [ebp - 0x18], 4
jne 0x40a4de
push 1
pop eax
jmp 0x40a4eb
push 0x41b42c
call fcn.00403cd9
pop ecx
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x40a4ef
Capabilities:
Start service

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 0x41b488
call fcn.00403cd9
mov esi, dword [ebp + 0xc]
pop ecx
cmp dword [esi + 0x750], 1
je 0x40a57e
push 0x40000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x40a52c
push dword [ebp + 8]
push esi
call fcn.00403ed4
pop ecx
jmp 0x40a588
push 0x10
push 0x4190e0
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x40a556
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.00403ed4
pop ecx
pop ecx
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40a589
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x40a572
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.00403ed4
pop ecx
pop ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
push 0x41b46c
call fcn.00403cd9
pop ecx
pop edi
pop esi
pop ebp
ret

Function at 0x40a58d
Capabilities:
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
push 0x41b4bc
call fcn.00403cd9
mov ebx, dword [ebp + 0xc]
pop ecx
cmp dword [ebx + 0x750], 1
je 0x40a61e
push 0x40000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x40a5ce
push dword [ebp + 8]
push ebx
call fcn.00403ed4
pop ecx
jmp 0x40a628
push 0x20
push 0x4190e0
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x40a5f6
push dword [ebp + 8]
push ebx
call fcn.00403ed4
pop ecx
pop ecx
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40a629
lea eax, [ebp - 0x1c]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40a612
push dword [ebp + 8]
push ebx
call fcn.00403ed4
pop ecx
pop ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
push 0x41b4a4
call fcn.00403cd9
pop ecx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40bbe0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
push 0x41c4bc
call fcn.00403cd9
pop ecx
lea eax, [ebp - 0x190]
push eax
push 0x101
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
je 0x40bc1a
push 0x41c48c
call fcn.00403cd9
pop ecx
or eax, 0xffffffff
leave
ret
cmp byte [ebp - 0x190], 1
jne 0x40bc3e
xor eax, eax
mov al, byte [ebp - 0x18f]
cmp al, 1
jne 0x40bc3e
push 0x41c474
call fcn.00403cd9
pop ecx
xor eax, eax
leave
ret
call dword [sym.imp.WSOCK32.dll_WSACleanup]
movzx eax, byte [ebp - 0x190]
push eax
xor eax, eax
mov al, byte [ebp - 0x18f]
movzx eax, al
push eax
push 0x41c44c
call fcn.00403cd9
add esp, 0xc
push 0xfffffffffffffffe
pop eax
leave
ret
Function at 0x40bcaa
Capabilities:
Create tcp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
push 0x41c540
call fcn.00403cd9
mov esi, dword [ebp + 0xc]
or edi, 0xffffffff
pop ecx
cmp dword [esi + 0x120], edi
je 0x40bcd6
push esi
push dword [ebp + 8]
call fcn.0040bf99
pop ecx
pop ecx
push 6
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, edi
mov dword [esi + 0x120], eax
jne 0x40bcf3
push 0x41c538
jmp 0x40bd6b
mov ax, word [esi + 0x228]
mov word [ebp - 0x10], 2
push eax
call dword [sym.imp.WSOCK32.dll_htons]
push 0
mov word [ebp - 0xe], ax
call dword [sym.imp.WSOCK32.dll_htonl]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push 0x10
push eax
push dword [esi + 0x120]
call dword [sym.imp.WSOCK32.dll_bind]
cmp eax, edi
jne 0x40bd33
push 0x41c530
jmp 0x40bd6b
push 1
push dword [esi + 0x120]
call dword [sym.imp.WSOCK32.dll_listen]
cmp eax, edi
jne 0x40bd4c
push 0x41c528
jmp 0x40bd6b
push 8
push 0x3e8
push dword [ebp + 8]
push dword [esi + 0x120]
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
cmp eax, edi
jne 0x40bd77
push 0x41c518
push esi
call fcn.0040b6b6
pop ecx
mov eax, edi
pop ecx
jmp 0x40bd84
push 0x41c500
call fcn.00403cd9
pop ecx
xor eax, eax
pop edi
pop esi
leave
ret

Function at 0x40be39
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
mov al, byte [0x41f314]
push ebx
push esi
push edi
push 0x19
mov byte [ebp - 0x70], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x6f]
push 0x41c618
rep stosd dword es:[edi], eax
call fcn.00403cd9
mov esi, dword [ebp + 0xc]
pop ecx
push 0
lea eax, [ebp - 0x70]
push 0x64
push eax
push dword [esi + 0x124]
call dword [sym.imp.WSOCK32.dll_recv]
mov ebx, eax
test ebx, ebx
jne 0x40be8c
push esi
push dword [ebp + 8]
call fcn.0040bf4b
pop ecx
pop ecx
jmp 0x40bf39
cmp ebx, 0xffffffff
jne 0x40beaf
push 0x41a2b8
push esi
call fcn.0040b6b6
push esi
push dword [ebp + 8]
call fcn.0040bf4b
add esp, 0x10
or eax, ebx
jmp 0x40bf46
and byte [ebp + ebx - 0x70], 0
lea eax, [ebp - 0x70]
push eax
push 0x41c5f8
call fcn.00403cd9
and dword [ebp - 8], 0
pop ecx
test ebx, ebx
pop ecx
jle 0x40bf39
mov edi, 0x41f360
mov eax, dword [ebp - 8]
lea esi, [ebp + eax - 0x70]
mov al, byte [ebp + eax - 0x70]
cmp al, 0xa
jne 0x40bef8
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00408dbf
add esp, 0xc
and byte [0x41f360], 0
jmp 0x40bf31
cmp al, 0xd
je 0x40bf31
push edi
call fcn.0040c940
cmp eax, 0x1f4
pop ecx
jb 0x40bf1c
push 0x41c5e4
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040832f
jmp 0x40beec
mov al, byte [esi]
and byte [ebp - 1], 0
mov byte [ebp - 2], al
lea eax, [ebp - 2]
push eax
push edi
call fcn.0040c6b0
pop ecx
pop ecx
inc dword [ebp - 8]
cmp dword [ebp - 8], ebx
jl 0x40bed1
push 0x41c5c8
call fcn.00403cd9
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40c41f
Capabilities:
Set socket configuration

Disassembly:
push ebx
push esi
push edi
push 0x41c798
call fcn.00403cd9
mov esi, dword [sym.imp.WSOCK32.dll_inet_addr]
pop ecx
push dword [esp + 0x14]
call esi
mov edi, dword [sym.imp.WSOCK32.dll_ntohl]
push eax
call edi
push dword [esp + 0x18]
mov ebx, eax
call esi
push eax
call edi
mov ecx, eax
and ecx, ebx
not eax
or ecx, eax
push ecx
call dword [sym.imp.WSOCK32.dll_htonl]
push eax
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
push eax
push dword [esp + 0x14]
call fcn.0040c6a0
push dword [esp + 0x18]
push 0x41c778
call fcn.00403cd9
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
ret