joyce8/EMBER2024-capa huggingface dataset:
Function at 0x429eb0
Capabilities:
Inspect load icon resource

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
push ebx
push esi
test dl, dl
je 0x429ec7
add esp, 0xfffffff0
call fcn.00402d18
mov byte [ebp - 1], dl
mov ebx, eax
xor edx, edx
mov eax, ebx
call fcn.00410a08
mov dl, 1
mov eax, dword [0x40b53c]
call fcn.00402b24
mov dword [ebx + 0x70], eax
mov dl, 1
mov eax, dword [0x40b53c]
call fcn.00402b24
mov dword [ebx + 0x88], eax
xor eax, eax
mov dword [ebx + 0x44], eax
xor eax, eax
mov dword [ebx + 0x64], eax
mov dword [ebx + 0x40], 0x80000018
mov dword [ebx + 0x58], 0x1f4
mov dword [ebx + 0x5c], 0x32
mov dword [ebx + 0x60], 0x9c4
mov byte [ebx + 0x68], 0
mov byte [ebx + 0x7d], 1
mov dl, 1
mov eax, dword [0x411f7c]
call fcn.00418b84
mov esi, eax
mov dword [ebx + 0x78], esi
push 0x42a020
mov eax, dword [0x445b0c]
mov eax, dword [eax]
push eax
call sub.user32.dll_LoadIconA
mov edx, eax
mov eax, esi
call fcn.00418f58
mov eax, dword [ebx + 0x78]
mov dword [eax + 8], ebx
mov dword [eax + 4], 0x42b63c
push pe_nt_image_headers32
lea eax, [ebp - 0x101]
push eax
mov eax, dword [0x445b0c]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_GetModuleFileNameA_2
lea eax, [ebp - 0x101]
push eax
lea eax, [ebp - 0x101]
push eax
call sub.user32.dll_OemToCharA
lea eax, [ebp - 0x101]
mov dl, 0x5c
call fcn.00409b14
test eax, eax
je 0x429fa8
lea edx, [eax + 1]
lea eax, [ebp - 0x101]
call fcn.00406f2c
lea eax, [ebp - 0x101]
mov dl, 0x2e
call fcn.00409b3c
test eax, eax
je 0x429fbc
mov byte [eax], 0
lea eax, [ebp - 0x101]
inc eax
push eax
call sub.user32.dll_CharLowerA
lea eax, [ebx + 0x6c]
lea edx, [ebp - 0x101]
mov ecx, pe_nt_image_headers32
call fcn.004037dc
mov eax, dword [0x445a80]
cmp byte [eax], 0
jne 0x429fed
mov eax, ebx
call fcn.0042a104
mov byte [ebx + 0x3d], 1
mov byte [ebx + 0x3e], 1
mov byte [ebx + 0x3f], 1
mov byte [ebx + 0x7e], 1
xor eax, eax
mov dword [ebx + 0x80], eax
cmp byte [ebp - 1], 0
je 0x42a015
pop dword fs:[0]
add esp, 0xc
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x42a358
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
push esi
add esp, 0xfffffff8
mov ebx, eax
mov eax, dword [0x4466ac]
cmp dword [eax + 0x24], 0
je 0x42a3e8
cmp dword [ebx + 0x74], 0
jne 0x42a3e5
mov eax, dword [ebx + 0x24]
mov dword [esp], eax
mov byte [esp + 4], dl
mov eax, esp
push eax
push 0x42a2ec
call sub.user32.dll_EnumWindows
mov eax, dword [ebx + 0x70]
cmp dword [eax + 8], 0
je 0x42a3e5
push 3
mov eax, dword [esp + 4]
push eax
call sub.user32.dll_GetWindow
mov esi, eax
mov dword [esp], esi
push 0xffffffffffffffec
push esi
call sub.user32.dll_GetWindowLongA
test al, 8
je 0x42a3b4
mov dword [esp], 0xfffffffe
mov eax, dword [ebx + 0x70]
mov esi, dword [eax + 8]
dec esi
cmp esi, 0
jl 0x42a3e5
push 0x13
push 0
push 0
push 0
push 0
mov eax, dword [esp + 0x14]
push eax
mov edx, esi
mov eax, dword [ebx + 0x70]
call fcn.0040c5b4
push eax
call sub.user32.dll_SetWindowPos
dec esi
cmp esi, 0xffffffff
jne 0x42a3c0
inc dword [ebx + 0x74]
pop ecx
pop edx
pop esi
pop ebx
ret
Function at 0x42acd0
Capabilities:
Get graphical window text

Disassembly:
push ebx
push esi
add esp, 0xffffff00
mov esi, edx
mov ebx, eax
cmp byte [ebx + 0x84], 0
je 0x42ad05
push pe_nt_image_headers32
lea eax, [esp + 4]
push eax
mov eax, dword [ebx + 0x24]
push eax
call sub.user32.dll_GetWindowTextA
mov ecx, eax
mov edx, esp
mov eax, esi
call fcn.00403694
jmp 0x42ad0f
mov eax, esi
mov edx, dword [ebx + 0x6c]
call fcn.00403648
add esp, 0x100
pop esi
pop ebx
ret

Function at 0x42b8ac
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
mov ebx, eax
mov esi, dword [ebx + 0x64]
test esi, esi
je 0x42b8e4
mov eax, esi
call fcn.00420630
test al, al
je 0x42b8e4
mov eax, dword [ebx + 0x64]
call fcn.00420498
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x42b8e4
push 0
mov eax, dword [ebx + 0x64]
call fcn.00420498
push eax
call sub.user32.dll_ShowWindow
pop esi
pop ebx
ret
Function at 0x40323a
Capabilities:
Encode data using xor

Disassembly:
lodsb al, byte [esi]
and dword [edi], edi
aas
pop edi
adc ebx, dword [esi]
jge 0x4031b4
xchg edi, esi
sbb esp, dword [eax + 0x29bfaf29]
pop edi
adc ebp, ecx
add dword cs:[eax], eax
add byte [eax], al
mov al, 0xb8
cwde
dec eax
ja 0x403169
inc eax
mov dl, 0x36
ja 0x4031f3
lodsd eax, dword [esi]
lds eax, [ebp - 0x31]
invalid
jne 0x403181
movsd dword es:[edi], dword [esi]
pop edx
mov edx, 0xaaa48173
lds eax, [esi - 0x29]
out 0xae, al
aam 0x61
sbb dword [ebp + 0x22], edi
salc
and dl, dh
lahf
mov ah, 0xb4
xor al, 0xdd
jae 0x4031a9
sbb eax, 0xb5dd957e
imul esi, dword [edi - 0x520c8722], 0x5a
xchg ebp, eax
fnsave dword [ebp + 0x78deb76b]
rep lodsd eax, dword [esi]
pop edx
invalid
iretd
cmp eax, 0x77b430c3
outsd dx, dword [esi]
sahf
jbe 0x4031d8
fisub dword [ebp + 0x6b168b45]
xlatb
scasb al, byte es:[edi]
fnsave dword [ebp - 0x18181832]
imul ecx, esp, 0xd
aaa
imul ebp, ecx, 0xee7a65d2
fldenv [edi - 0x2f6f6f6c]
call fcn.0040354b
add byte [eax], bh
xor byte [ecx], dl
jo 0x403197
mov ch, 0xce
out 0xe7, eax
out 0x6b, eax
int3
test cl, dl
xchg edx, eax
sbb eax, 0xa84ed7b5
cmp dword [edx], ecx
mov eax, dword [0x8fe4f8a9]
rcl dword [edx + 0x4ed7b51d]
xlatb
dec esi
test al, 0x39
or ah, byte [ecx - 0x701b0757]
ja 0x403217
clc
loop 0x4031e1
push esp
call 0x7f1905f6
jecxz 0x403270
mov dh, 0x43
int3
enter 0x6ccc, 0xffffffffffffffad
inc edi
push ds
jle 0x403212
scasd eax, dword es:[edi]
mov dl, 0x3f
push dword [edx + 0x71c04eb2]
in eax, 0x15
xchg edi, eax
jmp 0x688164b
mov edi, 0x25255531
movsd dword es:[edi], dword [esi]
jp 0x4032f5
retf 0x3964
cmc
sub byte [ebp + 0xd1e2b89], dl
fld dword [edx]
mov al, byte [0xd53a53ed]
fimul dword [ebp + 0x65]
fild qword [eax + 0xe]
inc esp
scasd eax, dword es:[edi]
mov eax, 0x1e0d38b8
xor al, 0x50
scasd eax, dword es:[edi]
test al, 0x39
mov ah, byte [ebx - 0x17]
mov es, word [ebp - 0x3ef894df]
aaa
insb byte es:[edi], dx
call 0xeb3d0017
or esi, dword [ebp - 0x13]
jp 0x403374
lodsd eax, dword [esi]
jecxz 0x40329e
imul byte ds:[edi + 0x189777a]
add byte [eax], al
add byte [eax], al
pop edi
or byte [eax], bh
ret 0xff64
add al, 0x7a
add al, 0
add byte [eax], al
ror dl, 0x58
and dword [ebx], 0x4c
mov dh, 0x17
outsb dx, byte [esi]
test eax, 0x26db7df5
xor bh, byte [0xa795c0a5]
sub esp, dword [edi - 0x64]
lodsb al, byte [esi]
insd dword es:[edi], dx
sti
cmp eax, 0x9a6764bf
or al, 0x7f
xor eax, 0x6f776da4
pop esi
jnp 0x403352
invalid
Function at 0x7bfe20
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x2b1000]
push edi
or ebp, 0xffffffff
jmp 0x7bfe42
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x7bfe49
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x7bfe38
mov eax, 1
add ebx, ebx
jne 0x7bfe5b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x7bfe6c
jne 0x7bfe8b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x7bfe8b
dec eax
add ebx, ebx
jne 0x7bfe78
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x7bfe50
add ebx, ebx
jne 0x7bfe87
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x7bfedd
xor ecx, ecx
sub eax, 3
jb 0x7bfea3
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x7bff12
sar eax, 1
mov ebp, eax
jmp 0x7bfeae
add ebx, ebx
jne 0x7bfeae
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x7bfe7c
inc ecx
add ebx, ebx
jne 0x7bfebc
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x7bfe7c
add ebx, ebx
jne 0x7bfec9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x7bfebe
jne 0x7bfeda
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x7bfebe
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x7bfefc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x7bfeee
jmp 0x7bfe3e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x7bfefc
add edi, ecx
jmp 0x7bfe3e
pop esi
mov edi, esi
mov ecx, 0x141ee
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x7bff1a
cmp byte [edi], 0x6e
jne 0x7bff1a
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x7bff1f
lea edi, [esi + 0x3bb000]
mov eax, dword [edi]
or eax, eax
je 0x7bff8e
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x3eeb20]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x3eec24]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x7bff4c
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x3eec28]
or eax, eax
je 0x7bff88
mov dword [ebx], eax
add ebx, 4
jmp 0x7bff69
call dword [esi + 0x3eec30]
mov ebp, dword [esi + 0x3eec2c]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x21f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x7bffc2
sub esp, 0xffffff80
jmp 0x6af17c
Function at 0x8989b0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x2f5000]
push edi
jmp 0x8989ca
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x8989d1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x8989c0
mov eax, 1
add ebx, ebx
jne 0x8989e3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x8989f4
jne 0x898a13
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x898a13
dec eax
add ebx, ebx
jne 0x898a00
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x8989d8
add ebx, ebx
jne 0x898a0f
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x898a65
xor ecx, ecx
sub eax, 3
jb 0x898a2b
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x898a9a
sar eax, 1
mov ebp, eax
jmp 0x898a36
add ebx, ebx
jne 0x898a36
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x898a04
inc ecx
add ebx, ebx
jne 0x898a44
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x898a04
add ebx, ebx
jne 0x898a51
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x898a46
jne 0x898a62
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x898a46
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x898a84
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x898a76
jmp 0x8989c6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x898a84
add edi, ecx
jmp 0x8989c6
pop esi
mov edi, esi
mov ecx, 0xbf38
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x898aa2
cmp byte [edi], 0x19
jne 0x898aa2
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x898aa7
lea edi, [esi + 0x494000]
mov eax, dword [edi]
or eax, eax
je 0x898b1f
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x519194]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x51937c]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x898ad4
mov ecx, edi
jns 0x898b03
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x519384]
or eax, eax
je 0x898b19
mov dword [ebx], eax
add ebx, 4
jmp 0x898af1
call dword [esi + 0x519380]
mov ebp, dword [esi + 0x519388]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x247]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x898b53
sub esp, 0xffffff80
jmp 0x54740a
Function at 0x401000
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1e8
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
call fcn.00401220
push 0x28
lea eax, [ebp - 0x58]
push ebx
push eax
call sub.MSVCRT.dll_memset
push 0x28
lea eax, [ebp - 0x30]
push ebx
push eax
call sub.MSVCRT.dll_memset
mov esi, dword [ebp + 0xc]
add esp, 0x18
mov edi, esi
cmp dword [esi], ebx
je 0x4010ab
push str._log
push dword [edi]
call dword [sym.imp.MSVCRT.dll__stricmp]
pop ecx
test eax, eax
pop ecx
jne 0x401062
push dword [edi + 4]
add edi, 4
call fcn.00401279
test eax, eax
pop ecx
je 0x401096
mov ebx, dword [edi]
add edi, 4
cmp dword [edi], 0
jne 0x40103d
test ebx, ebx
je 0x4010ab
push 0x404080
push ebx
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [0x404710], eax
test eax, eax
pop ecx
jne 0x40109d
push str.____ERROR:_open_logfile
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
jmp 0x40121b
push str.____ERROR:_Must_supply_logfile_name._r_n
jmp 0x40108a
push 0x16
push str._Start__r_n
call fcn.00401e9a
pop ecx
pop ecx
lea eax, [ebp - 0x1e8]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0x401ce4
push 2
call dword [sym.imp.MSVCRT.dll_signal]
mov ebx, dword [ebp + 8]
pop ecx
cmp ebx, 2
pop ecx
jle 0x4011b7
mov edi, dword [sym.imp.MSVCRT.dll__stricmp]
push str._listen
push dword [esi + 4]
call edi
pop ecx
test eax, eax
pop ecx
jne 0x40111a
cmp ebx, 4
jl 0x40111a
push dword [esi + 8]
mov edi, dword [sym.imp.MSVCRT.dll_atoi]
call edi
push dword [esi + 0xc]
mov dword [ebp - 8], eax
call edi
pop ecx
mov dword [ebp - 4], eax
pop ecx
mov dword [0x404714], 1
jmp 0x4011b7
push str._tran
push dword [esi + 4]
call edi
pop ecx
test eax, eax
pop ecx
jne 0x401163
cmp ebx, 5
jl 0x401163
push dword [esi + 8]
mov edi, dword [sym.imp.MSVCRT.dll_atoi]
call edi
push 0x28
mov dword [ebp - 8], eax
push dword [esi + 0xc]
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
push dword [esi + 0x10]
call edi
add esp, 0x14
mov dword [ebp - 4], eax
mov dword [0x404714], 2
jmp 0x4011b7
push str._slave
push dword [esi + 4]
call edi
pop ecx
test eax, eax
pop ecx
jne 0x4011b7
cmp ebx, 6
jl 0x4011b7
mov edi, dword [sym.imp.MSVCRT.dll_strncpy]
push 0x28
push dword [esi + 8]
lea eax, [ebp - 0x58]
push eax
call edi
push dword [esi + 0xc]
mov ebx, dword [sym.imp.MSVCRT.dll_atoi]
call ebx
push 0x28
mov dword [ebp - 8], eax
push dword [esi + 0x10]
lea eax, [ebp - 0x30]
push eax
call edi
push dword [esi + 0x14]
call ebx
add esp, 0x20
mov dword [ebp - 4], eax
mov dword [0x404714], 3
mov eax, dword [0x404714]
dec eax
je 0x4011fa
dec eax
je 0x4011e6
dec eax
je 0x4011ce
push dword [esi]
call fcn.0040123f
jmp 0x401206
push dword [ebp - 4]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x58]
push dword [ebp - 8]
push eax
call fcn.004015c2
add esp, 0x10
jmp 0x401207
push dword [ebp - 4]
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 8]
call fcn.004013f6
add esp, 0xc
jmp 0x401207
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040128d
pop ecx
pop ecx
cmp dword [0x404714], 0
je 0x401215
call fcn.00401cfd
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40128d
Capabilities:
Create thread
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
call fcn.00401d5f
test eax, eax
mov dword [ebp - 4], eax
je 0x4013f1
call fcn.00401d5f
test eax, eax
mov dword [ebp - 8], eax
je 0x4013f1
push dword [ebp + 8]
mov esi, dword [sym.imp.MSVCRT.dll_printf]
mov ebx, str.___Listening_port__d_......_r_n
push ebx
call esi
mov eax, dword [sym.imp.MSVCRT.dll__iob]
mov edi, dword [sym.imp.MSVCRT.dll_fflush]
add eax, 0x20
push eax
call edi
push dword [ebp + 8]
push dword [ebp - 4]
call fcn.00401d7e
add esp, 0x14
test eax, eax
jne 0x4012ef
push dword [ebp - 4]
jmp 0x40131c
push str.___Listen_OK__r_n
call esi
push dword [ebp + 0xc]
push ebx
call esi
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x20
push eax
call edi
push dword [ebp + 0xc]
push dword [ebp - 8]
call fcn.00401d7e
add esp, 0x18
test eax, eax
jne 0x401327
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x4013f1
push str.___Listen_OK__r_n
call esi
mov edi, dword [sym.imp.WS2_32.dll_accept]
mov ebx, dword [sym.imp.WS2_32.dll_inet_ntoa]
pop ecx
push 0x10
pop eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
push dword [ebp + 8]
push str.___Waiting_for_Client_on_port:_d_......_r_n
call esi
pop ecx
lea eax, [ebp - 0xc]
pop ecx
push eax
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 4]
call edi
push dword [ebp - 0x30]
mov dword [ebp - 0x14], eax
call ebx
push eax
push dword [ebp + 8]
push str.___Accept_a_Client_on_port__d_from__s_......_r_n
call esi
push dword [ebp + 0xc]
push str.___Waiting_another_Client_on_port:_d...._r_n
call esi
add esp, 0x14
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 8]
call edi
push dword [ebp - 0x40]
mov dword [ebp - 0x18], eax
call ebx
push eax
push dword [ebp + 0xc]
push str.___Accept_a_Client_on_port__d_from__s_r_n
call esi
push str.___Accept_Connect_OK__r_n
call esi
mov eax, dword [ebp - 0x14]
add esp, 0x10
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x1c]
push eax
xor eax, eax
lea ecx, [ebp - 0x24]
push eax
push ecx
push 0x4017b0
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x4013e7
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.___CreateThread_OK__r_n_n
call esi
pop ecx
jmp 0x401344
push 0
push 0
call dword [sym.imp.KERNEL32.dll_TerminateThread]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4013f6
Capabilities:
Create thread
Send data
Send data on socket
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, 0xffff
push esi
cmp dword [ebp + 8], eax
jg 0x4015b3
cmp dword [ebp + 8], 1
jl 0x4015b3
cmp dword [ebp + 0x10], eax
jg 0x4015ac
cmp dword [ebp + 0x10], 1
jl 0x4015ac
push 0x400
lea eax, [ebp - 0x424]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
call fcn.00401d5f
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 4], esi
je 0x4015bf
push dword [ebp + 8]
push esi
call fcn.00401d7e
pop ecx
test eax, eax
pop ecx
jne 0x40146f
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x4015bf
mov esi, dword [sym.imp.MSVCRT.dll_printf]
push ebx
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 8], 0x10
push str.___Waiting_for_Client_......_r_n
call esi
pop ecx
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_accept]
push dword [ebp - 0x22]
mov dword [ebp + 8], eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
push dword [ebp - 0x20]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.___Accept_a_Client_from__s:_d_......_r_n
call esi
add esp, 0xc
call fcn.00401d5f
mov ebx, eax
test ebx, ebx
jne 0x4014d3
push dword [ebp + 8]
call edi
jmp 0x401484
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push str.___Make_a_Connection_to__s:_d_......_r_n
call esi
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x20
push eax
call dword [sym.imp.MSVCRT.dll_fflush]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00401e0d
add esp, 0x1c
test eax, eax
jne 0x40155b
push ebx
call edi
push dword [ebp + 0x10]
lea eax, [ebp - 0x424]
push dword [ebp + 0xc]
push str._SERVER_connection_to__s:_d_error_r_n
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea eax, [ebp - 0x424]
push 0
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x424]
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_send]
push 0x400
lea eax, [ebp - 0x424]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
jmp 0x4014cc
push str.___Connect_OK__r_n
call esi
mov eax, dword [ebp + 8]
pop ecx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0xc], ebx
push eax
xor ebx, ebx
lea eax, [ebp - 0x10]
push ebx
push eax
push 0x4017b0
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
je 0x4015a0
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.___CreateThread_OK__r_n_n
call esi
pop ecx
jmp 0x401484
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
pop edi
pop ebx
jmp 0x4015bf
push str.____TransmitPort_invalid._r_n
jmp 0x4015b8
push str.____ConnectPort_invalid._r_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
pop esi
leave
ret
Function at 0x4015c2
Capabilities:
Create thread
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Terminate thread

Disassembly:
mov eax, 0x5114
call fcn.00401ee0
push ebx
push ebp
push esi
mov esi, dword [sym.imp.MSVCRT.dll_printf]
push edi
xor ebp, ebp
call fcn.00401d5f
mov edi, eax
cmp edi, ebp
je 0x4017a5
call fcn.00401d5f
mov ebx, eax
cmp ebx, ebp
je 0x4017a5
push dword [esp + 0x512c]
push dword [esp + 0x512c]
push str.___Make_a_Connection_to__s:_d...._r_n
call esi
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x20
push eax
call dword [sym.imp.MSVCRT.dll_fflush]
push dword [esp + 0x513c]
push dword [esp + 0x513c]
push edi
call fcn.00401e0d
add esp, 0x1c
test eax, eax
jne 0x401643
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
push ebx
call edi
jmp 0x4015d8
push pe_overlay
lea eax, [esp + 0x128]
push ebp
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push ebp
push ebp
lea eax, [esp + 0x28]
push ebp
push eax
lea eax, [edi + 1]
push eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], 1
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x40168b
call sub.MSVCRT.dll__errno
cmp dword [eax], 0x2714
jne 0x4016c1
jmp 0x401659
lea eax, [esp + 0x20]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x4016a4
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401659
push ebp
lea eax, [esp + 0x128]
push pe_overlay
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, ebp
mov dword [esp + 0x10], eax
jg 0x4016ce
push str.____There_is_a_error...Create_a_new_connection._r_n
call esi
pop ecx
jmp 0x4015d8
push str.___Connect_OK__r_n
call esi
push dword [esp + 0x5138]
push dword [esp + 0x5138]
push str.___Make_a_Connection_to__s:_d...._r_n
call esi
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x20
push eax
call dword [sym.imp.MSVCRT.dll_fflush]
push dword [esp + 0x5148]
push dword [esp + 0x5148]
push ebx
call fcn.00401e0d
add esp, 0x20
test eax, eax
jne 0x401724
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x4016ce
push ebp
lea eax, [esp + 0x128]
push dword [esp + 0x14]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x401747
push str.____Send_failed._r_n
call esi
pop ecx
jmp 0x4016ce
push pe_overlay
lea eax, [esp + 0x128]
push ebp
push eax
call sub.MSVCRT.dll_memset
push str.___All_Connect_OK__r_n
call esi
add esp, 0x10
lea eax, [esp + 0x1c]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebx
push eax
lea eax, [esp + 0x18]
push ebp
push eax
push 0x4017b0
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebp
je 0x40179d
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.___CreateThread_OK__r_n_n
jmp 0x4016c6
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_TerminateThread]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5114
ret

Function at 0x401d5f
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
test eax, eax
jge 0x401d7d
push str.____Create_socket_error._r_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
xor eax, eax
ret