joyce8/EMBER2024-capa huggingface dataset:
Function at 0x47bcc0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4cbf5c
mov eax, dword fs:[0]
push eax
sub esp, 0x138
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4fb304]
xor eax, esp
push eax
lea eax, [esp + 0x14c]
mov dword fs:[0], eax
mov edi, ecx
push 0x400
or ebp, 0xffffffff
mov dword [esp + 0x24], 0x4e34ec
mov dword [esp + 0x2c], 0x400
call fcn.0047da0e
mov dword [esp + 0x28], eax
xor eax, eax
add esp, 4
mov dword [esp + 0x2c], eax
mov dword [esp + 0x154], eax
mov eax, dword [0x50038c]
mov edx, dword [eax + 0xc]
mov ecx, 0x50038c
call edx
lea esi, [eax + 0x10]
mov dword [esp + 0x30], esi
lea ecx, [esp + 0x34]
mov byte [esp + 0x154], 1
call fcn.004c1c60
mov eax, dword [esp + 0x164]
mov ecx, dword [esp + 0x160]
mov edx, dword [esp + 0x15c]
push eax
push ecx
push edx
lea eax, [edi + 0x14]
mov ebx, 2
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x164], bl
call fcn.0047c640
mov eax, dword [esp + 0x2c]
cmp eax, 7
jbe 0x47be83
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
mov dword [esp + 0x18], edx
mov dx, word [ecx + 4]
mov word [esp + 0x1c], dx
mov dl, byte [ecx + 6]
add eax, 0xfffffff9
push eax
add ecx, 7
push ecx
push 0
mov byte [esp + 0x2a], dl
call fcn.004c1170
add esp, 0xc
cmp dword [esp + 0x1b], eax
jne 0x47be83
movzx eax, word [esp + 0x18]
cmp eax, dword [esp + 0x2c]
jne 0x47be83
cmp byte [esp + 0x1a], bl
jne 0x47be83
push 0x4e34d8
lea esi, [esp + 0x28]
call fcn.0047c880
mov ecx, dword [esp + 0x24]
add ecx, 7
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.004093f0
lea eax, [esp + 0x48]
mov dword [esp + 0x44], eax
call dword [0x4fb0ac]
mov esi, dword [esp + 0x30]
push eax
push esi
lea ecx, [esp + 0x4c]
push ecx
call fcn.0042baec
mov byte [esp + 0x154], 3
mov eax, dword [esp + 0x44]
add edi, 0x10
test eax, eax
mov ebx, eax
je 0x47be30
push eax
call fcn.004816be
add esp, 4
push ebx
mov ebx, eax
mov eax, edi
call fcn.00407c1b
mov byte [esp + 0x154], 2
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x48]
cmp eax, edx
je 0x47be57
push eax
call fcn.00480959
add esp, 4
mov edi, dword [edi]
push edi
lea ecx, [esp + 0x38]
call fcn.004c1b20
test eax, eax
je 0x47be83
push 0
push str.result
push str.common
lea ecx, [esp + 0x40]
call fcn.004c12a0
cmp eax, 1
jne 0x47be83
xor ebp, ebp
lea ecx, [esp + 0x34]
mov byte [esp + 0x154], 1
call fcn.004c1c00
lea eax, [esi - 0x10]
mov byte [esp + 0x154], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47beb8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
test eax, eax
mov dword [esp + 0x20], 0x4e34ec
je 0x47bed1
push eax
call fcn.00480c9e
add esp, 4
mov eax, ebp
mov ecx, dword [esp + 0x14c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x144
ret 0xc
Function at 0x47dcbc
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x4fb304]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0047dbfb
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.00480cb0
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 0x47dd0b
cmp dword [ebp - 0x1c], 5
jb 0x47dd23
jmp 0x47dd1f
cmp dword [ebp - 0x10], 1
jne 0x47dd23
cmp dword [ebp - 0x1c], 4
ja 0x47dd1f
jne 0x47dd23
cmp dword [ebp - 0x18], 0
jbe 0x47dd23
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4cdb8c
call fcn.0046406a
test eax, eax
jge 0x47dd44
mov byte [0x501d6c], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00485d3d
add ebp, 0x78
leave
ret

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

Disassembly:
cmp dword [0x5003a8], 0
push esi
jne 0x47e0ff
call fcn.0047e02a
test eax, eax
je 0x47e142
mov eax, dword [0x5003a8]
cmp eax, 1
jne 0x47e120
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x47e142
pop esi
ret
push eax
call dword [0x5003b0]
test eax, eax
jne 0x47e18a
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 0x47e146
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x5003a8]
call dword [0x5003b0]
mov edi, eax
test edi, edi
je 0x47e16d
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x47e189
lea edi, [esi + 0xff0]
push esi
push dword [0x5003a8]
call dword [0x5003ac]
add esi, 0x10
cmp esi, edi
jb 0x47e173
mov eax, esi
pop edi
pop esi
ret
jmp 0x47e0ec
Function at 0x4809e7
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 0x480a24
cmp dword [ebp + 0x14], edi
je 0x480a24
cmp ecx, edi
jne 0x480a2b
call fcn.00486dac
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.00480681
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x480a3f
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x480a60
cmp ebx, 0xffffffff
je 0x480a4f
push ebx
push edi
push ecx
call fcn.00480cb0
add esp, 0xc
cmp esi, edi
je 0x480a0c
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x480a0c
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x480a7c
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x480a83
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x480b74
test word [esi + 0xc], 0x10c
je 0x480ad7
mov eax, dword [esi + 4]
test eax, eax
je 0x480ad7
jl 0x480bd5
cmp ebx, eax
mov edi, ebx
jb 0x480aa8
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x480b7c
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00480068
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 0x480b6c
cmp ebx, dword [ebp - 0xc]
jb 0x480b44
cmp dword [ebp - 0xc], 0
je 0x480b01
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x480af6
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x480afd
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x480b0c
mov eax, SysReAllocString
cmp ebx, eax
ja 0x480b0c
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x480ba8
push eax
push dword [ebp - 8]
push esi
call fcn.00482fae
pop ecx
push eax
call fcn.0048cd96
add esp, 0xc
test eax, eax
je 0x480be7
cmp eax, 0xffffffff
je 0x480bd5
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x480b6c
push esi
call fcn.0048c6b5
cmp eax, 0xffffffff
pop ecx
je 0x480bd9
cmp dword [ebp - 4], 0
je 0x480ba8
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 0x480a8b
mov eax, dword [ebp + 0x14]
jmp 0x480a26
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x480b93
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.00480cb0
add esp, 0xc
call fcn.00486dac
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x480a1c
cmp dword [ebp + 0xc], 0xffffffff
je 0x480bbe
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.00480cb0
add esp, 0xc
call fcn.00486dac
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x480a1c
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x480a26
or dword [esi + 0xc], 0x10
jmp 0x480bd9
Function at 0x4841fa
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x484227
call fcn.00486dbf
mov dword [eax], esi
call fcn.00486dac
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.00480681
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x484203
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x484256
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00486dd2
pop ecx
call fcn.00486dac
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x48427d
test al, 1
je 0x48427d
test byte [esp + 0xc], 2
je 0x48427d
call fcn.00486dbf
mov dword [eax], 5
call fcn.00486dac
mov dword [eax], 0xd
jmp 0x48424d
xor eax, eax
pop esi
ret

Function at 0x485d3d
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4fb304]
jne 0x485d47
repz ret
jmp fcn.0049478c

Function at 0x48a297
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 + 0x4fbbf0]
je 0x48a2b2
inc edi
cmp edi, 0x17
jb 0x48a2a3
cmp edi, 0x17
jae 0x48a432
push ebp
push 3
call fcn.00496393
cmp eax, 1
pop ecx
je 0x48a3fe
push 3
call fcn.00496393
test eax, eax
pop ecx
jne 0x48a2e6
cmp dword [0x4fb160], 1
je 0x48a3fe
cmp ebx, 0xfc
je 0x48a431
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x5004a0
push ebp
call fcn.004842fc
add esp, 0xc
test eax, eax
je 0x48a31c
push esi
push esi
push esi
push esi
push esi
call fcn.00480585
add esp, 0x14
push 0x104
mov esi, 0x5004b9
push esi
push 0
mov byte [0x5005bd], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x48a360
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.004842fc
add esp, 0xc
test eax, eax
je 0x48a360
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00480585
add esp, 0x14
push esi
call fcn.0047e220
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x48a3a5
push esi
call fcn.0047e220
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x5007b4
push 0x4ced34
sub ecx, eax
push ecx
push eax
call fcn.00485675
add esp, 0x14
test eax, eax
je 0x48a3a5
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00480585
add esp, 0x14
jmp 0x48a3a7
xor esi, esi
push 0x4ced30
push ebx
push ebp
call fcn.00485604
add esp, 0xc
test eax, eax
je 0x48a3c7
push esi
push esi
push esi
push esi
push esi
call fcn.00480585
add esp, 0x14
push dword [edi*8 + 0x4fbbf4]
push ebx
push ebp
call fcn.00485604
add esp, 0xc
test eax, eax
je 0x48a3e9
push esi
push esi
push esi
push esi
push esi
call fcn.00480585
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004961d6
add esp, 0xc
jmp 0x48a431
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x48a431
cmp ebp, 0xffffffff
je 0x48a431
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4fbbf4]
push dword [esi]
call fcn.0047e220
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 0x4961d6
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00489d18
xor ebx, ebx
cmp dword [0x500f58], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4962ac
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x49638c
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x49638c
push eax
call fcn.00489caa
mov dword [esp], 0x4cf958
push edi
mov dword [0x500f58], eax
call esi
push eax
call fcn.00489caa
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x500f5c], eax
call esi
push eax
call fcn.00489caa
mov dword [0x500f60], eax
lea eax, [ebp - 0xc]
push eax
call fcn.00484fbf
test eax, eax
pop ecx
pop ecx
je 0x49627a
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00480585
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4962ac
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00489caa
cmp eax, ebx
pop ecx
mov dword [0x500f68], eax
je 0x4962ac
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00489caa
pop ecx
mov dword [0x500f64], eax
mov eax, dword [0x500f64]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x496331
cmp dword [0x500f68], ecx
je 0x496331
push eax
call fcn.00489d21
push dword [0x500f68]
mov esi, eax
call fcn.00489d21
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x496331
cmp edi, ebx
je 0x496331
call esi
cmp eax, ebx
je 0x4962fe
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4962fe
test byte [ebp - 0x18], 1
jne 0x496331
lea eax, [ebp - 0x10]
push eax
call fcn.00484ff6
test eax, eax
pop ecx
je 0x496319
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00480585
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x496328
or dword [ebp + 0x10], 0x200000
jmp 0x49636c
or dword [ebp + 0x10], 0x40000
jmp 0x49636c
mov eax, dword [0x500f5c]
cmp eax, dword [ebp - 8]
je 0x49636c
push eax
call fcn.00489d21
cmp eax, ebx
pop ecx
je 0x49636c
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x49636c
mov eax, dword [0x500f60]
cmp eax, dword [ebp - 8]
je 0x49636c
push eax
call fcn.00489d21
cmp eax, ebx
pop ecx
je 0x49636c
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x500f58]
call fcn.00489d21
cmp eax, ebx
pop ecx
je 0x49638c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x49638e
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x49b482
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x4fb304]
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 0x49b4c3
cmp byte [ebp - 0x194], 2
jne 0x49b4bd
cmp byte [ebp - 0x193], 2
je 0x49b4c6
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00485d3d
leave
ret

Function at 0x4a3174
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 0x4a31a3
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 0x4a32c4
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x4a32e4
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 0x4a331d
cmp eax, 2
jg 0x4a331d
push dword [esi + 0xf0]
imul eax, eax, 3
push 1
add eax, 0x4d0e58
push 2
push eax
call fcn.00482da2
push dword [esi + 0xf0]
push 1
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.00482da2
add esp, 0x20
xor eax, eax
ret

Function at 0x4a34e3
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 0x4a3555
push ebx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x2733
jne 0x4a352f
and dword [ebp + 8], 0
mov dword [edi], 0x51
jmp 0x4a3554
push ebx
push esi
call fcn.004ac694
push eax
push str.Send_failure:__s
push dword [esi]
call fcn.004a344f
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 0x4a3c04
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x4fb304]
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 0x4a3d21
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 0x4a3c81
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004ac694
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.004a344f
add esp, 0x18
jmp 0x4a3d28
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 0x4a3cb4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004ac694
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4a3c73
lea edi, [esi + 0xc8]
lea ebx, [esi + 0x9a]
lea esi, [ebp - 0x74]
call fcn.004a3bcb
test eax, eax
jne 0x4a3ce9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004ac694
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x80]
jmp 0x4a3c74
mov eax, dword [ebp - 0x78]
lea edi, [eax + 0xfc]
lea ebx, [eax + 0xcc]
lea esi, [ebp + 0xc]
call fcn.004a3bcb
test eax, eax
jne 0x4a3d1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004ac694
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
jmp 0x4a3ce4
mov esi, dword [ebp - 0x78]
push esi
call fcn.004a3b7c
pop ecx
mov ecx, dword [ebp + 0x8c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00485d3d
add ebp, 0x90
leave
ret

Function at 0x4a3d40
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 0x4a3d85
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004ac694
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004a33dc
add esp, 0x14
jmp 0x4a3d92
push str.TCP_NODELAY_set_n
push esi
call fcn.004a33dc
pop ecx
pop ecx
pop esi
leave
ret
Function at 0x4a41e9
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 0x4a423c
mov ecx, dword [ecx + 0x514]
mov ecx, dword [ecx]
lea eax, [ecx + eax*4]
cmp dword [eax], 0
je 0x4a423c
mov ecx, dword [ebp + 0xc]
test ecx, ecx
mov eax, dword [eax]
je 0x4a4216
mov dword [ecx], eax
cmp dword [eax + 0x144], 0
mov esi, dword [eax + 0x12c]
jne 0x4a423c
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4a423c
mov eax, esi
jmp 0x4a423f
or eax, 0xffffffff
pop esi
pop ebp
ret
Function at 0x4a5311
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 0x4a5483
push esi
mov esi, dword [ebp - 0x10]
test esi, esi
mov dword [ebp - 0xc], esi
je 0x4a5468
push ebx
push edi
jmp 0x4a5359
mov esi, dword [ebp - 0xc]
cmp dword [esi + 4], 2
jne 0x4a53fc
cmp dword [esi + 0x18], 0
je 0x4a53fc
mov eax, dword [esi + 0x10]
test eax, eax
jbe 0x4a53fc
push 0x10
pop edi
cmp eax, edi
jb 0x4a53fc
push 0x20
call dword [0x4fc5c8]
mov ebx, eax
xor eax, eax
cmp ebx, eax
pop ecx
je 0x4a540c
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 [0x4fc5c8]
test eax, eax
pop ecx
mov dword [ebx + 0x18], eax
je 0x4a5415
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 0x4a53e3
push eax
call dword [0x4fc5d4]
test eax, eax
pop ecx
mov dword [ebx + 0x14], eax
je 0x4a5425
cmp dword [ebp - 4], 0
jne 0x4a53ec
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4a53f6
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 0x4a5356
jmp 0x4a543e
mov dword [ebp - 8], 8
jmp 0x4a543e
push ebx
mov dword [ebp - 8], 8
call dword [0x4fc5cc]
jmp 0x4a543d
push dword [ebx + 0x18]
mov dword [ebp - 8], 8
call dword [0x4fc5cc]
push ebx
call dword [0x4fc5cc]
pop ecx
pop ecx
xor esi, esi
cmp dword [ebp - 0x10], esi
pop edi
pop ebx
je 0x4a5450
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 8], esi
je 0x4a5463
push dword [ebp - 4]
call fcn.004a52d5
pop ecx
mov dword [ebp - 4], esi
jmp 0x4a5477
cmp dword [ebp - 4], esi
jne 0x4a5477
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 0x4a57d5
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 [0x4fc5d8]
mov esi, eax
xor eax, eax
cmp esi, eax
pop ecx
pop ecx
mov dword [ebp - 4], 0xc
mov dword [edi + 0x3ac], esi
je 0x4a5887
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.004a5691
test eax, eax
pop ecx
pop ecx
je 0x4a5887
lea ebx, [edi + 0x398]
push dword [ebx]
call fcn.0049bb70
push dword [ebp + 8]
call dword [0x4fc5d4]
test eax, eax
pop ecx
pop ecx
mov dword [ebx], eax
je 0x4a5887
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
je 0x4a5887
lea eax, [esi + 0x10]
push eax
push 0x4a5705
call fcn.004aceb9
test eax, eax
pop ecx
pop ecx
mov dword [esi], eax
jne 0x4a58a1
call fcn.00486dac
mov eax, dword [eax]
mov dword [ebp - 4], eax
add edi, 0x398
push edi
call fcn.004a5783
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4a58a4
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret