joyce8/EMBER2024-capa huggingface dataset:
Function at 0x106a26a
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x111121c]
and dword [ebp - 0x2c], 0
mov dword [ebp - 4], eax
lea eax, [ebp - 0x30]
push eax
push 0x20019
push 0
push 0x100ba98
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x106a31b
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
lea edi, [ebp - 0x24]
stosd dword es:[edi], eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
push 0
push 0x100ba78
push dword [ebp - 0x30]
mov dword [ebp - 0x34], 0x20
call esi
test eax, eax
jne 0x106a2e2
cmp dword [ebp - 0x28], 3
jb 0x106a2e2
cmp dword [ebp - 0x28], 4
ja 0x106a2e2
mov eax, dword [ebp - 0x24]
test eax, eax
mov dword [ebp - 0x2c], eax
jne 0x106a310
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
push 0
push 0x100ba5c
push dword [ebp - 0x30]
call esi
test eax, eax
jne 0x106a310
cmp dword [ebp - 0x28], 3
jb 0x106a310
cmp dword [ebp - 0x28], 4
ja 0x106a310
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x2c]
call fcn.0105eca9
leave
ret

Function at 0x106a48b
Capabilities:
Check os version

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x111121c]
push esi
mov esi, ecx
cmp dword [esi + 0x18], 0xfffffffe
mov dword [ebp - 4], eax
jne 0x106a4e3
push edi
push 0x45
pop ecx
xor eax, eax
lea edi, [ebp - 0x118]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x118]
push eax
mov dword [ebp - 0x118], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
pop edi
je 0x106a4ec
mov eax, dword [ebp - 0x108]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x114]
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x18]
dec eax
je 0x106a506
dec eax
je 0x106a4f0
xor eax, eax
jmp 0x106a50d
cmp dword [esi + 0x1c], 5
mov ecx, esi
jne 0x106a4ff
call fcn.0106a43c
jmp 0x106a50d
call fcn.0106a32d
jmp 0x106a50d
mov ecx, esi
call fcn.0106a26a
mov ecx, dword [ebp - 4]
pop esi
call fcn.0105eca9
leave
ret

Function at 0x106a690
Capabilities:
Create process on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
push 0xf003f
push 1
push 0x80000001
push 0x100bc48
lea ecx, [ebp - 0x1c]
call fcn.01064103
push 3
push 1
mov esi, 0x100bcbc
push esi
lea ecx, [ebp - 0x1c]
call fcn.01063e10
push 1
call fcn.0106ade0
push 1
push 0x11137d8
push 0x100bcd0
push 0x11139e0
push 0x1008560
push dword [ebp + 8]
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
ja 0x106a6ff
push esi
lea ecx, [ebp - 0x1c]
call fcn.01063efe
mov esi, 0x80004005
jmp 0x106a701
xor esi, esi
lea ecx, [ebp - 0x1c]
call fcn.0106413d
mov eax, esi
pop esi
leave
ret 4
Function at 0x106b70f
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x218
cmp dword [0x1113be8], 0
mov eax, dword [0x111121c]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push edi
mov dword [ebp - 0x218], eax
je 0x106b73e
xor eax, eax
inc eax
jmp 0x106b820
call fcn.01106168
test eax, eax
mov dword [ebp - 0x214], eax
jl 0x106b820
cmp eax, 1
jne 0x106b760
mov eax, 0x80070005
jmp 0x106b820
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x106b781
test al, 2
je 0x106b781
test al, 4
je 0x106b781
test al, 8
je 0x106b781
test al, 0x10
je 0x106b781
mov eax, 0x80070057
jmp 0x106b820
push esi
mov esi, 0x103
push esi
lea eax, [ebp - 0x20c]
push eax
push 0x100c06c
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x106b81a
cmp eax, esi
ja 0x106b81a
mov edi, dword [sym.imp.SHLWAPI.dll_StrCpyNW]
inc esi
push esi
lea eax, [ebp - 0x20c]
push eax
mov ebx, 0x11137d8
push ebx
call edi
push esi
push ebx
mov ebx, 0x11139e0
push ebx
call edi
cmp dword [ebp - 0x218], 0
je 0x106b808
and dword [ebp - 0x210], 0
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x218]
call fcn.0106b602
test eax, eax
mov dword [ebp - 0x214], eax
jl 0x106b81f
mov edi, dword [sym.imp.SHLWAPI.dll_StrCatBuffW]
push esi
push 0x1002e78
push ebx
call edi
push esi
push dword [ebp - 0x210]
push ebx
call edi
mov eax, dword [ebp - 0x214]
mov dword [0x1113be8], 1
jmp 0x106b81f
mov eax, 0x80070057
pop esi
mov ecx, dword [ebp - 4]
pop edi
pop ebx
call fcn.0105eca9
leave
ret 8

Function at 0x106b981
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
and dword [ebp - 4], ebx
cmp dword [ebp + 8], ebx
push esi
mov esi, ecx
je 0x106b9e9
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
lea eax, [esi + 0x24]
push eax
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
test ebx, ebx
je 0x106b9e9
mov eax, dword [ebp - 4]
add dword [esi + 0x1c], eax
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x1c]
xor edx, edx
test ecx, ecx
je 0x106b9c9
imul eax, eax, 0x64
div ecx
jmp 0x106b9d3
push 0x64
shr eax, 0xa
pop ecx
div ecx
mov eax, edx
push 0
push eax
push 0x402
push 0x9dca
push dword [esi + 8]
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
pop esi
mov eax, ebx
pop ebx
leave
ret 4
Function at 0x106bab6
Capabilities:
Read data from internet
Receive data

Disassembly:
mov edi, edi
push ebx
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x18]
mov eax, dword [edi]
test eax, eax
je 0x106bad1
push eax
call fcn.0106b981
and dword [edi], 0
jmp 0x106baf8
push edi
push 0x400
lea eax, [esi + 0x24]
push eax
push dword [esi + 0x14]
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ebx, eax
test ebx, ebx
je 0x106bafc
mov eax, dword [edi]
test eax, eax
je 0x106bb19
push eax
mov ecx, esi
call fcn.0106b981
test eax, eax
jne 0x106bad1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
sub ebx, 0x3e5
neg ebx
sbb ebx, ebx
inc ebx
je 0x106bb2a
mov eax, dword [esi + 0x1c]
cmp eax, dword [esi + 0x20]
jne 0x106bb2a
push esi
push 2
push 0x8000
push dword [esi + 8]
call dword [sym.imp.USER32.dll_PostMessageW]
pop edi
pop esi
mov eax, ebx
pop ebx
ret

Function at 0x106bab9
Capabilities:
Read data from internet
Receive data

Disassembly:
mov edi, edi
push ebx
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x18]
mov eax, dword [edi]
test eax, eax
je 0x106bad1
push eax
call fcn.0106b981
and dword [edi], 0
jmp 0x106baf8
push edi
push 0x400
lea eax, [esi + 0x24]
push eax
push dword [esi + 0x14]
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ebx, eax
test ebx, ebx
je 0x106bafc
mov eax, dword [edi]
test eax, eax
je 0x106bb19
push eax
mov ecx, esi
call fcn.0106b981
test eax, eax
jne 0x106bad1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
sub ebx, 0x3e5
neg ebx
sbb ebx, ebx
inc ebx
je 0x106bb2a
mov eax, dword [esi + 0x1c]
cmp eax, dword [esi + 0x20]
jne 0x106bb2a
push esi
push 2
push 0x8000
push dword [esi + 8]
call dword [sym.imp.USER32.dll_PostMessageW]
pop edi
pop esi
mov eax, ebx
pop ebx
ret

Function at 0x106bc13
Capabilities:
Check http status code
Get http content length

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
and dword [ebp - 4], 0
push esi
push edi
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
mov esi, ecx
push 0x20000013
push dword [esi + 0x14]
mov dword [ebp - 0xc], 4
call edi
test eax, eax
je 0x106bc87
cmp dword [ebp - 4], 0xc8
jne 0x106bc87
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [esi + 0x20]
push eax
push 0x20000005
push dword [esi + 0x14]
call edi
test eax, eax
je 0x106bc87
mov ecx, esi
mov dword [esi], 3
call fcn.0106bab6
test eax, eax
je 0x106bc87
xor edi, edi
inc edi
jmp 0x106bc93
xor edi, edi
push edi
push dword [esi + 8]
call dword [sym.imp.USER32.dll_EndDialog]
mov eax, edi
pop edi
pop esi
leave
ret
Function at 0x106bd10
Capabilities:
Create http request

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
push esi
push 0x10000000
push 0
mov esi, ecx
push 0
mov dword [esi + 4], eax
mov eax, dword [ebp + 0x10]
push 0
push 0x10087f4
mov dword [esi + 0x10], eax
call dword [sym.imp.WININET.dll_InternetOpenW]
test eax, eax
mov dword [esi + 0xc], eax
je 0x106bd65
push esi
push 0x106bc9e
push dword [ebp + 0xc]
push 0x9c51
push dword [0x1112f58]
call dword [sym.imp.USER32.dll_DialogBoxParamW]
test eax, eax
je 0x106bd65
xor ebx, ebx
inc ebx
jmp 0x106bd67
xor ebx, ebx
mov eax, dword [esi + 0xc]
test eax, eax
je 0x106bd79
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
and dword [esi + 0xc], 0
pop esi
mov eax, ebx
pop ebx
pop ebp
ret 0xc

Function at 0x106c4ae
Capabilities:
Parse url

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x108c
call fcn.0105f070
mov eax, dword [0x111121c]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov esi, 0x10000000
push esi
lea ecx, [ebp - 0x1050]
push ecx
lea ecx, [ebp - 0x104c]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ecx
push eax
xor edi, edi
mov dword [ebp - 0x1050], 0x824
call dword [sym.imp.WININET.dll_InternetCanonicalizeUrlW]
test eax, eax
je 0x106c53c
push 0xf
pop ecx
xor eax, eax
lea edi, [ebp - 0x108c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1078], eax
lea eax, [ebp - 0x108c]
push eax
push esi
push dword [ebp - 0x1050]
lea eax, [ebp - 0x104c]
push eax
mov dword [ebp - 0x108c], 0x3c
mov dword [ebp - 0x107c], ebx
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
mov edi, eax
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
pop ebx
call fcn.0105eca9
leave
ret 0xc

Function at 0x106ca29
Capabilities:
Delete file

Disassembly:
mov edi, edi
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x1718]
push dword [edi]
mov dword [esi], fcn.010c8fa5
push dword [esi + 0x171c]
mov dword [esi + 0xc], 0x100c290
call fcn.010b7747
mov edi, dword [edi]
test edi, edi
je 0x106ca5b
mov eax, dword [edi]
push edi
call dword [eax + 8]
mov eax, dword [esi + 0x1720]
cmp eax, 0xffffffff
je 0x106ca9c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x192c], 1
jne 0x106ca95
cmp dword [esi + 0x1934], 8
je 0x106ca95
cmp dword [esi + 0x1930], 1
jne 0x106ca95
lea eax, [esi + 0x1724]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
or dword [esi + 0x1720], 0xffffffff
pop edi
mov ecx, esi
pop esi
jmp fcn.01071391
Function at 0x106ca2b
Capabilities:
Delete file

Disassembly:
mov edi, edi
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x1718]
push dword [edi]
mov dword [esi], fcn.010c8fa5
push dword [esi + 0x171c]
mov dword [esi + 0xc], 0x100c290
call fcn.010b7747
mov edi, dword [edi]
test edi, edi
je 0x106ca5b
mov eax, dword [edi]
push edi
call dword [eax + 8]
mov eax, dword [esi + 0x1720]
cmp eax, 0xffffffff
je 0x106ca9c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x192c], 1
jne 0x106ca95
cmp dword [esi + 0x1934], 8
je 0x106ca95
cmp dword [esi + 0x1930], 1
jne 0x106ca95
lea eax, [esi + 0x1724]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
or dword [esi + 0x1720], 0xffffffff
pop edi
mov ecx, esi
pop esi
jmp fcn.01071391
Function at 0x106d0ea
Capabilities:
Delete file
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x111121c]
and dword [ebp - 0x114], 0
push ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
test eax, eax
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10c], eax
jbe 0x106d1bc
cmp word [esi + 0x1c56], 0
jne 0x106d145
cmp byte [ebx], 1
je 0x106d1a4
mov ax, word [ebx + 1]
sub dword [ebp + 8], 3
sub dword [ebp - 0x10c], 3
mov word [esi + 0x1c56], ax
add ebx, 3
movzx eax, word [esi + 0x1c56]
mov ecx, dword [ebp + 8]
cmp ecx, eax
mov dword [ebp - 0x110], ecx
jb 0x106d15f
mov dword [ebp - 0x110], eax
movzx edi, word [ebp - 0x110]
push 0
lea eax, [ebp - 0x118]
push eax
push edi
push ebx
push dword [esi + 0x1720]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp edi, dword [ebp - 0x118]
jne 0x106d1b0
mov ax, word [ebp - 0x110]
sub dword [ebp + 8], edi
sub word [esi + 0x1c56], ax
add ebx, edi
cmp dword [ebp + 8], 0
ja 0x106d11d
jmp 0x106d1bc
mov dword [ebp - 0x114], 1
jmp 0x106d1bc
push 0x80070005
mov ecx, esi
call fcn.0106cd9f
lea eax, [esi + 0x1940]
mov ecx, dword [eax]
cmp dword [ebp - 0x10c], ecx
ja 0x106d1d6
sub ecx, dword [ebp - 0x10c]
mov dword [eax], ecx
jmp 0x106d1d9
and dword [eax], 0
cmp dword [eax], 0
jne 0x106d265
lea edi, [esi + 0x1720]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [edi], 0xffffffff
and dword [esi + 0x16fc], 0
cmp dword [esi + 0x1934], 2
jne 0x106d21f
push esi
push 0x1000305
mov eax, dword [esi + 0x1944]
push dword [esi + 0x1938]
mov ecx, dword [eax]
push eax
call dword [ecx]
jmp 0x106d2cb
mov eax, 0x1000305
push eax
push 0x100c320
mov dword [esi + 0x1c58], eax
lea eax, [ebp - 0x108]
push 0x104
push eax
mov dword [esi + 0x1934], 8
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
mov edx, dword [esi]
add esp, 0x10
lea ecx, [ebp - 0x108]
push ecx
push eax
push 0x20455942
mov ecx, esi
call dword [edx + 0x4c]
jmp 0x106d2c4
cmp dword [ebp - 0x114], 0
je 0x106d2cb
lea edi, [esi + 0x1720]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [edi], 0xffffffff
and dword [esi + 0x16fc], 0
cmp dword [esi + 0x1930], 1
jne 0x106d29c
lea eax, [esi + 0x1724]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esi + 0x1934], 2
jne 0x106d2b0
push esi
push 0x81000332
jmp 0x106d209
mov dword [esi + 0x1934], 8
mov dword [esi + 0x1c58], 0x81000332
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x40]
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0105eca9
leave
ret 8
Function at 0x106d2df
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x111121c]
push ebx
push esi
push edi
mov esi, ecx
xor edi, edi
cmp dword [esi + 0x1934], 0x24
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], edi
jne 0x106d40a
xor ebx, ebx
inc ebx
push ebx
push 2
lea ecx, [ebp - 0x10]
push ecx
push eax
mov ecx, esi
call fcn.0106cc7b
test eax, eax
je 0x106d40a
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x1718]
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x1c], edi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x2c]
test eax, eax
jl 0x106d38a
lea eax, [esi + 0x1948]
push eax
lea ecx, [ebp - 0x28]
call fcn.01064e5f
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x106d38a
push dword [ebp - 0x14]
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x18], ebx
call fcn.010644d9
mov ecx, eax
call fcn.010645a9
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x106d38a
mov bl, bl
jmp 0x106d38c
xor bl, bl
test byte [ebp - 0x18], 1
je 0x106d39a
lea ecx, [ebp - 0x34]
call fcn.01064519
test bl, bl
je 0x106d3dd
push edi
push dword [esi + 0x1720]
mov dword [esi + 0x1934], 0x28
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push 0x100c324
lea eax, [ebp - 0x10]
push 0xb
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
mov edx, dword [esi]
add esp, 0x10
lea ecx, [ebp - 0x10]
push ecx
push eax
push 0x204c4946
mov ecx, esi
call dword [edx + 0x4c]
jmp 0x106d3e9
push 0x81000303
mov ecx, esi
call fcn.0106cd9f
lea ecx, [ebp - 0x28]
call fcn.01064bb9
cmp dword [ebp - 0x14], edi
je 0x106d416
cmp dword [ebp - 0x14], 0x1111298
je 0x106d416
push dword [ebp - 0x14]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x106d416
mov ecx, esi
push 0x80004005
call fcn.0106cd9f
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0105eca9
leave
ret 4
Function at 0x106da9c
Capabilities:
Send data
Send data on socket
Send http request

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x35c
mov eax, dword [0x111121c]
push esi
mov esi, ecx
cmp dword [esi + 0x34], 5
mov dword [ebp - 4], eax
push edi
jne 0x106dbbc
mov eax, dword [esi + 0x444]
dec eax
je 0x106db3a
dec eax
je 0x106db0b
dec eax
jne 0x106dbae
push 4
call fcn.0106da65
movzx eax, word [esi + 0x38]
push eax
lea eax, [esi + 0x554]
push eax
push 0x100c4d8
lea eax, [ebp - 0x23c]
push 0x238
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
mov edi, eax
add esp, 0x14
inc edi
lea eax, [ebp - 0x23c]
jmp 0x106db99
push 5
mov ecx, esi
call fcn.0106da65
mov byte [ebp - 0x350], 5
mov byte [ebp - 0x34f], 2
mov byte [ebp - 0x34e], 0
mov byte [ebp - 0x34d], 2
push 4
lea eax, [ebp - 0x350]
jmp 0x106db98
push 4
mov ecx, esi
call fcn.0106da65
mov eax, dword [esi + 0x440]
cmp eax, 0xffffffff
jne 0x106db7f
movzx eax, word [esi + 0x38]
push eax
lea eax, [esi + 0x554]
push eax
lea ecx, [ebp - 0x34c]
call fcn.0106d985
lea eax, [ebp - 0x343]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
add edi, 0xa
lea eax, [ebp - 0x34c]
jmp 0x106db99
movzx ecx, word [esi + 0x38]
push ecx
push eax
lea ecx, [ebp - 0x35c]
call fcn.0106d954
push 9
lea eax, [ebp - 0x35c]
pop edi
push 0
push edi
push eax
push dword [esi + 0x2c]
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
je 0x106dbae
cmp edi, eax
je 0x106dbd0
mov eax, dword [esi]
push 0x8100031a
mov ecx, esi
call dword [eax + 0x14]
jmp 0x106dbd0
mov ecx, esi
call fcn.0106d93b
test eax, eax
je 0x106dbd0
push 7
mov ecx, esi
call fcn.0106da65
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.0105eca9
leave
ret

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov ecx, dword [ebp + 8]
mov eax, dword [esi + 0xe6c]
push edi
xor edi, edi
cmp ecx, edi
lea edx, [eax + esi + 0x66c]
jne 0x106dc7d
mov ecx, 0x800
sub ecx, eax
push edi
push ecx
push edx
push dword [esi + 0x2c]
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x106dc9a
cmp eax, edi
je 0x106dc9a
add dword [esi + 0xe6c], eax
xor edi, edi
inc edi
mov eax, edi
pop edi
pop esi
pop ebp
ret 4
Function at 0x106df49
Capabilities:
Send data
Send data on socket

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
push esi
mov esi, ecx
mov al, byte [esi + 0x664]
cmp al, 0xff
push edi
je 0x106e034
test al, al
je 0x106e024
cmp al, 2
jne 0x106e036
push 2
call fcn.0106dc57
lea ecx, [esi + 0xe6c]
mov eax, dword [ecx]
cmp eax, 2
jb 0x106e040
lea edx, [esi + 0x66c]
cmp byte [edx], 1
jne 0x106e02d
cmp byte [edx + 1], 0
jne 0x106e02d
add eax, 0xfffffffe
push eax
mov dword [ecx], eax
lea eax, [esi + 0x66e]
push eax
push edx
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
push 4
mov ecx, esi
call fcn.0106da65
mov eax, dword [esi + 0x440]
cmp eax, 0xffffffff
je 0x106dfe5
movzx ecx, word [esi + 0x38]
push ecx
push eax
lea ecx, [ebp - 0x108]
call fcn.0106da11
jmp 0x106dffc
movzx eax, word [esi + 0x38]
push eax
lea eax, [esi + 0x554]
push eax
lea ecx, [ebp - 0x108]
call fcn.0106d9b8
lea ecx, [ebp - 0x108]
call fcn.0106da46
push 0
mov edi, eax
push edi
lea eax, [ebp - 0x108]
push eax
push dword [esi + 0x2c]
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
je 0x106e024
cmp edi, eax
je 0x106e040
push 0x8100031a
mov ecx, esi
jmp 0x106e03b
push 0x8100031b
jmp 0x106e029
mov ecx, esi
push 0x8100031c
mov eax, dword [esi]
call dword [eax + 0x14]
pop edi
pop esi
leave
ret

Function at 0x106e0e3
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x111121c]
push esi
mov esi, dword [ebp + 8]
or dword [esi], 0xffffffff
mov dword [ebp - 4], eax
push edi
mov eax, ecx
mov eax, dword [eax + 0x2c]
xor edi, edi
inc edi
cmp eax, 0xffffffff
je 0x106e128
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x14]
push ecx
push eax
mov dword [ebp - 0x18], 0x10
call sub.WSOCK32.dll_getsockname
test eax, eax
jne 0x106e128
mov eax, dword [ebp - 0x10]
mov dword [esi], eax
xor edi, edi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
call fcn.0105eca9
leave
ret 4

Function at 0x106e5df
Capabilities:
Initialize winsock library

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x111121c]
push ebx
push esi
push edi
xor esi, esi
push esi
push esi
push esi
push esi
push esi
push esi
push 0x80000000
mov edi, ecx
lea ecx, [edi + 0xc]
push 0x100c4c0
mov dword [ebp - 4], eax
mov eax, dword [ecx]
push esi
call dword [eax + 0x18]
mov ebx, eax
cmp ebx, esi
jl 0x106e648
lea eax, [ebp - 0x194]
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
jne 0x106e648
cmp word [ebp - 0x194], 0x101
je 0x106e63f
call sub.WSOCK32.dll_WSACleanup
jmp 0x106e648
mov dword [edi + 0x34], 1
xor ebx, ebx
mov ecx, edi
call fcn.0106e1b7
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
pop ebx
call fcn.0105eca9
leave
ret
Function at 0x106e78a
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x111121c]
push esi
push edi
mov edi, ecx
mov esi, dword [edi + 0x444]
neg esi
push 0
sbb esi, esi
push 1
and esi, 0x19
push 2
mov dword [ebp - 4], eax
add esi, 0x81000301
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [edi + 0x2c], eax
je 0x106e860
push 0x33
push 0x428
push dword [edi + 0x10]
push eax
call sub.WSOCK32.dll_WSAAsyncSelect
test eax, eax
jne 0x106e860
mov eax, dword [edi + 0x444]
test eax, eax
mov word [ebp - 0x14], 2
je 0x106e817
jle 0x106e840
cmp eax, 3
jg 0x106e840
xor eax, eax
mov ax, word [edi + 0x448]
push eax
call sub.WSOCK32.dll_htons
mov word [ebp - 0x12], ax
mov eax, dword [edi + 0x44c]
mov dword [ebp - 0x10], eax
push 5
jmp 0x106e839
xor eax, eax
mov ax, word [edi + 0x38]
push eax
call sub.WSOCK32.dll_htons
mov word [ebp - 0x12], ax
mov eax, dword [edi + 0x440]
mov ecx, edi
mov dword [ebp - 0x10], eax
call fcn.0106e4e2
push 4
mov ecx, edi
call fcn.0106da65
push 0x10
lea eax, [ebp - 0x14]
push eax
push dword [edi + 0x2c]
call sub.WSOCK32.dll_connect
test eax, eax
je 0x106e85e
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x106e860
xor esi, esi
test esi, esi
jge 0x106e873
mov eax, dword [edi]
push esi
mov ecx, edi
call dword [eax + 0x14]
test al, al
je 0x106e873
xor esi, esi
inc esi
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
call fcn.0105eca9
leave
ret

Function at 0x106ebf7
Capabilities:
Set socket configuration

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, ecx
cmp dword [esi + 0x34], 1
push edi
mov edi, 0x80004005
jne 0x106ecb4
call fcn.0106e1b7
lea edi, [esi + 0x450]
push edi
call sub.WSOCK32.dll_inet_addr
push dword [ebp + 8]
mov dword [esi + 0x44c], eax
call sub.WSOCK32.dll_inet_addr
push 0x104
push dword [ebp + 8]
mov dword [esi + 0x440], eax
lea eax, [esi + 0x554]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp dword [esi + 0x444], 0
mov ax, word [ebp + 0xc]
mov word [esi + 0x38], ax
je 0x106ec88
cmp dword [esi + 0x44c], 0xffffffff
jne 0x106ec88
push 3
mov ecx, esi
call fcn.0106da65
push edi
mov ecx, esi
call fcn.0106e333
mov edi, eax
test edi, edi
jge 0x106ecb4
push 0x8100031d
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x14]
jmp 0x106ecb4
cmp dword [esi + 0x440], 0xffffffff
mov ecx, esi
jne 0x106ecad
push 2
call fcn.0106da65
push dword [ebp + 8]
mov ecx, esi
call fcn.0106e333
mov edi, eax
test edi, edi
jge 0x106ecb4
push edi
jmp 0x106ec7f
call fcn.0106e78a
mov edi, eax
mov eax, edi
pop edi
pop esi
pop ebp
ret 8