joyce8/EMBER2024-capa huggingface dataset:
Function at 0x658ded
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x65f3a8
cmp edx, dword [eax]
je 0x658e0f
add eax, 8
inc ecx
cmp eax, 0x65f438
jl 0x658e00
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x65f3a8]
jne 0x658f3d
mov eax, dword [0xa5be04]
cmp eax, 1
je 0x658f17
test eax, eax
jne 0x658e40
cmp dword [0x65f2d4], 1
je 0x658f17
cmp edx, 0xfc
je 0x658f3d
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x658e77
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.006597d0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00659c60
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x658eba
lea eax, [ebp - 0x1a4]
push eax
call fcn.00659c60
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x65e4d4
push edi
call fcn.0065bb30
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.006597d0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.006597e0
lea eax, [ebp - 0xa0]
push 0x65e4b4
push eax
call fcn.006597e0
push dword [esi + 0x65f3ac]
lea eax, [ebp - 0xa0]
push eax
call fcn.006597e0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0065baa4
add esp, 0x2c
pop edi
jmp 0x658f3d
lea eax, [ebp + 8]
lea esi, [esi + 0x65f3ac]
push 0
push eax
push dword [esi]
call fcn.00659c60
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x4010f0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401109
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x401144
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x401140
lea ebx, [ebx]
cmp esi, eax
jae 0x401144
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401130
cmp esi, eax
jb 0x40114a
pop esi
pop edi
xor eax, eax
pop ebx
ret
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret
Function at 0x407092
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
je 0x4070d8
call fcn.004087de
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x4070d8
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [ebp - 4], eax
je 0x40711b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], 1
je 0x407104
push dword [ebp + 0x10]
mov eax, dword [edi]
push ebx
push esi
mov ecx, edi
call dword [eax + 0x20]
cmp dword [ebp - 4], 0
mov dword [ebp + 0xc], eax
je 0x407104
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [esi + 0x4c], 0
je 0x407118
mov ecx, dword [esi + 0x4c]
push dword [ebp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0xa0]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x408d8b
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x408db9
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x408dd7
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00408cf5
jmp 0x408dd7
mov eax, dword [esi + 0x14]
test eax, eax
je 0x408dd7
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
push eax
mov ecx, esi
call fcn.00408cf5
test edi, edi
mov eax, edi
jne 0x408dc1
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
mov ecx, dword [0x446aac]
test ecx, ecx
je 0x408e9a
jmp 0x408d8a
ret 8

Function at 0x40ee0b
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push ebp
push esi
push edi
xor edi, edi
xor ebx, ebx
cmp dword [esp + 0x14], edi
mov ebp, ecx
je 0x40ee4e
call fcn.004087de
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x40ee4e
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x40ee69
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
push ebx
mov ecx, ebp
call fcn.0040e9c2
test ebx, ebx
mov esi, eax
je 0x40ee67
test edi, edi
je 0x40ee67
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x41f76e
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x445504]
jne 0x41f778
repz ret
jmp fcn.0042865c
Function at 0x43028d
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00425ded
xor ebx, ebx
cmp dword [0x4492dc], ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
jne 0x430362
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
jne 0x4302cd
xor eax, eax
jmp 0x430426
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x43bef4
push edi
call esi
cmp eax, ebx
je 0x4302c6
push eax
call fcn.00425d8a
mov dword [esp], 0x43bee4
push edi
mov dword [0x4492dc], eax
call esi
push eax
call fcn.00425d8a
mov dword [esp], 0x43bed0
push edi
mov dword [0x4492e0], eax
call esi
push eax
call fcn.00425d8a
mov dword [0x4492e4], eax
lea eax, [ebp - 8]
push eax
call fcn.00421947
test eax, eax
pop ecx
pop ecx
je 0x430330
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00424f6f
add esp, 0x14
cmp dword [ebp - 8], 2
jne 0x430362
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00425d8a
cmp eax, ebx
pop ecx
mov dword [0x4492ec], eax
je 0x430362
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00425d8a
pop ecx
mov dword [0x4492e8], eax
mov eax, dword [0x4492e8]
mov esi, dword [ebp - 0x10]
cmp eax, esi
je 0x4303db
cmp dword [0x4492ec], esi
je 0x4303db
push eax
call fcn.00425df6
pop ecx
call eax
cmp eax, ebx
je 0x4303a8
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
push dword [0x4492ec]
call fcn.00425df6
pop ecx
call eax
test eax, eax
je 0x4303a8
test byte [ebp - 0x18], 1
jne 0x4303db
lea eax, [ebp - 0xc]
push eax
call fcn.0042197e
test eax, eax
pop ecx
je 0x4303c3
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00424f6f
add esp, 0x14
cmp dword [ebp - 0xc], 4
jb 0x4303d2
or dword [ebp + 0x10], 0x200000
jmp 0x43040c
or dword [ebp + 0x10], 0x40000
jmp 0x43040c
mov eax, dword [0x4492e0]
cmp eax, esi
je 0x43040c
push eax
call fcn.00425df6
pop ecx
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x43040c
mov eax, dword [0x4492e4]
cmp eax, esi
je 0x43040c
push dword [ebp - 4]
push eax
call fcn.00425df6
pop ecx
call eax
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
push dword [0x4492dc]
call fcn.00425df6
pop ecx
call eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x434366
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x445504]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.004342fb
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 fcn.0041f780
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 0x4343b5
cmp dword [ebp - 0x1c], 5
jb 0x4343cd
jmp 0x4343c9
cmp dword [ebp - 0x10], 1
jne 0x4343cd
cmp dword [ebp - 0x1c], 4
ja 0x4343c9
jne 0x4343cd
cmp dword [ebp - 0x18], 0
jbe 0x4343cd
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x43c7c4
call fcn.004341cf
test eax, eax
jge 0x4343ee
mov byte [0x4469f0], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0041f76e
add ebp, 0x78
leave
ret

Function at 0x10001050
Capabilities:
Allocate or change rwx memory
Create process on windows
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x328
push 0x44
lea eax, [ebp - 0x5c]
push eax
call section..text
add esp, 8
mov dword [ebp - 0x5c], 0x44
call fcn.100011a0
test eax, eax
je 0x1000115e
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x5c]
push edx
push 0
push 0
push 0x1000044
push 1
push 0
push 0
push 0x1000420c
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x100010cc
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x5c]
push ecx
push 0
push 0
push 0x44
push 1
push 0
push 0
push str.rundll32.exe
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x1000115e
mov dword [ebp - 0x328], 0x10003
lea edx, [ebp - 0x328]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
push 0x40
push 0x1000
push 0x1000
push 0
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 8], eax
push 0
push 0x1000
push section..data
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x270], ecx
lea edx, [ebp - 0x328]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
call dword [sym.imp.KERNEL32.dll_ExitThread]
Function at 0x10001100
Capabilities:
Link many functions at runtime
Terminate thread

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov edi, dword [sym.imp.msvcrt.dll_puts]
push 0x100160a0
mov dword [esi], 0x10013388
call edi
mov eax, dword [0x10018410]
mov ebx, dword [sym.imp.kernel32.dll_GetProcAddress]
add esp, 4
push str.waveInReset
push eax
call ebx
mov ebp, dword [sym.imp.kernel32.dll_Sleep]
push 0
mov dword [esp + 0x18], eax
call ebp
push 0x100160a0
call edi
mov ecx, dword [0x10018410]
add esp, 4
push str.waveInStop
push ecx
call ebx
push 0
mov dword [esp + 0x14], eax
call ebp
push 0x100160a0
call edi
mov edx, dword [0x10018410]
add esp, 4
push str.waveInClose
push edx
call ebx
push 0
mov dword [esp + 0x20], eax
call ebp
push 0x100160a0
call edi
mov eax, dword [0x10018410]
add esp, 4
push str.waveInUnprepareHeader
push eax
call ebx
push 0
mov dword [esp + 0x1c], eax
call ebp
push 0x100160a0
call edi
mov ecx, dword [0x10018410]
add esp, 4
push str.waveOutReset
push ecx
call ebx
push 0
mov dword [esp + 0x24], eax
call ebp
push 0x100160a0
call edi
mov edx, dword [0x10018410]
add esp, 4
push str.waveOutClose
push edx
call ebx
push 0
mov dword [esp + 0x28], eax
call ebp
push 0x100160a0
call edi
mov eax, dword [0x10018410]
add esp, 4
push str.waveOutUnprepareHeader
push eax
call ebx
push 0
mov ebx, eax
call ebp
mov al, byte [esi + 0x44]
test al, al
je 0x10001242
mov ecx, dword [esi + 0x18]
push ecx
call dword [esp + 0x14]
mov edx, dword [esi + 0x18]
push edx
call dword [esp + 0x18]
lea edi, [esi + 0x30]
mov ebp, 2
mov eax, dword [edi]
mov ecx, dword [esi + 0x18]
push 0x20
push eax
push ecx
call dword [esp + 0x24]
add edi, 4
dec ebp
jne 0x1000121b
mov edx, dword [esi + 0x18]
push edx
call dword [esp + 0x20]
mov eax, dword [esi + 0x2c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.kernel32.dll_TerminateThread]
mov al, byte [esi + 0x45]
test al, al
je 0x10001272
mov ecx, dword [esi + 0x40]
push ecx
call dword [esp + 0x24]
lea edi, [esi + 0x30]
mov ebp, 2
mov edx, dword [edi]
mov eax, dword [esi + 0x40]
push 0x20
push edx
push eax
call ebx
add edi, 4
dec ebp
jne 0x10001259
mov ecx, dword [esi + 0x40]
push ecx
call dword [esp + 0x28]
lea edi, [esi + 0x30]
mov ebx, 2
mov edx, dword [edi - 0x28]
push edx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
mov eax, dword [edi]
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
mov ecx, dword [edi - 0x20]
push ecx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
mov edx, dword [edi + 8]
push edx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 0x10
add edi, 4
dec ebx
jne 0x1000127a
mov eax, dword [esi + 0x24]
mov edi, dword [sym.imp.kernel32.dll_CloseHandle]
push eax
call edi
mov ecx, dword [esi + 0x28]
push ecx
call edi
mov edx, dword [esi + 0x2c]
push edx
call edi
mov eax, dword [0x10018410]
push eax
call dword [sym.imp.kernel32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
Function at 0x100013d0
Capabilities:
Create thread
Link many functions at runtime
Resume thread

Disassembly:
mov eax, dword [0x10018410]
sub esp, 8
push ebx
push ebp
push esi
mov esi, dword [sym.imp.kernel32.dll_GetProcAddress]
push edi
push str.waveInGetNumDevs
mov edi, ecx
push eax
call esi
call eax
test eax, eax
jne 0x100013fc
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret
mov ecx, dword [0x10018410]
push str.waveInOpen
push ecx
call esi
lea edx, [esp + 0x10]
mov ebp, eax
push edx
push 4
push edi
push 0x100015c0
push 0
push 0
mov dword [esp + 0x28], 0
call dword [sym.imp.kernel32.dll_CreateThread]
mov dword [edi + 0x2c], eax
mov eax, dword [esp + 0x10]
push 0x20000
push 0
lea ecx, [edi + 0x46]
push eax
lea ebx, [edi + 0x18]
push ecx
push 0xffff
push ebx
call ebp
test eax, eax
je 0x10001457
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret
mov edx, dword [0x10018410]
push str.waveInPrepareHeader
push edx
call esi
mov dword [esp + 0x14], eax
lea esi, [edi + 0x30]
mov ebp, 2
mov eax, dword [esi]
mov ecx, dword [esi - 0x28]
push 0x20
mov dword [eax], ecx
mov edx, dword [esi]
mov eax, dword [edi + 4]
mov dword [edx + 4], eax
mov ecx, dword [esi]
xor eax, eax
mov dword [ecx + 0x10], eax
mov edx, dword [esi]
mov dword [edx + 0x14], eax
mov eax, dword [esi]
mov ecx, dword [ebx]
push eax
push ecx
call dword [esp + 0x20]
add esi, 4
dec ebp
jne 0x10001471
mov edx, dword [0x10018410]
mov esi, dword [sym.imp.kernel32.dll_GetProcAddress]
push str.waveInAddBuffer
push edx
call esi
mov ecx, dword [edi + 0x1c]
push 0x20
mov edx, dword [edi + ecx*4 + 0x30]
mov ecx, dword [ebx]
push edx
push ecx
call eax
mov edx, dword [edi + 0x2c]
push edx
call dword [sym.imp.kernel32.dll_ResumeThread]
mov eax, dword [0x10018410]
push str.waveInStart
push eax
call esi
mov ecx, dword [ebx]
push ecx
call eax
mov al, 1
mov byte [edi + 0x44], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret

Function at 0x10001db0
Capabilities:
Initialize winsock library

Disassembly:
push 0xffffffffffffffff
push 0x10012aba
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x198
push esi
mov esi, ecx
push edi
mov dword [esp + 8], esi
lea ecx, [esi + 4]
call fcn.10001960
lea ecx, [esi + 0x2c]
mov dword [esp + 0x1a8], 0
call fcn.10001960
lea ecx, [esi + 0x54]
mov byte [esp + 0x1a8], 1
call fcn.10001960
lea ecx, [esi + 0x7c]
mov byte [esp + 0x1a8], 2
call fcn.10001960
lea eax, [esp + 0x10]
mov dword [esi], 0x100133a0
push eax
push 0x202
call dword [sym.imp.ws2_32.dll_WSAStartup]
mov edi, dword [sym.imp.msvcrt.dll_putchar]
push 0x30
call edi
add esp, 4
push 0
push 0
push 1
push 0
call dword [sym.imp.kernel32.dll_CreateEventA]
push 0x30
mov dword [esi + 0xac], eax
call edi
mov byte [esp + 0xc], 0x47
mov byte [esp + 0xd], 0x68
mov byte [esp + 0xe], 0x30
mov byte [esp + 0xf], 0x73
mov edx, dword [esp + 0xc]
lea ecx, [esi + 0xb0]
mov al, 0x74
add esp, 4
mov dword [ecx], edx
mov byte [esi + 0xb5], 0
mov dword [esi + 0xa8], 0xffffffff
pop edi
mov byte [ecx + 4], al
mov ecx, dword [esp + 0x19c]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x1a4
ret
Function at 0x10001fc0
Capabilities:
Create tcp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.100024f0
mov edi, dword [sym.imp.msvcrt.dll_puts]
push 0x100160a0
call edi
mov eax, dword [esi + 0xac]
add esp, 4
push eax
call dword [sym.imp.kernel32.dll_ResetEvent]
push 0x100160a0
mov byte [esi + 0xb5], 0
call edi
add esp, 4
push 6
push 1
push 2
call dword [sym.imp.ws2_32.dll_socket]
push 0
mov dword [esi + 0xa8], eax
call dword [sym.imp.kernel32.dll_Sleep]
cmp dword [esi + 0xa8], 0xffffffff
jne 0x1000202b
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x20
ret 8
mov ebp, dword [sym.imp.msvcrt.dll_putchar]
push 0x30
call ebp
mov ecx, dword [esp + 0x38]
add esp, 4
push ecx
call dword [sym.imp.ws2_32.dll_gethostbyname]
push 0x30
mov ebx, eax
call ebp
add esp, 4
test ebx, ebx
jne 0x1000205c
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x20
ret 8
push 0x100160a0
mov word [esp + 0x24], 2
call edi
mov edx, dword [esp + 0x3c]
add esp, 4
push edx
call dword [sym.imp.ws2_32.dll_htons]
push 0
mov word [esp + 0x26], ax
call dword [sym.imp.kernel32.dll_Sleep]
mov eax, dword [ebx + 0xc]
mov edi, dword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov dword [esp + 0x24], edx
call edi
push str.connect
push str.WS2_32.DLL
call dword [sym.imp.kernel32.dll_LoadLibraryA]
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [esi + 0xa8]
lea ecx, [esp + 0x20]
push 0x10
push ecx
push edx
call eax
cmp eax, 0xffffffff
jne 0x100020d0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x20
ret 8
call edi
push 0x30
mov byte [esp + 0x17], 1
call ebp
mov ecx, dword [esi + 0xa8]
add esp, 4
lea eax, [esp + 0x13]
push 1
push eax
push 8
push 0xffff
push ecx
call dword [sym.imp.ws2_32.dll_setsockopt]
test eax, eax
jne 0x10002149
push 0x30
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 0xea60
mov dword [esp + 0x20], 0x1388
call ebp
add esp, 4
mov ecx, dword [esi + 0xa8]
lea edx, [esp + 0x13]
lea eax, [esp + 0x14]
push 0
push 0
push edx
push 0
push 0
push 0xc
push eax
push 0x98000004
push ecx
call dword [sym.imp.ws2_32.dll_WSAIoctl]
push 0x30
call ebp
add esp, 4
push 1
push 0
push 0
push esi
push 0x10002180
push 0
push 0
mov byte [esi + 0xb5], 1
call fcn.1000a0e0
add esp, 0x1c
mov dword [esi + 0xa4], eax
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 8
Function at 0x100024f0
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
push edi
mov edi, dword [sym.imp.msvcrt.dll_putchar]
mov esi, ecx
push 0x30
mov word [esp + 0xc], 1
mov word [esp + 0xe], 0
call edi
mov ecx, dword [esi + 0xa8]
add esp, 4
lea eax, [esp + 8]
push 4
push eax
push 0x80
push 0xffff
push ecx
call dword [sym.imp.ws2_32.dll_setsockopt]
push 0x30
call edi
mov edx, dword [esi + 0xa8]
add esp, 4
push edx
call dword [sym.imp.kernel32.dll_CancelIo]
push 0x30
call edi
add esp, 4
lea eax, [esi + 0xb5]
push 0
push eax
call dword [sym.imp.kernel32.dll_InterlockedExchange]
push 0x30
call edi
mov ecx, dword [esi + 0xa8]
add esp, 4
push ecx
call dword [sym.imp.ws2_32.dll_closesocket]
push 0x30
call edi
mov edx, dword [esi + 0xac]
add esp, 4
push edx
call dword [sym.imp.kernel32.dll_SetEvent]
push 0x30
call edi
add esp, 4
mov dword [esi + 0xa8], 0xffffffff
pop edi
pop esi
pop ecx
ret

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

Disassembly:
sub esp, 8
push ebx
mov ebx, dword [esp + 0x14]
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x20]
push edi
mov edi, ebx
cmp ebx, esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], edi
jb 0x100027c1
mov ebx, dword [sym.imp.kernel32.dll_Sleep]
mov dword [esp + 0x24], 0
push 0x100160a0
call dword [sym.imp.msvcrt.dll_puts]
mov eax, dword [esp + 0x18]
add esp, 4
mov ecx, dword [eax + 0xa8]
push 0
push esi
push ebp
push ecx
call dword [sym.imp.ws2_32.dll_send]
push 0
mov edi, eax
call ebx
test edi, edi
jg 0x10002792
mov eax, dword [esp + 0x24]
inc eax
cmp eax, 0xf
mov dword [esp + 0x24], eax
jl 0x10002757
cmp dword [esp + 0x24], 0xf
je 0x100027f7
mov edx, dword [esp + 0x1c]
push 0
add edx, edi
add ebp, esi
mov dword [esp + 0x20], edx
call ebx
push 0xa
call ebx
mov eax, dword [esp + 0x10]
sub eax, esi
cmp eax, esi
mov dword [esp + 0x10], eax
jae 0x1000274f
mov ebx, dword [esp + 0x20]
mov edi, eax
test edi, edi
jle 0x100027ef
xor esi, esi
mov edx, dword [esp + 0x14]
push 0
push edi
push ebp
mov eax, dword [edx + 0xa8]
push eax
call dword [sym.imp.ws2_32.dll_send]
test eax, eax
jg 0x100027e6
inc esi
cmp esi, 0xf
jl 0x100027c7
cmp esi, 0xf
je 0x100027f7
add dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x100027fa
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 0xc

Function at 0x10002820
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x10
push esi
mov esi, dword [esp + 0x18]
test esi, esi
jne 0x10002833
xor eax, eax
pop esi
add esp, 0x10
ret
push esi
call dword [sym.imp.ws2_32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x10002861
push esi
call dword [sym.imp.ws2_32.dll_gethostbyname]
mov ecx, dword [eax]
mov dword [esp + 4], ecx
mov edx, dword [eax + 4]
mov dword [esp + 8], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0xc], ecx
mov eax, dword [eax + 0xc]
mov edx, dword [eax]
mov eax, dword [edx]
pop esi
add esp, 0x10
ret
Function at 0x10002980
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x190
push esi
push edi
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x14]
lea edx, [esp + 0x94]
rep stosd dword es:[edi], eax
mov edi, str.SOFTWAREMicrosoftWindows_NTCurrentVersion
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x94]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 8]
push ecx
push 0xf003f
push 0
push edx
push 0x80000002
call dword [sym.imp.advapi32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10002a28
lea eax, [esp + 0xc]
lea ecx, [esp + 0x14]
push eax
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x14]
push ecx
push edx
push 0
push 0x100161d4
push eax
mov dword [esp + 0x24], 0xc8
call dword [sym.imp.advapi32.dll_RegQueryValueExA]
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov esi, dword [sym.imp.msvcrt.dll_strstr]
lea edx, [esp + 0x14]
push str.2000
push edx
call esi
add esp, 8
test eax, eax
jne 0x10002a70
lea eax, [esp + 0x14]
push str.2003
push eax
call esi
add esp, 8
test eax, eax
jne 0x10002a70
lea ecx, [esp + 0x14]
push str.2008
push ecx
call esi
add esp, 8
test eax, eax
jne 0x10002a70
pop edi
pop esi
add esp, 0x190
ret
pop edi
mov eax, 1
pop esi
add esp, 0x190
ret