joyce8/EMBER2024-capa huggingface dataset:
Function at 0x101e9b0
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x23c
mov eax, dword [0x1039004]
xor eax, esp
mov dword [esp + 0x238], eax
cmp dword [0x103a4d4], 0
push ebx
push esi
push edi
mov dword [esp + 0x10], 0x101a2f0
mov dword [esp + 0x14], 0x101e450
mov dword [esp + 0x18], 0x101a2e4
mov dword [esp + 0x1c], 0x101e710
mov dword [esp + 0x20], 0x101a2d4
mov dword [esp + 0x24], fcn.0101e400
je 0x101ea2a
movzx eax, word [ebp + 8]
mov eax, dword [eax*8 + 0x1039044]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.01029f27
mov esp, ebp
pop ebp
ret 4
push 0x104
lea ecx, [esp + 0x13c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x101eb35
mov edi, dword [sym.imp.MSVCR80.dll_strcpy_s]
lea edx, [esp + 0x138]
push edx
lea eax, [esp + 0x2c]
push 0x10c
push eax
call edi
mov ebx, dword [sym.imp.MSVCR80.dll_strcat_s]
push 0x101a318
lea ecx, [esp + 0x38]
push 0x10c
push ecx
call ebx
add esp, 0x18
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x101eaa1
push 0x101a2f0
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x101eaf5
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [esp + 0x138]
push eax
lea ecx, [esp + 0x2c]
push 0x10c
push ecx
call edi
push 0x101a320
lea edx, [esp + 0x38]
push 0x10c
push edx
call ebx
add esp, 0x18
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x101eb35
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x101a2f0
push esi
call ebx
test eax, eax
jne 0x101eafb
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x101eb35
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
lea ecx, [ecx]
mov ecx, dword [esp + edi*8 + 0x10]
push ecx
push esi
call ebx
test eax, eax
mov dword [esp + edi*8 + 0x14], eax
je 0x101eaec
add edi, 1
cmp edi, 3
jl 0x101eb00
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov dword [0x1039044], edx
mov dword [0x103904c], eax
mov dword [fcn.0101e400], ecx
movzx edx, word [ebp + 8]
mov ecx, dword [esp + 0x244]
mov eax, dword [edx*8 + 0x1039044]
pop edi
pop esi
pop ebx
xor ecx, esp
mov dword [0x103a4d4], 1
call fcn.01029f27
mov esp, ebp
pop ebp
ret 4
Function at 0x101f530
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x1039004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
test esi, esi
mov dword [ebp - 0x220], edx
mov dword [ebp - 0x224], ecx
mov dword [ebp - 0x214], 0
mov dword [ebp - 0x218], 0x105
je 0x101f72a
test eax, eax
je 0x101f72a
test ecx, ecx
je 0x101f72a
test edx, edx
je 0x101f72a
push edi
push eax
lea eax, [ebp - 0x218]
lea edi, [ebp - 0x210]
call fcn.0101f030
test eax, eax
pop edi
je 0x101f608
cmp word [esi], 0x5c
je 0x101f614
mov ecx, 0x105
lea eax, [ebp - 0x210]
cmp word [eax], 0
je 0x101f5d7
add eax, 2
sub ecx, 1
jne 0x101f5b5
push 0x6f
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x214]
push eax
jmp 0x101f739
test ecx, ecx
je 0x101f600
mov eax, 0x105
sub eax, ecx
push 0x101a3f0
mov ecx, 0x105
sub ecx, eax
push ecx
lea edx, [ebp + eax*2 - 0x210]
push edx
call fcn.0101ed00
test eax, eax
jge 0x101f614
push 0x6f
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x214]
push eax
jmp 0x101f739
mov ecx, 0x105
lea eax, [ebp - 0x210]
nop
cmp word [eax], 0
je 0x101f642
add eax, 2
sub ecx, 1
jne 0x101f620
push 0x6f
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x214]
push eax
jmp 0x101f739
test ecx, ecx
je 0x101f600
mov eax, 0x105
sub eax, ecx
push esi
mov ecx, 0x105
sub ecx, eax
push ecx
lea edx, [ebp + eax*2 - 0x210]
push edx
call fcn.0101ed00
test eax, eax
jl 0x101f600
lea ecx, [ebp - 0x214]
push ecx
push 0x20019
push 0
lea edx, [ebp - 0x210]
push edx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x101f69e
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x214]
push eax
jmp 0x101f739
mov edx, dword [ebp - 0x224]
lea ecx, [ebp - 0x218]
push ecx
mov ecx, dword [ebp - 0x220]
push edx
mov edx, dword [ebp - 0x214]
lea eax, [ebp - 0x21c]
push eax
push 0
push ecx
mov esi, 4
push edx
mov dword [ebp - 0x218], esi
mov dword [ebp - 0x21c], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x101f6e9
cmp eax, 0xea
jne 0x101f703
cmp dword [ebp - 0x21c], esi
je 0x101f703
push 0x70c
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, 0x70c
jmp 0x101f705
mov esi, eax
mov eax, dword [ebp - 0x214]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.01029f27
mov esp, ebp
pop ebp
ret 8
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x214]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
pop esi
call fcn.01029f27
mov esp, ebp
pop ebp
ret 8
Function at 0x1020c90
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x1039004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov ebx, ecx
lea eax, [ebp - 0x138]
push eax
lea ecx, [ebp - 0x128]
push ecx
push 0x101a7e0
mov edi, edx
push 0x101a7f8
lea edx, [ebx + 0x64]
push edx
mov dword [ebp - 0x134], edi
mov dword [ebp - 0x130], esi
mov dword [ebp - 0x138], 0x80
call sub.instapi.dll_GetSQLInstanceRegStringByID
test eax, eax
je 0x1020d60
xor eax, eax
test byte [ebx + 0xcc], 1
mov word [ebp - 0x2a], ax
mov dword [ebp - 0x12c], eax
je 0x1020d75
lea esi, [ebx + 0x22]
mov ecx, 8
lea edi, [ebp - 0x24]
lea eax, [ebp - 0x13c]
rep movsd dword es:[edi], dword [esi]
push eax
lea ecx, [ebp - 0x24]
push ecx
push 4
mov dword [ebp - 0x13c], 0x10
call dword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
je 0x1020d9c
mov ecx, dword [ebp - 0x134]
lea edx, [ebp - 0x128]
push edx
mov edx, dword [ecx]
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x130]
mov esi, dword [eax]
push 0x101a83c
push edx
lea edi, [ebp - 0x12c]
call fcn.01023c90
add esp, 0x10
test eax, eax
jne 0x1020d9c
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.01029f27
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi]
mov esi, dword [esi]
lea ecx, [ebp - 0x128]
push ecx
lea edx, [ebx + 0x42]
push edx
push 0x101a83c
push eax
lea edi, [ebp - 0x12c]
call fcn.01023c90
add esp, 0x10
test eax, eax
je 0x1020d60
mov edx, dword [ebp - 0x130]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x12c]
sub eax, dword [ebp + 8]
push ecx
push eax
xor ecx, ecx
call fcn.0101fac0
test eax, eax
je 0x1020d60
mov eax, dword [ebp - 0x12c]
mov ecx, dword [ebp - 0x130]
add dword [ecx], eax
mov ecx, dword [ebp - 0x134]
sub dword [ecx], eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.01029f27
mov esp, ebp
pop ebp
ret 8
Function at 0x1020df0
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1050
call fcn.01032f80
mov eax, dword [0x1039004]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov ebx, edx
lea edx, [ebp - 0x1038]
push edx
xor edi, edi
push 0x101a858
push eax
mov dword [ebp - 0x1048], esi
mov dword [ebp - 0x103c], ecx
mov dword [ebp - 0x1038], edi
mov dword [ebp - 0x1040], edi
mov dword [ebp - 0x1044], edi
call fcn.0102f7b0
test eax, eax
jne 0x1020fe1
mov ecx, dword [ebp - 0x1038]
lea eax, [ebp - 0x1044]
push eax
push 0x101a4e0
push ecx
call fcn.0102d6c0
test eax, eax
jne 0x1020fe1
cmp dword [ebp - 0x1044], edi
jne 0x1020e82
mov edx, dword [ebp - 0x1038]
push edx
jmp 0x1020fe8
mov ecx, dword [ebp - 0x1038]
lea eax, [ebp - 0x1034]
push eax
push 0x101a7e0
push ecx
call fcn.0102d7c0
test eax, eax
je 0x1020ebf
mov edx, dword [ebp - 0x1038]
push edx
call fcn.0102bd20
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.01029f27
mov esp, ebp
pop ebp
ret 0xc
test byte [ebx + 0xcc], 1
je 0x1020f52
lea esi, [ebx + 0x22]
mov ecx, 8
lea edi, [ebp - 0x28]
lea eax, [ebp - 0x104c]
rep movsd dword es:[edi], dword [esi]
push eax
lea ecx, [ebp - 0x28]
push ecx
push 4
mov dword [ebp - 0x104c], 0x10
call dword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
je 0x1020fa0
mov ecx, dword [ebp - 0x1048]
lea edx, [ebp - 0x1030]
push edx
mov edx, dword [ecx]
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x103c]
mov esi, dword [eax]
push 0x101a83c
push edx
lea edi, [ebp - 0x1040]
call fcn.01023c90
add esp, 0x10
test eax, eax
jne 0x1020fa0
mov ecx, dword [ebp - 0x1038]
push ecx
call fcn.0102bd20
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.01029f27
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esi]
lea edx, [ebp - 0x1030]
push edx
mov edx, dword [ebp - 0x103c]
mov esi, dword [edx]
lea eax, [ebx + 0x42]
push eax
push 0x101a83c
push ecx
lea edi, [ebp - 0x1040]
call fcn.01023c90
add esp, 0x10
test eax, eax
jne 0x1020fa0
mov eax, dword [ebp - 0x1038]
push eax
call fcn.0102bd20
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.01029f27
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp - 0x103c]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1040]
sub eax, dword [ebp + 0xc]
push ecx
push eax
xor ecx, ecx
call fcn.0101fac0
test eax, eax
je 0x1020e9e
mov eax, dword [ebp - 0x1040]
mov ecx, dword [ebp - 0x103c]
add dword [ecx], eax
mov ecx, dword [ebp - 0x1048]
sub dword [ecx], eax
mov ecx, dword [ebp - 0x1038]
push ecx
jmp 0x1020fe8
mov eax, dword [ebp - 0x1038]
push eax
call fcn.0102bd20
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.01029f27
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10241e0
Capabilities:
Access the windows event log

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x101ac28
push 0
mov ebx, eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x102423d
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
push 0
push ecx
push 0
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret 0x14
push 0
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
push ebx
xor edi, edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret 0x14

Function at 0x10247f0
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x804
mov eax, dword [0x1039004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 8]
mov esi, eax
lea eax, [ebp + 0xc]
push eax
push ecx
push 0x3ff
lea edx, [ebp - 0x804]
push 0x400
push edx
call dword [sym.imp.MSVCR80.dll__vsnwprintf_s]
add esp, 0x14
test eax, eax
jl 0x102483d
cmp eax, 0x3ff
ja 0x102483d
jne 0x1024843
mov word [ebp - 6], 0
mov ecx, 0x400
lea eax, [ebp - 0x804]
mov edi, edi
cmp word [eax], 0
je 0x1024860
add eax, 2
sub ecx, 1
jne 0x1024850
jmp 0x1024885
test ecx, ecx
je 0x1024885
mov eax, 0x400
sub eax, ecx
push 0x101b160
mov ecx, 0x400
sub ecx, eax
push ecx
lea edx, [ebp + eax*2 - 0x804]
push edx
call fcn.0101ed00
test byte [0x103a4fc], 2
je 0x10248b7
cmp dword [0x10390bc], 0xffffffff
je 0x10248b7
mov ecx, dword [0x103b170]
mov edx, dword [0x10390bc]
lea eax, [ebp - 0x804]
push eax
push 0xcc00
push ecx
push edx
call dword [0x1039078]
cmp dword [0x103a514], 0
je 0x10248e2
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x804]
push ecx
push 0x101b164
call dword [sym.imp.MSVCR80.dll_wprintf]
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
pop esi
call fcn.01029f27
mov esp, ebp
pop ebp
ret
Function at 0x1025e20
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x1039004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 8]
push ebx
push edi
mov edi, dword [esi + 0xc]
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x120], eax
lea eax, [ebp - 0x120]
push eax
mov eax, dword [esi]
push edi
lea ecx, [ebp - 0x118]
push ecx
push 0
push edx
push eax
mov dword [ebp - 0x118], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, eax
test ebx, ebx
jne 0x1025eec
cmp dword [ebp - 0x120], 1
jbe 0x1025ee1
mov eax, dword [ebp - 0x118]
sub eax, 1
je 0x1025ed6
sub eax, 1
je 0x1025e9c
mov dword [esi + 0x14], ebx
mov byte [edi], bl
mov ebx, 0xd
jmp 0x1025ee1
push 0x10d
lea ecx, [ebp - 0x114]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x1025eba
cmp eax, 0x10e
jb 0x1025ec1
mov byte [ebp - 0x114], 0
mov edx, dword [ebp - 0x11c]
push edx
lea eax, [ebp - 0x114]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
xor ecx, ecx
cmp byte [edi], 0x3a
setne cl
mov dword [esi + 0x14], ecx
mov edx, dword [ebp - 0x11c]
mov byte [edx + edi - 1], 0
mov ecx, dword [ebp - 4]
xor eax, eax
test ebx, ebx
sete al
pop edi
xor ecx, ebp
pop ebx
call fcn.01029f27
mov esp, ebp
pop ebp
ret

Function at 0x1025f10
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x1039004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 3
jl 0x1025fd0
mov al, byte [esi]
cmp al, 0x2e
je 0x1025fb4
cmp al, 0x5c
je 0x1025f89
cmp al, 0x2f
je 0x1025f89
cmp byte [esi + 1], 0x3a
je 0x1025f89
lea edx, [ebp - 0x118]
push edx
lea eax, [ebp - 0x114]
push eax
push 0x10e
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathA]
test eax, eax
je 0x1025fd0
cmp eax, 0x10e
jae 0x1025fd0
push 0x10e
lea ecx, [ebp - 0x114]
push ecx
push esi
mov byte [ebp - 7], 0
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push ebx
mov bl, byte [esi + 3]
push esi
mov byte [esi + 3], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
xor edx, edx
cmp eax, 3
sete dl
mov byte [esi + 3], bl
pop ebx
mov eax, edx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.01029f27
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x114]
push ecx
push 0x10e
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x1025f67
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.01029f27
mov esp, ebp
pop ebp
ret
Function at 0x1027850
Capabilities:
Initialize winsock library

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1a4
mov eax, dword [0x1039004]
xor eax, esp
mov dword [esp + 0x1a0], eax
push esi
lea eax, [esp + 0x10]
push eax
push 0x202
mov esi, ecx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x10278cd
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test byte [0x103a4fc], 2
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x10278c0
mov ecx, dword [0x103b3e0]
test ecx, ecx
je 0x10278c0
call esi
mov edx, dword [0x103b3e0]
push eax
mov eax, dword [0x103b1cc]
push edx
push 0xb000
push eax
call fcn.01024ec0
add esp, 0x10
call esi
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], eax
push ecx
jmp 0x102794a
mov ax, word [esp + 0x10]
or dword [esi + 0x1c], 1
cmp al, 2
jne 0x10278f6
cmp ah, al
jne 0x10278f6
mov eax, 1
pop esi
mov ecx, dword [esp + 0x1a0]
xor ecx, esp
call fcn.01029f27
mov esp, ebp
pop ebp
ret
push 0x77
call dword [sym.imp.KERNEL32.dll_SetLastError]
test byte [0x103a4fc], 2
je 0x102793b
mov edx, dword [0x103b3e4]
test edx, edx
je 0x102793b
cmp dword [0x10390bc], 0xffffffff
je 0x102793b
mov eax, dword [0x103b3e4]
mov ecx, dword [0x103b1d0]
mov edx, dword [0x10390bc]
push 0
push eax
push 0xd400
push ecx
push edx
call dword [0x1039080]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 8], eax
lea eax, [esp + 8]
push eax
push 4
push 0xc04e000b
call fcn.010240e0
mov ecx, dword [esp + 0x1a4]
pop esi
xor ecx, esp
xor eax, eax
call fcn.01029f27
mov esp, ebp
pop ebp
ret
Function at 0x1027af0
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov esi, 1
push esi
push 0
push 0
mov edi, eax
movzx eax, word [edi]
push 0x11
push 2
push eax
mov ebx, ecx
call dword [sym.imp.WS2_32.dll_WSASocketW]
cmp eax, 0xffffffff
mov dword [ebx], eax
je 0x1027c44
push 4
lea ecx, [ebp - 8]
push ecx
push 0xfffffffffffffffb
push 0xffff
push eax
mov dword [ebp - 8], esi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x1027c44
push 0x59a
mov dword [ebp - 4], esi
call dword [sym.imp.WS2_32.dll_htons]
mov esi, dword [sym.imp.WS2_32.dll_bind]
mov word [edi + 2], ax
lea ebx, [ebx]
mov dx, word [edi]
mov eax, dword [ebx]
sub dx, 2
neg dx
sbb edx, edx
and edx, 0xc
add edx, 0x10
push edx
push edi
push eax
call esi
cmp eax, 0xffffffff
jne 0x1027bc3
cmp dword [ebp - 4], 0
je 0x1027b9c
mov ecx, dword [0x103a508]
push 0x1388
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub dword [ebp - 4], 1
jmp 0x1027b60
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebx]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx], 0xffffffff
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp word [edi], 0x17
jne 0x1027bee
push 1
call fcn.01027d30
test eax, eax
jne 0x1027bee
mov eax, dword [ebx]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx], 0xffffffff
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx]
lea ecx, [ebp - 0xc]
push ecx
lea edx, [ebx + 8]
push edx
push eax
mov dword [ebp - 0xc], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x1027c44
mov edx, dword [0x1039058]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x18]
push edx
push ecx
push eax
mov eax, dword [ebx]
push eax
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
je 0x1027c44
call fcn.01027970
mov dword [ebx + 0x88], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x1027c58
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx], 0xffffffff
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x1027d30
Capabilities:
Set socket configuration

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [0x1039004]
xor eax, esp
mov dword [esp + 0x38], eax
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp], eax
mov eax, dword [0x103a4d8]
test eax, eax
push esi
mov dword [esp + 0xc], 0x17
mov dword [esp + 8], 4
jne 0x1027d8c
push eax
call fcn.0101e9b0
mov dword [0x103a4d8], eax
lea ecx, [esp + 4]
push ecx
lea edx, [esp + 0xc]
push edx
push 0
push 0x101a390
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
test esi, esi
je 0x1027dfd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test byte [0x103a4fc], 2
je 0x1027de9
mov eax, dword [0x103b3ec]
test eax, eax
je 0x1027de9
mov ecx, dword [0x103b3ec]
mov edx, dword [0x103b1d8]
push esi
push ecx
push 0x51000
push edx
call fcn.01024ec0
add esp, 0x10
xor eax, eax
pop esi
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.01029f27
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 4]
mov eax, dword [ecx + 0x18]
mov edx, dword [eax + 8]
add eax, 8
mov dword [esp + 0x28], edx
mov edx, dword [eax + 4]
mov dword [esp + 0x2c], edx
mov edx, dword [eax + 8]
mov dword [esp + 0x30], edx
mov eax, dword [eax + 0xc]
mov dword [esp + 0x34], eax
mov eax, dword [0x103a4dc]
test eax, eax
mov dword [esp + 0x38], 0
mov esi, ecx
jne 0x1027e42
push 2
call fcn.0101e9b0
mov dword [0x103a4dc], eax
push esi
call eax
cmp dword [ebp + 8], 0
push 0x14
je 0x1027e5b
mov edx, dword [ebx]
lea ecx, [esp + 0x2c]
push ecx
push 0xc
push 0x29
push edx
jmp 0x1027e67
mov ecx, dword [ebx]
lea eax, [esp + 0x2c]
push eax
push 0xd
push 0x29
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x1027ecb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test byte [0x103a4fc], 2
je 0x1027de9
mov edx, dword [0x103b3f0]
test edx, edx
je 0x1027de9
mov eax, dword [0x103b3f0]
mov ecx, dword [0x103b1dc]
push esi
push eax
push 0x59000
push ecx
call fcn.01024ec0
add esp, 0x10
xor eax, eax
pop esi
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.01029f27
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x3c]
pop esi
xor ecx, esp
mov eax, 1
call fcn.01029f27
mov esp, ebp
pop ebp
ret 4