joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4037a4
Capabilities:
Create pipe
Get common file path
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x5149f8]
mov ecx, dword [0x513948]
sub esp, 0x42c
push esi
shr eax, 3
xor esi, esi
cmp eax, esi
jbe 0x403898
push ebx
push edi
mov ebx, ecx
mov dword [ebp - 4], eax
cmp dword [0x5149f8], 0x959
jne 0x403884
lea eax, [ebp - 0x18]
push eax
push esi
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputA]
xor eax, eax
mov word [ebp - 8], ax
lea edi, [ebp - 6]
stosw word es:[edi], ax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 8]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_EnumDateFormatsExW]
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push 0x402e3c
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
push esi
call dword [sym.imp.KERNEL32.dll_GetPriorityClass]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
push 0x402e68
push esi
push esi
call dword [sym.imp.KERNEL32.dll_OpenWaitableTimerA]
push esi
push esi
push esi
push esi
push esi
push esi
push 0x402e78
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_InitializeSListHead]
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push ebx
call fcn.004035da
add ebx, 8
dec dword [ebp - 4]
jne 0x4037cd
pop edi
pop ebx
pop esi
leave
ret
Function at 0x40396a
Capabilities:
Get common file path

Disassembly:
mov eax, 0x461e34
call fcn.00461d38
mov eax, 0x1428
call fcn.0040f5b0
push ebx
push esi
xor esi, esi
cmp dword [0x5149f8], 0x5b1
push edi
jne 0x403a16
push esi
lea eax, [ebp - 0x434]
push eax
push esi
push 0x402f04
push esi
call dword [sym.imp.KERNEL32.dll_FoldStringA]
push esi
call dword [sym.imp.KERNEL32.dll_SetLocalTime]
lea eax, [ebp - 0x34]
call fcn.00403c7e
mov dword [ebp - 4], esi
call fcn.00404821
push 0x402f54
lea ecx, [ebp - 0x18]
call fcn.00403400
lea ecx, [ebp - 0x18]
call fcn.0040341c
lea ecx, [ebp - 0x18]
call fcn.00403462
lea ecx, [ebp - 0x18]
call fcn.0040347b
push esi
push esi
call fcn.00404d83
push esi
call fcn.00404d54
push esi
call fcn.00404d3d
push esi
call fcn.00404f2e
add esp, 0x10
mov dword [esp], esi
call fcn.004035b4
fstp st(0)
push esi
call fcn.00404d3d
pop ecx
call fcn.00404e48
add dword [0x5149f8], 0x1134b
push dword [0x5149f8]
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [0x513948], eax
call fcn.004038b5
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
call ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp edi, 0x206d47
jg 0x403a5f
inc edi
cmp edi, 0x4f6a4
jl 0x403a3f
mov eax, dword [0x5149f8]
xor ecx, ecx
cmp eax, esi
jbe 0x403a85
mov edx, dword [0x5149fc]
mov dl, byte [edx + ecx + 0x1134b]
mov edi, dword [0x513948]
mov byte [edi + ecx], dl
inc ecx
cmp ecx, eax
jb 0x403a6a
xor edi, edi
lea ecx, [eax + edi]
cmp ecx, 0xe
jne 0x403ad4
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasW]
push esi
lea eax, [ebp - 0x434]
push eax
push esi
push 0x402f68
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetNumberFormatA]
push 0x402fb0
push 0x402fcc
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push esi
push esi
lea eax, [ebp - 0xc34]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesA]
mov eax, dword [0x5149f8]
inc edi
cmp edi, 0x39621
jl 0x403a87
call fcn.004037a4
xor edi, edi
call ebx
cmp edi, 0x26
jne 0x403af0
call fcn.0040389b
inc edi
cmp edi, 0x6753f
jl 0x403ae4
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push 0x7b
pop ebx
cmp dword [0x5149f8], 0x86
jne 0x403b4b
push 0x402fdc
push 0x403014
call dword [sym.imp.KERNEL32.dll_SetVolumeLabelW]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_AddConsoleAliasA]
push esi
lea eax, [ebp - 0xc34]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push esi
lea eax, [ebp - 0x834]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
cmp dword [0x5149f8], 0xf
jne 0x403b73
push esi
push esi
call edi
push esi
lea eax, [ebp - 0x1434]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_AddConsoleAliasW]
push 0x403034
push 0x403068
call edi
dec ebx
jne 0x403b02
push 0x4030bc
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x40562b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x46355c]
jne 0x405635
repz ret
jmp fcn.00409e6c
Function at 0x40d5ff
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00407adc
and dword [ebp - 4], 0
cmp dword [0x46556c], 0
mov ebx, eax
jne 0x40d6b0
push 0x402c3c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40d761
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x402c30
push edi
call esi
test eax, eax
je 0x40d761
push eax
call fcn.00407a6a
mov dword [esp], 0x402c20
push edi
mov dword [0x46556c], eax
call esi
push eax
call fcn.00407a6a
mov dword [esp], 0x402c0c
push edi
mov dword [0x465570], eax
call esi
push eax
call fcn.00407a6a
mov dword [esp], 0x402bf0
push edi
mov dword [0x465574], eax
call esi
push eax
call fcn.00407a6a
pop ecx
mov dword [0x46557c], eax
test eax, eax
je 0x40d6b0
push 0x402bd8
push edi
call esi
push eax
call fcn.00407a6a
pop ecx
mov dword [0x465578], eax
mov eax, dword [0x465578]
cmp eax, ebx
je 0x40d708
cmp dword [0x46557c], ebx
je 0x40d708
push eax
call fcn.00407ae5
push dword [0x46557c]
mov esi, eax
call fcn.00407ae5
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x40d708
test edi, edi
je 0x40d708
call esi
test eax, eax
je 0x40d6ff
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40d6ff
test byte [ebp - 0xc], 1
jne 0x40d708
or dword [ebp + 0x10], 0x200000
jmp 0x40d741
mov eax, dword [0x465570]
cmp eax, ebx
je 0x40d741
push eax
call fcn.00407ae5
pop ecx
test eax, eax
je 0x40d741
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x40d741
mov eax, dword [0x465574]
cmp eax, ebx
je 0x40d741
push eax
call fcn.00407ae5
pop ecx
test eax, eax
je 0x40d741
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x46556c]
call fcn.00407ae5
pop ecx
test eax, eax
je 0x40d761
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40d763
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401777
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
sub esp, 0x14
push ebx
mov ebx, ecx
push ebp
push esi
push edi
movzx ecx, byte [ebx + 0xc0]
mov ebp, edx
shl ecx, 4
add ecx, ebx
mov dword [esp + 0x10], ebx
call fcn.004011c8
mov bl, byte [ebx + 0xc0]
dec bl
shl bl, 2
mov esi, ebp
lea edi, [esp + 0x14]
push 0x10
xor edx, edx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop esi
mov ecx, edx
mov eax, edx
and ecx, 3
shl ecx, 2
sub eax, ecx
and eax, 0xf
mov al, byte [esp + eax + 0x14]
mov byte [edx + ebp], al
inc edx
dec esi
jne 0x4017b1
push 0x10
mov ecx, ebp
pop edx
movzx eax, byte [ecx]
mov al, byte [eax + 0x407350]
mov byte [ecx], al
inc ecx
dec edx
jne 0x4017d0
mov ecx, dword [esp + 0x10]
mov edx, ebp
movzx eax, bl
lea ecx, [ecx + eax*4]
call fcn.004011c8
test bl, bl
je 0x401800
mov ecx, ebp
call fcn.004011db
add bl, 0xfc
jmp 0x4017a2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret

Function at 0x401808
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push edi
mov ebp, ecx
lea edi, [ebx + 0xf0]
cmp edi, ebx
jbe 0x401837
push esi
mov edx, edi
mov ecx, ebp
call fcn.00401777
mov edx, edi
lea ecx, [edi - 0x10]
call fcn.004011c8
add edi, 0xfffffff0
cmp edi, ebx
ja 0x40181c
pop esi
mov edx, edi
mov ecx, ebp
pop edi
pop ebp
pop ebx
jmp fcn.00401777

Function at 0x401843
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
cmp dword [0x40a860], 0
jne 0x401863
push 0xf0000000
push 0x18
push 0
push 0
push 0x40a860
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
ret
mov al, 1
ret

Function at 0x401866
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 8], 0x20
mov esi, edx
mov dword [ebp - 4], ebx
mov edi, ecx
call fcn.00401843
test al, al
je 0x4018cb
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push 0x800c
push dword [0x40a860]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x4018cb
push ebx
push esi
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4018cb
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
push 2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x4018cb
mov bl, 1
cmp dword [ebp - 4], 0
je 0x4018da
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4018e3
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x30], 0x208
lea edi, [esp + 0x3c]
mov dword [esp + 0x34], 0x6602
xor eax, eax
mov dword [esp + 0x38], 0x10
mov esi, ecx
stosd dword es:[edi], eax
xor ebx, ebx
mov ebp, edx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], 0x20
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [esp + 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea edi, [esp + 0x3c]
mov dword [esp + 0x1c], 0x800c
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.00401843
test al, al
je 0x4019cb
lea eax, [esp + 0x14]
push eax
push ebx
push ebx
push 0x1c
lea eax, [esp + 0x40]
push eax
push dword [0x40a860]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x4019cb
lea eax, [esp + 0x10]
push eax
push ebx
push dword [esp + 0x1c]
push 0x8009
push dword [0x40a860]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x4019cb
push ebx
lea eax, [esp + 0x20]
push eax
push 5
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
je 0x4019cb
push ebx
push dword [esp + 0x54]
push ebp
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4019cb
push ebx
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x5c]
push 2
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x4019cb
inc ebx
cmp dword [esp + 0x14], 0
je 0x4019dc
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [esp + 0x10], 0
je 0x4019ed
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x3c
ret

Function at 0x401cf2
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
lea eax, [ebp - 4]
mov bl, cl
mov ecx, dword [0x40aa04]
mov esi, edx
push eax
push dword [ebp + 8]
call fcn.00401be6
pop ecx
pop ecx
test eax, eax
jne 0x401d31
push dword [ebp + 8]
movsx eax, bl
push esi
push eax
push str.Fatal:_Option____c__must_be_numeric_between__u_and__u._n
call fcn.00403fcc
add esp, 0x10
push 0x57
call dword [sym.imp.msvcrt.dll_exit]
mov eax, dword [ebp - 4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401f18
Capabilities:
Terminate process

Disassembly:
push esi
call dword [sym.imp.msvcrt.dll__errno]
mov esi, dword [eax]
push esi
call dword [sym.imp.msvcrt.dll_strerror]
push eax
push dword [0x40a87c]
push str.Fatal:_Could_not_read__s:__s_n
call fcn.0040402e
add esp, 0x10
push esi
call dword [sym.imp.msvcrt.dll_exit]
pop esi
Function at 0x40200b
Capabilities:
Read file on windows

Disassembly:
push ecx
mov edx, dword [0x40a87c]
mov ecx, section..data
mov dword [0x40a880], ecx
push ebx
mov ebx, 0x742
push ebp
push esi
push edi
test edx, edx
jne 0x40203b
call fcn.00401f5f
mov ecx, dword [0x40a880]
mov edx, dword [0x40a87c]
push 2
xor esi, esi
cmp byte [edx], 0x2d
pop ebp
jne 0x402051
movzx eax, byte [edx + 1]
test al, al
je 0x40211a
push 0x40773c
push edx
call dword [sym.imp.msvcrt.dll_fopen]
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x402076
cmp byte [0x40a877], al
je 0x402114
jmp 0x4021ef
push ebp
mov ebp, dword [sym.imp.msvcrt.dll_fseek]
push esi
push edi
call ebp
add esp, 0xc
test eax, eax
jne 0x4021ef
push edi
call dword [sym.imp.msvcrt.dll_ftell]
mov ebx, eax
pop ecx
cmp ebx, 0xffffffff
je 0x4021ef
push ebx
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
test eax, eax
jne 0x4020b0
call fcn.00401dca
push esi
push esi
push edi
mov dword [0x40a880], eax
call ebp
add esp, 0xc
test eax, eax
jne 0x4021ef
push edi
push ebx
push 1
push dword [0x40a880]
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, ebx
jne 0x4021ef
push edi
call dword [sym.imp.msvcrt.dll_fclose]
cmp byte [0x40a876], 0
pop ecx
jne 0x402114
mov ecx, dword [0x40a880]
push dword [0x40a87c]
movzx eax, word [ecx + 4]
push eax
movzx eax, word [ecx + 6]
push eax
push str.Read_KMS_data_file_version__u._u__s_n
call fcn.00403fbc
add esp, 0x10
mov ecx, dword [0x40a880]
lea ebp, [ecx + ebx]
cmp byte [ebp - 1], 0
mov dword [esp + 0x10], ebp
jne 0x4021f4
mov edx, esi
lea eax, [ecx + 0x20]
add dword [eax], ecx
cmp dword [eax], ebp
ja 0x4021f4
inc edx
add eax, 8
cmp edx, 5
jb 0x402130
cmp byte [ecx + 8], 0
mov edi, esi
jbe 0x402166
lea edx, [ecx + 0x58]
add dword [edx - 0x10], ecx
cmp dword [edx - 0x10], ebp
ja 0x4021f4
movzx eax, byte [ecx + 8]
inc edi
add edx, 0x20
cmp edi, eax
jb 0x40214e
mov edx, esi
cmp dword [ecx + 0x18], esi
jbe 0x402183
mov edi, esi
mov eax, dword [ecx + 0x38]
add dword [eax + edi], ecx
cmp dword [eax + edi], ebp
ja 0x4021f4
inc edx
add edi, 0x20
cmp edx, dword [ecx + 0x18]
jb 0x40216f
mov edi, dword [ecx + 0xc]
add edi, dword [ecx + 0x10]
add edi, dword [ecx + 0x14]
cmp dword [ecx], 0x444d4b
jne 0x4021f4
push 2
pop eax
cmp word [ecx + 6], ax
jne 0x4021f4
mov ebp, edi
mov eax, ebx
shl ebp, 5
cdq
add ebp, 0x68
cmp esi, edx
ja 0x4021f4
jb 0x4021b2
cmp ebp, eax
jae 0x4021f4
test edi, edi
je 0x4021e9
mov ebp, dword [esp + 0x10]
mov ebx, esi
mov edx, dword [ecx + 0x20]
add edx, ebx
add dword [edx + 0x10], ecx
cmp dword [edx + 0x10], ebp
jae 0x4021f4
cmp dword [ecx + 0xc], 0
je 0x4021d8
movzx eax, byte [edx + 0x18]
cmp eax, dword [ecx + 0xc]
jge 0x4021f4
movzx eax, byte [edx + 0x19]
cmp eax, dword [ecx + 0x10]
jge 0x4021f4
inc esi
add ebx, 0x20
cmp esi, edi
jb 0x4021bc
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
call fcn.00401f18
call fcn.00401f44
int3
Function at 0x4030b3
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ecx
cmp byte [esp + 0xc], 0
mov eax, ecx
push ebx
push ebp
mov ebp, dword [sym.imp.WS2_32.dll_recv]
mov ebx, edx
cmovne ebp, dword [sym.imp.WS2_32.dll_send]
push esi
mov esi, dword [esp + 0x14]
push edi
mov dword [esp + 0x10], eax
push 0
push esi
push ebx
push eax
call ebp
mov edi, eax
test edi, edi
jns 0x4030f6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
mov eax, dword [esp + 0x10]
je 0x4030d6
test edi, edi
jle 0x403104
mov eax, dword [esp + 0x10]
sub esi, edi
add ebx, edi
test esi, esi
jg 0x4030d6
pop edi
xor eax, eax
test esi, esi
pop esi
pop ebp
sete al
pop ebx
pop ecx
ret

Function at 0x403111
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
lea eax, [ebp - 8]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0xa
push 8
push eax
push 0x40
pop ebx
push ebx
lea eax, [ebp - 0x48]
mov edi, ecx
push eax
push dword [ebp + 0xc]
push esi
call dword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
je 0x403141
xor al, al
jmp 0x40316c
cmp word [esi], 0x17
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x48]
mov ecx, str._s:_s
push eax
mov eax, str.__s_:_s
cmovne eax, ecx
push eax
push ebx
push edi
call dword [sym.imp.msvcrt.dll__snprintf]
add esp, 0x14
cmp ebx, eax
sbb al, al
inc al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x403173
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, edx
mov dword [ebp - 4], ecx
push esi
mov esi, ebx
push edi
lea edx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x403186
sub esi, edx
lea edi, [esi + 1]
cmp edi, 0x108
jbe 0x40319e
xor al, al
jmp 0x403213
mov eax, edi
call fcn.00401070
mov esi, esp
push edi
push ebx
push esi
call sub.msvcrt.dll_memcpy
lea eax, [ebp - 8]
mov ecx, esi
push eax
lea edx, [ebp - 0xc]
call fcn.00401d5b
add esp, 0x10
lea edi, [ebp - 0x2c]
xor eax, eax
push 8
pop ecx
push dword [ebp - 4]
rep stosd dword es:[edi], eax
and dword [ebp - 0x28], eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 8]
mov dword [ebp - 0x24], 1
push dword [ebp - 0xc]
mov dword [ebp - 0x20], 6
mov dword [ebp - 0x2c], 5
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x403211
mov ecx, eax
call fcn.00403091
push eax
push ebx
push str.Warning:__s:__s_n
call fcn.00403fcc
add esp, 0xc
jmp 0x40319a
mov al, 1
lea esp, [ebp - 0x38]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4032c6
Capabilities:
Get local ipv4 addresses
Resolve dns
Terminate process

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
mov eax, 0x4000
mov dword [esp + 0x18], edx
push edi
push eax
mov ebp, ecx
mov dword [esp + 0x18], eax
call dword [sym.imp.msvcrt.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
jne 0x4032f1
call fcn.00401dca
mov esi, eax
mov ebx, dword [sym.imp.IPHLPAPI.DLL_GetAdaptersAddresses]
lea eax, [esp + 0x14]
push eax
push esi
push 0
push 0x2e
push 0
call ebx
mov edi, eax
cmp edi, 0x6f
jne 0x40333c
push esi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [esp + 0x14]
call dword [sym.imp.msvcrt.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
jne 0x40332c
call fcn.00401dca
mov esi, eax
lea eax, [esp + 0x14]
push eax
push esi
push 0
push 0x2e
push 0
call ebx
mov edi, eax
test edi, edi
je 0x40335b
mov ecx, edi
call fcn.00401d3a
push eax
push str.FATAL:_Could_not_get_network_address_list:__s_n
call fcn.00403fcc
pop ecx
pop ecx
push edi
call dword [sym.imp.msvcrt.dll_exit]
and dword [ebp], 0
mov edi, esi
test esi, esi
je 0x403391
cmp dword [edi + 0x44], 1
jne 0x40338a
mov ebx, dword [edi + 0x10]
jmp 0x403386
mov ecx, dword [ebx + 0xc]
lea edx, [esp + 0x20]
call fcn.0040321d
test al, al
je 0x403383
inc dword [ebp]
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x403370
mov edi, dword [edi + 8]
test edi, edi
jne 0x403365
mov eax, dword [ebp]
shl eax, 2
push eax
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
test eax, eax
jne 0x4033a8
call fcn.00401dca
mov ecx, dword [esp + 0x1c]
mov ebx, esi
and dword [ebp], 0
test esi, esi
mov dword [ecx], eax
jmp 0x403456
cmp dword [ebx + 0x44], 1
jne 0x403451
mov edi, dword [ebx + 0x10]
test edi, edi
je 0x403451
mov ebx, dword [esp + 0x1c]
mov ecx, dword [edi + 0xc]
lea edx, [esp + 0x18]
call fcn.0040321d
test al, al
je 0x403446
push 0x40
call dword [sym.imp.msvcrt.dll_malloc]
mov dword [esp + 0x1c], eax
pop ecx
test eax, eax
jne 0x4033fe
call fcn.00401dca
mov dword [esp + 0x18], eax
push 2
push 0
push 0
push 0x40
push eax
push dword [edi + 0x10]
push dword [edi + 0xc]
call dword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
je 0x403434
mov ecx, eax
call fcn.00403091
push eax
push str.WARNING:_Could_not_get_IP_address_from_interface_list:__s_n
call fcn.00403fcc
mov edx, dword [esp + 0x20]
pop ecx
pop ecx
mov byte [edx], 0
jmp 0x403438
mov edx, dword [esp + 0x18]
mov ecx, dword [ebp]
mov eax, dword [ebx]
mov dword [eax + ecx*4], edx
lea eax, [ecx + 1]
mov dword [ebp], eax
mov edi, dword [edi + 8]
test edi, edi
jne 0x4033d4
mov ebx, dword [esp + 0x20]
mov ebx, dword [ebx + 8]
test ebx, ebx
mov dword [esp + 0x20], ebx
jne 0x4033bb
push esi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x403470
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x48
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ebx, edx
lea ecx, [esp + 0x18]
push dword [edi + 0x10]
push dword [edi + 0x18]
call fcn.00403111
pop ecx
pop ecx
push 6
xor ebp, ebp
inc ebp
push ebp
push dword [edi + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx], eax
cmp eax, 0xffffffff
jne 0x4034d6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, esi
call fcn.00401d3a
cmp dword [edi + 4], 0x17
mov ecx, str.IPv6
push eax
mov eax, str.IPv4
cmovne ecx, eax
push ecx
push str.Warning:__s_error.__s_n
call fcn.00403fcc
add esp, 0xc
jmp 0x40356c
cmp dword [edi + 4], 0x17
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [esp + 0x10], ebp
jne 0x4034f4
push 4
lea ecx, [esp + 0x14]
push ecx
push 0x1b
push 0x29
push eax
call esi
push 4
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebp
push eax
push 0xfffffffffffffffb
push 0xffff
push dword [ebx]
call esi
push dword [edi + 0x10]
push dword [edi + 0x18]
push dword [ebx]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x403542
push closesocket
push dword [ebx]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jne 0x403542
lea eax, [esp + 0x18]
push eax
push str.Listening_on__s_n
call fcn.00403fbc
pop ecx
pop ecx
xor eax, eax
jmp 0x40356e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, esi
call fcn.00401d3a
push eax
lea eax, [esp + 0x1c]
push eax
push str.Warning:__s:__s_n
call fcn.00403fcc
add esp, 0xc
push dword [ebx]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret

Function at 0x4035e6
Capabilities:
Get socket status

Disassembly:
sub esp, 0x104
push ebx
mov ebx, dword [0x40a898]
push ebp
xor ebp, ebp
mov eax, ebp
mov edx, ebp
mov dword [esp + 8], eax
push esi
mov esi, ebp
test ebx, ebx
jle 0x403648
push edi
mov edi, dword [0x40aa44]
mov ecx, ebp
test eax, eax
je 0x403622
mov ebp, dword [edi + edx*4]
cmp dword [esp + ecx*4 + 0x14], ebp
je 0x403620
inc ecx
cmp ecx, eax
jb 0x403615
xor ebp, ebp
cmp ecx, eax
jne 0x40363b
cmp eax, 0x40
jae 0x40363b
mov eax, dword [edi + edx*4]
mov dword [esp + ecx*4 + 0x14], eax
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp dword [edi + edx*4], esi
cmova esi, dword [edi + edx*4]
inc edx
cmp edx, ebx
jl 0x40360c
pop edi
push ebp
push ebp
push ebp
lea eax, [esp + 0x18]
push eax
lea eax, [esi + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x403689
cmp dword [0x40a898], 0
mov esi, ebp
jle 0x403689
lea eax, [esp + 0xc]
push eax
mov eax, dword [0x40aa44]
push dword [eax + esi*4]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x403696
inc esi
cmp esi, dword [0x40a898]
jl 0x403669
or eax, 0xffffffff
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
mov eax, dword [0x40aa44]
cmp dword [eax + esi*4], 0xffffffff
je 0x403689
push ebp
push ebp
push dword [eax + esi*4]
call dword [sym.imp.WS2_32.dll_accept]
jmp 0x40368c