joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40450b
Capabilities:
Delete file

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
xor ebx, ebx
push edi
mov eax, dword [esi + 8]
mov ebp, dword [esi + 0xc]
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ebp
call fcn.004273f0
mov edi, eax
test edi, edi
je 0x4045db
push dword [esp + 0x18]
call fcn.0044c5d0
push ebx
push pe_nt_image_headers32
push 2
push ebx
push 1
push 0xc0000000
push ebp
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x4045cb
test byte [esi + 0x1c], 2
mov dword [esi + 0x10], ebp
jne 0x404574
push 1
push 0x34
push edi
call fcn.00427480
add esp, 0xc
push dword [esp + 0x18]
push 0x2712
push edi
call fcn.00427480
push 0x404605
push 0x4e2b
push edi
call fcn.00427480
push esi
push 0x2711
push edi
call fcn.00427480
push edi
call fcn.00427470
add esp, 0x28
test eax, eax
jne 0x4045b6
xor ebx, ebx
mov dword [esi + 4], 0xfffffffe
inc ebx
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x4045cb
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x18]
call fcn.0044c5c0
push edi
call fcn.004273d0
pop ecx
cmp dword [esi + 4], 0xfffffffe
je 0x4045ee
cmp dword [esi + 4], 0xfffffffc
je 0x4045ee
mov dword [esi + 4], 0xfffffffd
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
pop ecx
ret

Function at 0x40472c
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
push edi
xor edi, edi
inc edi
cmp dword [0x580830], 0
jne 0x404758
push 0x40467b
push 0x10
push 0x2c
mov dword [0x580830], edi
call fcn.0040e96a
mov dword [0x58082c], eax
cmp word [0x580824], 0
jne 0x4047f4
lea eax, [esp + 4]
push eax
push 0x101
call dword [sym.imp.WSOCK32.DLL_WSAStartup]
test eax, eax
jne 0x404783
mov word [0x580824], di
jmp 0x40478b
xor eax, eax
mov word [0x580824], ax
push str.ws2_32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x580840], eax
test eax, eax
je 0x4047f4
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x454038
push eax
call esi
push 0x454044
push dword [0x580840]
mov dword [0x580834], eax
call esi
push str.getnameinfo
push dword [0x580840]
mov dword [0x580838], eax
call esi
cmp dword [0x580834], 0
mov dword [0x58083c], eax
pop esi
je 0x4047f4
cmp dword [0x580838], 0
je 0x4047f4
test eax, eax
je 0x4047f4
mov dword [0x580828], edi
movsx eax, word [0x580824]
pop edi
add esp, 0x190
ret
Function at 0x407a90
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x407acc
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4

Function at 0x407e70
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
mov dword [esp + 4], 0
test esi, esi
je 0x407ed5
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x407ecd
push dword [esp + 0x10]
push dword [0x5810e4]
call fcn.0040e897
test eax, eax
je 0x407ec3
cmp dword [eax + 4], 0
je 0x407eb2
push edi
push esi
push eax
call fcn.00408440
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea ecx, [esp + 0xc]
push ecx
push edi
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
pop edi
xor eax, eax
pop esi
pop ecx
ret 0xc
xor eax, eax
pop esi
pop ecx
ret 0xc
Function at 0x407f90
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x580750]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x408114
mov cl, byte [esp + 3]
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x407fde
test ebp, ebp
je 0x408080
dec ebp
cmp dword [ebx + 4], 0
je 0x407ff7
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.00408550
mov dword [esp + 0x14], eax
jmp 0x408011
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov cl, byte [esp + 0x13]
cmp eax, 1
jne 0x408080
test cl, cl
je 0x408025
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x13]
mov eax, dword [esp + 0x18]
mov edi, esi
mov edx, dword [esp + 0x20]
dec eax
sub edi, edx
cmp edi, eax
jle 0x408060
mov eax, dword [esp + 0x18]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x580750]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x20], edx
lea esi, [edi + edx]
test cl, cl
je 0x408080
cmp dword [esp + 0x2c], 0
jne 0x407fd0
cmp cl, 0xd
je 0x408087
cmp cl, 0xa
jne 0x407fd0
dec esi
jmp 0x4080f7
cmp dword [esp + 0x2c], 0
jne 0x4080f7
cmp cl, 0xa
jne 0x40808f
dec esi
jmp 0x4080f7
cmp cl, 0xd
jne 0x4080f7
dec esi
cmp dword [ebx + 4], 0
je 0x4080ae
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.00408550
mov dword [esp + 0x14], eax
jmp 0x4080c4
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x4080f7
cmp dword [ebx + 4], 0
je 0x4080d6
inc dword [ebx + 0xc]
jmp 0x4080f7
push 1
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x20]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x408120
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push 0x1000
push 0
push dword [0x580750]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov dword [esp + 8], ecx
test ecx, ecx
je 0x4082cd
mov ax, word [esp]
push ebx
mov ebx, dword [esp + 0x20]
push ebp
mov ebp, dword [esp + 0x2c]
push esi
push edi
mov edi, ecx
mov dword [esp + 0x20], 0x1000
mov dword [esp + 0x1c], 0x7ff
cmp ebp, 0xffffffff
je 0x408174
test ebp, ebp
je 0x40822d
dec ebp
cmp dword [ebx + 4], 0
je 0x40818d
push 2
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00408550
mov dword [esp + 0x14], eax
jmp 0x4081a7
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
cmp eax, 2
mov ax, word [esp + 0x10]
jne 0x40822d
test ax, ax
je 0x4081c1
mov word [edi], ax
add edi, 2
mov ax, word [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov esi, edi
mov edx, dword [esp + 0x1c]
sub esi, ecx
sar esi, 1
cmp esi, edx
jle 0x408208
mov eax, dword [esp + 0x20]
add edx, 0x800
add eax, 0x1000
mov dword [esp + 0x1c], edx
push eax
push ecx
push 8
push dword [0x580750]
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, eax
mov ax, word [esp + 0x10]
mov dword [esp + 0x18], ecx
lea edi, [ecx + esi*2]
test ax, ax
je 0x40822d
cmp dword [esp + 0x30], 0
jne 0x408166
cmp ax, 0xd
je 0x408234
cmp ax, 0xa
jne 0x408166
sub edi, 2
jmp 0x4082ac
cmp dword [esp + 0x30], 0
jne 0x4082ac
cmp ax, 0xa
jne 0x40823f
sub edi, 2
jmp 0x4082ac
cmp ax, 0xd
jne 0x4082ac
sub edi, 2
cmp dword [ebx + 4], 0
je 0x408261
push 2
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00408550
mov dword [esp + 0x14], eax
jmp 0x408277
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x10], 0xa
je 0x4082ac
cmp dword [ebx + 4], 0
je 0x40828b
add dword [ebx + 0xc], 2
jmp 0x4082ac
push 1
lea eax, [esp + 0x28]
mov dword [esp + 0x24], 0xfffffffe
push eax
push 0xfffffffffffffffe
push dword [ebx]
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x38]
mov ecx, edi
sub ecx, dword [esp + 0x18]
sar ecx, 1
mov dword [eax], ecx
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
xor eax, eax
add esp, 0x18
ret 0x10
Function at 0x4082e0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x580750]
mov dword [esp + 0x10], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0xc], edx
test edx, edx
je 0x408430
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 3]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, edx
cmp edi, 0xffffffff
je 0x40832c
test edi, edi
je 0x40839d
dec edi
push esi
push ebp
call fcn.00408670
mov dword [esp + 0x20], eax
test eax, eax
jne 0x40833f
xor cl, cl
jmp 0x408341
mov cl, byte [esi]
mov edx, dword [esp + 0x1c]
add esi, eax
mov eax, dword [esp + 0x14]
mov ebx, esi
sub ebx, edx
mov byte [esp + 0x13], cl
add eax, 0xfffffffb
cmp ebx, eax
jle 0x408384
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x580750]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [ebx + edx]
mov eax, dword [esp + 0x2c]
test cl, cl
je 0x40839d
test eax, eax
jne 0x408322
cmp cl, 0xd
je 0x4083a1
cmp cl, 0xa
jne 0x408322
dec esi
jmp 0x408413
test eax, eax
jne 0x408413
cmp cl, 0xa
jne 0x4083a9
dec esi
jmp 0x408413
cmp cl, 0xd
jne 0x408413
dec esi
cmp dword [ebp + 4], 0
je 0x4083c8
push 1
lea eax, [esp + 0x17]
push eax
push ebp
call fcn.00408550
mov dword [esp + 0x20], eax
jmp 0x4083df
push 0
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x408413
cmp dword [ebp + 4], 0
je 0x4083f1
inc dword [ebp + 0xc]
jmp 0x408413
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebp]
mov dword [esp + 0x28], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x40a511
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push 0x454334
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x580edc], eax
test eax, eax
je 0x40a53f
push 0x45434c
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x580ed8], eax
lea eax, [ebp - 0x114]
mov dword [0x580ee0], 1
push eax
mov dword [ebp - 0x114], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x40a5a1
cmp dword [ebp - 0x104], 1
jne 0x40a576
and dword [0x580ee0], 0
jmp 0x40a5b9
cmp dword [ebp - 0x104], 2
jne 0x40a5a1
cmp dword [ebp - 0x110], 5
jb 0x40a56d
jne 0x40a5a1
mov eax, dword [ebp - 0x10c]
neg eax
sbb eax, eax
and eax, dword [0x580ee0]
mov dword [0x580ee0], eax
jmp 0x40a5a6
mov eax, dword [0x580ee0]
test eax, eax
je 0x40a5b9
call fcn.00409fc1
neg eax
sbb eax, eax
and dword [0x580ee0], eax
mov esp, ebp
pop ebp
ret

Function at 0x40b620
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x40b652
push 0
lea ecx, [esp + 0x10]
push ecx
push esi
push dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b64d
cmp dword [esp + 0xc], esi
je 0x40b669
pop edi
xor eax, eax
pop esi
ret
mov eax, dword [edi + 4]
add eax, dword [edi + 8]
push esi
push dword [esp + 0x14]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add dword [edi + 8], esi
pop edi
mov eax, 1
pop esi
ret

Function at 0x40e726
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push dword [0x580f80]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x40e787
push esi
push dword [0x580f7c]
push 8
push dword [0x580750]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
push edi
push dword [0x580f80]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [0x580f78]
jmp 0x40e777
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x40e775
mov eax, dword [esi + 8]
add eax, edi
push eax
call ecx
pop ecx
mov esi, dword [esi]
test esi, esi
jne 0x40e765
push edi
push 0x40e6c4
call fcn.0044c1eb
pop esi
mov eax, dword [esp + 8]
add eax, edi
pop edi
ret 4
Function at 0x40e791
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
mov ecx, esi
push edi
and ecx, 3
je 0x40e7a7
push 4
pop eax
sub eax, ecx
add esi, eax
mov eax, dword [0x580f7c]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x40e7de
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
push 8
push dword [0x580750]
mov dword [0x580f80], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push dword [0x580f80]
call ebx
mov eax, dword [0x580f7c]
mov edi, eax
add eax, esi
push eax
push dword [0x580f80]
mov dword [0x580f7c], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
push 8
push dword [0x580750]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ebp, eax
push ebp
push dword [0x580f80]
call ebx
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test esi, esi
jne 0x40e81e
test ebx, ebx
je 0x40e83f
push 0x14
push 0x580f78
call fcn.0040ef70
pop ecx
pop ecx
mov dword [eax], edi
mov dword [eax + 4], esi
mov dword [eax + 8], ebx
test esi, esi
je 0x40e83f
lea ecx, [edi + ebp]
push ecx
call esi
pop ecx
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 0xc

Function at 0x40f070
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x57eca0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 8]
sub edx, dword [ebp + 0xc]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x40f0b6
mov ecx, dword [ebp - 4]
add ecx, 0xa
push ecx
push 0
mov edx, dword [0x5811f4]
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x40f0d7
mov edx, dword [ebp - 4]
add edx, 0xa
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
push 0
mov edx, dword [0x5811f4]
push edx
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
shr edx, 1
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
add ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call fcn.0040f4e0
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 8], edx
mov esp, ebp
pop ebp
ret 8

Function at 0x40f160
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x57eca0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
add edx, 2
mov eax, dword [ebp - 4]
mov dword [eax + 8], edx
mov esp, ebp
pop ebp
ret
Function at 0x40f390
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x57eca0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0xffffffff
jne 0x40f3b4
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
mov dword [ebp + 0xc], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 8]
mov edx, dword [ebp + 8]
lea eax, [ecx + edx*2]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
sub edx, 4
cmp dword [ebp - 8], edx
jl 0x40f402
mov eax, dword [ebp - 8]
add eax, 0x4000
mov ecx, dword [ebp - 4]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
add eax, 0xa
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
push 0
mov eax, dword [0x5811f4]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx]
add eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
lea eax, [edx + ecx*2]
mov ecx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret 8

Function at 0x40f430
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x57eca0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
shl ecx, 1
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
sub eax, ecx
mov ecx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov esp, ebp
pop ebp
ret 4

Function at 0x40f460
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x57eca0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx]
jb 0x40f49e
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 8]
cmp dword [ebp + 8], ecx
ja 0x40f49e
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
sub ecx, dword [eax]
add ecx, 1
mov eax, ecx
jmp 0x40f4a0
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x40f8c0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x57eca0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 8]
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret 4

Function at 0x417390
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x4173b0
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x4173b0
mov eax, dword [eax + 0x44]
test eax, eax
je 0x4173b0
push dword [esp + 8]
push eax
call ecx
add esp, 8
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x4338f0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xa8
mov eax, dword [0x580fd8]
mov dword [esp], 0x4020
mov dword [esp + 4], 0
mov dword [esp + 8], 4
test eax, eax
jne 0x433977
push 0x9c
push eax
lea eax, [esp + 0x14]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [esp + 0xc], 0x9c
mov dword [esp + 0x10], 6
push 3
push 2
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
push edx
push eax
push 2
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
test eax, eax
je 0x43396b
mov dword [0x580fd8], 2
add esp, 0xa8
ret
mov dword [0x580fd8], 1
jmp 0x43397c
cmp eax, 2
je 0x4339c8
lea eax, [esp + 8]
push eax
lea eax, [esp + 8]
push eax
push 0x1001
push 0xffff
push dword [esp + 0xbc]
call dword [sym.imp.WSOCK32.DLL_getsockopt]
test eax, eax
jne 0x4339aa
mov eax, dword [esp + 4]
cmp eax, dword [esp]
jg 0x4339c8
push 4
lea eax, [esp + 4]
push eax
push 0x1001
push 0xffff
push dword [esp + 0xbc]
call dword [sym.imp.WSOCK32.DLL_setsockopt]
add esp, 0xa8
ret
Function at 0x441320
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x104
push dword [esp + 0x108]
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
mov byte [esp], 0
test eax, eax
je 0x441369
push 0x104
lea ecx, [esp + 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [esp], 0
je 0x441369
lea eax, [esp]
push eax
call dword [0x57ecb0]
add esp, 4
add esp, 0x104
ret
xor eax, eax
add esp, 0x104
ret
Function at 0x4461b0
Capabilities:
Resolve dns

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
push ebp
xor ebp, ebp
mov dword [esp + 4], ebp
mov dword [eax], ebp
lea eax, [esp + 8]
push eax
push dword [esp + 0x20]
push dword [esp + 0x20]
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.DLL_getaddrinfo]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x446343
push ebx
push edi
mov edi, dword [esp + 0x10]
test edi, edi
je 0x44632d
push esi
mov eax, dword [edi + 4]
cmp eax, 2
jne 0x4461ff
lea ebx, [eax + 0xe]
jmp 0x44620b
cmp eax, 0x17
jne 0x4462ba
lea ebx, [eax + 5]
cmp dword [edi + 0x18], 0
je 0x4462ba
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4462ba
cmp eax, ebx
jb 0x4462ba
push 0x20
call dword [0x57eca4]
mov esi, eax
add esp, 4
test esi, esi
je 0x446322
mov eax, dword [edi]
mov dword [esi], eax
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 8]
mov dword [esi + 8], eax
mov eax, dword [edi + 0xc]
push ebx
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ebx
mov dword [esi + 0x18], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x1c], 0
call dword [0x57eca4]
add esp, 4
mov dword [esi + 0x18], eax
test eax, eax
je 0x446311
push ebx
push dword [edi + 0x18]
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [edi + 0x14]
add esp, 0xc
test eax, eax
je 0x4462a5
push eax
call dword [0x57ecb0]
add esp, 4
mov dword [esi + 0x14], eax
test eax, eax
je 0x4462f7
test ebp, ebp
jne 0x4462ab
mov ebp, esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4462b6
mov dword [eax + 0x1c], esi
mov dword [esp + 0x10], esi
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x4461f2
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
pop esi
test eax, eax
je 0x4462d9
push eax
call dword [sym.imp.WS2_32.DLL_freeaddrinfo]
test ebx, ebx
je 0x446329
push ebp
call fcn.00446170
mov eax, dword [esp + 0x2c]
add esp, 4
xor ebp, ebp
mov dword [eax], ebp
mov eax, ebx
pop edi
pop ebx
pop ebp
add esp, 0xc
ret
push dword [esi + 0x18]
mov ebx, 8
call dword [0x57eca8]
push esi
call dword [0x57eca8]
add esp, 8
jmp 0x4462c9
push esi
mov ebx, 8
call dword [0x57eca8]
add esp, 4
jmp 0x4462c9
mov ebx, 8
jmp 0x4462c9
test ebp, ebp
jne 0x446339
mov ebx, 0x2af9
push ebx
call dword [sym.imp.WSOCK32.DLL_WSASetLastError]
mov eax, dword [esp + 0x28]
pop edi
mov dword [eax], ebp
mov eax, ebx
pop ebx
pop ebp
add esp, 0xc
ret

Function at 0x446790
Capabilities:
Create udp socket

Disassembly:
mov eax, dword [esp + 4]
cmp dword [eax + 0x264], 2
je fcn.00446740
mov al, 1
ret