joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404c95
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
push dword [esp + 0x18]
call fcn.004169ca
lea ecx, [esi + 0x24]
call fcn.004164cd
lea ecx, [esi + 0x30]
call fcn.004164cd
lea ecx, [esi + 0x3c]
call fcn.004164cd
lea ecx, [esi + 0x48]
call fcn.004164cd
lea ecx, [esi + 0x54]
call fcn.004164cd
lea edi, [esi + 0x60]
mov ecx, edi
call fcn.0040b541
push 1
mov dword [esi], 0x41b49c
pop eax
mov dword [edi], eax
push 0x9c8
mov dword [esi + 0x64], eax
call fcn.004171cc
xor ebx, ebx
pop ecx
cmp eax, ebx
je 0x404d0c
mov edx, dword [esp + 0x14]
mov ecx, eax
push edx
mov dword [esi + 0xa0], edx
push dword [esp + 0x14]
call fcn.004019bf
jmp 0x404d0e
xor eax, eax
push 0x8c
mov dword [esi + 0x98], eax
call fcn.004171cc
cmp eax, ebx
pop ecx
je 0x404d3c
push dword [esi + 0x98]
mov ecx, eax
push dword [esi + 0xa0]
push dword [esp + 0x18]
call fcn.0040c4c5
jmp 0x404d3e
xor eax, eax
mov dword [esi + 0x8c], eax
cmp dword [eax + 8], ebx
jne 0x404d56
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, dword [esi + 0x98]
call fcn.00401a40
push 0x38
call fcn.004171cc
cmp eax, ebx
pop ecx
je 0x404d7e
push ebx
push edi
push dword [esi + 0x98]
mov ecx, eax
call fcn.00413530
jmp 0x404d80
xor eax, eax
push 0x30
mov dword [esi + 0x7c], eax
call fcn.004171cc
cmp eax, ebx
pop ecx
je 0x404d99
push ebx
mov ecx, eax
call fcn.00409b16
jmp 0x404d9b
xor eax, eax
push 0x40
mov dword [esi + 0x80], eax
call fcn.004171cc
cmp eax, ebx
pop ecx
je 0x404dbd
push esi
mov ecx, eax
push dword [esi + 0x98]
call fcn.0040a038
jmp 0x404dbf
xor eax, eax
push 4
mov dword [esi + 0x88], eax
call fcn.004171cc
cmp eax, ebx
pop ecx
je 0x404de0
push dword [esi + 0x98]
mov ecx, eax
call fcn.004048bf
jmp 0x404de2
xor eax, eax
push 0x1c
mov dword [esi + 0x90], eax
call fcn.004171cc
cmp eax, ebx
pop ecx
je 0x404e01
push 0x10
push 0x64
mov ecx, eax
call fcn.00416542
jmp 0x404e03
xor eax, eax
push 0x14
mov dword [esi + 0x9c], eax
call fcn.004171cc
cmp eax, ebx
pop ecx
je 0x404e24
push dword [esi + 0x98]
mov ecx, eax
call fcn.00413b99
jmp 0x404e26
xor eax, eax
lea edi, [esi + 0x94]
push 0x168
mov dword [edi], eax
call fcn.004171cc
cmp eax, ebx
pop ecx
je 0x404e4f
push ebx
mov ecx, eax
push dword [esi + 0x98]
push dword [edi]
call fcn.00414a3b
jmp 0x404e51
xor eax, eax
mov dword [esi + 0x84], eax
push 0xc0
lea eax, [esi + 0xc8]
push ebx
push eax
mov dword [esi + 0xa8], ebx
mov dword [esi + 0xac], ebx
call fcn.004171f0
add esp, 0xc
mov ecx, esi
mov dword [esi + 0x188], ebx
mov dword [esi + 0xb0], ebx
mov dword [esi + 0xb4], ebx
mov dword [esi + 0xb8], ebx
mov dword [esi + 0xc0], ebx
mov dword [esi + 0xc4], 1
call fcn.0040878f
push 0x7c
push dword [0x42227c]
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
mov dword [esi + 0x14], eax
mov eax, esi
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x4061a0
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 3
push connect
mov edi, ecx
push dword [ebp + 8]
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, dword [ebp + 0xc]
cmp eax, 0xffffffff
mov dword [esi + 0x34], eax
je 0x406291
lea ecx, [ebp + 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [ebp + 8]
xor ecx, ecx
xor ebx, ebx
or ecx, eax
or edx, ebx
mov dword [esi + 0x20], ecx
mov dword [esi + 0x24], edx
mov ecx, dword [esi + 0x20]
or ecx, edx
jne 0x406202
push 1
pop eax
jmp 0x406299
push 0
push eax
push dword [ebp + 8]
push 2
push 0
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [esi + 0x38], eax
mov ecx, dword [edi + 0x98]
mov edi, dword [esi + 0x20]
mov dword [ebp - 4], eax
mov eax, dword [ecx + 0x314]
cdq
cmp dword [esi + 0x24], edx
jl 0x40623b
jg 0x406236
cmp edi, eax
jbe 0x40623b
mov dword [ebp + 0xc], eax
jmp 0x40623e
mov dword [ebp + 0xc], edi
mov edi, dword [esi + 0x2c]
mov eax, edi
mov dword [ebp + 8], edi
mov ebx, dword [ecx + 0x314]
sar eax, 0x1f
mov eax, ebx
cdq
push edx
push eax
push edi
push dword [esi + 0x28]
call fcn.00417a60
imul eax, ebx
push dword [ebp + 0xc]
push eax
push edi
push 4
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
mov dword [esi + 0x30], eax
je 0x406291
push 1
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x406291
mov ecx, dword [ebp - 8]
push esi
call fcn.004062a0
xor eax, eax
jmp 0x406299
xor eax, eax
cmp dword [esi + 0x30], eax
setne al
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x40694a
Capabilities:
Check for time delay via gettickcount
Read and send data from client to server
Read file via mapping
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
test esi, esi
mov dword [ebp - 4], edi
je 0x406aae
cmp dword [esi + 0x34], 0xffffffff
je 0x406aae
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x20]
and dword [ebp + 8], 0
mov edx, dword [esi + 0x2c]
mov ebx, dword [esi + 0x24]
sub eax, ecx
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 0x98]
sbb ebx, edx
mov edi, dword [eax + 0x318]
mov eax, edi
cdq
push edx
push eax
push dword [esi + 0x2c]
push ecx
call fcn.00417b10
sub edi, eax
test ebx, ebx
jl 0x406a00
jg 0x4069ac
cmp dword [ebp - 0xc], 0
jbe 0x406a00
mov eax, edi
cdq
cmp ebx, edx
jl 0x4069bf
jg 0x4069ba
cmp dword [ebp - 0xc], eax
jbe 0x4069bf
mov dword [ebp - 8], edx
jmp 0x4069c5
mov eax, dword [ebp - 0xc]
mov dword [ebp - 8], ebx
push 0
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x98]
mov eax, dword [eax + 0x314]
cdq
push edx
push eax
push dword [esi + 0x2c]
push dword [esi + 0x28]
call fcn.00417b10
add eax, dword [esi + 0x30]
push eax
mov eax, dword [esi + 8]
push dword [eax + 8]
call dword [sym.imp.WSOCK32.dll_send]
test eax, eax
mov dword [ebp + 8], eax
jl 0x406aae
mov eax, dword [ebp + 8]
cdq
add dword [esi + 0x28], eax
adc dword [esi + 0x2c], edx
mov ecx, dword [esi + 0x28]
cmp ecx, dword [esi + 0x20]
mov edi, dword [esi + 0x2c]
jne 0x406a2b
cmp edi, dword [esi + 0x24]
jne 0x406a2b
xor eax, eax
cmp dword [esi + 0x18], 0x62
setne al
add eax, 7
mov dword [esi + 0x48], eax
jmp 0x406a9d
mov ebx, dword [ebp - 4]
mov eax, dword [ebx + 0x98]
mov eax, dword [eax + 0x314]
cdq
push edx
push eax
push edi
push ecx
call fcn.00417b10
or eax, edx
jne 0x406a9d
push dword [esi + 0x30]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esi + 0x28]
mov edi, dword [esi + 0x20]
mov edx, dword [esi + 0x2c]
mov ecx, dword [esi + 0x24]
sub edi, eax
mov eax, dword [ebx + 0x98]
sbb ecx, edx
mov eax, dword [eax + 0x314]
cdq
cmp ecx, edx
jl 0x406a7d
jg 0x406a78
cmp edi, eax
jbe 0x406a7d
mov dword [ebp - 8], edx
jmp 0x406a82
mov eax, edi
mov dword [ebp - 8], ecx
push eax
mov eax, dword [esi + 0x2c]
push dword [esi + 0x28]
mov ecx, eax
sar ecx, 0x1f
push eax
push 4
push dword [esi + 0x38]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0x30], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 8]
push 1
mov dword [ecx + 0x20], eax
pop eax
jmp 0x406ab0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40745f
Capabilities:
Set socket configuration

Disassembly:
cmp dword [esp + 4], 0
push ebx
push esi
push edi
mov esi, ecx
je 0x4074ba
mov eax, dword [esi + 0x24]
lea ebx, [esi + 0x24]
mov ecx, ebx
call dword [eax + 4]
mov edi, eax
add eax, 0xffffffd0
neg edi
sbb edi, edi
and edi, eax
je 0x4074ba
mov eax, dword [esp + 0x10]
cmp dword [edi + 0x44], eax
jne 0x407498
mov ecx, edi
call fcn.00412af1
cmp eax, 1
jne 0x4074fa
mov eax, dword [ebx]
mov ecx, edi
add edi, 0x30
neg ecx
sbb ecx, ecx
and ecx, edi
push ecx
mov ecx, ebx
call dword [eax + 8]
mov ecx, eax
add eax, 0xffffffd0
neg ecx
sbb ecx, ecx
and ecx, eax
mov edi, ecx
jne 0x407483
push 0x8334
call fcn.004171cc
xor ebx, ebx
pop ecx
cmp eax, ebx
je 0x407506
push dword [esp + 0x14]
lea ecx, [esi + 0x60]
push dword [esp + 0x14]
push dword [esi + 0x90]
push dword [esi + 0x98]
push ecx
mov ecx, eax
push dword [esi + 0x94]
push dword [esi + 0x8c]
call fcn.0040fb65
mov edi, eax
jmp 0x407508
push 1
push edi
mov ecx, esi
call fcn.004088a5
jmp 0x407574
xor edi, edi
cmp edi, ebx
jne 0x407510
xor eax, eax
jmp 0x407577
mov eax, dword [esi + 0x24]
lea ecx, [esi + 0x24]
lea edx, [edi + 0x30]
push edx
call dword [eax]
mov eax, dword [edi]
push ebx
mov ecx, edi
call dword [eax + 0xe4]
mov eax, dword [edi]
push 0xa
mov ecx, edi
call dword [eax + 4]
push 1
push edi
mov ecx, esi
call fcn.004097b5
cmp dword [esi + 0x6c], ebx
jne 0x407574
mov eax, dword [esi + 0x98]
cmp dword [eax + 0x390], ebx
jne 0x407574
mov ax, word [esi + 0xa0]
push 1
push eax
call dword [sym.imp.WSOCK32.dll_htons]
movzx eax, ax
push eax
push str.127.0.0.1
call dword [sym.imp.WSOCK32.dll_inet_addr]
push eax
mov ecx, esi
call fcn.00408263
push 1
pop eax
pop edi
pop esi
pop ebx
ret 8
Function at 0x4084d4
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x84
push ebx
push esi
lea eax, [ebp - 4]
push edi
push eax
mov eax, dword [ebp + 8]
add eax, 0x84
push 7
mov ebx, ecx
push eax
call fcn.0040c415
xor edi, edi
add esp, 0xc
cmp eax, edi
je 0x4086dd
push eax
call fcn.00417897
mov dword [ebp - 0x14], eax
lea eax, [ebp - 4]
push eax
push 7
push edi
call fcn.0040c415
add esp, 0x10
cmp eax, edi
je 0x4086dd
push eax
call fcn.00417897
mov dword [ebp - 0x10], eax
lea eax, [ebp - 4]
push eax
xor esi, esi
push 7
push edi
mov dword [ebp - 8], esi
call fcn.0040c415
add esp, 0x10
cmp eax, edi
je 0x408670
jmp 0x40854d
mov esi, dword [ebp - 8]
push 0x32
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.0040b255
lea eax, [ebp - 4]
push eax
push 7
push edi
call fcn.0040c415
add esp, 0x18
cmp eax, edi
je 0x408670
push 0x32
push eax
lea eax, [ebp - 0x52]
push eax
call fcn.0040b255
lea eax, [ebp - 4]
push eax
push 7
push edi
call fcn.0040c415
add esp, 0x18
cmp eax, edi
je 0x408670
push eax
call fcn.0041780c
mov esi, eax
lea eax, [ebp - 4]
push eax
push 7
push edi
call fcn.0040c415
add esp, 0x10
cmp eax, edi
je 0x40866d
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 4]
push eax
push 7
push edi
call fcn.0040c415
add esp, 0xc
cmp eax, edi
je 0x40866d
push eax
call fcn.00417897
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 4]
push eax
push 7
push edi
call fcn.0040c415
add esp, 0x10
cmp eax, edi
mov dword [ebp - 0xc], eax
je 0x40866d
push 0x420cb4
push eax
call fcn.00417590
pop ecx
test eax, eax
pop ecx
jne 0x40860d
mov dword [ebp - 0xc], 0x4220f0
lea eax, [ebp - 4]
push eax
push 7
push edi
call fcn.0040c415
add esp, 0xc
cmp eax, edi
mov dword [ebp - 0x18], eax
je 0x40866d
push 0x420cb4
push eax
call fcn.00417590
pop ecx
test eax, eax
pop ecx
jne 0x40863b
mov dword [ebp - 0x18], 0x4220f0
push dword [ebp - 0x18]
or esi, 1
lea eax, [ebp - 0x84]
mov ecx, ebx
push dword [ebp - 0xc]
push esi
push eax
call fcn.00407a43
inc dword [ebp - 8]
lea eax, [ebp - 4]
push eax
push 7
push edi
call fcn.0040c415
add esp, 0xc
cmp eax, edi
jne 0x40854a
mov esi, dword [ebp - 8]
cmp dword [ebp - 0x14], edi
jne 0x408699
cmp esi, dword [ebp - 0x10]
jl 0x408699
mov eax, dword [ebx + 0x98]
mov dword [ebx + 0xac], edi
cmp dword [eax + 0x390], edi
je 0x4086dd
push 1
mov ecx, ebx
call fcn.004080c9
jmp 0x4086dd
sub esi, dword [ebp - 0x10]
add esi, dword [ebp - 0x14]
push esi
call fcn.00417e57
pop ecx
mov ecx, dword [ebx + 0x8c]
push eax
push 0x12
push dword [ebp + 8]
call fcn.0040c85d
mov eax, dword [ebx + 0x98]
push edi
mov esi, 0x105
push dword [eax + 0x394]
push esi
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
je 0x4086dd
mov dword [ebx + 0xb0], esi
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x4086e4
Capabilities:
Create process on windows

Disassembly:
push esi
mov esi, ecx
push edi
xor edi, edi
mov eax, dword [esi + 0x98]
push 5
push edi
add eax, 0x68
push edi
push eax
push edi
push edi
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
cmp eax, 0x1f
jg 0x408733
cmp eax, 0x1b
je 0x40871e
cmp eax, 0x1f
je 0x40871e
mov eax, dword [esi]
push edi
push 0x420860
push 0x420ce4
jmp 0x40872b
mov eax, dword [esi]
push edi
push 0x420860
push 0x420cc4
mov ecx, esi
call dword [eax + 0x90]
pop edi
pop esi
ret
Function at 0x40bb3b
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x954
mov dl, byte [0x4220f0]
push ebx
push esi
mov esi, ecx
mov ebx, 0xff
push edi
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x553]
mov byte [ebp - 0x554], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x953]
mov byte [ebp - 0x954], dl
rep stosd dword es:[edi], eax
and dword [ebp - 4], 0
add ebx, 5
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 8]
cmp byte [eax], 0
je 0x40bbbf
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp - 0x554]
push ecx
push 0x400
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x40bbbf
mov eax, dword [ebp - 4]
test eax, eax
je 0x40bbbf
and byte [eax - 1], 0
push ebx
push dword [ebp - 4]
lea eax, [ebp - 0x954]
jmp 0x40bbcf
cmp dword [ebp + 0x14], 0
je 0x40bbd8
push ebx
lea eax, [ebp - 0x554]
push dword [ebp + 0x14]
push eax
call fcn.0040b255
add esp, 0xc
push 0x4c
lea eax, [ebp - 0x50]
pop edi
push edi
push 0
push eax
call fcn.004171f0
mov eax, dword [esi]
add esp, 0xc
test eax, eax
mov dword [ebp - 0x50], edi
je 0x40bbfb
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x4c], eax
jmp 0x40bbff
and dword [ebp - 0x4c], 0
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov dword [ebp - 0x44], eax
mov edi, 0x400
test eax, eax
lea eax, [ebp - 0x954]
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x554]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 4]
setne cl
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x38], ecx
neg eax
sbb eax, eax
and eax, 0x20
or eax, 0x80004
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x40bc60
cmp eax, 1
je 0x40bc60
cmp eax, 3
jne 0x40bc5c
mov eax, 0x100000
jmp 0x40bc71
xor eax, eax
jmp 0x40bc71
dec eax
neg eax
sbb eax, eax
and ax, 0xfe00
add eax, 0x200
or ah, 0x10
or dword [ebp - 0x1c], eax
lea eax, [ebp - 0x154]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, dword [esi + 8]
test eax, eax
je 0x40bc99
cmp eax, 1
je 0x40bc99
lea eax, [ebp - 0x50]
push eax
call sub.comdlg32.dll_GetSaveFileNameA
jmp 0x40bca2
lea eax, [ebp - 0x50]
push eax
call sub.comdlg32.dll_GetOpenFileNameA
mov dword [ebp + 0x10], eax
lea eax, [ebp - 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp dword [ebp + 0x10], 0
je 0x40bcf8
cmp dword [esi + 8], 1
jne 0x40bcd0
lea eax, [ebp - 0x954]
push edi
push eax
push dword [ebp + 8]
call fcn.00417250
jmp 0x40bcdc
push ebx
push dword [ebp - 0x34]
push dword [ebp + 8]
call fcn.0040b255
add esp, 0xc
cmp dword [ebp + 0x14], 0
je 0x40bcf8
movzx eax, word [ebp - 0x18]
push eax
push dword [ebp - 0x34]
push dword [ebp + 0x14]
call fcn.0040b255
add esp, 0xc
mov eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x40c466
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x40c48f
push esi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x40c491
push esi
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
je 0x40c48f
mov eax, dword [eax + 0xc]
pop esi
mov eax, dword [eax]
mov eax, dword [eax]
ret
xor eax, eax
pop esi
ret

Function at 0x40c4c5
Capabilities:
Get hostname
Get session user name
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
push ebx
push esi
mov esi, ecx
push edi
and dword [esi + 8], 0
call fcn.0040c060
mov edi, dword [ebp + 8]
push dword [ebp + 0xc]
or dword [esi + 4], 0xffffffff
or dword [esi], 0xffffffff
and dword [esi + 0x14], 0
mov dword [esi + 0xc], eax
mov dword [esi + 0x84], edi
call dword [sym.imp.WSOCK32.dll_htons]
movzx eax, ax
mov dword [esi + 0x88], eax
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov dword [esi + 0x10], eax
test eax, eax
setne cl
push ecx
mov ecx, esi
call fcn.0040c5d0
test eax, eax
je 0x40c5c2
push 0x32
lea ecx, [ebp - 4]
pop ebx
lea eax, [esi + 0x52]
push ecx
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
jne 0x40c549
push eax
push str.GetComputerName__
call fcn.0040bda6
pop ecx
pop ecx
jmp 0x40c5c2
test edi, edi
jne 0x40c596
lea eax, [ebp - 0x404]
push 0x400
push eax
call dword [sym.imp.WSOCK32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x40c576
lea eax, [esi + 0x52]
push eax
lea eax, [ebp - 0x404]
push eax
call fcn.00417620
pop ecx
pop ecx
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
jne 0x40c596
mov eax, dword [0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esi + 0x84], eax
lea eax, [ebp - 4]
lea edi, [esi + 0x20]
push eax
push edi
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
cmp eax, 1
je 0x40c5bb
push ebx
push 0x421240
push edi
call fcn.0040b255
add esp, 0xc
mov dword [esi + 8], 1
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x40c5d0
Capabilities:
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ac
push ebx
push esi
lea eax, [ebp - 0x1ac]
push edi
push eax
mov esi, ecx
push 0x101
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
push 0
je 0x40c607
push str.WSAStart__
call fcn.0040bdff
pop ecx
pop ecx
jmp 0x40c7fd
mov edi, dword [sym.imp.WSOCK32.dll_socket]
push 2
pop ebx
push ebx
push ebx
call edi
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x40c624
push 0
push 0x421344
jmp 0x40c5fb
push 1
pop eax
cmp dword [ebp + 8], eax
jne 0x40c804
push 0
push eax
push ebx
call edi
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x40c647
push 0
push 0x421318
jmp 0x40c5fb
push 0x10
lea eax, [ebp - 0x1c]
push 0
push eax
call fcn.004171f0
mov eax, dword [esi + 0x84]
mov edi, dword [sym.imp.WSOCK32.dll_bind]
mov dword [ebp - 0x18], eax
mov ax, word [esi + 0x88]
add esp, 0xc
mov word [ebp - 0x1a], ax
lea eax, [ebp - 0x1c]
mov word [ebp - 0x1c], bx
push 0x10
push eax
push dword [esi]
call edi
test eax, eax
je 0x40c68f
push 0
push str.bind__
jmp 0x40c5fb
lea eax, [ebp - 0x1c]
push 0x10
push eax
push dword [esi + 4]
call edi
test eax, eax
je 0x40c6b9
push dword [esi + 4]
call dword [sym.imp.WSOCK32.dll_closesocket]
or dword [esi + 4], 0xffffffff
push 0
push 0x4212f0
call fcn.0040bdff
pop ecx
pop ecx
mov edi, dword [sym.imp.WSOCK32.dll_ioctlsocket]
lea eax, [ebp - 4]
mov ebx, 0x8004667e
push eax
push ebx
mov dword [ebp - 4], 1
push dword [esi]
call edi
test eax, eax
je 0x40c6e4
push 0
push str.ioctlsocket_nonblock_
jmp 0x40c5fb
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x40c704
lea ecx, [ebp - 4]
push ecx
push ebx
push eax
call edi
test eax, eax
je 0x40c704
push 0
push str.ioctlsocket_tcp_nonblock_
jmp 0x40c5fb
mov edi, dword [sym.imp.WSOCK32.dll_setsockopt]
lea eax, [ebp - 4]
push 4
push eax
mov ebx, 0xffff
push 0x20
push ebx
mov dword [ebp - 4], 1
push dword [esi]
call edi
test eax, eax
je 0x40c733
push 0
push str.setsockopt_broadcast_
jmp 0x40c5fb
lea eax, [ebp - 0xc]
push 4
push eax
push 0x1001
push ebx
mov dword [ebp - 0xc], 0x10000
push dword [esi]
mov dword [ebp - 8], 0x8000
call edi
test eax, eax
je 0x40c777
lea eax, [ebp - 8]
push 4
push eax
push 0x1001
push ebx
push dword [esi]
call edi
test eax, eax
je 0x40c777
push 0
push str.setsockopt_sendbuf_
call fcn.0040bdff
pop ecx
pop ecx
lea eax, [ebp - 0xc]
push 4
push eax
push 0x1002
push ebx
mov dword [ebp - 0xc], 0x10000
push dword [esi]
mov dword [ebp - 8], 0x8000
call edi
test eax, eax
je 0x40c7bb
lea eax, [ebp - 8]
push 4
push eax
push 0x1002
push ebx
push dword [esi]
call edi
test eax, eax
je 0x40c7bb
push 0
push str.setsockopt_recvbuf_
call fcn.0040bdff
pop ecx
pop ecx
mov eax, dword [esi + 4]
mov dword [ebp - 4], 1
cmp eax, 0xffffffff
je 0x40c7e8
lea ecx, [ebp - 4]
push 4
push ecx
push 4
push ebx
push eax
call edi
test eax, eax
je 0x40c7e8
push 0
push str.setsockopt_tcp_reuseaddr_
call fcn.0040bdff
pop ecx
pop ecx
mov esi, dword [esi + 4]
cmp esi, 0xffffffff
je 0x40c801
push 5
push esi
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
je 0x40c801
xor eax, eax
jmp 0x40c804
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40cc5b
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
push 0x10
lea eax, [ebp - 0x10]
push 0
mov esi, ecx
push eax
call fcn.004171f0
mov ax, word [ebp + 0xc]
add esp, 0xc
mov word [ebp - 0xe], ax
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push 0x10
push eax
push 0
mov edi, dword [sym.imp.WSOCK32.dll_sendto]
push dword [ebp + 0x14]
mov word [ebp - 0x10], 2
push dword [ebp + 0x10]
push dword [esi]
call edi
cmp eax, 0xffffffff
jne 0x40cd08
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
sub eax, 0x2742
je 0x40cccd
sub eax, 0xf
jne 0x40cd04
cmp dword [0x422228], 0
jne 0x40cd04
mov dword [0x422228], 1
jmp 0x40cd04
mov ecx, esi
call fcn.0040c84a
cmp eax, 1
jne 0x40cd04
mov eax, dword [esi + 0x14]
test eax, eax
je 0x40cced
push eax
mov ecx, esi
call fcn.0040c908
cmp eax, 1
jne 0x40cd04
lea eax, [ebp - 0x10]
push 0x10
push eax
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [esi]
call edi
cmp eax, 0xffffffff
jne 0x40cd08
xor eax, eax
jmp 0x40cd0b
push 1
pop eax
pop edi
pop esi
leave
ret 0x10

Function at 0x40cd4c
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
push edi
push 1
lea eax, [ebp - 0xc]
pop edi
mov dword [ebp - 8], ecx
push eax
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0xc], 0x10
push dword [ecx + 4]
mov dword [ebp - 0x10], edi
call dword [sym.imp.WSOCK32.dll_accept]
mov esi, dword [ebp + 0xc]
cmp eax, 0xffffffff
mov dword [esi + 8], eax
je 0x40ce0d
push ebx
mov ebx, dword [sym.imp.WSOCK32.dll_setsockopt]
lea ecx, [ebp - 0x10]
push 4
push ecx
push edi
push 0xffff
push eax
call ebx
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x18], edi
mov dword [esi + 0xc], eax
mov dword [esi + 0x14], edi
movzx eax, word [ebp - 0x1e]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 0x31c]
test eax, eax
mov dword [ebp - 4], eax
jle 0x40cde3
lea eax, [ebp - 4]
push 4
push eax
push 0x1001
push 0xffff
push dword [esi + 8]
call ebx
test eax, eax
je 0x40cde3
mov eax, dword [ebp - 4]
cdq
sub eax, edx
sar eax, 1
jmp 0x40cdb9
mov ecx, dword [ebp - 8]
push esi
push dword [ebp + 8]
call fcn.0040cf24
test eax, eax
pop ebx
je 0x40ce04
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x20], eax
mov dword [esi + 0x1c], eax
mov eax, edi
jmp 0x40ce0f
push dword [esi + 8]
call dword [sym.imp.WSOCK32.dll_closesocket]
xor eax, eax
pop edi
pop esi
leave
ret 8