joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1006fe29
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x10080340]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.10067146
mov dword [ebp - 0x14], eax
cmp dword [0x1066cfe0], esi
jne 0x1006ff1c
push 0x800
push esi
push 0x100060fc
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x1006fea9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x1006fffc
push esi
push esi
push 0x100060fc
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x1006fffc
push 0x10006114
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1006fffc
push eax
call ebx
push 0x10006120
push edi
mov dword [0x1066cfe0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push 0x10006130
push edi
mov dword [0x1066cfe4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push 0x10006144
push edi
mov dword [0x1066cfe8], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x1066cff0], eax
test eax, eax
je 0x1006ff19
push 0x10006160
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x1066cfec], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x1006ff41
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x1006ff34
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x1006ff56
push 4
pop eax
jmp 0x1006fffe
cmp dword [ebp - 0x14], esi
je 0x1006ff56
push dword [0x1066cfe0]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x1006ff3b
mov eax, dword [0x1066cfec]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x1006ffb4
cmp dword [0x1066cff0], edi
je 0x1006ffb4
push eax
call ebx
push dword [0x1066cff0]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x1006ffb4
test eax, eax
je 0x1006ffb4
call ecx
test eax, eax
je 0x1006ffa9
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x1006ffa9
test byte [ebp - 8], 1
jne 0x1006ffb4
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x1006ffe4
mov eax, dword [0x1066cfe4]
cmp eax, edi
je 0x1006ffe1
push eax
call ebx
test eax, eax
je 0x1006ffe1
call eax
mov esi, eax
test esi, esi
je 0x1006ffe1
mov eax, dword [0x1066cfe8]
cmp eax, edi
je 0x1006ffe1
push eax
call ebx
test eax, eax
je 0x1006ffe1
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x1066cfe0]
call ebx
test eax, eax
je 0x1006fffc
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x1006fffe
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10062c3d
mov esp, ebp
pop ebp
ret
Function at 0xf94a60
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [0xfbb010]
push edi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
mov edi, dword [ebp + 0x10]
lea eax, [edi + 1]
push eax
push 0
call 0x5450294
nop
push eax
nop
call 0x776b5da0
mov ebx, eax
push 0xfc49f0
mov dword [ebp - 4], ebx
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
mov byte [ebx + edi], 0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
xor edi, edi
cmp dword [ebp + 0x10], edi
jbe 0xf94b7a
mov eax, dword [ebp + 8]
sub eax, ebx
mov dword [ebp - 8], eax
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
mov ecx, dword [ebp + 0xc]
push ecx
add ebx, edi
nop
call 0x75c497f0
mov ecx, eax
xor edx, edx
mov eax, edi
div ecx
mov eax, dword [ebp + 0xc]
add esp, 4
push 0xfc49f0
mov cl, byte [edx + eax]
mov edx, dword [ebp - 8]
xor cl, byte [edx + ebx]
mov byte [ebx], cl
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
mov ebx, dword [ebp - 4]
inc edi
cmp edi, dword [ebp + 0x10]
jb 0xf94b06
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
push 0xfc49f0
call esi
lea eax, [ebp - 0xc]
push eax
push 0x100
push 4
push ebx
mov dword [ebp - 0xc], 0
call 0x545029a
nop
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0xf96ef0
Capabilities:
Parse pe header

Disassembly:
cmp dword [ebx + 4], 0x40
jb 0xf96f91
mov eax, dword [ebx]
push 0x40
push eax
push esi
nop
call 0x75c48cf0
mov ecx, 0x5a4d
add esp, 0xc
cmp word [esi], cx
jne 0xf96fc0
mov eax, dword [esi + 0x3c]
test eax, eax
je 0xf96fc0
lea edx, [eax + 0xf8]
cmp edx, dword [ebx + 4]
ja 0xf96f91
mov ecx, dword [ebx]
push edi
push 0xf8
add ecx, eax
push ecx
lea edi, [esi + 0x40]
push edi
nop
call 0x75c48cf0
add esp, 0xc
cmp dword [edi], 0x4550
pop edi
jne 0xf96fc0
mov edx, 0x10b
cmp word [esi + 0x58], dx
jne 0xf96fc0
movzx eax, word [esi + 0x46]
test ax, ax
je 0xf96fc0
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
add eax, eax
push eax
push 8
mov dword [esi + 0x140], eax
call dword [fcn.011c90f4]
push eax
call dword [fcn.011c9088]
mov dword [esi + 0x138], eax
test eax, eax
jne 0xf96f97
mov eax, 3
ret
mov eax, 1
ret
movzx ecx, word [esi + 0x54]
mov edx, dword [esi + 0x3c]
lea ecx, [ecx + edx + 0x18]
mov edx, dword [esi + 0x140]
push ebx
push edx
push ecx
push eax
mov dword [esi + 0x13c], ecx
call fcn.00f97590
add esp, 0x10
neg eax
sbb eax, eax
inc eax
ret
mov eax, 2
ret
Function at 0x14a0d00
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, dword [0x11c90e0]
test esi, esi
jne 0x14a0d18
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x14a0d11
mov eax, dword [esi + 0x3c]
cmp dword [eax + esi], 0x4550
jne 0x14a0d11
mov eax, dword [eax + esi + 0x78]
mov ecx, dword [eax + esi + 0x1c]
add eax, esi
add ecx, esi
push ebx
mov ebx, dword [eax + 0x20]
mov dword [ebp - 0xc], ecx
mov ecx, dword [eax + 0x24]
mov eax, dword [eax + 0x18]
push edi
add ecx, esi
add ebx, esi
xor edi, edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test eax, eax
je 0x14a0d7a
jmp 0x14a0d60
mov eax, dword [ebx + edi*4]
mov ecx, dword [0x11c8bf0]
add eax, esi
call fcn.0149e7e0
test eax, eax
je 0x14a0d83
inc edi
cmp edi, dword [ebp - 4]
jb 0x14a0d60
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
movzx edx, word [ecx + edi*2]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + edx*4]
pop edi
pop ebx
add eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4040a0
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x35c
mov eax, dword [0x44e004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
lea eax, [ebp - 0x110]
push edi
push str._s
push 0x104
push eax
call fcn.00401090
add esp, 0x10
lea eax, [ebp - 0x358]
push eax
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40410c
push edi
push str.Error:_Could_not_open_directory__s__Access_Denied_or_Not_Found__n
call fcn.00401010
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004295a7
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov ecx, 0x44955c
lea eax, [ebp - 0x32c]
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404140
test dl, dl
je 0x40413c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404140
add eax, 2
add ecx, 2
test dl, dl
jne 0x404120
xor eax, eax
jmp 0x404145
sbb eax, eax
or eax, 1
test eax, eax
je 0x4041b5
mov eax, 0x449560
lea ecx, [ebp - 0x32c]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x404174
test dl, dl
je 0x404170
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x404174
add ecx, 2
add eax, 2
test dl, dl
jne 0x404154
xor eax, eax
jmp 0x404179
sbb eax, eax
or eax, 1
test eax, eax
je 0x4041b5
mov eax, dword [ebp - 0x358]
and al, 0x16
cmp al, 0x10
jne 0x4041b5
lea eax, [ebp - 0x32c]
push eax
push edi
push str._s_s
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00401090
add esp, 0x14
lea ecx, [ebp - 0x218]
call fcn.004040a0
lea eax, [ebp - 0x358]
push eax
push esi
call ebx
test eax, eax
jne 0x404112
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004295a7
mov esp, ebp
pop ebp
ret
Function at 0x4060a0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
mov ebx, edx
push esi
push edi
mov edi, ecx
cmp dword [ebx], 0
jne 0x4060b7
mov dword [ebx], edi
cmp dword [ebx + 4], 0
jne 0x4060c4
mov dword [ebx + 4], 0x400
mov eax, dword [ebx + 8]
or eax, dword [ebx + 0xc]
jne 0x4060e3
mov eax, dword [0x44f624]
inc eax
mov dword [0x44f624], eax
mov eax, dword [0x44f624]
cdq
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], edx
lea eax, [edi + 0xe0]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0xcc]
cmp eax, 0xffffffff
jne 0x40613f
lea esi, [edi + 0xc8]
push esi
push ecx
call fcn.004096f0
add esp, 8
test eax, eax
jne 0x4062b7
mov edx, dword [esi]
mov ecx, edi
call fcn.00406ba0
mov esi, eax
mov ecx, esi
mov dword [esi + 0xa8], 0x405f30
call fcn.00407dd0
mov dword [esi + 0x20], 3
inc dword [edi + 0x3c]
mov eax, dword [edi + 0xcc]
push 0
push 1
push 0x4495ac
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x4062b7
cmp dword [edi + 0xd8], 0
jne 0x4061b2
mov dword [edi + 0xdc], 0
mov dword [edi + 0xd4], 0
mov dword [edi + 0xd8], 0x10
lock inc dword [0x44f628]
push 0x280
call fcn.0042ffac
mov esi, eax
add esp, 4
test esi, esi
je 0x4062cb
push 0x280
push 0
push esi
call fcn.0042a750
add esp, 0xc
mov dword [edi + 0xd0], esi
mov esi, dword [edi + 0xd4]
mov ecx, dword [edi + 0xd8]
cmp esi, ecx
jne 0x40624f
lea edx, [ecx + ecx]
mov eax, 0x10
test edx, edx
cmove edx, eax
lea eax, [ecx + ecx*4]
shl eax, 3
mov dword [esp + 0xc], eax
mov eax, dword [edi + 0xd0]
lea esi, [edx + edx*4]
mov dword [esp + 0x14], edx
shl esi, 3
lock inc dword [0x44f628]
test eax, eax
je 0x4061ff
lock inc dword [0x44f62c]
push esi
push eax
call fcn.0042c84e
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x40621b
push str.realloc_failed__n
jmp 0x4062d0
mov ecx, dword [esp + 0xc]
cmp esi, ecx
jbe 0x406237
sub esi, ecx
add eax, ecx
push esi
push 0
push eax
call fcn.0042a750
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov edx, dword [edi + 0xdc]
mov dword [edi + 0xd0], eax
mov eax, dword [esp + 0x14]
mov dword [edi + 0xd8], eax
jmp 0x406285
mov edx, dword [edi + 0xdc]
lea eax, [edx + esi]
cmp eax, ecx
jne 0x406285
mov ecx, dword [edi + 0xd0]
lea eax, [esi + esi*4]
shl eax, 3
push eax
lea eax, [edx + edx*4]
lea eax, [ecx + eax*8]
push eax
push ecx
call fcn.0042b1d0
add esp, 0xc
mov dword [edi + 0xdc], 0
xor edx, edx
mov eax, dword [edi + 0xd4]
movups xmm0, xmmword [ebx]
add eax, edx
lea ecx, [eax + eax*4]
mov eax, dword [edi + 0xd0]
movups xmmword [eax + ecx*8], xmm0
movups xmm0, xmmword [ebx + 0x10]
movups xmmword [eax + ecx*8 + 0x10], xmm0
movq xmm0, qword [ebx + 0x20]
movq qword [eax + ecx*8 + 0x20], xmm0
inc dword [edi + 0xd4]
lea eax, [edi + 0xe0]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.malloc_failed__n
push 2
call fcn.0042c7ca
add esp, 4
push eax
call fcn.00408c80
add esp, 8
push 0xffffffffffffffff
call fcn.004319c5
int3
Function at 0x407600
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 4], 0x1c
lea eax, [ebp - 4]
push eax
push dword [esi + 0x44]
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
jns 0x40763d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, esi
mov dword [esi + 0x34], eax
call fcn.00408160
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x1c
push eax
push dword [esi + 0x40]
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_getsockname]
cmp dword [esi + 0x28], 0x1000000
jne 0x407774
mov ebx, dword [esi + 0xf8]
test ebx, ebx
jne 0x4076d6
mov eax, dword [esi + 0xfc]
test eax, eax
jne 0x4076aa
mov eax, dword [0x44f638]
test eax, eax
jne 0x4076aa
call fcn.0040abf0
or dword [esi + 0x24], 0x8000
mov dword [esi + 0xfc], eax
test eax, eax
jne 0x4076aa
mov eax, 0x411
mov ecx, esi
mov dword [esi + 0x34], eax
call fcn.00408160
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x30]
mov ecx, eax
call fcn.0040b020
mov ebx, eax
test ebx, ebx
jne 0x4076d0
mov eax, 0x412
mov ecx, esi
mov dword [esi + 0x34], eax
call fcn.00408160
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0xf8], ebx
mov eax, dword [esi + 0x100]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x407764
mov edi, eax
lea ecx, [edi + 1]
nop dword [eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x4076f0
sub edi, ecx
cmp edi, 0xff
ja 0x407764
mov edx, dword [ebx + 0xc0]
test edx, edx
je 0x407735
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 8], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407713
sub ecx, dword [ebp - 8]
je 0x40772c
mov eax, edx
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x407721
push edx
call fcn.0042f3a1
add esp, 4
lea eax, [edi + 1]
push eax
push 1
call fcn.0042c6c4
add esp, 8
mov dword [ebx + 0xc0], eax
test eax, eax
je 0x407764
push edi
push dword [ebp - 0xc]
push eax
call fcn.0042b1d0
mov eax, dword [ebx + 0xc0]
add esp, 0xc
mov byte [edi + eax], 0
push esi
call fcn.00407240
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0xd8]
test ecx, ecx
je 0x407797
call fcn.00406a20
mov dword [esi + 0xd8], 0
mov dword [esi + 0xbc], 0
or dword [esi + 0x24], 0x10
mov eax, dword [esi + 0xb8]
test eax, eax
je 0x4077ab
push esi
call eax
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4077e0
Capabilities:
Get local ipv4 addresses
Get socket information
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
mov eax, dword [esi + 0x28]
cmp eax, 0x2000
jg 0x407856
je 0x407807
cmp eax, 0x100
je 0x407807
cmp eax, 0x1000
jne 0x407868
mov edx, dword [esi + 0x44]
mov edi, 0x10
mov ecx, 0x1c
cmp word [edx], 2
cmove ecx, edi
push ecx
push edx
push 0
push dword [ebp + 8]
push ebx
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_sendto]
mov edi, eax
mov eax, dword [esi + 0x40]
cmp word [eax + 2], 0
jne 0x40784d
lea ecx, [ebp - 4]
mov dword [ebp - 4], 0x1c
push ecx
push eax
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_getsockname]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x100000
je 0x407935
cmp eax, 0x1000000
je 0x40787e
push dword [ebp + 8]
push ebx
push dword [esi + 0x30]
call fcn.00435008
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [esi + 0xf8]
test esi, esi
je 0x407929
cmp dword [esi], 0
je 0x407929
cmp dword [esi + 4], 0x1b
je 0x4078aa
mov ecx, esi
call fcn.0040bcb0
test eax, eax
jne 0x407944
mov ecx, dword [esi + 0x40]
mov eax, 0x4000
mov edi, dword [ebp + 8]
test ecx, ecx
je 0x4078c8
cmp dword [ecx + 0x34], 0x304
mov edx, 0x3fff
cmove eax, edx
cmp edi, eax
cmova edi, eax
cmp dword [esi + 0xb4], 0
je 0x4078ec
mov ecx, esi
call fcn.0040e1b0
test eax, eax
je 0x40784d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0xb0], edi
mov dword [esi + 0xac], 0x17
test edi, edi
je 0x407910
push edi
push ebx
push dword [esi + 0xa8]
call fcn.0042b1d0
add esp, 0xc
mov edx, 1
mov ecx, esi
call fcn.0040e250
test eax, eax
jne 0x407944
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xffff8f00
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push dword [ebp + 8]
push ebx
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_send]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x407950
Capabilities:
Read file on windows
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x58]
mov edx, dword [esi + 0x64]
add ecx, edx
test byte [esi + 0x68], 2
mov dword [esp + 0x10], ecx
je 0x40797b
mov edi, dword [esi + 0x6c]
add edi, dword [esi + 0x60]
jmp 0x40797e
mov edi, dword [esi + 0x5c]
sub edi, edx
cmp eax, 0x2000
jg 0x4079b6
je 0x407997
cmp eax, 0x100
je 0x407997
cmp eax, 0x1000
jne 0x4079c4
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0x1c
push eax
push dword [esi + 0x44]
push 0
push edi
push ecx
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_recvfrom]
jmp 0x4079f3
cmp eax, 0x100000
je 0x4079e6
cmp eax, 0x1000000
je 0x4079d3
push edi
push ecx
push dword [esi + 0x30]
call fcn.004343a7
add esp, 0xc
jmp 0x4079f3
mov edx, ecx
mov ecx, dword [esi + 0xf8]
push edi
call fcn.0040e7d0
add esp, 4
jmp 0x4079f3
push 0
push edi
push ecx
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
test ebx, ebx
jns 0x407a18
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x407a7d
cmp eax, 0x2714
je 0x407a7d
cmp eax, 0x2738
jne 0x407a69
mov ebx, edi
test ebx, ebx
jne 0x407a24
mov eax, dword [esi + 0x28]
test eax, 0xff00000
jne 0x407a76
mov edx, dword [esp + 0x10]
cmp ebx, edi
jge 0x407a30
mov byte [edx + ebx], 0
mov eax, dword [esi]
add dword [esi + 0x64], ebx
push ebx
mov ecx, dword [eax + 0x20]
mov eax, dword [eax + 0x24]
mov dword [esi + 0x48], ecx
mov ecx, esi
mov dword [esi + 0x4c], eax
call fcn.00408890
add esp, 4
cmp ebx, edi
jne 0x407a7d
test byte [esi + 0x24], 0x20
jne 0x407a7d
cmp dword [esi + 0x28], 0x1000000
jne 0x407a7d
mov eax, 0x1000000
jmp 0x407961
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0x28]
test eax, 0xff00000
je 0x407a7d
mov ecx, esi
call fcn.00408160
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x407ca0
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, 0x1c
push ebx
push esi
push edi
mov edi, ecx
mov ecx, 0x10
mov esi, dword [edi + 0x44]
cmp word [esi], 2
cmove eax, ecx
push eax
push esi
push dword [edi + 0x30]
call dword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
test ebx, ebx
jns 0x407d3c
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x2733
je 0x407d82
push str.connect
call fcn.004303e2
add esp, 4
call esi
mov ecx, dword [edi]
lea edx, [esp + 0x10]
xorps xmm0, xmm0
mov dword [edi + 0x34], eax
mov eax, dword [edi + 0x2c]
movlpd qword [esp + 0x10], xmm0
movlpd qword [esp + 0x18], xmm0
movlpd qword [esp + 0x2c], xmm0
mov dword [esp + 0x34], 0
mov dword [esp + 0x20], 0x406db0
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], eax
call fcn.004060a0
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
jne 0x407d82
mov eax, dword [edi + 0x2c]
lea edx, [esp + 0x10]
mov ecx, dword [edi]
xorps xmm0, xmm0
movlpd qword [esp + 0x10], xmm0
movlpd qword [esp + 0x18], xmm0
movlpd qword [esp + 0x2c], xmm0
mov dword [esp + 0x34], 0
mov dword [esp + 0x20], 0x4077c0
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], eax
call fcn.004060a0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0xbc]
mov ecx, 0x2710
test eax, eax
mov edx, 0x4071a0
push 1
cmovne ecx, eax
push ecx
mov ecx, dword [edi]
call fcn.00406830
mov dword [edi + 0xd8], eax
mov edx, 0x407c10
push 4
mov ecx, edi
mov dword [eax + 0x18], edi
or dword [edi + 0x24], 0x80
call fcn.00406c40
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408f60
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov edi, edx
test esi, esi
je 0x408f9b
movzx edx, byte [ebp + 0x10]
mov ebx, esi
mov dword [ebp + 8], ebx
sub edi, ecx
mov ebx, dword [ebp + 0xc]
nop
mov eax, edx
lea ecx, [ecx + 1]
and eax, 3
inc edx
mov al, byte [eax + ebx]
xor al, byte [edi + ecx - 1]
mov byte [ecx - 1], al
sub esi, 1
jne 0x408f80
mov ebx, dword [ebp + 8]
add bl, byte [ebp + 0x10]
pop edi
and bl, 3
pop esi
mov al, bl
pop ebx
pop ebp
ret

Function at 0x408fb0
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov eax, edx
xor esi, esi
push edi
xor edi, edi
mov dword [ebp - 4], eax
mov ebx, ecx
test eax, eax
je 0x40905b
nop word [eax + eax]
mov eax, 0xaaaaaaab
mov ecx, edi
mul edi
shr edx, 1
lea eax, [edx + edx*2]
sub ecx, eax
sub ecx, 0
je 0x40903d
sub ecx, 1
je 0x409023
sub ecx, 1
jne 0x409051
movzx ecx, byte [edi + ebx - 1]
movzx eax, byte [edi + ebx]
and ecx, 0xf
shr eax, 6
movzx eax, byte [eax + ecx*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__]
mov ecx, dword [ebp + 8]
mov byte [esi + ecx], al
movzx eax, byte [edi + ebx]
and eax, 0x3f
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__]
mov byte [esi + ecx + 1], al
add esi, 2
jmp 0x409051
movzx ecx, byte [edi + ebx - 1]
movzx eax, byte [edi + ebx]
and ecx, 3
add ecx, ecx
shr eax, 4
mov al, byte [eax + ecx*8 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__]
jmp 0x40904a
movzx eax, byte [edi + ebx]
shr eax, 2
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__]
mov ecx, dword [ebp + 8]
mov byte [esi + ecx], al
inc esi
inc edi
cmp edi, dword [ebp - 4]
jb 0x408fd0
dec edi
mov eax, 0xaaaaaaab
mul edi
mov ecx, edi
shr edx, 1
lea eax, [edx + edx*2]
sub ecx, eax
jne 0x409095
movzx ecx, byte [edi + ebx]
mov eax, dword [ebp + 8]
and ecx, 3
shl ecx, 4
pop edi
mov cl, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__]
mov byte [esi + eax], cl
mov word [esi + eax + 1], 0x3d3d
lea eax, [esi + 3]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ecx, 1
jne 0x4090bd
movzx eax, byte [edi + ebx]
mov ecx, dword [ebp + 8]
and eax, 0xf
pop edi
mov al, byte [eax*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__]
mov byte [esi + ecx], al
lea eax, [esi + 2]
mov byte [esi + ecx + 1], 0x3d
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4095c0
Capabilities:
Convert ip address from string
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1a0
mov eax, dword [0x44e004]
xor eax, esp
mov dword [esp + 0x19c], eax
push esi
push edi
mov edi, edx
mov esi, ecx
test edi, edi
je 0x4096a7
cmp byte [edi], 0
je 0x4096a7
mov ecx, 1
mov edx, 0x44f634
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x409615
lea eax, [esp + 0x10]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
lea eax, [esi + 4]
push eax
push edi
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x409634
mov eax, 2
mov word [esi], ax
jmp 0x4096c7
lea eax, [esi + 8]
push eax
push edi
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x40964e
mov eax, 0x17
mov word [esi], ax
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0
push eax
push 0
push 0
push edi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x4096d6
mov edi, dword [esp + 0xc]
test edi, edi
je 0x4096ba
cmp dword [edi + 0x18], eax
je 0x4096ba
cmp dword [edi + 0x10], eax
je 0x4096ba
mov eax, edi
nop
cmp dword [eax + 4], 2
je 0x40968f
mov eax, dword [eax + 0x1c]
test eax, eax
jne 0x409680
mov eax, edi
push dword [eax + 0x10]
push dword [eax + 0x18]
push esi
call fcn.0042b1d0
add esp, 0xc
push edi
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x4096ba
mov eax, 2
push 0
mov word [esi], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esi + 4], eax
movzx eax, word [esi]
cmp eax, 2
je 0x4096c7
cmp eax, 0x17
jne 0x4096d4
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 2], ax
xor eax, eax
mov ecx, dword [esp + 0x1a4]
pop edi
pop esi
xor ecx, esp
call fcn.004295a7
mov esp, ebp
pop ebp
ret