joyce8/EMBER2024-capa huggingface dataset:
Function at 0xa02532
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov eax, dword [eax + 8]
mov dword [ebp + 0x10], 0x100
add eax, 0x646c6f47
xor edi, edi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov esi, dword [eax + 4]
mov eax, dword [ebp + 0xc]
lea ecx, [eax + 7]
mov eax, edi
push 4
cdq
pop ebx
idiv ebx
mov al, byte [edx + ebp - 4]
xor al, byte [esi + edi]
inc edi
mov byte [ecx], al
inc ecx
dec dword [ebp + 0x10]
jne 0xa0255c
pop edi
pop esi
pop ebx
leave
ret

Function at 0xa02579
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
lea eax, [ebp - 0x94]
mov dword [ebp - 0x94], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0xa025a1
xor eax, eax
leave
ret
mov eax, dword [ebp - 0x84]
xor ecx, ecx
sub eax, ecx
je 0xa025d5
dec eax
je 0xa025b5
dec eax
je 0xa025c7
jmp 0xa0259d
cmp dword [ebp - 0x8c], ecx
jne 0xa025c1
push 4
jmp 0xa025d7
jbe 0xa025c7
push 5
jmp 0xa025d7
cmp dword [ebp - 0x90], 5
sbb eax, eax
add eax, 7
leave
ret
push 3
pop eax
leave
ret

Function at 0xa025da
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov byte [esi], 0x4d
mov byte [esi + 1], 0x48
mov eax, dword [edi]
mov cl, byte [eax]
mov al, byte [eax + 1]
mov byte [esi + 3], al
mov eax, dword [edi + 8]
mov byte [esi + 2], cl
mov eax, dword [eax]
mov dword [esi + 4], eax
call fcn.00a02677
mov dword [esi + 8], eax
lea ecx, [eax + 0x646c6f47]
mov eax, dword [edi]
mov dword [ebp + 8], ecx
mov dx, word [eax + 2]
xor dx, cx
mov word [esi + 0xc], dx
mov edx, dword [eax + 0x12]
mov edx, dword [edx]
xor edx, ecx
mov dword [esi + 0x110], edx
mov dx, word [eax + 8]
xor dx, cx
mov word [esi + 0xe], dx
mov dl, byte [eax + 0x16]
xor dl, cl
mov byte [esi + 0x114], dl
mov dx, word [eax + 4]
test dx, dx
jbe 0xa02673
mov edi, dword [eax + 0xe]
push ebx
movzx eax, dx
xor ebx, ebx
lea ecx, [esi + 0x10]
mov dword [ebp + 0xc], eax
mov eax, ebx
push 4
cdq
pop esi
idiv esi
mov al, byte [edx + ebp + 8]
xor al, byte [edi + ebx]
inc ebx
mov byte [ecx], al
inc ecx
dec dword [ebp + 0xc]
jne 0xa0265a
pop ebx
pop edi
pop esi
pop ebp
ret

Function at 0xa026ca
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
add dword [ebp + 0x10], 0x646c6f47
mov eax, dword [eax]
mov dx, word [eax + 6]
test dx, dx
jbe 0xa02711
push ebx
push esi
mov esi, dword [eax + 0xa]
mov eax, dword [ebp + 0xc]
push edi
xor edi, edi
lea ecx, [eax + 7]
movzx eax, dx
mov dword [ebp + 8], eax
mov eax, edi
push 4
cdq
pop ebx
idiv ebx
mov al, byte [edx + ebp + 0x10]
xor al, byte [ecx]
mov byte [esi + edi], al
inc edi
inc ecx
dec dword [ebp + 8]
jne 0xa026f6
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0xa02bb4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push es
mov ax, 0x101f
mov es, ax
xor eax, eax
mov esi, eax
mov ecx, 0x8000
xor al, byte es:[esi]
inc esi
loop 0xa02bca
pop es
mov byte [ebp - 1], al
mov al, byte [ebp - 1]
test al, al
jne 0xa02bdd
add al, 0x55
mov ecx, dword [ebp + 8]
pop esi
mov byte [ecx], al
xor al, al
leave
ret

Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..data
nop
mov ebx, 0x408f6c
nop
nop
mov ecx, 0x5e3058e6
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x430024
nop
nop
mov eax, section..data_1
mov ebx, 0x42e3d0
nop
nop
mov ecx, 0x519b4ed3
nop
nop
test eax, eax
nop
nop
nop
nop
nop
nop
je 0x430084
nop
nop
xor dword [eax], ecx
nop
nop
add eax, 4
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x43006c
nop
nop
nop
nop
nop
nop
popal
nop
jmp 0x401219
Function at 0x4022a0
Capabilities:
Access peb ldr_data
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4fb7c8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x52a51c]
xor eax, esp
mov dword [esp + 0x20], eax
push esi
mov eax, dword [0x52a51c]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 0x10]
sub esp, 0x18
mov ecx, esp
push 0xffffffffffffffff
push 0
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push eax
mov byte [ecx], 0
call fcn.00404a50
push dword [ebp + 0xc]
lea eax, [esp + 0x2c]
push dword [ebp + 8]
push eax
call fcn.004021c0
add esp, 0x24
mov dword [esp + 0x38], 0
cmp dword [eax + 0x14], 0x10
jb 0x40231d
mov eax, dword [eax]
mov dword [esp + 0xc], eax
mov ecx, esi
lea eax, [esp + 0xc]
push eax
call fcn.004c8ad6
cmp dword [esp + 0x24], 0x10
mov dword [esi], vtable.std::runtime_error.0
jb 0x402346
push dword [esp + 0x10]
call fcn.0044bc50
add esp, 4
mov ecx, dword [ebp + 8]
mov eax, esi
mov dword [esi + 0xc], ecx
mov ecx, dword [ebp + 0xc]
mov dword [esi], vtable.std::_System_error.0
mov dword [esi + 0x10], ecx
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.004c8a23
mov esp, ebp
pop ebp
ret 0xc

Function at 0x4029b0
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 8
push esi
push edi
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov esi, eax
cmp esi, 0xffffffff
jne 0x402a0b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x53af88]
mov edi, eax
test cl, 1
jne 0x4029fb
or ecx, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], ecx
call fcn.004c95ad
add esp, 4
mov dword [esp + 8], edi
mov dword [esp + 0xc], 0x53af9c
test edi, edi
jne 0x402a13
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
mov edx, 0x50b070
lea ecx, [esp + 8]
call fcn.004027d0
int3

Function at 0x402bf0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, ecx
push 0xffffffffffffffff
push 0
mov eax, dword [esi + 8]
mov dword [ebp - 8], eax
mov eax, dword [esi + 4]
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x53af98
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push 0
push dword [esi + 4]
test eax, eax
je 0x402c3f
call dword [sym.imp.KERNEL32.dll_TerminateThread]
pop esi
mov esp, ebp
pop ebp
ret
push method.std::basic_streambuf_char__struct_std::char_traits_char__.virtual_56
call dword [sym.imp.KERNEL32.dll_QueueUserAPC]
push 0xffffffffffffffff
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x402ca0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fb93f
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push esi
push edi
mov eax, dword [0x52a51c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov eax, dword [ebp + 8]
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], 0
mov dword [ebp - 4], 0
mov dword [esi], vtable.asio::detail::win_iocp_io_service.0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov byte [ebp - 4], 3
lea ecx, [esi + 0x34]
mov dword [esi + 0x30], 0
call fcn.00402a40
mov dword [esi + 0x4c], 0
mov dword [esi + 0x50], 0
mov dword [esi + 0x54], 0
or ecx, 0xffffffff
mov byte [ebp - 4], 5
cmp dword [ebp + 0xc], 0xffffffff
cmovb ecx, dword [ebp + 0xc]
push ecx
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [esi + 0x14], eax
test eax, eax
jne 0x402dbe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x53af88]
mov edi, eax
test cl, 1
jne 0x402da3
or ecx, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], ecx
call fcn.004c95ad
add esp, 4
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], 0x53af9c
test edi, edi
je 0x402dbe
mov edx, str.iocp
lea ecx, [ebp - 0x18]
call fcn.004027d0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
Function at 0x403080
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fb9f0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x52a51c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 0
lea eax, [edi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
test eax, eax
jne 0x4030e7
mov ecx, edi
call fcn.00403190
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov dword [eax + 4], 0x52c6cc
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x10]
push dword [0x55c630]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c]
push eax
push dword [0x55c630]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ebx, dword [ebp + 8]
xor esi, esi
push ebx
push ecx
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.004032c0
test eax, eax
je 0x403146
cmp esi, 0xffffffff
je 0x403139
inc esi
push ebx
push ecx
mov ecx, edi
call fcn.004032c0
test eax, eax
jne 0x403133
push dword [ebp - 0x14]
push dword [0x55c630]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x403165
push ecx
call fcn.0044bc50
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x404650
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1a0
mov eax, dword [0x52a51c]
xor eax, esp
mov dword [esp + 0x19c], eax
push esi
push edi
push 0x53af90
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp eax, 1
jne 0x404697
lea eax, [esp + 0x10]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
push eax
push 0x53af94
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp byte [ebp + 8], 0
je 0x4046bd
push 0
push 0x53af94
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov esi, eax
test esi, esi
je 0x4046bd
mov ecx, dword [0x53af88]
test cl, 1
jne 0x4046f5
jmp 0x4046d5
mov ecx, dword [esp + 0x1a4]
mov eax, edi
pop edi
pop esi
xor ecx, esp
call fcn.004c8a23
mov esp, ebp
pop ebp
ret 4
or ecx, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], ecx
call fcn.004c95ad
add esp, 4
mov edx, str.winsock
mov dword [esp + 8], esi
lea ecx, [esp + 8]
mov dword [esp + 0xc], 0x53af9c
call fcn.004027d0
int3

Function at 0x405b70
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push dword [0x55c630]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [ebp + 8]
test eax, eax
je 0x405bb2
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x405bb2
mov eax, dword [ecx]
test eax, eax
je 0x405bb2
mov dword [ecx], 0
mov dl, byte [eax]
movzx ecx, dl
cmp ecx, ebx
jb 0x405ba9
mov byte [eax + ebx], dl
pop ebx
pop ebp
ret
push eax
call fcn.0044bc50
add esp, 4
lea eax, [ebx + 1]
push eax
call fcn.004c96bf
add esp, 4
mov ecx, eax
cmp ebx, 0xff
ja 0x405bd3
movzx eax, bl
mov byte [ecx + ebx], al
mov eax, ecx
pop ebx
pop ebp
ret
xor eax, eax
mov byte [ecx + ebx], al
mov eax, ecx
pop ebx
pop ebp
ret

Function at 0x405be0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push dword [0x55c630]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x405bf8
mov edx, dword [eax + 4]
jmp 0x405bfa
xor edx, edx
mov eax, dword [ebp + 0xc]
cmp eax, 0xff
ja 0x405c19
test edx, edx
je 0x405c19
cmp dword [edx], 0
jne 0x405c19
mov ecx, dword [ebp + 8]
mov al, byte [ecx + eax]
mov byte [ecx], al
mov dword [edx], ecx
pop ebp
ret
push dword [ebp + 8]
call fcn.0044bc50
add esp, 4
pop ebp
ret
Function at 0x405fb0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov esi, dword [ebp + 0x18]
push edi
mov dword [ebp - 4], edx
mov dword [ebp - 0x10], ecx
cmp dword [esi], 0x40
jne 0x405ffd
mov eax, dword [0x53af88]
test al, 1
jne 0x405ff0
or dword [0x53af88], 1
push 0x501e00
mov dword [0x53af9c], 0x50b1f8
call fcn.004c95ad
mov edx, dword [ebp - 4]
add esp, 4
mov dword [esi], 0x2745
mov dword [esi + 4], 0x53af9c
cmp dword [esi], 0
jne 0x406126
cmp dword [ebp + 0xc], 0
je 0x406076
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x406076
lea eax, [ebp + 0x18]
mov dword [ebp - 0xc], 0
push eax
lea eax, [ebp - 4]
mov dword [ebp - 8], 0
push eax
lea eax, [ebp - 8]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0xc]
mov dword [ebp + 0x18], 0
push eax
mov eax, dword [ebp + 8]
push eax
push eax
push 0
push edx
call dword [sym.imp.MSWSOCK.dll_GetAcceptExSockaddrs]
mov eax, dword [ebp + 0x18]
cmp eax, dword [edi]
jbe 0x406062
push 0x2726
mov ecx, esi
call fcn.00408010
jmp 0x406076
push eax
push dword [ebp - 4]
push dword [ebp + 0xc]
call fcn.004cd4f0
mov eax, dword [ebp + 0x18]
add esp, 0xc
mov dword [edi], eax
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
cmp edi, 0xffffffff
jne 0x4060be
mov eax, dword [0x53af88]
test al, 1
jne 0x4060ab
or dword [0x53af88], 1
push 0x501e00
mov dword [0x53af9c], 0x50b1f8
call fcn.004c95ad
add esp, 4
mov dword [esi], 0x2719
mov dword [esi + 4], 0x53af9c
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [ebp - 0x14]
push eax
push 0x700b
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [0x53af88]
mov edi, eax
test cl, 1
jne 0x40610a
or ecx, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], ecx
call fcn.004c95ad
add esp, 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi], eax
mov dword [esi + 4], 0x53af9c
test edi, edi
jne 0x406126
mov dword [esi], edi
mov dword [esi + 4], 0x52c6cc
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4061f0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
push edi
mov eax, edx
xor edi, edi
mov dword [ebp - 0xc], eax
cmp ebx, 0xffffffff
je 0x40634a
cmp byte [ebp + 8], 0
je 0x40623c
test byte [eax], 8
je 0x40623c
xor ecx, ecx
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x14]
push ecx
push 4
lea ecx, [ebp - 4]
push ecx
push 0x80
push 0xffff
mov ecx, ebx
call fcn.004065d0
add esp, 0x14
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edi, eax
mov eax, dword [0x53af88]
test al, 1
jne 0x406275
or eax, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], eax
call fcn.004c95ad
add esp, 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi], eax
mov dword [esi + 4], 0x53af9c
test edi, edi
je 0x40634a
mov eax, dword [0x53af88]
test al, 1
jne 0x4062b4
or eax, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], eax
call fcn.004c95ad
add esp, 4
cmp dword [esi + 4], 0x53af9c
jne 0x4062c5
cmp dword [esi], 0x2733
je 0x4062e1
push 0x4d5
lea ecx, [ebp - 8]
call fcn.00407fc0
mov eax, dword [esi + 4]
cmp eax, dword [ebp - 4]
jne 0x406346
mov eax, dword [esi]
cmp eax, dword [ebp - 8]
jne 0x406346
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push 0x8004667e
push ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [ebp - 0xc]
push 0
and byte [eax], 0xfc
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edi, eax
mov eax, dword [0x53af88]
test al, 1
jne 0x406337
or eax, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], eax
call fcn.004c95ad
add esp, 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi], eax
mov dword [esi + 4], 0x53af9c
test edi, edi
jne 0x406357
mov dword [esi], 0
mov dword [esi + 4], 0x52c6cc
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x406420
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push 0
mov esi, edx
mov edi, ecx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 0
push 0
push 0
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push 1
push esi
push edi
call dword [sym.imp.WS2_32.dll_WSASend]
mov ecx, dword [0x53af88]
mov edi, eax
test cl, 1
jne 0x40647a
or ecx, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], ecx
call fcn.004c95ad
add esp, 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [ebp + 0x10]
mov dword [esi], eax
mov dword [esi + 4], 0x53af9c
cmp eax, 0x40
jne 0x4064c1
mov eax, dword [0x53af88]
test al, 1
jne 0x4064b9
or eax, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], eax
call fcn.004c95ad
add esp, 4
mov dword [esi], 0x2746
jmp 0x4064f6
cmp eax, 0x4d2
jne 0x4064fd
mov eax, dword [0x53af88]
test al, 1
jne 0x4064f0
or eax, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], eax
call fcn.004c95ad
add esp, 4
mov dword [esi], 0x274d
mov dword [esi + 4], 0x53af9c
test edi, edi
je 0x40650a
or eax, 0xffffffff
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
pop edi
mov dword [esi], 0
mov dword [esi + 4], 0x52c6cc
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x406520
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0
mov esi, edx
mov ebx, ecx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 1
push 0
push 0
push dword [ebp + 8]
push esi
push ebx
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov ecx, dword [0x53af88]
mov esi, eax
test cl, 1
jne 0x406571
or ecx, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], ecx
call fcn.004c95ad
add esp, 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [ebp + 0xc]
mov dword [edi], eax
mov dword [edi + 4], 0x53af9c
cmp esi, 0xffffffff
jne 0x406590
or eax, esi
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret
cmp ebx, 0x17
jne 0x4065ad
push 4
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0
push eax
push 0x1b
push 0x29
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [edi], 0
mov eax, esi
mov dword [edi + 4], 0x52c6cc
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret
Function at 0x4065d0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, ecx
push esi
push edi
cmp ebx, 0xffffffff
jne 0x40661d
mov eax, dword [0x53af88]
test al, 1
jne 0x406605
or eax, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], eax
call fcn.004c95ad
add esp, 4
mov eax, dword [ebp + 0x18]
mov dword [eax], 0x2719
mov dword [eax + 4], 0x53af9c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
pop ebp
ret
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
cmp edi, 0xa5100000
jne 0x406677
cmp esi, 2
jne 0x406645
mov ecx, dword [ebp + 0x18]
push 0x2726
call fcn.00408010
or eax, 0xffffffff
pop edi
pop esi
pop ebx
pop ebp
ret
cmp esi, 1
jne 0x40668a
cmp dword [ebp + 0x14], 4
jne 0x406630
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
je 0x40665d
or byte [edx], 4
jmp 0x406660
and byte [edx], 0xfb
mov eax, dword [ebp + 0x18]
mov dword [eax], 0
mov dword [eax + 4], 0x52c6cc
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
cmp edi, 0xffff
jne 0x40668a
cmp esi, 0x80
jne 0x40668a
or byte [edx], 8
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
push edi
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [0x53af88]
mov esi, eax
test cl, 1
jne 0x4066ce
or ecx, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], ecx
call fcn.004c95ad
add esp, 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov dword [ecx + 4], 0x53af9c
test esi, esi
jne 0x4066ed
mov dword [ecx], esi
mov dword [ecx + 4], 0x52c6cc
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret
Function at 0x4068c0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4fbcf0
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x52a51c]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x18], ebx
lea eax, [ebx + 0xc]
push eax
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [esp + 0x30], 1
mov dword [esp + 0x48], 0
mov esi, dword [ebx + 0x24]
test esi, esi
je 0x406a26
jmp 0x406920
cmp dword [esi], 0xffffffff
je 0x4069b3
push 0
push 0
lea eax, [ebx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
mov edi, eax
test edi, edi
je 0x4069b3
mov eax, dword [esi]
lea ebx, [edi + 0x18]
push ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x38], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [esp + 0x38], 1
mov byte [esp + 0x48], 1
mov eax, dword [0x53af88]
test al, 1
jne 0x406983
or eax, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], eax
call fcn.004c95ad
add esp, 4
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x3e3
push eax
push dword [esp + 0x18]
mov ecx, edi
mov dword [esp + 0x28], 0x53af9c
call fcn.004067e0
push ebx
mov byte [esp + 0x4c], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [esp + 0x18]
mov ecx, dword [esi]
lea eax, [esp + 0x24]
push eax
push 1
lea edx, [esi + 4]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0x52c6cc
call fcn.004061f0
mov dword [esi], 0xffffffff
add esp, 8
mov byte [esi + 4], 0
mov edi, dword [esi + 0xc]
mov dword [esi + 0xc], 0
mov dword [esi + 8], 0
test edi, edi
je 0x406a1b
lea eax, [edi + 4]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x406a1b
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lea eax, [edi + 8]
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x406a1b
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov esi, dword [esi + 0x14]
test esi, esi
jne 0x406920
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x409140
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4fc148
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push esi
mov eax, dword [0x52a51c]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
mov esi, ecx
sub esp, 8
lea eax, [esi + 4]
mov ecx, esp
mov dword [esp + 0x14], esp
push eax
mov dword [ecx], 0
mov dword [ecx + 4], 0
call fcn.004082d0
sub esp, 8
mov dword [esp + 0x30], 0
mov ecx, esp
lea eax, [esi + 0xc]
push eax
mov dword [ecx], 0
mov dword [ecx + 4], 0
call fcn.004082d0
push dword [ebp + 8]
lea eax, [esi + 0x18]
mov dword [esp + 0x34], 0xffffffff
push eax
mov ecx, esi
call fcn.004091e0
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 4