joyce8/EMBER2024-capa huggingface dataset:
Function at 0x486c10
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x50331c]
xor eax, ebp
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x418]
push eax
push 0xf003f
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x414], eax
cmp dword [ebp - 0x414], 0
je 0x486c59
mov eax, dword [ebp - 0x414]
jmp 0x486d0c
mov dword [ebp - 0x41c], 0
mov dword [ebp - 0xc], 0x200
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0
lea ecx, [ebp - 0xc]
push ecx
lea edx, [ebp - 0x410]
push edx
mov eax, dword [ebp - 0x41c]
push eax
mov ecx, dword [ebp - 0x418]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov dword [ebp - 0x414], eax
cmp dword [ebp - 0x414], 0
jne 0x486ce5
lea edx, [ebp - 0x410]
push edx
mov eax, dword [ebp - 0x418]
push eax
call fcn.00486c10
add esp, 8
mov dword [ebp - 0x414], eax
cmp dword [ebp - 0x414], 0
je 0x486cdc
mov ecx, dword [ebp - 0x418]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x414]
jmp 0x486d0c
mov dword [ebp - 0xc], 0x200
jmp 0x486c6a
mov edx, dword [ebp - 0x418]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov dword [ebp - 0x414], eax
mov eax, dword [ebp - 0x414]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00491d9b
mov esp, ebp
pop ebp
ret

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

Disassembly:
cmp dword [0x509640], 0
push esi
jne 0x489170
call fcn.0048909b
test eax, eax
je 0x4891b3
mov eax, dword [0x509640]
cmp eax, 1
jne 0x489191
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x4891b3
pop esi
ret
push eax
call dword [0x509648]
test eax, eax
jne 0x4891fb
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x4891b7
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x509640]
call dword [0x509648]
mov edi, eax
test edi, edi
je 0x4891de
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x4891fa
lea edi, [esi + 0xff0]
push esi
push dword [0x509640]
call dword [0x509644]
add esi, 0x10
cmp esi, edi
jb 0x4891e4
mov eax, esi
pop edi
pop esi
ret
jmp 0x48915d
Function at 0x4893cb
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x50331c]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0048930a
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.00489db0
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x48941a
cmp dword [ebp - 0x1c], 5
jb 0x489432
jmp 0x48942e
cmp dword [ebp - 0x10], 1
jne 0x489432
cmp dword [ebp - 0x1c], 4
ja 0x48942e
jne 0x489432
cmp dword [ebp - 0x18], 0
jbe 0x489432
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4d8ae0
call fcn.0040e215
test eax, eax
jge 0x489453
mov byte [0x50be1c], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00491d9b
add ebp, 0x78
leave
ret

Function at 0x489e88
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x489eb5
call fcn.00494382
mov dword [eax], esi
call fcn.0049436f
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.0048a47a
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x489e91
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x489ee4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00494395
pop ecx
call fcn.0049436f
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x489f0b
test al, 1
je 0x489f0b
test byte [esp + 0xc], 2
je 0x489f0b
call fcn.00494382
mov dword [eax], 5
call fcn.0049436f
mov dword [eax], 0xd
jmp 0x489edb
xor eax, eax
pop esi
ret
Function at 0x48d60d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
je 0x48d64a
cmp dword [ebp + 0x14], edi
je 0x48d64a
cmp ecx, edi
jne 0x48d651
call fcn.0049436f
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.0048a47a
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x48d665
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x48d686
cmp ebx, 0xffffffff
je 0x48d675
push ebx
push edi
push ecx
call fcn.00489db0
add esp, 0xc
cmp esi, edi
je 0x48d632
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x48d632
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x48d6a2
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x48d6a9
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x48d79a
test word [esi + 0xc], 0x10c
je 0x48d6fd
mov eax, dword [esi + 4]
test eax, eax
je 0x48d6fd
jl 0x48d7fb
cmp ebx, eax
mov edi, ebx
jb 0x48d6ce
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x48d7a2
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0048ba29
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x48d792
cmp ebx, dword [ebp - 0xc]
jb 0x48d76a
cmp dword [ebp - 0xc], 0
je 0x48d727
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x48d71c
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x48d723
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x48d732
mov eax, SysReAllocString
cmp ebx, eax
ja 0x48d732
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x48d7ce
push eax
push dword [ebp - 8]
push esi
call fcn.0048fd2c
pop ecx
push eax
call fcn.0049b7d8
add esp, 0xc
test eax, eax
je 0x48d80d
cmp eax, 0xffffffff
je 0x48d7fb
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x48d792
push esi
call fcn.0049b0f7
cmp eax, 0xffffffff
pop ecx
je 0x48d7ff
cmp dword [ebp - 4], 0
je 0x48d7ce
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec ebx
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x48d6b1
mov eax, dword [ebp + 0x14]
jmp 0x48d64c
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x48d7b9
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.00489db0
add esp, 0xc
call fcn.0049436f
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x48d642
cmp dword [ebp + 0xc], 0xffffffff
je 0x48d7e4
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.00489db0
add esp, 0xc
call fcn.0049436f
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x48d642
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x48d64c
or dword [esi + 0xc], 0x10
jmp 0x48d7ff
Function at 0x491d9b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x50331c]
jne 0x491da5
repz ret
jmp fcn.004a0a7c

Function at 0x49a52a
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x503d08]
je 0x49a545
inc edi
cmp edi, 0x17
jb 0x49a536
cmp edi, 0x17
jae 0x49a6c5
push ebp
push 3
call fcn.004a47bd
cmp eax, 1
pop ecx
je 0x49a691
push 3
call fcn.004a47bd
test eax, eax
pop ecx
jne 0x49a579
cmp dword [0x503174], 1
je 0x49a691
cmp ebx, 0xfc
je 0x49a6c4
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x509910
push ebp
call fcn.00490534
add esp, 0xc
test eax, eax
je 0x49a5af
push esi
push esi
push esi
push esi
push esi
call fcn.0048a37e
add esp, 0x14
push 0x104
mov esi, 0x509929
push esi
push 0
mov byte [0x509a2d], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x49a5f3
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00490534
add esp, 0xc
test eax, eax
je 0x49a5f3
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0048a37e
add esp, 0x14
push esi
call fcn.0048a4b0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x49a638
push esi
call fcn.0048a4b0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x509c24
push 0x4d9cb4
sub ecx, eax
push ecx
push eax
call fcn.004909f8
add esp, 0x14
test eax, eax
je 0x49a638
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0048a37e
add esp, 0x14
jmp 0x49a63a
xor esi, esi
push 0x4d9cb0
push ebx
push ebp
call fcn.004a16fe
add esp, 0xc
test eax, eax
je 0x49a65a
push esi
push esi
push esi
push esi
push esi
call fcn.0048a37e
add esp, 0x14
push dword [edi*8 + 0x503d0c]
push ebx
push ebp
call fcn.004a16fe
add esp, 0xc
test eax, eax
je 0x49a67c
push esi
push esi
push esi
push esi
push esi
call fcn.0048a37e
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004a4600
add esp, 0xc
jmp 0x49a6c4
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x49a6c4
cmp ebp, 0xffffffff
je 0x49a6c4
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x503d0c]
push dword [esi]
call fcn.0048a4b0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4a4600
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00495029
xor ebx, ebx
cmp dword [0x50a2a0], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4a46d6
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4a47b6
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x4a47b6
push eax
call fcn.00494fbb
mov dword [esp], 0x4dafb0
push edi
mov dword [0x50a2a0], eax
call esi
push eax
call fcn.00494fbb
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x50a2a4], eax
call esi
push eax
call fcn.00494fbb
mov dword [0x50a2a8], eax
lea eax, [ebp - 0xc]
push eax
call fcn.0049445c
test eax, eax
pop ecx
pop ecx
je 0x4a46a4
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0048a37e
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4a46d6
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00494fbb
cmp eax, ebx
pop ecx
mov dword [0x50a2b0], eax
je 0x4a46d6
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00494fbb
pop ecx
mov dword [0x50a2ac], eax
mov eax, dword [0x50a2ac]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x4a475b
cmp dword [0x50a2b0], ecx
je 0x4a475b
push eax
call fcn.00495032
push dword [0x50a2b0]
mov esi, eax
call fcn.00495032
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x4a475b
cmp edi, ebx
je 0x4a475b
call esi
cmp eax, ebx
je 0x4a4728
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4a4728
test byte [ebp - 0x18], 1
jne 0x4a475b
lea eax, [ebp - 0x10]
push eax
call fcn.00494493
test eax, eax
pop ecx
je 0x4a4743
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0048a37e
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x4a4752
or dword [ebp + 0x10], 0x200000
jmp 0x4a4796
or dword [ebp + 0x10], 0x40000
jmp 0x4a4796
mov eax, dword [0x50a2a4]
cmp eax, dword [ebp - 8]
je 0x4a4796
push eax
call fcn.00495032
cmp eax, ebx
pop ecx
je 0x4a4796
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x4a4796
mov eax, dword [0x50a2a8]
cmp eax, dword [ebp - 8]
je 0x4a4796
push eax
call fcn.00495032
cmp eax, ebx
pop ecx
je 0x4a4796
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x50a2a0]
call fcn.00495032
cmp eax, ebx
pop ecx
je 0x4a47b6
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4a47b8
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4a8124
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x50331c]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4a8165
cmp byte [ebp - 0x194], 2
jne 0x4a815f
cmp byte [ebp - 0x193], 2
je 0x4a8168
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00491d9b
leave
ret
Function at 0x4b05d0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push 0
push dword [esp + 0x10]
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4b05ff
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret

Function at 0x4b070f
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x1a8]
test ecx, ecx
je 0x4b072f
push dword [esi + 0x134]
push dword [esp + 0xc]
push dword [esp + 0xc]
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
jl 0x4b0768
cmp eax, 2
jg 0x4b0768
push dword [esi + 0x130]
imul eax, eax, 3
push 1
add eax, 0x4db9e0
push 2
push eax
call fcn.0048feb8
push dword [esi + 0x130]
push 1
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.0048feb8
add esp, 0x20
xor eax, eax
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + eax*4 + 0x154]
push edi
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [ebp + 0x18]
and dword [edi], 0
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x4b0989
push ebx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x2733
jne 0x4b0963
and dword [ebp + 8], 0
mov dword [edi], 0x51
jmp 0x4b0988
push ebx
push esi
call fcn.004b52fe
push eax
push str.Send_failure:__s
push dword [esi]
call fcn.004b0889
mov eax, dword [esi]
mov dword [eax + 0x860c], ebx
add esp, 0x14
mov dword [edi], 0x37
pop ebx
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebp
ret

Function at 0x4b2226
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push edi
xor eax, eax
xor edi, edi
cmp dword [esi + 0x46c], edi
push 4
setne al
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 8
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x4b2266
push ebx
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.004b081f
add esp, 0xc
jmp 0x4b22d1
push dword [esi + 0x470]
mov dword [ebp - 0x14], 1
call fcn.004b8f06
imul eax, eax, 0x3e8
push dword [esi + 0x474]
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], eax
call fcn.004b8f06
imul eax, eax, 0x3e8
pop ecx
pop ecx
push edi
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
push eax
push edi
push edi
push 0xc
lea eax, [ebp - 0x14]
push eax
push 0x98000004
push ebx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4b22d1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.004b081f
add esp, 0x10
pop edi
leave
ret
Function at 0x4b27b6
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x50331c]
xor eax, ebp
mov dword [ebp + 0x8c], eax
push ebx
push esi
mov esi, dword [ebp + 0x98]
cmp dword [esi + 0x8c], 2
mov ebx, dword [esi]
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x80], ebx
je 0x4b2903
cmp dword [esi + 0x1d8], 0
push edi
jne 0x4b28fb
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x74]
push eax
push dword [ebp + 0x9c]
mov edi, 0x80
mov dword [ebp - 0x7c], edi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x4b2834
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004b52fe
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
jmp 0x4b2874
push edi
lea eax, [ebp + 0xc]
push 0
push eax
mov dword [ebp - 0x7c], edi
call fcn.00489db0
add esp, 0xc
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0x9c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4b2877
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004b52fe
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
push ebx
jmp 0x4b28ee
lea ebx, [esi + 0xb8]
lea edi, [esi + 0xe8]
lea esi, [ebp - 0x74]
call fcn.004b277d
test eax, eax
jne 0x4b28a9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004b52fe
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
jmp 0x4b28eb
mov esi, dword [ebp - 0x78]
push 0x2e
lea eax, [esi + 0x58]
push ebx
push eax
call fcn.0048a820
lea edi, [esi + 0x11c]
lea ebx, [esi + 0xec]
add esp, 0xc
lea esi, [ebp + 0xc]
call fcn.004b277d
test eax, eax
jne 0x4b28f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004b52fe
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x80]
call fcn.004b0889
add esp, 0x18
jmp 0x4b2902
mov esi, dword [ebp - 0x78]
push esi
call fcn.004b272b
pop ecx
pop edi
mov ecx, dword [ebp + 0x8c]
pop esi
xor ecx, ebp
pop ebx
call fcn.00491d9b
add ebp, 0x90
leave
ret

Function at 0x4b291a
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x364]
push 4
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 1
push 6
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x4b295f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004b52fe
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004b081f
add esp, 0x14
jmp 0x4b296c
push str.TCP_NODELAY_set_n
push esi
call fcn.004b081f
pop ecx
pop ecx
pop esi
leave
ret
Function at 0x4b296f
Capabilities:
Check os version
Set socket configuration

Disassembly:
push ebp
lea ebp, [esp - 0xa4]
sub esp, 0x124
mov eax, dword [0x50331c]
xor eax, ebp
mov dword [ebp + 0xa0], eax
push esi
push edi
xor eax, eax
cmp dword [0x50a2f8], eax
push 2
mov dword [ebp - 0x78], 0x4020
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x80], 4
pop edi
jne 0x4b29e4
mov esi, 0x114
push esi
push eax
lea eax, [ebp - 0x74]
push eax
call fcn.00489db0
add esp, 0xc
lea eax, [ebp - 0x74]
push eax
mov dword [ebp - 0x74], esi
mov dword [0x50a2f8], 1
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x4b29e4
cmp dword [ebp - 0x70], 6
jb 0x4b29e4
mov dword [0x50a2f8], edi
cmp dword [0x50a2f8], edi
je 0x4b2a2c
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x7c]
push eax
mov edi, 0x1001
push edi
mov esi, 0xffff
push esi
push dword [ebp + 0xac]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4b2a18
mov eax, dword [ebp - 0x7c]
cmp eax, dword [ebp - 0x78]
jg 0x4b2a2c
push 4
lea eax, [ebp - 0x78]
push eax
push edi
push esi
push dword [ebp + 0xac]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [ebp + 0xa0]
pop edi
xor ecx, ebp
pop esi
call fcn.00491d9b
add ebp, 0xa4
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x5d0]
xor ebx, ebx
cmp esi, ebx
je 0x4b2aa9
mov eax, dword [edi + 0x44]
cmp eax, ebx
jne 0x4b2a7c
cmp dword [edi + 0x40], ebx
je 0x4b2aa9
cmp eax, ebx
mov dword [ebp - 8], esi
mov dword [ebp - 4], ebx
jne 0x4b2a89
mov eax, dword [edi + 0x40]
mov eax, dword [eax + 0x34]
push 0x4b2a43
lea ecx, [ebp - 8]
push ecx
push eax
call fcn.004b94fa
add esp, 0xc
cmp dword [ebp - 4], ebx
jne 0x4b2ab1
mov dword [edi + 0x5d0], ebx
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4b2aba
mov dword [eax], esi
cmp dword [esi + 0x17c], ebx
mov edi, dword [esi + 0x154]
jne 0x4b2aa9
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4b2aa9
mov eax, edi
jmp 0x4b2aac
Function at 0x4b336f
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x18]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x1c]
and dword [edi], 0
push dword [ebp + 8]
mov byte [eax], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x4b33e5
cmp word [ebx + 8], 2
jne 0x4b33c5
cmp word [ebx + 0xa], 4
jne 0x4b33c5
mov esi, dword [ebx + 0xc]
jmp 0x4b33bf
push dword [eax]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.004b330a
test eax, eax
mov dword [edi], eax
je 0x4b33e0
lea edi, [eax + 0x1c]
add esi, 4
mov eax, dword [esi]
test eax, eax
jne 0x4b33a3
push 0x400
push dword [ebx]
push 0x401
push dword [ebp + 0x18]
call fcn.004909f8
add esp, 0x10
xor eax, eax
jmp 0x4b340b
push 8
pop eax
jmp 0x4b340b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov eax, 0x2af9
sub ecx, eax
je 0x4b340b
dec ecx
je 0x4b3406
dec ecx
je 0x4b33ff
dec ecx
jmp 0x4b340b
mov eax, 0x2afb
jmp 0x4b340b
mov eax, 0x2afa
pop edi
pop esi
pop ebx
pop ebp
ret 0x18
Function at 0x4b3a07
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x1b0]
sub esp, 0x230
mov eax, dword [0x50331c]
xor eax, ebp
mov dword [ebp + 0x1ac], eax
cmp dword [0x50a2fc], 0
mov dword [ebp - 0x80], str.getaddrinfo
mov dword [ebp - 0x7c], 0x4b35c6
mov dword [ebp - 0x78], str.getnameinfo
mov dword [ebp - 0x74], 0x4b384d
mov dword [ebp - 0x70], str.freeaddrinfo
mov dword [ebp - 0x6c], fcn.004b358d
jne 0x4b3b6d
push 0x104
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4b3b63
push ebx
push esi
push edi
lea eax, [ebp - 0x68]
push eax
mov esi, 0x10c
lea eax, [ebp + 0xa0]
push esi
push eax
call fcn.00490534
push str.ws2_32
lea eax, [ebp + 0xa0]
push esi
push eax
call fcn.004a16fe
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
add esp, 0x18
lea eax, [ebp + 0xa0]
push eax
call ebx
mov edi, eax
test edi, edi
je 0x4b3ad0
push str.getaddrinfo
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x4b3acc
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor edi, edi
test edi, edi
jne 0x4b3b22
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp + 0xa0]
push esi
push eax
call fcn.00490534
push str.wship6
lea eax, [ebp + 0xa0]
push esi
push eax
call fcn.004a16fe
add esp, 0x18
lea eax, [ebp + 0xa0]
push eax
call ebx
mov edi, eax
test edi, edi
je 0x4b3b60
push str.getaddrinfo
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x4b3b1e
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor edi, edi
test edi, edi
je 0x4b3b60
xor esi, esi
push dword [ebp + esi*8 - 0x80]
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [ebp + esi*8 - 0x7c], eax
je 0x4b3b3f
inc esi
cmp esi, 3
jl 0x4b3b24
jmp 0x4b3b48
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor edi, edi
test edi, edi
je 0x4b3b60
xor eax, eax
mov ecx, dword [ebp + eax - 0x7c]
mov dword [eax + 0x50462c], ecx
add eax, 8
cmp eax, 0x18
jl 0x4b3b4e
pop edi
pop esi
pop ebx
mov dword [0x50a2fc], 1
movzx eax, word [ebp + 0x1b8]
mov ecx, dword [ebp + 0x1ac]
mov eax, dword [eax*8 + 0x50462c]
xor ecx, ebp
call fcn.00491d9b
add ebp, 0x1b0
leave
ret 4