joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40f220
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x418660]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x40f262
call edi
mov esi, eax
test esi, esi
je 0x40f24c
mov eax, 1
jmp 0x40f25d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40f36f
mov eax, 2
mov dword [0x418660], eax
cmp eax, 1
jne 0x40f302
test esi, esi
jne 0x40f27b
call edi
mov esi, eax
test esi, esi
je 0x40f36f
cmp word [esi], 0
mov eax, esi
je 0x40f295
add eax, 2
cmp word [eax], 0
jne 0x40f283
add eax, 2
cmp word [eax], 0
jne 0x40f283
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x40f2f4
push edi
call fcn.0040c620
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40f2f4
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x40f2e6
push ebx
call fcn.0040c6d0
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x40f36f
test ebx, ebx
jne 0x40f313
call ebp
mov ebx, eax
test ebx, ebx
je 0x40f36f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40f32b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40f31b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40f31b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.0040c620
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40f34d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x40fa70
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x416a50
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x40fa94
add eax, 8
inc ebp
cmp eax, 0x416ae0
jb 0x40fa85
cmp ecx, dword [ebp*8 + 0x416a50]
jne 0x40fc3b
mov eax, dword [0x4184e0]
cmp eax, 1
je 0x40fbfd
test eax, eax
jne 0x40fac0
cmp dword [0x414864], 1
je 0x40fbfd
cmp ecx, 0xfc
je 0x40fc3b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40fafb
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x40fb44
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x4134e4
add ebx, ecx
push ebx
call fcn.00411270
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4134c4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x416a54]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004111e0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x41ad00]
test eax, eax
je 0x40fc0e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x40fc18
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x416a54]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x410340
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x41ae00]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x4104ed
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x41ad00]
lea edi, [ecx*4 + 0x41ad00]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x4104ed
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x4103ae
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x4103bf
push 2
push ebp
push eax
call fcn.00410280
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x41051e
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x410469
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x41041a
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x410407
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x4103ea
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41050f
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x410465
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x4103e6
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4104de
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4104b2
cmp eax, 5
jne 0x41049b
mov dword [0x4184fc], eax
mov dword [0x4184f8], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00411370
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x4104d2
cmp byte [ebp], 0x1a
jne 0x4104d2
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x4184f8], 0x1c
jmp 0x4104f7
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x4184f8], 9
pop edi
pop esi
pop ebp
mov dword [0x4184fc], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x410465
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41054f
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x410469
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x410469
Function at 0x40607d
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x422274], 0
push esi
jne 0x4060b4
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x40608e
mov dword [ecx*4 + 0x422270], eax
inc ecx
cmp ecx, 0x100
jl 0x406089
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x4060e5
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x422270]
xor eax, esi
inc ecx
dec edx
jne 0x4060c7
pop edi
not eax
pop esi
ret 0xc

Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43000c
pop eax
nop
nop
nop
nop
nop
nop
add eax, 0x403d6f
nop
sub eax, 0x403d15
nop
nop
mov ebx, dword [eax]
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
jl 0x430030
nop
nop
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x43001e
nop
nop
nop
popal
nop
nop
jmp loc.00401219
Function at 0x406625
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40d448]
jne 0x40662f
repz ret
jmp fcn.0040861b

Function at 0x407c33
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x40d448]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.0040532f
and dword [ebp - 0x14], 0
cmp dword [0x43c270], 0
mov dword [ebp - 0x18], eax
jne 0x407ce6
push 0x4021a0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x407d8e
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x402194
push ebx
call edi
test eax, eax
je 0x407d8e
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x402184
push ebx
mov dword [0x43c270], eax
call edi
push eax
call esi
push 0x402170
push ebx
mov dword [0x43c274], eax
call edi
push eax
call esi
push 0x402154
push ebx
mov dword [0x43c278], eax
call edi
push eax
call esi
mov dword [0x43c280], eax
test eax, eax
je 0x407ce6
push 0x40213c
push ebx
call edi
push eax
call esi
mov dword [0x43c27c], eax
mov eax, dword [0x43c27c]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x407d3f
cmp dword [0x43c280], ecx
je 0x407d3f
push eax
call esi
push dword [0x43c280]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x407d3f
test ebx, ebx
je 0x407d3f
call edi
test eax, eax
je 0x407d36
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x407d36
test byte [ebp - 8], 1
jne 0x407d3f
or dword [ebp + 0x10], 0x200000
jmp 0x407d72
mov eax, dword [0x43c274]
cmp eax, dword [ebp - 0x18]
je 0x407d72
push eax
call esi
test eax, eax
je 0x407d72
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x407d72
mov eax, dword [0x43c278]
cmp eax, dword [ebp - 0x18]
je 0x407d72
push eax
call esi
test eax, eax
je 0x407d72
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x43c270]
call esi
test eax, eax
je 0x407d8e
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x407d90
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406625
leave
ret
Function at 0x409f10
Capabilities:
Copy file
Get uefi variable

Disassembly:
sub esp, 0x934
cmp dword [0x4b7de0], 0x37
jne 0x409f95
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CopyFileExA]
push 0x402a58
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
lea eax, [esp + 0x18]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCPInfoExA]
push 0
lea ecx, [esp + 0x138]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableA]
lea edx, [esp]
push edx
push 0
lea eax, [esp + 0xc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputW]
push 0
call dword [sym.imp.KERNEL32.dll_PulseEvent]
push 0
lea ecx, [esp + 0x538]
push ecx
push 0x402a6c
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeMountPointA]
mov edx, dword [0x4b7de4]
mov ecx, dword [0x4b74c4]
mov al, byte [edx + esi + 0x38d6]
mov byte [ecx + esi], al
add esp, 0x934
ret
Function at 0x1000bb80
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x10038f80]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012061
mov esp, ebp
pop ebp
ret

Function at 0x1000bdc0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [0x10038f80]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x24]
mov dword [ebp - 0x110], eax
mov dword [ebp - 0x10c], 0
je 0x1000bdfa
lea ecx, [ebp - 0x108]
xor edx, edx
jmp 0x1000be02
xor ecx, ecx
lea edx, [ebp - 0x108]
mov eax, dword [esi]
push edi
lea edi, [ebp - 0x110]
push edi
push 0
push edx
mov dword [ebp - 0x104], eax
push ecx
inc eax
push eax
mov dword [ebp - 0x108], 1
call dword [sym.imp.WS2_32.dll_select]
pop edi
cmp eax, 0xffffffff
jne 0x1000be5a
mov byte [esi + 0x2c], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Error_while_in_select__.
push esi
mov dword [esi + 0x30], eax
call fcn.1000bd20
add esp, 8
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012061
mov esp, ebp
pop ebp
ret
mov edx, dword [esi]
lea ecx, [ebp - 0x108]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1000be96
push str.select___timed_out.
push esi
mov byte [esi + 0x2c], al
mov dword [esi + 0x30], 0x274c
call fcn.1000bd20
add esp, 8
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012061
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov eax, 1
pop esi
call fcn.10012061
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
cmp dword [esi], 0xffffffff
jne 0x1000bffa
push str.Error_while_trying_to_read_data_from_the_stream.
push esi
mov byte [esi + 0x2c], 1
mov dword [esi + 0x30], 1
call fcn.1000bd20
add esp, 8
xor eax, eax
pop esi
pop ebp
ret
cmp dword [esi + 0x24], 0
jle 0x1000c00f
push 1
push esi
call fcn.1000bdc0
add esp, 8
test eax, eax
je 0x1000bff5
mov ecx, dword [ebp + 0xc]
mov edx, dword [esi]
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x1000c04b
mov byte [esi + 0x2c], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Error_while_trying_to_read_data_from_the_stream.
push esi
mov dword [esi + 0x30], eax
call fcn.1000bd20
add esp, 8
pop edi
xor eax, eax
pop esi
pop ebp
ret
test eax, eax
jne 0x1000c052
or eax, 0xffffffff
mov dword [edi], eax
pop edi
mov eax, 1
pop esi
pop ebp
ret
Function at 0x1000c060
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
cmp dword [esi], 0xffffffff
jne 0x1000c08b
mov eax, 1
push str.Error_while_trying_to_read_data_from_the_stream.
push esi
mov byte [esi + 0x2c], al
mov dword [esi + 0x30], eax
call fcn.1000bd20
add esp, 8
or eax, 0xffffffff
pop esi
pop ebp
ret
cmp dword [esi + 0x24], 0
jle 0x1000c0a0
push 0
push esi
call fcn.1000bdc0
add esp, 8
test eax, eax
je 0x1000c0d3
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [esi]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x1000c0d6
mov byte [esi + 0x2c], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Error_while_trying_to_write_data_to_the_stream.
push esi
mov dword [esi + 0x30], eax
call fcn.1000bd20
add esp, 8
or eax, 0xffffffff
pop esi
pop ebp
ret

Function at 0x1000c230
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
lea ecx, [ebp + 0x10]
push ecx
mov dword [ebp + 0x10], eax
mov eax, dword [esi]
push edx
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x1000c277
mov byte [esi + 0x2c], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Error_while_using_ioctl.
push esi
mov dword [esi + 0x30], eax
call fcn.1000bd20
add esp, 8
pop edi
xor eax, eax
pop esi
pop ebp
ret
mov ecx, dword [ebp + 0x10]
mov dword [edi], ecx
pop edi
mov eax, 1
pop esi
pop ebp
ret
Function at 0x1000c2e0
Capabilities:
Create tcp socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x10038f80]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
cmp dword [esi], 0xffffffff
mov dword [ebp - 0x1c], 1
je 0x1000c327
push 0
push esi
mov byte [esi + 0x2c], 1
mov dword [esi + 0x30], 2
call fcn.1000bd20
add esp, 8
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012061
mov esp, ebp
pop ebp
ret
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x1000c366
mov byte [esi + 0x2c], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Error_trying_to_create_a_new_socket_in_initXSocket.
push esi
mov dword [esi + 0x30], eax
call fcn.1000bd20
add esp, 8
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012061
mov esp, ebp
pop ebp
ret
push 1
push esi
call fcn.1000bf70
add esp, 8
test eax, eax
je 0x1000c316
push 4
lea eax, [ebp - 0x1c]
push eax
push 4
push 0xffff
push esi
call fcn.1000bbf0
add esp, 0x14
cmp eax, 0xffffffff
jne 0x1000c3bc
mov byte [esi + 0x2c], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Error_while_trying_to_set_socket_option_for_address_reuse.
push esi
mov dword [esi + 0x30], eax
call fcn.1000bd20
add esp, 8
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012061
mov esp, ebp
pop ebp
ret
mov edx, dword [esi]
push 0x10
lea ecx, [esi + 0x14]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x1000c3fc
mov byte [esi + 0x2c], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Error_while_trying_to_bind_socket_to_an_address.
push esi
mov dword [esi + 0x30], eax
call fcn.1000bd20
add esp, 8
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012061
mov esp, ebp
pop ebp
ret
cmp word [esi + 0x16], 0
jne 0x1000c454
mov edx, dword [esi]
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x14]
push ecx
push edx
mov dword [ebp - 0x18], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x1000c44c
mov byte [esi + 0x2c], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Error_while_attempting_to_retrievelocal_socket_information.
push esi
mov dword [esi + 0x30], eax
call fcn.1000bd20
add esp, 8
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012061
mov esp, ebp
pop ebp
ret
mov ax, word [ebp - 0x12]
mov word [esi + 0x16], ax
mov ecx, dword [ebp - 4]
mov byte [esi + 0x2c], 0
mov dword [esi + 0x30], 0
xor ecx, ebp
mov eax, 1
pop esi
call fcn.10012061
mov esp, ebp
pop ebp
ret
Function at 0x1000c480
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x10038f80]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
mov ecx, 1
xor ebx, ebx
push ebx
mov dword [ebp - 0x20c], ecx
mov dword [ebp - 0x108], ecx
lea ecx, [ebp - 0x108]
push ecx
lea edx, [ebp - 0x20c]
push edx
mov dword [ebp - 0x208], eax
mov dword [ebp - 0x104], eax
push ebx
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x1000c502
mov byte [esi + 0x2c], bl
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Error_while_in_select__.
push esi
mov dword [esi + 0x30], eax
call fcn.1000bd20
add esp, 8
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012061
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi]
push edi
lea eax, [ebp - 0x108]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1000c584
lea edi, [esi + 0x30]
push edi
push esi
call fcn.1000beb0
add esp, 8
test eax, eax
jne 0x1000c549
mov edx, dword [esi]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
mov dword [esi], 0xffffffff
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012061
mov esp, ebp
pop ebp
ret
cmp dword [edi], ebx
je 0x1000c5d1
mov eax, dword [esi]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push str.Error_on_socket_during_connect.
push esi
mov dword [esi], 0xffffffff
mov byte [esi + 0x2c], bl
call fcn.1000bd20
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012061
mov esp, ebp
pop ebp
ret
mov edx, dword [esi]
lea ecx, [ebp - 0x20c]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1000c5d1
mov eax, dword [esi]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push str.connection_timed_out__in_select___.
push esi
mov dword [esi], 0xffffffff
mov byte [esi + 0x2c], bl
mov dword [esi + 0x30], 0x274c
call fcn.1000bd20
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012061
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
mov byte [esi + 0x2c], bl
mov dword [esi + 0x30], ebx
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.10012061
mov esp, ebp
pop ebp
ret
Function at 0x1000c5f0
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.1000c2e0
add esp, 4
test eax, eax
jne 0x1000c60a
pop esi
mov esp, ebp
pop ebp
ret
push ebx
xor ebx, ebx
cmp dword [esi + 0x24], ebx
jne 0x1000c64c
mov ecx, dword [esi]
push 0x10
lea eax, [esi + 4]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1000c723
mov byte [esi + 0x2c], bl
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Error_while_trying_to_connect.
push esi
mov dword [esi + 0x30], eax
call fcn.1000bd20
add esp, 8
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 4]
push edx
push 0x8004667e
push esi
mov dword [ebp - 4], 1
call fcn.1000c230
add esp, 0xc
test eax, eax
jne 0x1000c68b
mov byte [esi + 0x2c], bl
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Error_setting_to_non_blocking_during_connect.
push esi
mov dword [esi + 0x30], eax
call fcn.1000bd20
add esp, 8
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi]
push 0x10
lea eax, [esi + 4]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1000c6e2
mov byte [esi + 0x2c], bl
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov cl, byte [esi + 0x2c]
mov dword [esi + 0x30], eax
cmp cl, bl
jne 0x1000c6cc
cmp eax, 0x2733
je 0x1000c6c4
cmp cl, bl
jne 0x1000c6cc
cmp eax, 0x2714
jne 0x1000c6cc
mov byte [esi + 0x2c], bl
mov dword [esi + 0x30], ebx
jmp 0x1000c6e6
push str.Error_while_trying_to_connect.
push esi
call fcn.1000bd20
add esp, 8
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp eax, ebx
je 0x1000c6f3
push esi
call fcn.1000c480
add esp, 4
test eax, eax
je 0x1000c71b
lea edx, [ebp - 4]
push edx
push 0x8004667e
push esi
mov dword [ebp - 4], ebx
call fcn.1000c230
add esp, 0xc
test eax, eax
jne 0x1000c723
mov eax, dword [esi]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi], 0xffffffff
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
pop ebx
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret