joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a730
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov edx, ecx
sub esp, 0x11c
mov eax, dword [edx + 0xed0]
test eax, eax
jne 0x40a74b
xor eax, eax
add esp, 0x11c
ret
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
add edx, 0xdcc
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, 0x5c
push edx
mov byte [esp + 0x10], al
mov byte [esp + 0x11], al
lea eax, [esp + 8]
lea ecx, [esp + 0x20]
push eax
push ecx
mov byte [esp + 0x10], 0x53
mov byte [esp + 0x11], 0x4f
mov byte [esp + 0x12], 0x46
mov byte [esp + 0x13], 0x54
mov byte [esp + 0x14], 0x57
mov byte [esp + 0x15], 0x41
mov byte [esp + 0x16], 0x52
mov byte [esp + 0x17], 0x45
mov byte [esp + 0x1a], 0x25
mov byte [esp + 0x1b], 0x73
mov byte [esp + 0x1c], 0
call dword [sym.imp.MSVCRT.dll_sprintf]
mov ecx, dword [0x41066c]
add esp, 0xc
lea edx, [esp + 0x14]
lea eax, [esp + 0x1c]
push edx
push 1
push 0
push eax
push 0x80000002
call dword [ecx + 0x130]
test eax, eax
pop edi
je 0x40a81b
lea edx, [esp + 0x14]
lea eax, [esp + 0x10]
push edx
mov edx, dword [0x41066c]
push eax
push 0
push 1
push 0
push 0
lea ecx, [esp + 0x30]
push 0
push ecx
push 0x80000002
mov dword [esp + 0x38], 1
call dword [edx + 0x134]
xor eax, eax
add esp, 0x11c
ret
mov eax, 1
add esp, 0x11c
ret

Function at 0x40ae70
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x10], ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
ret 4
Function at 0x40c670
Capabilities:
Contain obfuscated stackstrings

Disassembly:
sub esp, 0x144
mov eax, dword [0x41066c]
push ebx
push esi
push edi
mov esi, ecx
push 0
push 0x10000000
push 1
lea ebx, [esi + 8]
push 0
push 0
push ebx
call dword [eax + 0x2c]
test eax, eax
mov dword [esi + 4], eax
jne 0x40c6b0
mov ecx, dword [0x41066c]
push 0x100
push 1
push eax
push ebx
call dword [ecx + 0x28]
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
test eax, eax
jne 0x40c6c1
pop edi
pop esi
pop ebx
add esp, 0x144
ret
mov edx, dword [0x41066c]
push eax
call dword [edx + 0x78]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x9c]
mov dword [esp + 0x98], 0
rep stosd dword es:[edi], eax
mov al, 0x78
lea ecx, [esp + 0x98]
mov byte [esp + 0x15], al
mov byte [esp + 0x1e], al
lea eax, [esp + 0xdc]
lea edx, [esp + 0x14]
push eax
mov eax, dword [0x41066c]
push ecx
push 0
push 0
push 0x200
push 0
push 0
mov dword [esp + 0xbc], ebx
push 0
mov bl, 0x65
push edx
push 0
mov dword [esp + 0xec], 1
mov word [esp + 0xf0], 5
mov byte [esp + 0x3c], bl
mov byte [esp + 0x3e], 0x70
mov byte [esp + 0x3f], 0x6c
mov byte [esp + 0x40], 0x6f
mov byte [esp + 0x41], 0x72
mov byte [esp + 0x42], bl
mov byte [esp + 0x43], 0x72
mov byte [esp + 0x44], 0x2e
mov byte [esp + 0x45], bl
mov byte [esp + 0x47], bl
mov byte [esp + 0x48], 0
call dword [eax + 0x98]
test eax, eax
jne 0x40c780
pop edi
pop esi
pop ebx
add esp, 0x144
ret
mov ecx, dword [0x41066c]
push 0xbb8
call dword [ecx + 0x104]
mov ecx, 0x18
xor eax, eax
lea edi, [esp + 0xed]
mov byte [esp + 0xec], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, 0x25
mov ecx, 0x15
mov byte [esp + 0x34], al
mov byte [esp + 0x41], al
xor eax, eax
lea edi, [esp + 0x43]
mov byte [esp + 0x35], 0x50
mov byte [esp + 0x36], 0x72
mov byte [esp + 0x37], 0x6f
mov byte [esp + 0x38], 0x67
mov byte [esp + 0x39], 0x72
mov byte [esp + 0x3a], 0x61
mov byte [esp + 0x3b], 0x6d
mov byte [esp + 0x3c], 0x46
mov byte [esp + 0x3d], 0x69
mov byte [esp + 0x3e], 0x6c
mov byte [esp + 0x3f], bl
mov byte [esp + 0x40], 0x73
rep stosd dword es:[edi], eax
mov ecx, dword [0x41066c]
lea edx, [esp + 0xec]
stosb byte es:[edi], al
push 0x64
lea eax, [esp + 0x38]
push edx
push eax
mov byte [esp + 0x4e], 0
call dword [ecx + 0x11c]
mov ecx, dword [0x41066c]
push 0
push 0
lea edx, [esp + 0xf4]
push 0
lea eax, [esp + 0x18]
push edx
push eax
push 0
mov byte [esp + 0x24], 0x6f
mov byte [esp + 0x25], 0x70
mov byte [esp + 0x26], bl
mov byte [esp + 0x27], 0x6e
mov byte [esp + 0x28], 0
call dword [ecx + 0x1c]
mov al, 0x43
lea edx, [esp + 0x24]
push 0
mov byte [esp + 0x28], al
mov byte [esp + 0x30], al
mov eax, dword [0x41066c]
push edx
push 0
push 0
mov byte [esp + 0x35], 0x61
mov byte [esp + 0x36], 0x62
mov byte [esp + 0x37], 0x69
mov byte [esp + 0x38], 0x6e
mov byte [esp + 0x39], bl
mov byte [esp + 0x3a], 0x74
mov byte [esp + 0x3b], 0x57
mov byte [esp + 0x3d], 0x6c
mov byte [esp + 0x3e], 0x61
mov byte [esp + 0x3f], 0x73
mov byte [esp + 0x40], 0x73
mov byte [esp + 0x41], 0
call dword [eax + 0x70]
mov ecx, dword [0x41066c]
push esi
push 0x40c5d0
push eax
call dword [ecx + 0x6c]
mov eax, dword [esi]
pop edi
pop esi
pop ebx
add esp, 0x144
ret
Function at 0x40cc00
Capabilities:
Contain obfuscated stackstrings

Disassembly:
sub esp, 0x24
mov eax, dword [esp + 0x2c]
push esi
mov esi, ecx
mov byte [esp + 0x14], 0xd2
mov cl, 0xb0
mov dword [eax], 0
mov edx, dword [0x41066c]
mov byte [esp + 0x1a], cl
mov byte [esp + 0x21], cl
lea ecx, [esp + 0x14]
push ecx
push 0
mov al, 0xd3
push 0
push 0
mov byte [esp + 0x25], 0xbb
mov byte [esp + 0x26], 0xc6
mov byte [esp + 0x27], pe_nt_image_headers32
mov byte [esp + 0x28], 0xbf
mov byte [esp + 0x29], 0xb4
mov byte [esp + 0x2b], 0xc9
mov byte [esp + 0x2c], 0xb8
mov byte [esp + 0x2d], 0xdf
mov byte [esp + 0x2e], 0xc7
mov byte [esp + 0x2f], 0xe5
mov byte [esp + 0x30], al
mov byte [esp + 0x32], 0xca
mov byte [esp + 0x33], al
mov byte [esp + 0x34], 0
call dword [edx + 0x70]
mov cl, 0x79
mov dword [esi], eax
test eax, eax
mov byte [esp + 4], 0x46
mov byte [esp + 5], 0x69
mov byte [esp + 6], 0x6c
mov byte [esp + 7], 0x6d
mov byte [esp + 8], 0x45
mov byte [esp + 9], 0x76
mov byte [esp + 0xa], 0x65
mov byte [esp + 0xb], 0x72
mov byte [esp + 0xc], cl
mov byte [esp + 0xd], 0x64
mov byte [esp + 0xe], 0x61
mov byte [esp + 0xf], cl
mov byte [esp + 0x10], 0
jne 0x40ccd5
mov ecx, dword [0x41066c]
push eax
lea eax, [esp + 8]
push eax
push 0
push 0
call dword [ecx + 0x70]
mov dword [esi], eax
mov eax, dword [esi]
test eax, eax
jne 0x40cce2
pop esi
add esp, 0x24
ret 8
mov edx, dword [esp + 0x2c]
push edi
mov edi, dword [sym.imp.USER32.dll_GetWindow]
push 5
mov dword [edx], eax
mov eax, dword [esi]
push eax
mov dword [esi + 4], eax
call edi
push 5
push eax
mov dword [esi + 4], eax
call edi
push 5
push eax
mov dword [esi + 4], eax
call edi
push 5
push eax
mov dword [esi + 4], eax
call edi
mov edi, dword [sym.imp.MSVCRT.dll_rand]
mov dword [esi + 4], eax
call edi
cdq
mov ecx, 5
idiv ecx
test edx, edx
jle 0x40cd6f
push ebx
push ebp
mov ebx, edx
mov edx, dword [0x41066c]
push 1
push 0
push 0
lea ebp, [edx + 0x84]
call edi
xor edx, edx
mov ecx, 0x312
div ecx
push edx
call edi
mov edx, dword [esi]
and eax, 0x3ff
push eax
push 0xfffffffffffffffe
push edx
call dword [ebp]
mov eax, dword [0x41066c]
push 0x1f4
call dword [eax + 0x104]
dec ebx
jne 0x40cd2c
pop ebp
pop ebx
mov ecx, dword [esi]
mov edx, dword [0x41066c]
push 2
push 0x2b0
push 0x3e4
push 0
push 0
push 0xfffffffffffffffe
push ecx
call dword [edx + 0x84]
mov eax, dword [esi]
mov ecx, dword [0x41066c]
push 1
push 0
push 0
push 0
push 0
push 0xfffffffffffffffe
push eax
call dword [ecx + 0x84]
pop edi
mov eax, 1
pop esi
add esp, 0x24
ret 8
Function at 0x4095ed
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
lea eax, [ebp - 4]
push esi
xor esi, esi
push eax
push 0x20019
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push Ordinal_2
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x409645
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x104
push eax
push dword [ebp + 8]
push esi
push esi
push 0x40c064
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x409638
push 1
pop esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x409647
xor eax, eax
pop esi
leave
ret 4
Function at 0x401977
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, ecx
xor eax, eax
cmp edx, dword [edi + 0xa4]
sete al
cmp byte [eax + edi + 0xb0], 0
jne 0x4019c5
cmp dword [edi + 0x168], 0
je 0x4019a2
or esi, 0xffffffff
jmp 0x4019b8
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_send]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4019e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2733
jne 0x4019c9
xor esi, esi
jmp 0x4019e2
mov edx, eax
mov ecx, edi
call fcn.004037cc
push eax
push str.Send_failure:__s
push dword [edi]
call fcn.00401832
add esp, 0xc
mov eax, dword [ebp + 0x10]
xor ecx, ecx
push 0x37
cmp esi, 0xffffffff
mov dword [eax], esi
pop eax
pop edi
cmovne eax, ecx
pop esi
pop ecx
pop ebp
ret

Function at 0x401ad6
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov eax, dword [esi + 0x88]
test eax, eax
je 0x401af8
push dword [esi + 0x14]
push dword [ebp + 0xc]
push dword [ebp + 8]
push edx
push esi
call eax
add esp, 0x14
jmp 0x401b25
cmp edx, 2
ja 0x401b23
push dword [esi + 0x10]
push 1
push 2
push dword [edx*4 + 0x550720]
call fcn.004f8eac
push dword [esi + 0x10]
push 1
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004f8eac
add esp, 0x20
xor eax, eax
pop esi
pop ebp
ret

Function at 0x401c34
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x198
mov eax, dword [0x583d10]
xor eax, esp
mov dword [esp + 0x194], eax
lea eax, [esp]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x401c79
mov eax, dword [esp]
cmp al, 1
jne 0x401c73
shr eax, 8
cmp al, 1
jne 0x401c73
xor eax, eax
jmp 0x401c7c
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.004f225b
mov esp, ebp
pop ebp
ret
Function at 0x402e63
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x583d10]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x124], edx
push esi
push edi
mov dword [ebp - 0x128], ebx
mov edi, dword [ebx]
push dword [edi + 0x74]
call fcn.004f95a0
pop ecx
mov ecx, 0xff
cmp eax, ecx
jae 0x402fd6
xor eax, eax
push ecx
push eax
mov dword [ebp - 0x11c], eax
mov byte [ebp - 0x108], al
lea eax, [ebp - 0x107]
push eax
call fcn.004f2e30
mov esi, dword [sym.imp.WS2_32.dll_inet_addr]
add esp, 0xc
push dword [edi + 0x74]
call esi
mov edx, dword [edi + 0x74]
lea eax, [ebp - 0x11c]
push eax
push 0
mov ecx, ebx
call fcn.00406ddb
pop ecx
pop ecx
cmp eax, 1
jne 0x402ef0
lea edx, [ebp - 0x11c]
mov ecx, ebx
call fcn.0040a922
mov ebx, dword [ebp - 0x11c]
test ebx, ebx
je 0x402f0b
push dword [edi + 0x74]
lea eax, [ebp - 0x108]
push eax
call fcn.004f97b0
pop ecx
pop ecx
cmp byte [ebp - 0x108], 0
jne 0x402f21
push dword [edi + 0x74]
push str.Couldnt_bind_to__s
jmp 0x402fcd
lea eax, [ebp - 0x108]
push eax
push str.We_bind_local_end_to__s_n
push edi
call fcn.004017c3
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
call esi
cmp eax, 0xffffffff
je 0x402fc1
test ebx, ebx
je 0x402fc1
mov esi, dword [ebx]
mov edx, ebx
mov ecx, edi
call fcn.00406f2b
push dword [esi + 0x10]
push dword [esi + 0x14]
mov esi, dword [ebp - 0x124]
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x402fa0
lea eax, [ebp - 0x120]
mov dword [ebp - 0x120], 0x10
push eax
lea eax, [ebp - 0x118]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x402f9c
push str.getsockname___failed
push edi
call fcn.00401832
pop ecx
pop ecx
jmp 0x402fd6
xor eax, eax
jmp 0x402fd9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x128]
mov edx, eax
mov dword [edi + 0x8318], eax
call fcn.004037cc
push eax
push str.bind_failure:__s
jmp 0x402fcd
lea eax, [ebp - 0x108]
push eax
push str.couldnt_find_my_own_IP_address___s_
push edi
call fcn.00401832
add esp, 0xc
push 0x2d
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f225b
mov esp, ebp
pop ebp
ret

Function at 0x4030bc
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
mov edi, ecx
push 4
mov esi, dword [edi]
movzx eax, byte [esi + 0x1b6]
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 1
push 6
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x403106
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov ecx, edi
call fcn.004037cc
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004017c3
add esp, 0xc
jmp 0x403113
push str.TCP_NODELAY_set_n
push esi
call fcn.004017c3
pop ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x403119
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x583d10]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push dword [edx + 0xc]
mov eax, ecx
mov dword [ebp - 0x8c], edx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x94], ecx
push dword [eax + 0x28]
mov edi, dword [eax]
push dword [edx + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x4032ea
mov eax, dword [ebp - 0x94]
lea edx, [ebp - 0x88]
mov ecx, dword [ebp - 0x8c]
xor ebx, ebx
push 0x80
mov byte [eax], bl
call fcn.00406ca3
pop ecx
lea eax, [ebp - 0x88]
push eax
push str.__Trying__s...
push edi
call fcn.004017c3
add esp, 0xc
cmp byte [edi + 0x1b6], bl
je 0x4031ad
mov ecx, dword [ebp - 0x90]
mov edx, esi
call fcn.004030bc
mov ecx, dword [ebp - 0x90]
mov eax, dword [ecx]
cmp dword [eax + 0x74], ebx
je 0x4031c9
mov edx, esi
call fcn.00402e63
test eax, eax
jne 0x4032e3
lea eax, [ebp - 0x98]
mov dword [ebp - 0x98], 1
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [ebp - 0x90]
cmp dword [eax + 0x28], 1
jne 0x403207
mov eax, dword [ebp - 0x8c]
push dword [eax + 0x10]
push dword [eax + 0x14]
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403297
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x8c], eax
cmp eax, 0xb
je 0x40328b
cmp eax, 0x2732
jle 0x40322f
cmp eax, 0x2734
jle 0x40328b
mov ecx, dword [ebp - 0x90]
mov edx, eax
call fcn.004037cc
push eax
lea eax, [ebp - 0x88]
push eax
push str.Failed_to_connect_to__s:__s
push edi
call fcn.00401832
mov eax, dword [ebp - 0x8c]
add esp, 0x10
mov dword [edi + 0x8318], eax
lea edx, [ebp - 0x8c]
mov ecx, esi
call fcn.00402fea
test ebx, ebx
jne 0x4032a9
test al, al
je 0x4032bd
mov eax, dword [ebp - 0x94]
push str.connected_n
push edi
mov byte [eax], 1
call fcn.004017c3
pop ecx
pop ecx
jmp 0x4032a5
mov edx, dword [ebp + 8]
mov ecx, esi
call fcn.00402e40
mov ebx, eax
cmp ebx, 1
jne 0x40325e
cmp dword [edi + 0x2d8], 2
jne 0x40325e
mov eax, esi
jmp 0x4032ed
cmp ebx, 1
jne 0x4032bd
push str.Timeout_n
push edi
call fcn.004017c3
pop ecx
pop ecx
jmp 0x4032e3
mov edx, dword [ebp - 0x8c]
mov ecx, dword [ebp - 0x90]
mov dword [edi + 0x8318], edx
call fcn.004037cc
push eax
push 0x5575bc
push edi
call fcn.004017c3
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f225b
mov esp, ebp
pop ebp
ret
Function at 0x406f9d
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
xor ecx, ecx
lea eax, [esi + edx]
mov edx, 0x1505
mov edi, eax
sub edi, esi
cmp esi, eax
cmova edi, ecx
test edi, edi
je 0x406fc9
movsx ecx, byte [esi]
imul edx, edx, 0x21
xor edx, ecx
inc esi
inc ebx
cmp ebx, edi
jb 0x406fbb
pop edi
pop esi
mov eax, edx
pop ebx
ret

Function at 0x40a7b7
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push 1
push 0x28
mov dword [ebp - 4], edx
mov ebx, ecx
call dword [0x5aa840]
and dword [ebp - 0xc], 0
mov esi, eax
and dword [ebp - 8], 0
pop ecx
pop ecx
test esi, esi
jne 0x40a7ed
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x40a91c
push edi
lea edi, [ebx + 0x320]
mov ecx, dword [edi]
call fcn.004039ea
push dword [ebp - 4]
call dword [0x5aa834]
mov dword [edi], eax
pop ecx
test eax, eax
jne 0x40a81a
push esi
call dword [0x5aa838]
pop ecx
push 0xc
jmp 0x40a8aa
mov eax, dword [ebp + 8]
mov dword [ebx + 0x324], eax
xor eax, eax
push eax
push 1
mov byte [ebx + 0x32c], al
mov dword [ebx + 0x330], eax
mov dword [ebx + 0x328], eax
mov dword [ebx + 0x334], esi
or dword [esi + 0xc], 0xffffffff
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi + 0x14], eax
test eax, eax
je 0x40a8a1
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x18], eax
test eax, eax
je 0x40a8a1
xor eax, eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi + 0x20], eax
test eax, eax
je 0x40a8a1
xor eax, eax
push eax
push eax
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x24], eax
test eax, eax
je 0x40a8a1
xor eax, eax
push eax
push eax
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x1c], eax
test eax, eax
jne 0x40a8b2
mov ecx, edi
call fcn.0040a6f1
push 0xb
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x40a8ef
call fcn.004f96c5
add eax, 0x40
mov dword [esi + 0x10], eax
lea eax, [esi + 4]
push eax
push 0
push ebx
push 0x40a548
xor ebx, ebx
push ebx
push ebx
call fcn.004f6132
add esp, 0x18
mov dword [esi], eax
test eax, eax
jne 0x40a8f3
call fcn.004fa255
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, edi
call fcn.0040a6f1
xor al, al
jmp 0x40a91b
push 0xffffffffffffffff
push ebx
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x1c]
push ecx
push 2
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push ebx
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0xc], eax
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a922
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, ecx
mov dword [ebp - 0xc], edx
push esi
push edi
mov eax, dword [ebx]
mov esi, dword [ebx + 0x334]
mov dword [ebp - 8], esi
mov dword [ebp - 4], eax
mov edi, dword [eax + 0x9c]
test edi, edi
jne 0x40a958
mov eax, dword [eax + 0x98]
mov edi, 0x12c
test eax, eax
cmovne edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
imul eax, edi, 0x3e8
push eax
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esi + 0x14]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [esi + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebp - 8]
push dword [eax + 0x18]
and dword [eax + 0x14], 0
call esi
mov esi, dword [ebp - 8]
and dword [esi + 0x18], 0
test edi, edi
jne 0x40a9b8
push 0x1388
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x40aa00
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
lea edi, [esi + 8]
mov byte [ebx + 0x32c], 1
or dword [edi], 0xffffffff
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x40a9d4
mov eax, dword [ebx + 0x328]
mov dword [ecx], eax
xor esi, esi
cmp dword [ebx + 0x328], esi
jne 0x40aa6b
push 0x1b
pop esi
cmp dword [edi], esi
jne 0x40aa1a
push str.out_of_memory
push str.Could_not_resolve_host:__s
push dword [ebp - 4]
call fcn.00401832
add esp, 0xc
jmp 0x40aa6b
push dword [ebx + 0x330]
call dword [sym.imp.WS2_32.dll_WSASetLastError]
lea edi, [esi + 8]
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
jmp 0x40a9c5
cmp dword [edi], 0xffffffff
je 0x40aa55
mov edx, dword [ebx + 0x330]
cmp edx, 0x2afc
je 0x40aa55
cmp byte [ebx + 0x32c], 0
je 0x40aa68
mov ecx, ebx
call fcn.004037cc
push eax
push dword [ebx + 0x34]
push str.Could_not_resolve_host:__s___s
push dword [ebp - 4]
call fcn.00401832
add esp, 0x10
push 6
jmp 0x40aa6a
push dword [ebx + 0x34]
push str.Resolving_host_timed_out:__s
push dword [ebp - 4]
call fcn.00401832
add esp, 0xc
push 0x1c
pop esi
lea ecx, [ebx + 0x320]
call fcn.0040a6f1
cmp dword [ebx + 0x328], 0
jne 0x40aa86
mov byte [ebx + 0xe4], 1
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40aac2
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
mov esi, edx
and dword [ebx], 0
push esi
mov eax, dword [edi]
mov dword [ebp - 4], eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edx, esi
cmp eax, 0xffffffff
je 0x40aaf3
push dword [ebp + 8]
mov ecx, eax
call fcn.00414908
pop ecx
jmp 0x40ab69
push ecx
push dword [ebp + 8]
mov ecx, edi
call fcn.0040a7b7
pop ecx
pop ecx
test al, al
je 0x40ab0e
mov dword [ebx], 1
xor eax, eax
jmp 0x40ab69
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov ecx, edi
call fcn.004037cc
mov ebx, dword [ebp - 4]
push eax
push esi
push str.init_resolve_thread___failed_for__s___s_n
push ebx
call fcn.004017c3
add esp, 0x10
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x40ab5f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.004037cc
push eax
push dword [ebp + 8]
push esi
push str.gethostbyname_2__failed_for__s:_d___s_n
push ebx
call fcn.004017c3
add esp, 0x14
jmp 0x40ab0a
mov edx, dword [ebp + 8]
mov ecx, eax
call fcn.0041496d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40abb3
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x338
mov eax, dword [0x583d10]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov ebx, ecx
xor esi, esi
push edi
mov edi, edx
mov dword [ebp - 0x32c], ebx
cdq
mov ecx, 0x3e8
idiv ecx
or ecx, 0xffffffff
mov dword [ebp - 0x324], esi
mov dword [ebp - 0x334], eax
imul eax, edx, 0x3e8
mov edx, esi
mov dword [ebp - 0x114], edx
mov dword [ebp - 0x330], eax
xor eax, eax
inc eax
cmp ebx, 0xffffffff
je 0x40ac27
mov edx, eax
mov dword [ebp - 0x320], ebx
mov dword [ebp - 0x324], eax
mov ecx, ebx
mov dword [ebp - 0x110], ebx
mov dword [ebp - 0x114], edx
mov dword [ebp - 0x21c], esi
cmp edi, 0xffffffff
je 0x40ac6d
mov dword [ebp - 0x21c], eax
mov eax, esi
mov dword [ebp - 0x218], edi
test edx, edx
je 0x40ac52
cmp dword [ebp + eax*4 - 0x110], edi
je 0x40ac52
inc eax
cmp eax, edx
jb 0x40ac44
cmp eax, edx
jne 0x40ac68
cmp edx, 0x40
jae 0x40ac68
mov dword [ebp + eax*4 - 0x110], edi
inc dword [ebp - 0x114]
cmp edi, ecx
cmova ecx, edi
lea ebx, [ecx + 1]
lea eax, [ebp - 0x334]
push eax
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x324]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x328], eax
cmp eax, 0xffffffff
jne 0x40acaf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 4
je 0x40ac70
mov eax, dword [ebp - 0x328]
mov ebx, dword [ebp - 0x32c]
test eax, eax
jns 0x40acbe
or eax, 0xffffffff
jmp 0x40ad25
jne 0x40acc4
xor eax, eax
jmp 0x40ad25
cmp ebx, 0xffffffff
je 0x40acf4
lea eax, [ebp - 0x324]
push eax
push ebx
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
push 1
test eax, eax
pop eax
cmovne esi, eax
lea eax, [ebp - 0x114]
push eax
push ebx
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x40acf4
or esi, 4
cmp edi, 0xffffffff
je 0x40ad23
lea eax, [ebp - 0x21c]
push eax
push edi
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x40ad0e
or esi, 2
lea eax, [ebp - 0x114]
push eax
push edi
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x40ad23
or esi, 4
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f225b
mov esp, ebp
pop ebp
ret