joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403050
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x18
push ebx
push ebp
push esi
mov esi, ecx
mov al, byte [esi + 0x68]
test al, al
push edi
je 0x4031e2
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea edi, [esi + 0x58]
mov eax, dword [edi]
mov ecx, dword [esi + 0x38]
cmp ecx, eax
mov edx, dword [edi + 4]
jg 0x40308e
jne 0x4031e2
cmp dword [esi + 0x3c], edx
jle 0x4031e2
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x54]
mov eax, dword [esi + 0x40]
sub edx, ecx
mov ecx, dword [esi + 0x50]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
mov edx, dword [edi + 4]
sub ecx, eax
mov dword [esp + 0x14], ecx
fmul qword [0x415378]
mov ecx, dword [esi + 0x44]
fild dword [esp + 0x14]
sub edx, ecx
mov ecx, dword [edi]
mov dword [esp + 0x14], edx
mov edx, dword [0x41af50]
faddp st(1)
sub ecx, eax
push 0xffffffffffffffff
fstp qword [esp + 0x24]
push edx
fild dword [esp + 0x1c]
mov dword [esp + 0x1c], ecx
fmul qword [0x415378]
fild dword [esp + 0x1c]
faddp st(1)
fstp qword [esp + 0x20]
call ebp
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
push ecx
mov ecx, dword [esi + 0x18]
push edx
sub ecx, dword [esi + 0x78]
mov edx, dword [esi + 0x1c]
push eax
sbb edx, dword [esi + 0x7c]
push edx
push ecx
mov ecx, esi
call fcn.004023a0
mov eax, dword [esi + 0x84]
test eax, eax
je 0x403191
mov ebx, dword [esi + 0x78]
fld qword [esp + 0x18]
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x7c]
mov ecx, dword [esi + 0x1c]
sub eax, ebx
sbb ecx, edx
push ecx
push eax
sub esp, 8
mov ebx, esp
call fcn.00409a50
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
mov dword [ebx], eax
fsubr qword [esp + 0x28]
fmul qword [0x415750]
call fcn.00409a50
fld qword [esp + 0x30]
mov dword [ebx + 4], eax
sub esp, 8
mov ebx, esp
call fcn.00409a50
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
mov dword [ebx], eax
fsubr qword [esp + 0x38]
fmul qword [0x415750]
call fcn.00409a50
mov dword [ebx + 4], eax
mov ecx, dword [esi + 0x84]
call fcn.00402160
mov edx, dword [0x41af50]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov edx, dword [esi + 0x64]
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x60]
push edx
mov dword [esi + 0x54], ecx
push eax
mov ecx, edi
call fcn.00402780
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
mov eax, dword [edi]
mov dword [esi + 0x7c], edx
mov edx, dword [edi + 4]
mov dword [esi + 0x78], ecx
mov ecx, dword [esi + 0x38]
cmp ecx, eax
jg 0x4031d7
jne 0x4031e2
cmp dword [esi + 0x3c], edx
jle 0x4031e2
mov al, byte [esi + 0x68]
test al, al
jne 0x403073
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4031f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
mov esi, ecx
mov al, byte [esi + 0x68]
test al, al
push edi
je 0x4033ae
lea edi, [esi + 0x58]
lea esp, [esp]
mov eax, dword [edi]
mov ecx, dword [esi + 0x38]
cmp ecx, eax
mov edx, dword [edi + 4]
jg 0x40322b
jne 0x4033ae
cmp dword [esi + 0x3c], edx
jle 0x4033ae
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x54]
mov eax, dword [esi + 0x40]
sub edx, ecx
mov ecx, dword [esi + 0x50]
mov dword [esp + 0xc], edx
fild dword [esp + 0xc]
mov edx, dword [edi + 4]
sub ecx, eax
mov dword [esp + 0xc], ecx
fmul qword [0x415378]
mov ecx, dword [esi + 0x44]
fild dword [esp + 0xc]
sub edx, ecx
mov ecx, dword [edi]
mov dword [esp + 0xc], edx
mov edx, dword [0x41af50]
faddp st(1)
sub ecx, eax
push 0xffffffffffffffff
fstp qword [esp + 0x1c]
push edx
fild dword [esp + 0x14]
mov dword [esp + 0x14], ecx
fmul qword [0x415378]
fild dword [esp + 0x14]
faddp st(1)
fstp qword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esi + 0x74]
mov eax, dword [ebp + 0x10]
mov ebx, dword [esi + 0x70]
mov ecx, dword [ebp + 0xc]
sub eax, edx
mov edx, dword [ebp + 8]
push eax
mov eax, dword [esp + 0x18]
sub ecx, ebx
push ecx
sub edx, dword [esi + 0x6c]
mov ecx, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push ecx
mov ecx, dword [esi + 0x18]
push edx
sub ecx, dword [esi + 0x78]
mov edx, dword [esi + 0x1c]
push eax
sbb edx, dword [esi + 0x7c]
push edx
push ecx
mov ecx, esi
call fcn.00402470
mov eax, dword [esi + 0x84]
test eax, eax
je 0x40334b
mov ebx, dword [esi + 0x78]
fld qword [esp + 0x10]
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x7c]
mov ecx, dword [esi + 0x1c]
sub eax, ebx
sbb ecx, edx
push ecx
push eax
sub esp, 8
mov ebx, esp
call fcn.00409a50
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
mov dword [ebx], eax
fsubr qword [esp + 0x20]
fmul qword [0x415750]
call fcn.00409a50
fld qword [esp + 0x28]
mov dword [ebx + 4], eax
sub esp, 8
mov ebx, esp
call fcn.00409a50
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
mov dword [ebx], eax
fsubr qword [esp + 0x30]
fmul qword [0x415750]
call fcn.00409a50
mov dword [ebx + 4], eax
mov ecx, dword [esi + 0x84]
call fcn.00402160
mov edx, dword [0x41af50]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov edx, dword [esi + 0x64]
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x60]
push edx
mov dword [esi + 0x54], ecx
push eax
mov ecx, edi
call fcn.00402780
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x7c], edx
mov edx, dword [ebp + 0xc]
mov dword [esi + 0x78], ecx
mov ecx, dword [ebp + 8]
mov dword [esi + 0x74], eax
mov eax, dword [edi]
mov dword [esi + 0x70], edx
mov edx, dword [edi + 4]
mov dword [esi + 0x6c], ecx
mov ecx, dword [esi + 0x38]
cmp ecx, eax
jg 0x4033a3
jne 0x4033ae
cmp dword [esi + 0x3c], edx
jle 0x4033ae
mov al, byte [esi + 0x68]
test al, al
jne 0x403210
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x403870
Capabilities:
Receive data
Receive data on socket
Terminate process

Disassembly:
sub esp, 0x84
lea eax, [esp]
push eax
mov eax, dword [ecx + 0xc]
lea edx, [esp + 8]
push edx
push 0
mov dword [esp + 0xc], 0x80
mov edx, dword [eax + 0x1c]
mov eax, dword [ecx + 0x10]
mov ecx, dword [ecx + 4]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xffffffff
jne 0x4038c2
push 0x159
push str.srcPerfSocket_UDP.cpp
push 0x415a18
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
mov eax, dword [esp + 0x88]
push esi
push edi
mov ecx, 0x20
lea esi, [esp + 0xc]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
add esp, 0x84
ret 4
Function at 0x403ed0
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Terminate process

Disassembly:
sub esp, 0x11c
push ebx
push ebp
push esi
xor esi, esi
push edi
mov edi, dword [sym.imp.WS2_32.dll_htonl]
mov ebx, ecx
mov dword [esp + 0x28], esi
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax + 0x1c]
inc esi
cmp ecx, 0x34
mov dword [esp + 0x1c], esi
jle 0x403feb
mov esi, dword [ebx + 0x10]
push bind
add esi, 0xc
call edi
mov dword [esi], eax
mov eax, dword [esp + 0x134]
mov ecx, eax
push eax
sar ecx, 0x1f
call edi
mov edx, dword [esp + 0x130]
push edx
mov dword [esi + 4], eax
call edi
mov ebp, dword [esp + 0x144]
mov edx, dword [esp + 0x140]
mov ecx, dword [esp + 0x138]
mov dword [esi + 8], eax
mov eax, dword [esp + 0x13c]
sub eax, ebp
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
sub ecx, edx
mov dword [esp + 0x10], ecx
fmul qword [0x415378]
fild dword [esp + 0x10]
faddp st(1)
fld st(0)
call fcn.00409a50
mov ebp, eax
mov dword [esp + 0x14], ebp
fild dword [esp + 0x14]
fsubr st(1)
fmul qword [0x415750]
call fcn.00409a50
fstp st(0)
push ebp
mov dword [esp + 0x1c], eax
call edi
mov edx, dword [esp + 0x18]
push edx
mov dword [esi + 0xc], eax
call edi
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x148]
push eax
call edi
mov ecx, dword [esp + 0x14c]
push ecx
mov dword [esi + 0x14], eax
call edi
mov edx, dword [esp + 0x150]
push edx
mov dword [esi + 0x18], eax
call edi
mov dword [esi + 0x1c], eax
fld qword [ebx + 0x30]
call fcn.00409a50
push eax
mov dword [esp + 0x14], eax
call edi
fild dword [esp + 0x10]
mov dword [esi + 0x20], eax
fsubr qword [ebx + 0x30]
fmul qword [0x415750]
call fcn.00409a50
push eax
call edi
mov dword [esi + 0x24], eax
mov esi, dword [esp + 0x1c]
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax + 0x1c]
mov edx, dword [ebx + 0x10]
mov eax, dword [ebx + 4]
push 0
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
mov ecx, dword [esp + 0x28]
xor eax, eax
test ecx, ecx
jbe 0x40401b
mov edx, dword [ebx + 4]
nop
cmp dword [esp + eax*4 + 0x2c], edx
je 0x40401b
inc eax
cmp eax, ecx
jb 0x404010
cmp eax, ecx
jne 0x40402f
cmp ecx, 0x40
jae 0x40402f
mov ecx, dword [ebx + 4]
mov dword [esp + eax*4 + 0x2c], ecx
inc dword [esp + 0x28]
mov ecx, dword [ebx + 4]
lea edx, [esp + 0x20]
push edx
push 0
push 0
lea eax, [esp + 0x34]
push eax
inc ecx
push ecx
mov dword [esp + 0x34], 1
mov dword [esp + 0x38], 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x4040bb
test eax, eax
je 0x4040ae
mov edx, dword [ebx + 0xc]
mov eax, dword [edx + 0x1c]
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jge 0x404093
push 0x1df
push str.srcPerfSocket_UDP.cpp
push 0x4158b0
call fcn.00406bf0
add esp, 0xc
cmp esi, 0xa
jl 0x403ee8
mov eax, dword [ebx + 4]
push esi
push eax
push str.__3d__WARNING:_ack_of_last_datagram_failed_after__d_tries._n
call fcn.004090a5
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret 0x24
push 0x1d7
push str.srcPerfSocket_UDP.cpp
push 0x415a48
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
int3
Function at 0x405230
Capabilities:
Get local ipv4 addresses
Get socket information
Terminate process

Disassembly:
sub esp, 0x84
lea eax, [esp]
push eax
mov dword [esp + 4], 0
mov eax, dword [ecx + 4]
lea edx, [esp + 8]
push edx
push eax
mov dword [esp + 0xc], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x40527d
push 0x158
push str.libSocket.cpp
push str.getsockname
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
mov ecx, dword [esp]
push esi
mov esi, dword [esp + 0x8c]
push ecx
lea edx, [esp + 0xc]
push edx
mov ecx, esi
call fcn.00406400
mov eax, esi
pop esi
add esp, 0x84
ret 4

Function at 0x4052b0
Capabilities:
Terminate process

Disassembly:
sub esp, 0x84
lea eax, [esp]
push eax
mov dword [esp + 4], 0
mov eax, dword [ecx + 4]
lea edx, [esp + 8]
push edx
push eax
mov dword [esp + 0xc], 0x80
call dword [sym.imp.WS2_32.dll_getpeername]
cmp eax, 0xffffffff
jne 0x4052fd
push 0x163
push str.libSocket.cpp
push str.getpeername
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
mov ecx, dword [esp]
push esi
mov esi, dword [esp + 0x8c]
push ecx
lea edx, [esp + 0xc]
push edx
mov ecx, esi
call fcn.00406400
mov eax, esi
pop esi
add esp, 0x84
ret 4

Function at 0x405330
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x4051d9
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
cmp eax, 0xffffffff
jne 0x4051d2
push 0x59
push str.libSocket.cpp
push str.close
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
mov dword [esi + 4], 0xffffffff
pop esi
ret
mov dword [ecx], 0x416d74
jmp 0x4051a0
Function at 0x405340
Capabilities:
Set socket configuration
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x413e5b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x8c
mov eax, dword [esp + 0xa0]
mov edx, dword [esp + 0x9c]
push ebx
push esi
mov esi, ecx
xor ecx, ecx
mov cx, word [esi + 8]
push edi
push eax
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.00406540
mov al, byte [esi + 0xa]
mov bl, byte [esp + 0x90]
xor ecx, ecx
test al, al
setne cl
mov dword [esp + 0xa0], 0
inc ecx
neg bl
mov edi, ecx
sbb ebx, ebx
and ebx, 0x15
add ebx, 2
test al, al
je 0x4053ed
lea ecx, [esp + 0x10]
call fcn.00406510
test al, al
je 0x4053ed
push 0x14
push 0
push 0
push 0
push edi
push ebx
call dword [sym.imp.WS2_32.dll_WSASocketA]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x40541d
push 0x7f
push str.libSocket.cpp
push str.socket
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
push 0
push edi
push ebx
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x40541d
push 0x85
push str.libSocket.cpp
push str.socket
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov ecx, dword [esi + 4]
push 4
lea eax, [esp + 0x10]
push eax
push 4
push 0xffff
push ecx
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
lea ecx, [esp + 0x10]
call fcn.00406510
test al, al
lea ecx, [esp + 0x10]
je 0x40549c
push 4
push 0
push 0
push 0
push 0
call fcn.00405810
push eax
lea ecx, [esp + 0x28]
call fcn.00405800
mov edx, dword [esi + 4]
push eax
push edx
call dword [sym.imp.WS2_32.dll_WSAJoinLeaf]
cmp eax, 0xffffffff
jne 0x4054d9
push 0x9f
push str.libSocket.cpp
push str.bind
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
call fcn.00405810
push eax
lea ecx, [esp + 0x14]
call fcn.00405800
push eax
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x4054d9
push 0xa4
push str.libSocket.cpp
push str.bind
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
mov al, byte [esi + 0xa]
test al, al
jne 0x40550f
mov ecx, dword [esi + 4]
push 5
push ecx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x40550f
push 0xaa
push str.libSocket.cpp
push str.listen
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
lea ecx, [esp + 0x10]
mov dword [esp + 0xa0], 0xffffffff
call fcn.00408840
mov ecx, dword [esp + 0x98]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x98
ret 8
Function at 0x40555b
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x413e86
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x110
push esi
mov esi, ecx
mov ecx, dword [esp + 0x124]
xor eax, eax
mov ax, word [esi + 8]
push 0
push eax
push ecx
lea ecx, [esp + 0x10]
call fcn.00406540
mov dl, byte [esi + 0xa]
mov cl, byte [esp + 0x84]
xor eax, eax
test dl, dl
setne al
push 0
mov dword [esp + 0x120], 0
inc eax
neg cl
push eax
sbb ecx, ecx
and ecx, 0x15
add ecx, 2
push ecx
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x4055cf
push 0xec
push str.libSocket.cpp
push str.socket
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov eax, dword [esp + 0x128]
test eax, eax
je 0x405655
push 0
push 0
push eax
lea ecx, [esp + 0x98]
call fcn.00406540
lea ecx, [esp + 0x8c]
mov byte [esp + 0x11c], 1
call fcn.00405810
push eax
lea ecx, [esp + 0x90]
call fcn.00405800
push eax
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x405641
push 0x105
push str.libSocket.cpp
push str.bind
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
lea ecx, [esp + 0x8c]
mov byte [esp + 0x11c], 0
call fcn.00408840
lea ecx, [esp + 4]
call fcn.00405810
push eax
lea ecx, [esp + 8]
call fcn.00405800
mov ecx, dword [esi + 4]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x405696
push 0x115
push str.libSocket.cpp
push str.connect
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
lea ecx, [esp + 4]
mov dword [esp + 0x11c], 0xffffffff
call fcn.00408840
mov ecx, dword [esp + 0x114]
pop esi
mov dword fs:[0], ecx
add esp, 0x11c
ret 8

Function at 0x4056d0
Capabilities:
Set socket configuration

Disassembly:
mov eax, dword [esp + 8]
mov dl, byte [eax + 0x80]
mov eax, dword [ecx + 4]
push 4
test dl, dl
lea edx, [esp + 8]
push edx
push 0xa
jne 0x4056ff
push 0
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x405724
push 0x145
jmp 0x405712
push 0x29
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x405724
push 0x14b
push str.libSocket.cpp
push str.multicast_ttl
call fcn.00406bf0
add esp, 0xc
ret 8
Function at 0x405a10
Capabilities:
Resolve dns

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x14]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x24]
push edi
mov dword [esi], 0
push ecx
mov byte [eax], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ecx, eax
test ecx, ecx
mov dword [esp + 0x28], ecx
je 0x405aaf
cmp word [ecx + 8], 2
jne 0x405a85
cmp word [ecx + 0xa], 4
jne 0x405a85
mov edi, dword [ecx + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x405a85
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
lea esp, [esp]
mov edx, dword [eax]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebx
push ebp
call fcn.004059a0
test eax, eax
mov dword [esi], eax
je 0x405aa3
add edi, 4
lea esi, [eax + 0x1c]
mov eax, dword [edi]
test eax, eax
jne 0x405a60
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx]
mov edx, dword [esp + 0x24]
jmp 0x405a90
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x405a90
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 0x18
pop edi
pop esi
pop ebp
mov eax, 8
pop ebx
ret 0x18
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
add eax, 0xffffd507
cmp eax, 3
ja case.0x405abf.11001
jmp dword [eax*4 + 0x405aec]
pop edi
pop esi
pop ebp
mov eax, 0x2afa
pop ebx
ret 0x18
pop edi
pop esi
pop ebp
mov eax, 0x2afb
pop ebx
ret 0x18
pop edi
pop esi
pop ebp
mov eax, 0x2af9
pop ebx
ret 0x18
Function at 0x406280
Capabilities:
Get common file path

Disassembly:
sub esp, 0x22c
mov eax, dword [0x41b35c]
test eax, eax
mov dword [esp], str.getaddrinfo
mov dword [esp + 4], 0x405d50
mov dword [esp + 8], str.getnameinfo
mov dword [esp + 0xc], 0x406040
mov dword [esp + 0x10], str.freeaddrinfo
mov dword [esp + 0x14], fcn.00405d00
jne 0x4063e2
push 0x104
lea ecx, [esp + 0x128]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4063d8
xor eax, eax
mov cl, byte [esp + eax + 0x124]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x4062e0
push ebx
push ebp
push esi
push edi
lea edi, [esp + 0x28]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406300
mov edx, dword [str.ws2_32]
mov eax, dword [0x416df0]
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea ecx, [esp + 0x28]
mov dword [edi], edx
push ecx
mov dword [edi + 4], eax
call ebp
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x406344
push str.getaddrinfo
push esi
call ebx
test eax, eax
jne 0x40639f
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x406350
mov cl, byte [esp + eax + 0x134]
mov byte [esp + eax + 0x28], cl
inc eax
test cl, cl
jne 0x406350
lea edi, [esp + 0x28]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406365
mov edx, dword [str.wship6]
mov eax, dword [0x416de8]
lea ecx, [esp + 0x28]
mov dword [edi], edx
push ecx
mov dword [edi + 4], eax
call ebp
mov esi, eax
test esi, esi
je 0x4063d4
push str.getaddrinfo
push esi
call ebx
test eax, eax
jne 0x40639f
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4063d4
xor edi, edi
mov edx, dword [esp + edi*8 + 0x10]
push edx
push esi
call ebx
test eax, eax
mov dword [esp + edi*8 + 0x14], eax
je 0x406396
inc edi
cmp edi, 3
jl 0x4063a1
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov dword [0x41a058], eax
mov dword [0x41a060], ecx
mov dword [fcn.00405d00], edx
pop edi
pop esi
pop ebp
pop ebx
mov dword [0x41b35c], 1
movzx eax, word [esp + 0x230]
mov eax, dword [eax*8 + 0x41a058]
add esp, 0x22c
ret 4
Function at 0x406440
Capabilities:
Terminate process

Disassembly:
push ecx
mov eax, dword [0x41b360]
test eax, eax
push esi
push edi
mov edi, ecx
jne 0x406459
push eax
call fcn.00406280
mov dword [0x41b360], eax
mov esi, dword [esp + 0x10]
lea ecx, [esp + 8]
push ecx
push 0
push 0
push esi
call eax
test eax, eax
je 0x4064aa
push 0
push 0x400
push 0x41af58
push 0x400
push eax
push 0
push 0x12ff
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0x41af58
push str.error:__s_n
push 0x41a108
call fcn.00409df6
add esp, 0xc
push 1
call fcn.004095b8
mov eax, dword [esp + 8]
mov ecx, dword [eax + 0x18]
test ecx, ecx
jne 0x4064cf
push esi
push str.getaddrinfo_failed_to_get_an_address..._target_was__s_n
push 0x41a108
call fcn.00409df6
add esp, 0xc
push 1
call fcn.004095b8
cmp dword [eax + 4], 2
setne dl
mov byte [edi + 0x80], dl
mov ecx, dword [eax + 0x10]
mov esi, dword [eax + 0x18]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, eax
mov eax, dword [0x41b364]
test eax, eax
jne 0x406507
push 2
call fcn.00406280
mov dword [0x41b364], eax
push esi
call eax
pop edi
pop esi
pop ecx
ret 4

Function at 0x4068a0
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
call fcn.00408850
push eax
mov eax, dword [esi + 4]
push eax
call fcn.00406860
add esp, 8
test al, al
jne 0x40691e
mov ecx, dword [0x41b36c]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [0x41b368]
mov edx, dword [0x41b370]
dec ecx
push edx
mov dword [0x41b368], ecx
call dword [sym.imp.KERNEL32.dll_PulseEvent]
mov eax, dword [0x41b36c]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [esi + 4]
call fcn.00408850
push ecx
mov dword [esi + 4], eax
call sub.KERNEL32.dll_GetCurrentThreadId
push eax
call fcn.00406860
add esp, 8
test al, al
push 0
je 0x406914
call dword [sym.imp.KERNEL32.dll_ExitThread]
mov ecx, dword [esi + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
pop esi
ret

Function at 0x406a40
Capabilities:
Create thread
Terminate process

Disassembly:
push esi
push edi
mov esi, ecx
lea edi, [esi + 4]
call fcn.00408850
push eax
mov eax, dword [edi]
push eax
call fcn.00406860
add esp, 8
test al, al
je 0x406ab3
mov ecx, dword [0x41b36c]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
inc dword [0x41b368]
mov edx, dword [0x41b36c]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
push 0
push esi
push 0x406920
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
mov dword [esi + 0xc], eax
jne 0x406ab3
push 0x7c
push str.libThread.cpp
push 0x416e74
call fcn.00406bf0
add esp, 0xc
push 1
call fcn.004095b8
pop edi
pop esi
ret