joyce8/EMBER2024-capa huggingface dataset:
Function at 0x571b50
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d8237
mov eax, dword fs:[0]
push eax
push ecx
mov eax, dword [0x5f5f3c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
mov ecx, dword [ebp - 0x10]
add ecx, 0x44
call fcn.00570680
mov dword [ebp - 4], 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, 0xa4
call fcn.00570680
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
push edx
mov ecx, dword [ebp - 0x10]
add ecx, 0x104
call fcn.00570680
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x10]
mov dword [eax], 0x44
mov ecx, dword [ebp - 0x10]
add ecx, 0x44
call fcn.00571190
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 0x10]
add ecx, 0xa4
call fcn.00571190
mov edx, dword [ebp - 0x10]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x10]
add ecx, 0x104
call fcn.00571190
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
mov dword [edx + 0x10], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
mov dword [edx + 0x14], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov dword [edx + 0x18], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1c]
mov dword [edx + 0x1c], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x20]
mov dword [edx + 0x20], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x24]
mov dword [edx + 0x24], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x28]
mov dword [edx + 0x28], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x2c]
mov dword [edx + 0x2c], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov cx, word [eax + 0x30]
mov word [edx + 0x30], cx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov cx, word [eax + 0x32]
mov word [edx + 0x32], cx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x38]
mov dword [edx + 0x38], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
mov dword [edx + 0x3c], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x40]
mov dword [edx + 0x40], ecx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 4
Function at 0x5863a0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5dae80
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push esi
mov eax, dword [0x5f5f3c]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 8], esi
mov dword [esi + 4], 0
push 0x5f9d14
lea ecx, [esp + 0x10]
mov dword [esp + 0x3c], 0
mov dword [esi], 0x5f9df8
call fcn.0053b850
mov byte [esp + 0x38], 1
call fcn.00585574
lea ecx, [esp + 0xc]
mov dword [esi + 8], eax
mov dword [esi + 0xc], edx
mov byte [esp + 0x38], 0
call fcn.0053b920
mov dword [esi], 0x5f9e1c
mov eax, esi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x34
ret
Function at 0x5b73b8
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [edi + 0x2c]
push esi
mov esi, dword [edi + 0x3c]
sub esi, dword [edi + 0x74]
mov eax, dword [edi + 0x6c]
mov ecx, dword [edi + 0x2c]
lea ecx, [ebx + ecx - 0x106]
sub esi, eax
cmp eax, ecx
jb 0x5b743d
mov eax, dword [edi + 0x38]
push ebx
lea ecx, [eax + ebx]
push ecx
push eax
call fcn.00591fe0
mov eax, dword [edi + 0x4c]
mov ecx, dword [edi + 0x44]
sub dword [edi + 0x70], ebx
sub dword [edi + 0x6c], ebx
add esp, 0xc
sub dword [edi + 0x5c], ebx
mov dword [ebp - 4], eax
lea eax, [ecx + eax*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x5b7400
mov eax, dword [edi + 0x40]
mov dword [ebp - 4], ebx
lea eax, [eax + ebx*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x5b7422
add esi, ebx
mov eax, dword [edi]
cmp dword [eax + 4], 0
je 0x5b7498
mov ecx, dword [edi + 0x74]
add ecx, dword [edi + 0x6c]
push esi
add ecx, dword [edi + 0x38]
mov esi, eax
push ecx
call fcn.005b7108
add dword [edi + 0x74], eax
mov esi, dword [edi + 0x74]
cmp esi, 3
pop ecx
pop ecx
jb 0x5b7484
mov eax, dword [edi + 0x6c]
mov ecx, dword [edi + 0x38]
lea edx, [eax + ecx]
movzx eax, byte [edx]
mov ecx, dword [edi + 0x58]
mov dword [edi + 0x48], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [edi + 0x54]
mov dword [edi + 0x48], eax
cmp esi, 0x106
jae 0x5b7498
mov eax, dword [edi]
cmp dword [eax + 4], 0
jne 0x5b73c1
pop esi
pop ebx
leave
ret
Function at 0x8a8290
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.sect_1
lea edi, [esi - 0x219000]
push edi
or ebp, 0xffffffff
jmp 0x8a82b2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x8a82b9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x8a82a8
mov eax, 1
add ebx, ebx
jne 0x8a82cb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x8a82dc
jne 0x8a82fb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x8a82fb
dec eax
add ebx, ebx
jne 0x8a82e8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x8a82c0
add ebx, ebx
jne 0x8a82f7
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x8a834d
xor ecx, ecx
sub eax, 3
jb 0x8a8313
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x8a8382
sar eax, 1
mov ebp, eax
jmp 0x8a831e
add ebx, ebx
jne 0x8a831e
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x8a82ec
inc ecx
add ebx, ebx
jne 0x8a832c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x8a82ec
add ebx, ebx
jne 0x8a8339
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x8a832e
jne 0x8a834a
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x8a832e
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x8a836c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x8a835e
jmp 0x8a82ae
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x8a836c
add edi, ecx
jmp 0x8a82ae
pop esi
mov edi, esi
mov ecx, 0x31aa
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x8a838a
cmp byte [edi], 0x1b
jne 0x8a838a
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 0x8a838f
lea edi, [esi + 0x4a5000]
mov eax, dword [edi]
or eax, eax
je 0x8a83fe
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x4a9b7c]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x4a9c48]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x8a83bc
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x4a9c50]
or eax, eax
je 0x8a83f8
mov dword [ebx], eax
add ebx, 4
jmp 0x8a83d9
call dword [esi + 0x4a9c4c]
mov ebp, dword [esi + 0x4a9c54]
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 0x8a8432
sub esp, 0xffffff80
jmp 0x471b78
Function at 0x4068db
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push esi
mov esi, 0x104
lea eax, [ebp - 0x23c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, esi
pop esi
jbe 0x4068ff
xor eax, eax
test eax, eax
je 0x406912
cmp word [ebp + eax*2 - 0x23e], 0x5c
je 0x406912
xor ecx, ecx
jmp 0x406915
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx*2 + 0x40a014]
lea eax, [ebp + eax*2 - 0x23c]
push ecx
push str._s_S.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x23c]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
leave
ret 4

Function at 0x406a38
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x43110c], 0
push esi
jne 0x406a6f
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x406a49
mov dword [ecx*4 + 0x431108], eax
inc ecx
cmp ecx, 0x100
jl 0x406a44
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x406aa0
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x431108]
xor eax, esi
inc ecx
dec edx
jne 0x406a82
pop edi
not eax
pop esi
ret 0xc

Function at 0x8003b3f
Capabilities:
Accept command line arguments
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
mov dword [0x80043b4], 0x30
mov dword [0x80043bc], 0x8003351
mov dword [0x80043b8], 2
mov dword [0x80043c0], 0
mov dword [0x80043c4], 0
push 0
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
jmp 0x8003b82
mov dword [0x80043c8], eax
mov dword [0x80043dc], 0x80041e0
mov dword [0x80043d4], 0xf
mov dword [0x8004102], eax
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadIconA]
mov dword [0x80043cc], eax
mov dword [0x80043e0], eax
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadCursorA]
mov dword [0x800410a], ebp
mov dword [0x80043d0], eax
push 0x80043b4
call dword [sym.imp.user32.dll_RegisterClassExA]
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov dword [0x8004434], eax
push 0
push dword [0x8004102]
push 0
push 0
push 0x1ef
push 0x21c
push 0xffffe688
push 0xfffff524
push 0xcf0000
push str.uno_momento
push str.verba
push 0
call dword [sym.imp.user32.dll_CreateWindowExA]
mov dword [0x800442c], eax
push 1
push dword [0x800442c]
call dword [sym.imp.user32.dll_ShowWindow]
push dword [0x800442c]
call dword [sym.imp.user32.dll_UpdateWindow]
jmp 0x8003c40
xor edi, edi
lea ebx, [0x80043e4]
jmp 0x8003c58
push ebx
call dword [sym.imp.user32.dll_TranslateMessage]
push ebx
call dword [sym.imp.user32.dll_DispatchMessageA]
push edi
push edi
push edi
push ebx
call dword [sym.imp.user32.dll_GetMessageA]
test al, al
jne 0x8003c4a
jmp 0x8003c6c
mov eax, dword [0x80043ec]
call fcn.08002ae4
ret
Function at 0x4020b0
Capabilities:
Create thread

Disassembly:
push ecx
lea eax, [esp]
push esi
push eax
push 0
push 0
push 0x402970
push 0
mov esi, ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0xc0], eax
mov eax, 1
pop esi
pop ecx
ret
Function at 0x4066d0
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x7f4
push ebp
push esi
mov esi, dword [esp + 0x800]
mov ecx, 0x12
mov dword [esp + 0x28], 0
mov dword [esp + 0x20], ecx
mov al, byte [esi + 0x29e]
test al, al
je 0x4067c8
cmp al, 1
mov ebp, 1
jbe 0x4067c8
lea eax, [esp + 0x3e]
lea ecx, [esi + 0x23c]
push ebx
push edi
mov dword [esp + 0x2c], eax
lea ebx, [esi + 0x1e]
mov dword [esp + 0x10], ecx
push ebx
mov ecx, 0x4887a0
call fcn.0040ff70
mov edi, eax
test edi, edi
je 0x406758
mov eax, dword [esp + 0x10]
mov dl, byte [edi + 0x368]
mov byte [esp + 0x1e], dl
cmp word [eax], 0x7530
je 0x406869
mov cx, word [edi + 4]
mov word [eax], cx
jmp 0x40686e
mov byte [esp + 0x1e], 0xff
mov byte [esi + ebp + 0x368], 0xff
mov edi, dword [esp + 0x2c]
mov edx, ebx
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dx, word [edx + 8]
mov dword [edi], eax
mov al, byte [esp + 0x1e]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x30]
mov word [edi + 8], dx
mov edx, dword [esp + 0x2c]
mov byte [edi + 0xa], al
mov edi, dword [esp + 0x28]
mov eax, 0xb
add edi, eax
add edx, eax
inc ecx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x30], ecx
xor ecx, ecx
inc ebp
mov cl, byte [esi + 0x29e]
add edx, 2
add ebx, eax
cmp ebp, ecx
mov dword [esp + 0x28], edi
mov dword [esp + 0x10], edx
jl 0x406722
mov ecx, edi
pop edi
pop ebx
mov al, byte [esi + 0x3a4]
mov edx, ecx
shr edx, 8
mov byte [esp + 0xd], dl
lea edx, [esi + 8]
mov byte [esp + 0x1d], al
mov byte [esp + 0xc], 0xc2
mov eax, dword [edx]
mov byte [esp + 0xe], cl
mov dword [esp + 0x12], eax
mov byte [esp + 0xf], 0x60
mov eax, dword [edx + 4]
push ecx
mov dword [esp + 0x1a], eax
mov ax, word [esi + 4]
mov dx, word [edx + 8]
mov word [esp + 0x14], ax
mov eax, dword [esp + 0x10]
mov word [esp + 0x1e], dx
mov dl, byte [esp + 0x2c]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x18]
mov byte [esp + 0x20], dl
mov edx, dword [esp + 0x14]
mov dword [esp + 0x38], eax
mov ax, word [esp + 0x20]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x1c]
mov word [esp + 0x40], ax
mov eax, dword [esp + 0x808]
mov dword [esp + 0x3c], edx
lea ecx, [esp + 0x30]
lea edx, [eax + eax*8]
push ecx
mov ecx, dword [0x48ff68]
mov eax, dword [edx*8 + 0x48e34c]
push eax
call fcn.0040e260
pop esi
pop ebp
add esp, 0x7f4
ret
mov byte [esp + 0x1e], 0xff
push edi
mov ecx, 0x4887a0
call fcn.00410930
test eax, eax
jne 0x406882
mov byte [esp + 0x1e], 0xff
push edi
mov ecx, 0x4887a0
call fcn.00410900
cmp eax, 0xfd
jne 0x406898
mov byte [esp + 0x1e], al
mov dl, byte [edi + 0x368]
mov ecx, dword [esp + 0x10]
mov byte [esi + ebp + 0x368], dl
mov ax, word [edi + 6]
mov edx, dword [esp + 0x80c]
mov word [ecx + 0xca], ax
xor eax, eax
xor ecx, ecx
mov al, byte [esi + 0x368]
mov cx, word [esi + 4]
push edx
push eax
lea edx, [esi + 8]
push ecx
push edx
push edi
mov ecx, 0x4887a0
call fcn.00410780
jmp 0x406765
Function at 0x40d711
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
xor edi, edi
mov eax, dword [esi + 0x1018]
test eax, eax
jle 0x40d75c
mov ebx, dword [sym.imp.WS2_32.dll_send]
mov eax, dword [esi + 0x1018]
mov edx, dword [esi + 8]
sub eax, edi
push 0
lea ecx, [esi + edi + 0x18]
push eax
push ecx
push edx
call ebx
cmp eax, 0xffffffff
je 0x40d765
test eax, eax
jle 0x40d785
mov ecx, dword [esi + 0x1018]
add edi, eax
sub ecx, eax
mov eax, ecx
mov dword [esi + 0x1018], ecx
test eax, eax
jg 0x40d727
pop edi
pop esi
mov eax, 1
pop ebx
ret
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x2733
je 0x40d75c
call edi
push eax
push str.FD_WRITE_send__
push esi
call fcn.0040d7d0
add esp, 0xc
mov ecx, esi
call fcn.0040ee40
pop edi
pop esi
xor eax, eax
pop ebx
ret

Function at 0x40d7e2
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, 0x1000
push edi
mov eax, dword [esi + 0x201c]
push 0
sub ecx, eax
lea edx, [eax + esi + 0x101c]
mov eax, dword [esi + 8]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
mov eax, dword [esi + 0x2020]
test eax, eax
je 0x40d823
lea ecx, [esi + 0x101c]
push edi
push ecx
mov ecx, esi
call fcn.0040d7c0
test edi, edi
jne 0x40d831
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
cmp edi, 0xffffffff
jne 0x40d86a
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x2733
jne 0x40d84f
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
call edi
push eax
push str.recv__
push esi
call fcn.0040d7d0
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
ret
mov edx, dword [esi + 0x201c]
add edx, edi
mov eax, edx
mov dword [esi + 0x201c], edx
cmp eax, 3
jge 0x40d889
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
ret
xor ebp, ebp
lea edi, [esi + 0x101c]
mov cl, byte [edi + ebp]
lea eax, [edi + ebp]
cmp cl, 0xc1
jne 0x40d8a8
xor ebx, ebx
xor ecx, ecx
mov bl, byte [eax + 1]
mov cl, byte [eax + 2]
jmp 0x40d8c1
cmp cl, 0xc2
jne 0x40d91c
xor ebx, ebx
xor edx, edx
mov bl, byte [eax + 1]
mov dl, byte [eax + 2]
shl ebx, 8
add ebx, edx
xor ecx, ecx
mov cl, byte [eax + 3]
test ebx, ebx
jle 0x40d926
cmp ebx, dword [esi + 0x201c]
jg 0x40d8f1
push ebx
push eax
push ecx
call dword [esi + 0x66348]
mov ecx, dword [esi + 0x201c]
add esp, 0xc
sub ecx, ebx
add ebp, ebx
mov eax, ecx
mov dword [esi + 0x201c], ecx
test eax, eax
jle 0x40d926
jmp 0x40d891
test ebp, ebp
jle 0x40d926
mov ecx, dword [esi + 0x201c]
cmp ecx, 1
jl 0x40d926
mov eax, ecx
lea esi, [esi + ebp + 0x101c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
ret
mov dword [esi + 0x201c], 0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x40dcb0
Capabilities:
Create thread
Get system information on windows

Disassembly:
sub esp, 0x24
push esi
mov esi, ecx
lea eax, [esi + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea ecx, [esp + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edx, dword [esp + 0x18]
mov cx, word [esp + 0x2c]
push 0
push 0
lea eax, [edx + edx]
push 0
push 0xffffffffffffffff
mov dword [esi + 0x24], eax
mov word [esi + 0x18], cx
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
jne 0x40dcf7
pop esi
add esp, 0x24
ret 8
push eax
mov ecx, esi
call fcn.0040dc80
mov eax, dword [esp + 0x30]
cmp eax, 5
je 0x40dd10
push eax
mov ecx, esi
call fcn.0040dc60
lea edx, [esi + 0x1c]
push edx
push 0
push esi
push 0x40e620
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
xor ecx, ecx
mov dword [esi + 0x20], eax
test eax, eax
setne cl
mov eax, ecx
pop esi
add esp, 0x24
ret 8

Function at 0x40dd40
Capabilities:
Terminate thread

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
call fcn.0040df00
mov eax, dword [edi + 0x20]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
lea esi, [edi + 0x4c]
mov ebx, 0x3e8
mov eax, dword [esi]
test eax, eax
je 0x40dd6d
push eax
call fcn.004354d4
add esp, 4
add esi, 4
dec ebx
jne 0x40dd5e
add edi, 0x34
push edi
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
pop edi
pop esi
pop ebx
ret

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

Disassembly:
sub esp, 0x10
push esi
push 1
push 0
push 0
push 0
push 1
mov esi, ecx
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
cmp eax, 0xffffffff
mov dword [esi + 8], eax
jne 0x40de2a
mov eax, 0xa
pop esi
add esp, 0x10
ret
push 0
mov word [esp + 8], 2
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 8], eax
mov ax, word [esi + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [esi + 8]
lea ecx, [esp + 4]
push 0x10
push ecx
push edx
mov word [esp + 0x12], ax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x40de7b
push str.Bind_error__
call dword [sym.imp.LogProc.dll_void___cdecl_MsgBox_char__]
add esp, 4
mov eax, 0xb
pop esi
add esp, 0x10
ret
mov eax, dword [esi + 8]
push bind
push eax
call dword [sym.imp.WS2_32.dll_listen]
inc eax
pop esi
neg eax
sbb eax, eax
and al, 0xf4
add eax, 0xc
add esp, 0x10
ret

Function at 0x40dea0
Capabilities:
Create thread

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor edi, edi
mov eax, dword [esi + 0x24]
test eax, eax
jle 0x40dede
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x10]
push eax
push 0
push esi
push 0x40e670
push 0
push 0
call ebx
test eax, eax
je 0x40dee9
push eax
call ebp
mov eax, dword [esi + 0x24]
inc edi
cmp edi, eax
jl 0x40debc
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x40e170
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ecx
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
test esi, esi
mov edi, ecx
mov dword [esp + 0xc], 0
jne 0x40e1a3
mov eax, dword [0x4058]
push eax
push str._index:_d__RECV_buffer_NULL
push edi
call fcn.0040dca0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ecx
ret 4
cmp byte [esi + 0x4060], 1
jne 0x40e1ca
mov ecx, dword [esi + 0x4058]
push ecx
push str._index:_d__Recv_State_HDS_CLOSE
push edi
call fcn.0040dca0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ecx
ret 4
lea eax, [esi + 8]
xor edx, edx
mov ecx, eax
mov ebp, 0x2000
push 0
push eax
mov dword [ecx], edx
lea eax, [esp + 0x14]
push eax
mov dword [ecx + 4], edx
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], edx
mov dword [ecx + 0x10], edx
mov ecx, dword [esi + 0x2028]
sub ebp, ecx
lea edx, [esi + 0x1c]
lea ecx, [ecx + esi + 0x24]
mov dword [esi + 0x202c], 1
mov dword [esi + 0x20], ecx
lea ecx, [esp + 0x20]
push ecx
push 1
mov dword [edx], ebp
push edx
mov edx, dword [esi]
push edx
call dword [sym.imp.WS2_32.dll_WSARecv]
cmp eax, 0xffffffff
jne 0x40e251
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call ebp
cmp eax, 0x3e5
je 0x40e251
call ebp
push eax
push str.WSARecv___failed_with_error__d
push edi
call fcn.0040dca0
add esp, 0xc
mov ecx, edi
push esi
call fcn.0040e0b0
pop edi
pop esi
xor eax, eax
pop ebp
pop ecx
ret 4
pop edi
pop esi
mov eax, 1
pop ebp
pop ecx
ret 4
Function at 0x40e260
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, ecx
push edi
test ebp, ebp
mov dword [esp + 0x10], esi
jne 0x40e28f
push str.buffer_NULL
push esi
call fcn.0040dca0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 0xc
cmp byte [ebp + 0x4060], 1
jne 0x40e2b9
mov eax, dword [ebp + 0x4058]
push eax
push str._index:_d__Send_State_HDS_CLOSE
push esi
call fcn.0040dca0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 0xc
cmp dword [ebp], 0xffffffff
jne 0x40e2e0
mov ecx, dword [ebp + 0x4058]
push ecx
push str._index:_d__INVALID_SOCKET_error
push esi
call fcn.0040dca0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 0xc
lea edi, [esi + 0x34]
push edi
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 0x4050]
lea ebx, [ebp + 0x2030]
test eax, eax
jle 0x40e360
mov edx, dword [esp + 0x24]
lea ecx, [eax + edx]
cmp ecx, 0x1fff
jle 0x40e33d
mov edx, dword [ebp + 0x4058]
push edx
push str._index:_d__send___max_buffer_overflow
push esi
call fcn.0040dca0
add esp, 0xc
mov ecx, esi
push ebp
call fcn.0040e0b0
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret 0xc
mov esi, dword [esp + 0x20]
mov ecx, edx
lea edi, [eax + ebx + 0x1c]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add dword [ebx + 0x2020], edx
jmp 0x40e3ef
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
lea eax, [ebx + 0x1c]
mov edx, ecx
mov edi, eax
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
mov dword [ebx + 0x18], eax
lea edx, [esp + 0x20]
lea eax, [ebx + 0x14]
push edx
push 1
mov dword [eax], ecx
push eax
mov eax, dword [ebp]
push eax
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x40e3ce
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x3e5
je 0x40e3ce
call esi
mov ecx, dword [ebp + 0x4058]
mov edx, dword [esp + 0x10]
push eax
push ecx
push str._index:_d__send_error__d
push edx
call fcn.0040dca0
add esp, 0x10
jmp 0x40e3ef
mov eax, dword [esp + 0x24]
mov dword [ebx + 0x2024], 0
mov dword [ebx + 0x2020], eax
mov eax, dword [ebp + 0x405c]
inc eax
mov dword [ebp + 0x405c], eax
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret 0xc