joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4937b2
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x5061dc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x224], eax
mov ax, word [edi + 4]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov word [ebp - 0x14], ax
mov ax, word [edi + 8]
push esi
mov word [ebp - 0x12], ax
call ebx
mov word [ebp - 0x10], ax
mov ax, word [edi + 8]
mov word [ebp - 0xe], ax
mov ax, word [edi + 4]
mov word [ebp - 0xc], ax
mov word [ebp - 0xa], 0x4e4
call ebx
mov word [ebp - 8], ax
mov word [ebp - 6], 0x4e4
xor ebx, ebx
mov esi, 0x104
movzx eax, word [ebp + ebx*2 - 0x14]
movzx ecx, word [ebp + ebx*2 - 0x12]
inc ebx
push 0x4eb378
movzx ecx, cx
push ecx
movzx eax, ax
push eax
push str.StringFileInfo_04x_04x_ls
push esi
lea eax, [ebp - 0x21c]
push esi
push eax
inc ebx
call fcn.004950bb
and dword [ebp - 0x220], 0
add esp, 0x1c
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x21c]
push eax
push dword [edi]
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x493874
cmp dword [ebp - 0x220], 0
jne 0x49388b
cmp ebx, 8
jb 0x493815
xor al, al
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0049de7e
leave
ret 4
mov esi, dword [ebp - 0x220]
push esi
call fcn.00495089
pop ecx
mov ecx, esi
mov esi, dword [ebp - 0x224]
call fcn.0041e4e5
mov al, 1
jmp 0x49387b

Function at 0x4946ab
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x5061dc]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.004945ea
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.00495180
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 0x4946fa
cmp dword [ebp - 0x1c], 5
jb 0x494712
jmp 0x49470e
cmp dword [ebp - 0x10], 1
jne 0x494712
cmp dword [ebp - 0x1c], 4
ja 0x49470e
jne 0x494712
cmp dword [ebp - 0x18], 0
jbe 0x494712
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4d4ab4
call fcn.00440189
test eax, eax
jge 0x494733
mov byte [0x50e9c8], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0049de7e
add ebp, 0x78
leave
ret
Function at 0x4948e5
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x50dca8], 0
push esi
jne 0x494858
call fcn.00494783
test eax, eax
je 0x49489b
mov eax, dword [0x50dca8]
cmp eax, 1
jne 0x494879
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x49489b
pop esi
ret
push eax
call dword [0x50dcb0]
test eax, eax
jne 0x4948e3
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 0x49489f
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x50dca8]
call dword [0x50dcb0]
mov edi, eax
test edi, edi
je 0x4948c6
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x4948e2
lea edi, [esi + 0xff0]
push esi
push dword [0x50dca8]
call dword [0x50dcac]
add esi, 0x10
cmp esi, edi
jb 0x4948cc
mov eax, esi
pop edi
pop esi
ret
jmp 0x494845

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

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x499b1c
call fcn.0049fb29
mov dword [eax], esi
call fcn.0049fb16
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.00496250
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x499af8
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x499b4b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0049fb3c
pop ecx
call fcn.0049fb16
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x499b72
test al, 1
je 0x499b72
test byte [esp + 0xc], 2
je 0x499b72
call fcn.0049fb29
mov dword [eax], 5
call fcn.0049fb16
mov dword [eax], 0xd
jmp 0x499b42
xor eax, eax
pop esi
ret
Function at 0x499ec8
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 0x499f05
cmp dword [ebp + 0x14], edi
je 0x499f05
cmp ecx, edi
jne 0x499f0c
call fcn.0049fb16
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.00496250
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x499f20
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x499f41
cmp ebx, 0xffffffff
je 0x499f30
push ebx
push edi
push ecx
call fcn.00495180
add esp, 0xc
cmp esi, edi
je 0x499eed
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x499eed
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x499f5d
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x499f64
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x49a055
test word [esi + 0xc], 0x10c
je 0x499fb8
mov eax, dword [esi + 4]
test eax, eax
je 0x499fb8
jl 0x49a0b6
cmp ebx, eax
mov edi, ebx
jb 0x499f89
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x49a05d
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00494fc9
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 0x49a04d
cmp ebx, dword [ebp - 0xc]
jb 0x49a025
cmp dword [ebp - 0xc], 0
je 0x499fe2
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x499fd7
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x499fde
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x499fed
mov eax, SysReAllocString
cmp ebx, eax
ja 0x499fed
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x49a089
push eax
push dword [ebp - 8]
push esi
call fcn.0049b332
pop ecx
push eax
call fcn.004ab6dc
add esp, 0xc
test eax, eax
je 0x49a0c8
cmp eax, 0xffffffff
je 0x49a0b6
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x49a04d
push esi
call fcn.004aaffb
cmp eax, 0xffffffff
pop ecx
je 0x49a0ba
cmp dword [ebp - 4], 0
je 0x49a089
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 0x499f6c
mov eax, dword [ebp + 0x14]
jmp 0x499f07
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x49a074
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.00495180
add esp, 0xc
call fcn.0049fb16
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x499efd
cmp dword [ebp + 0xc], 0xffffffff
je 0x49a09f
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.00495180
add esp, 0xc
call fcn.0049fb16
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x499efd
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x499f07
or dword [esi + 0xc], 0x10
jmp 0x49a0ba
Function at 0x49de7e
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x5061dc]
jne 0x49de88
repz ret
jmp fcn.004af3cc

Function at 0x4a90b0
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 + 0x506f20]
je 0x4a90cb
inc edi
cmp edi, 0x17
jb 0x4a90bc
cmp edi, 0x17
jae 0x4a924b
push ebp
push 3
call fcn.004b3d68
cmp eax, 1
pop ecx
je 0x4a9217
push 3
call fcn.004b3d68
test eax, eax
pop ecx
jne 0x4a90ff
cmp dword [0x5061d0], 1
je 0x4a9217
cmp ebx, 0xfc
je 0x4a924a
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x50dfd0
push ebp
call fcn.0049c290
add esp, 0xc
test eax, eax
je 0x4a9135
push esi
push esi
push esi
push esi
push esi
call fcn.00496154
add esp, 0x14
push 0x104
mov esi, 0x50dfe9
push esi
push 0
mov byte [0x50e0ed], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4a9179
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.0049c290
add esp, 0xc
test eax, eax
je 0x4a9179
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00496154
add esp, 0x14
push esi
call fcn.00496e20
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4a91be
push esi
call fcn.00496e20
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x50e2e4
push 0x4dc074
sub ecx, eax
push ecx
push eax
call fcn.0049c758
add esp, 0x14
test eax, eax
je 0x4a91be
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00496154
add esp, 0x14
jmp 0x4a91c0
xor esi, esi
push 0x4dc070
push ebx
push ebp
call fcn.004b0041
add esp, 0xc
test eax, eax
je 0x4a91e0
push esi
push esi
push esi
push esi
push esi
call fcn.00496154
add esp, 0x14
push dword [edi*8 + 0x506f24]
push ebx
push ebp
call fcn.004b0041
add esp, 0xc
test eax, eax
je 0x4a9202
push esi
push esi
push esi
push esi
push esi
call fcn.00496154
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004b3bab
add esp, 0xc
jmp 0x4a924a
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x4a924a
cmp ebp, 0xffffffff
je 0x4a924a
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x506f24]
push dword [esi]
call fcn.00496e20
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 0x4b3bab
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.004a0e80
xor ebx, ebx
cmp dword [0x50e894], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4b3c81
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4b3d61
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x4b3d61
push eax
call fcn.004a0e12
mov dword [esp], 0x4dd258
push edi
mov dword [0x50e894], eax
call esi
push eax
call fcn.004a0e12
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x50e898], eax
call esi
push eax
call fcn.004a0e12
mov dword [0x50e89c], eax
lea eax, [ebp - 0xc]
push eax
call fcn.0049ef56
test eax, eax
pop ecx
pop ecx
je 0x4b3c4f
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00496154
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4b3c81
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.004a0e12
cmp eax, ebx
pop ecx
mov dword [0x50e8a4], eax
je 0x4b3c81
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004a0e12
pop ecx
mov dword [0x50e8a0], eax
mov eax, dword [0x50e8a0]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x4b3d06
cmp dword [0x50e8a4], ecx
je 0x4b3d06
push eax
call fcn.004a0e89
push dword [0x50e8a4]
mov esi, eax
call fcn.004a0e89
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x4b3d06
cmp edi, ebx
je 0x4b3d06
call esi
cmp eax, ebx
je 0x4b3cd3
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4b3cd3
test byte [ebp - 0x18], 1
jne 0x4b3d06
lea eax, [ebp - 0x10]
push eax
call fcn.0049ef8d
test eax, eax
pop ecx
je 0x4b3cee
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00496154
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x4b3cfd
or dword [ebp + 0x10], 0x200000
jmp 0x4b3d41
or dword [ebp + 0x10], 0x40000
jmp 0x4b3d41
mov eax, dword [0x50e898]
cmp eax, dword [ebp - 8]
je 0x4b3d41
push eax
call fcn.004a0e89
cmp eax, ebx
pop ecx
je 0x4b3d41
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x4b3d41
mov eax, dword [0x50e89c]
cmp eax, dword [ebp - 8]
je 0x4b3d41
push eax
call fcn.004a0e89
cmp eax, ebx
pop ecx
je 0x4b3d41
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x50e894]
call fcn.004a0e89
cmp eax, ebx
pop ecx
je 0x4b3d61
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4b3d63
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4b77f2
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x5061dc]
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 0x4b7833
cmp byte [ebp - 0x194], 2
jne 0x4b782d
cmp byte [ebp - 0x193], 2
je 0x4b7836
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049de7e
leave
ret
Function at 0x4bf4e5
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 0x4bf514
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 0x4bf635
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x4bf655
push dword [esi + 0xf4]
push dword [esp + 0xc]
push dword [esp + 0xc]
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
jl 0x4bf68e
cmp eax, 2
jg 0x4bf68e
push dword [esi + 0xf0]
imul eax, eax, 3
push 1
add eax, 0x4de020
push 2
push eax
call fcn.0049b4be
push dword [esi + 0xf0]
push 1
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.0049b4be
add esp, 0x20
xor eax, eax
ret

Function at 0x4bf854
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 + 0x12c]
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 0x4bf8c6
push ebx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x2733
jne 0x4bf8a0
and dword [ebp + 8], 0
mov dword [edi], 0x51
jmp 0x4bf8c5
push ebx
push esi
call fcn.004c8a05
push eax
push str.Send_failure:__s
push dword [esi]
call fcn.004bf7c0
mov eax, dword [esi]
mov dword [eax + 0x855c], ebx
add esp, 0x14
mov dword [edi], 0x37
pop ebx
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebp
ret
Function at 0x4bff75
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x5061dc]
xor eax, ebp
mov dword [ebp + 0x8c], eax
push ebx
push esi
mov esi, dword [ebp + 0x98]
cmp dword [esi + 0x198], 0
mov ebx, dword [esi]
push edi
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x80], ebx
jne 0x4c0092
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 0x4bfff2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004c8a05
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.004bf7c0
add esp, 0x18
jmp 0x4c0099
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0x9c]
mov dword [ebp - 0x7c], edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4c0025
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004c8a05
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4bffe4
lea edi, [esi + 0xc8]
lea ebx, [esi + 0x9a]
lea esi, [ebp - 0x74]
call fcn.004bff3c
test eax, eax
jne 0x4c005a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004c8a05
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x80]
jmp 0x4bffe5
mov eax, dword [ebp - 0x78]
lea edi, [eax + 0xfc]
lea ebx, [eax + 0xcc]
lea esi, [ebp + 0xc]
call fcn.004bff3c
test eax, eax
jne 0x4c008f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004c8a05
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
jmp 0x4c0055
mov esi, dword [ebp - 0x78]
push esi
call fcn.004bfeed
pop ecx
mov ecx, dword [ebp + 0x8c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049de7e
add ebp, 0x90
leave
ret

Function at 0x4c00b1
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x308]
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 0x4c00f6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004c8a05
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004bf74d
add esp, 0x14
jmp 0x4c0103
push str.TCP_NODELAY_set_n
push esi
call fcn.004bf74d
pop ecx
pop ecx
pop esi
leave
ret
Function at 0x4c055a
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x520]
cmp eax, 0xffffffff
push esi
je 0x4c05ad
mov ecx, dword [ecx + 0x514]
mov ecx, dword [ecx]
lea eax, [ecx + eax*4]
cmp dword [eax], 0
je 0x4c05ad
mov ecx, dword [ebp + 0xc]
test ecx, ecx
mov eax, dword [eax]
je 0x4c0587
mov dword [ecx], eax
cmp dword [eax + 0x144], 0
mov esi, dword [eax + 0x12c]
jne 0x4c05ad
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4c05ad
mov eax, esi
jmp 0x4c05b0
or eax, 0xffffffff
pop esi
pop ebp
ret
Function at 0x4c1682
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
and dword [eax], 0
and dword [ebp - 4], 0
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
mov dword [ebp - 8], eax
jne 0x4c17f4
push esi
mov esi, dword [ebp - 0x10]
test esi, esi
mov dword [ebp - 0xc], esi
je 0x4c17d9
push ebx
push edi
jmp 0x4c16ca
mov esi, dword [ebp - 0xc]
cmp dword [esi + 4], 2
jne 0x4c176d
cmp dword [esi + 0x18], 0
je 0x4c176d
mov eax, dword [esi + 0x10]
test eax, eax
jbe 0x4c176d
push 0x10
pop edi
cmp eax, edi
jb 0x4c176d
push 0x20
call dword [0x507858]
mov ebx, eax
xor eax, eax
cmp ebx, eax
pop ecx
je 0x4c177d
mov ecx, dword [esi]
mov dword [ebx], ecx
mov ecx, dword [esi + 4]
mov dword [ebx + 4], ecx
mov ecx, dword [esi + 8]
mov dword [ebx + 8], ecx
mov ecx, dword [esi + 0xc]
push edi
mov dword [ebx + 0xc], ecx
mov dword [ebx + 0x10], edi
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x1c], eax
call dword [0x507858]
test eax, eax
pop ecx
mov dword [ebx + 0x18], eax
je 0x4c1786
mov esi, dword [esi + 0x18]
mov edi, eax
mov eax, dword [ebp - 0xc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x4c1754
push eax
call dword [0x507864]
test eax, eax
pop ecx
mov dword [ebx + 0x14], eax
je 0x4c1796
cmp dword [ebp - 4], 0
jne 0x4c175d
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4c1767
mov dword [eax + 0x1c], ebx
mov esi, dword [ebp - 0xc]
mov dword [ebp - 0x14], ebx
mov esi, dword [esi + 0x1c]
test esi, esi
mov dword [ebp - 0xc], esi
jne 0x4c16c7
jmp 0x4c17af
mov dword [ebp - 8], 8
jmp 0x4c17af
push ebx
mov dword [ebp - 8], 8
call dword [0x50785c]
jmp 0x4c17ae
push dword [ebx + 0x18]
mov dword [ebp - 8], 8
call dword [0x50785c]
push ebx
call dword [0x50785c]
pop ecx
pop ecx
xor esi, esi
cmp dword [ebp - 0x10], esi
pop edi
pop ebx
je 0x4c17c1
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 8], esi
je 0x4c17d4
push dword [ebp - 4]
call fcn.004c1646
pop ecx
mov dword [ebp - 4], esi
jmp 0x4c17e8
cmp dword [ebp - 4], esi
jne 0x4c17e8
mov eax, 0x2af9
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov eax, dword [ebp - 8]
pop esi
leave
ret
Function at 0x4c1b46
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0x48
push 1
mov ebx, eax
mov edi, ecx
call dword [0x507868]
mov esi, eax
xor eax, eax
cmp esi, eax
pop ecx
pop ecx
mov dword [ebp - 4], 0xc
mov dword [edi + 0x3ac], esi
je 0x4c1bf8
mov dword [edi + 0x3a4], eax
mov dword [edi + 0x3a8], eax
mov dword [edi + 0x3a0], eax
mov dword [edi + 0x39c], ebx
or dword [esi + 4], 0xffffffff
push ebx
push dword [ebp + 8]
mov dword [esi], eax
lea eax, [esi + 0x10]
call fcn.004c1a02
test eax, eax
pop ecx
pop ecx
je 0x4c1bf8
lea ebx, [edi + 0x398]
push dword [ebx]
call fcn.004b7ee0
push dword [ebp + 8]
call dword [0x507864]
test eax, eax
pop ecx
pop ecx
mov dword [ebx], eax
je 0x4c1bf8
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
je 0x4c1bf8
lea eax, [esi + 0x10]
push eax
push 0x4c1a76
call fcn.004c922d
test eax, eax
pop ecx
pop ecx
mov dword [esi], eax
jne 0x4c1c12
call fcn.0049fb16
mov eax, dword [eax]
mov dword [ebp - 4], eax
add edi, 0x398
push edi
call fcn.004c1af4
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4c1c15
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret