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

Disassembly:
push 0xffffffffffffffff
push 0x5df12b
mov eax, dword fs:[0]
push eax
push ecx
push ebx
mov eax, dword [0x658aa8]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
lea eax, [esi + 8]
push eax
mov dword [esi], vtable.CHttpBaseOperate.0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov al, 1
xor ebx, ebx
push 0x10
mov byte [esi + 0x30], al
mov byte [esi + 0x31], al
mov byte [esi + 0x32], bl
call fcn.0048fcc0
add esp, 4
cmp eax, ebx
je 0x48dbae
mov dword [eax], vtable.CDataBuffer.0
mov dword [eax + 4], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 8], ebx
jmp 0x48dbb0
xor eax, eax
push 0x10
mov dword [esi + 0x28], eax
call fcn.0048fcc0
add esp, 4
cmp eax, ebx
je 0x48dbd2
mov dword [eax], vtable.CDataBuffer.0
mov dword [eax + 4], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 8], ebx
jmp 0x48dbd4
xor eax, eax
mov dword [esi + 0x2c], eax
mov eax, 0xa
xor ecx, ecx
xor edx, edx
push 0x1c
mov dword [esi + 0x58], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x60], ebx
mov dword [esi + 0x68], ebx
mov dword [esi + 0x64], ebx
mov dword [esi + 0x34], 0x1e
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], 5
mov dword [esi + 0x40], 7
mov word [esi + 0x54], cx
mov word [esi + 0x56], dx
mov dword [esi + 0x44], ebx
mov dword [esi + 0x48], ebx
mov dword [esi + 0x4c], ebx
mov dword [esi + 0x50], eax
mov dword [esi + 0x7c], ebx
mov dword [esi + 0x80], ebx
mov dword [esi + 0x88], ebx
mov dword [esi + 0x8c], ebx
call fcn.0048fcc0
add esp, 4
mov dword [esp + 8], eax
mov dword [esp + 0x14], ebx
cmp eax, ebx
je 0x48dc54
push eax
call fcn.0048f840
jmp 0x48dc56
xor eax, eax
mov dword [esi + 0x90], eax
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x70], ebx
mov dword [esi + 0x74], ebx
mov dword [esi + 0x78], ebx
mov eax, esi
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop ebx
add esp, 0x10
ret
Function at 0x48e400
Capabilities:
Reference http user-agent string

Disassembly:
sub esp, 0x10
mov eax, dword [0x658aa8]
xor eax, esp
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x1c]
push ebx
mov ebx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
xor esi, esi
mov dword [esp + 0x18], eax
push esi
push esi
lea edi, [esp + 0x1c]
mov eax, ebp
mov dword [esp + 0x1c], esi
call fcn.0048ddc0
add esp, 8
test al, al
je 0x48e4bf
mov edi, dword [esp + 0x14]
push edi
call fcn.0048fcef
add esp, 4
push edi
mov esi, eax
push 0
push esi
call fcn.004a0660
add esp, 0xc
test ebp, ebp
je 0x48e4f6
test esi, esi
je 0x48e4f6
push 0x644ad8
push ebp
call fcn.0049ab43
mov edi, eax
add esp, 8
test edi, edi
je 0x48e4f6
add edi, 3
push 0x637a14
push edi
call fcn.0049ab43
add esp, 8
test eax, eax
je 0x48e498
sub eax, edi
jmp 0x48e4a9
mov eax, edi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x48e4a0
sub eax, edx
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jae 0x48e4f6
push eax
push edi
push ecx
push esi
call fcn.0049d87e
add esp, 0x10
jmp 0x48e4f6
test ebp, ebp
je 0x48e4f6
mov eax, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x48e4c8
sub eax, edx
lea edi, [eax + 1]
push edi
call fcn.0048fcef
add esp, 4
push edi
mov esi, eax
push 0
push esi
call fcn.004a0660
add esp, 0xc
push ebp
push edi
push esi
call fcn.0049a49f
add esp, 0xc
mov eax, dword [ebx + 0x90]
xor edi, edi
mov dword [ebx + 0x78], edi
mov dword [ebx + 0x58], edi
cmp eax, edi
je 0x48e50e
push eax
call fcn.0048f8b0
mov eax, dword [ebx + 0x20]
cmp eax, edi
je 0x48e521
push eax
call fcn.004b33e0
add esp, 4
mov dword [ebx + 0x20], edi
push 0x644ae8
push str.Accept
push ebx
call fcn.0048e170
push str.zh_CN
push str.Accept_Language
push ebx
call fcn.0048e170
push str.Mozilla_5.0__Windows_NT_6.1__Win64__x64__AppleWebKit_537.36__KHTML__like_Gecko__Chrome_75.0.3770.90_Safari_537.36
push str.User_Agent
push ebx
call fcn.0048e170
push str.gzip__deflate
push str.Accept_Encoding
push ebx
call fcn.0048e170
cmp esi, edi
je 0x48e571
push esi
push str.Host
push ebx
call fcn.0048e170
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x48e585
push eax
push str.Content_Type
push ebx
call fcn.0048e170
push str.Keep_Alive
push str.Connection
push ebx
call fcn.0048e170
cmp esi, edi
je 0x48e5a2
push esi
call fcn.0048fcfa
add esp, 4
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00499a1c
add esp, 0x10
ret 0xc
Function at 0x499a1c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x658aa8]
jne 0x499a26
repz ret
jmp fcn.004a0e60

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x49b438
call fcn.0049e0d1
mov dword [eax], esi
call fcn.0049e0be
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.00499bdd
add esp, 0x14
push 0x16
pop eax
jmp 0x49b48d
test dword [ebp + 0xc], 0xfffffff9
jne 0x49b414
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x49b465
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0049e0e4
pop ecx
call fcn.0049e0be
mov eax, dword [eax]
jmp 0x49b48d
test al, 0x10
jne 0x49b48b
test al, 1
je 0x49b48b
test byte [ebp + 0xc], 2
je 0x49b48b
call fcn.0049e0d1
mov dword [eax], 5
call fcn.0049e0be
mov dword [eax], 0xd
jmp 0x49b45c
xor eax, eax
pop esi
pop ebp
ret

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x49b8ac
call fcn.0049e0d1
mov dword [eax], esi
call fcn.0049e0be
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.00499bdd
add esp, 0x14
push 0x16
pop eax
jmp 0x49b901
test dword [ebp + 0xc], 0xfffffff9
jne 0x49b888
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x49b8d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0049e0e4
pop ecx
call fcn.0049e0be
mov eax, dword [eax]
jmp 0x49b901
test al, 0x10
jne 0x49b8ff
test al, 1
je 0x49b8ff
test byte [ebp + 0xc], 2
je 0x49b8ff
call fcn.0049e0d1
mov dword [eax], 5
call fcn.0049e0be
mov dword [eax], 0xd
jmp 0x49b8d0
xor eax, eax
pop esi
pop ebp
ret
Function at 0x4ae09b
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004a13f6
and dword [ebp - 4], 0
cmp dword [0x668fb8], 0
mov ebx, eax
jne 0x4ae14c
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4ae1fd
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x5e9218
push edi
call esi
test eax, eax
je 0x4ae1fd
push eax
call fcn.004a1384
mov dword [esp], 0x5e9208
push edi
mov dword [0x668fb8], eax
call esi
push eax
call fcn.004a1384
mov dword [esp], 0x5e91f4
push edi
mov dword [0x668fbc], eax
call esi
push eax
call fcn.004a1384
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x668fc0], eax
call esi
push eax
call fcn.004a1384
pop ecx
mov dword [0x668fc8], eax
test eax, eax
je 0x4ae14c
push 0x5e91c0
push edi
call esi
push eax
call fcn.004a1384
pop ecx
mov dword [0x668fc4], eax
mov eax, dword [0x668fc4]
cmp eax, ebx
je 0x4ae1a4
cmp dword [0x668fc8], ebx
je 0x4ae1a4
push eax
call fcn.004a13ff
push dword [0x668fc8]
mov esi, eax
call fcn.004a13ff
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x4ae1a4
test edi, edi
je 0x4ae1a4
call esi
test eax, eax
je 0x4ae19b
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4ae19b
test byte [ebp - 0xc], 1
jne 0x4ae1a4
or dword [ebp + 0x10], 0x200000
jmp 0x4ae1dd
mov eax, dword [0x668fbc]
cmp eax, ebx
je 0x4ae1dd
push eax
call fcn.004a13ff
pop ecx
test eax, eax
je 0x4ae1dd
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x4ae1dd
mov eax, dword [0x668fc0]
cmp eax, ebx
je 0x4ae1dd
push eax
call fcn.004a13ff
pop ecx
test eax, eax
je 0x4ae1dd
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x668fb8]
call fcn.004a13ff
pop ecx
test eax, eax
je 0x4ae1fd
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4ae1ff
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4bf5b0
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea edi, [esi + eax]
mov ebx, 0x1505
cmp esi, edi
jae 0x4bf5a0
movzx eax, byte [esi]
push eax
call fcn.004c0f30
mov edx, ebx
shl edx, 5
movsx ecx, al
add edx, ebx
xor ecx, edx
inc esi
add esp, 4
mov ebx, ecx
cmp esi, edi
jb 0x4bf581
pop edi
pop esi
movzx eax, bl
pop ebx
ret
push ecx
push esi
mov esi, eax
test esi, esi
je 0x4bf5dd
call fcn.004bf3c0
test eax, eax
jne 0x4bf5dd
lea eax, [esp + 4]
push eax
call fcn.004bf510
add esp, 4
mov ecx, eax
mov eax, dword [esp + 4]
pop esi
add esp, 4
jmp 0x4bf570
xor eax, eax
pop esi
pop ecx
ret

Function at 0x4c1c40
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 0xc]
push eax
call fcn.004c1c30
add esp, 4
mov dword [esp + 0xc], eax
jmp fcn.004abfb5

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

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4c1ea2
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 0x4c1fe0
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
xor edi, edi
cmp dword [esi + 0x608], edi
je 0x4c2029
push 1
push esi
call fcn.004c51e0
mov eax, dword [esi + 0x59c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
push ecx
mov ecx, dword [esi + 0x608]
push edx
push eax
push esi
call ecx
push 0
push esi
mov edi, eax
call fcn.004c51e0
add esp, 0x24
mov eax, edi
pop edi
pop esi
ret
mov eax, dword [esp + 0x10]
test eax, eax
jl 0x4c2069
cmp eax, 2
jg 0x4c2069
mov edx, dword [esi + 0x598]
push edx
push 1
lea eax, [eax + eax*2 + 0x5eb6c8]
push 2
push eax
call fcn.0049cd23
mov ecx, dword [esi + 0x598]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
push ecx
push 1
push edx
push eax
call fcn.0049cd23
add esp, 0x20
mov eax, edi
pop edi
pop esi
ret
Function at 0x4c25e0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov ecx, dword [ebx + 0x2b8]
push ebp
mov ebp, dword [ebx + eax*4 + 0x1a8]
push esi
lea esi, [eax + 0x1d]
shl esi, 4
add esi, ebx
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [ecx + 0x40], 3
je 0x4c267f
cmp dword [ebx + eax*4 + 0x1c0], 0x4c2310
jne 0x4c267f
cmp dword [esi], 0
je 0x4c261a
test edi, edi
je 0x4c267f
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebp
call fcn.004c27d0
add esp, 0x14
cmp eax, 0xffffffff
je 0x4c267f
test al, 1
je 0x4c267f
cmp dword [esi], 0
jne 0x4c2661
mov edx, dword [ebx]
mov eax, dword [edx + 0x8e4]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [0x659f3c]
mov edi, dword [esi + 4]
xor ecx, ecx
add esp, 4
mov dword [esi], eax
mov dword [esi + 8], ecx
mov dword [esi + 0xc], ecx
cmp eax, ecx
je 0x4c267c
mov eax, dword [esi]
add eax, dword [esi + 8]
push 0
push edi
push eax
push ebp
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x4c267f
add dword [esi + 8], eax
pop edi
pop esi
pop ebp
ret
mov dword [esi + 4], ecx
pop edi
pop esi
pop ebp
ret

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

Disassembly:
sub esp, 0x84
mov eax, dword [0x658aa8]
xor eax, esp
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x8c]
push ebx
mov ebx, dword [esp + 0x8c]
push ebp
mov ebp, dword [ebx + eax*4 + 0x1a8]
push esi
mov esi, dword [esp + 0xa4]
push edi
mov edi, dword [esp + 0xa0]
call fcn.004c25e0
mov eax, dword [esp + 0xa4]
push 0
push eax
push edi
push ebp
call dword [sym.imp.WS2_32.dll_send]
mov edi, eax
mov dword [esi], 0
cmp edi, 0xffffffff
jne 0x4c273a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x4c2709
xor eax, eax
mov dword [esi], 0x51
jmp 0x4c273a
push 0x80
lea ecx, [esp + 0x14]
push ecx
push ebp
call fcn.004b6fe0
mov edx, dword [ebx]
push eax
push str.Send_failure:__s
push edx
call fcn.004c2150
mov eax, dword [ebx]
mov dword [eax + 0xcac], ebp
add esp, 0x18
mov dword [esi], 0x37
mov eax, edi
mov ecx, dword [esp + 0x90]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00499a1c
add esp, 0x84
ret
Function at 0x4c2fb0
Capabilities:
Create udp socket

Disassembly:
mov eax, dword [esp + 4]
cmp dword [eax + 0x2c0], 2
jne 0x4c2fc2
jmp fcn.004c2f50
mov eax, 1
ret

Function at 0x4c3150
Capabilities:
Get common file path

Disassembly:
push ecx
push ebp
push esi
push str.kernel32
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
test esi, esi
jne 0x4c316a
pop esi
pop ebp
pop ecx
ret
push ebx
push edi
push str.LoadLibraryExA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, dword [esp + 0x18]
mov edi, eax
push 0x5eb790
push ebx
mov dword [esp + 0x18], edi
call fcn.004f6eda
add esp, 8
test eax, eax
je 0x4c31b6
test edi, edi
je 0x4c31a7
push 8
push 0
push ebx
call edi
pop edi
pop ebx
pop esi
mov ebp, eax
pop ebp
pop ecx
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop edi
pop ebx
pop esi
mov ebp, eax
pop ebp
pop ecx
ret
test edi, edi
je 0x4c31dc
push str.AddDllDirectory
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4c31dc
push 0x800
push 0
push ebx
call edi
pop edi
pop ebx
pop esi
mov ebp, eax
pop ebp
pop ecx
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, eax
test edi, edi
je 0x4c3290
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c31f5
sub eax, edx
lea eax, [eax + edi + 1]
push eax
call dword [0x659f3c]
mov esi, eax
add esp, 4
test esi, esi
je 0x4c3286
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4c3286
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c3223
sub eax, edx
mov ecx, 0x5c
mov word [eax + esi], cx
mov eax, esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c3240
sub eax, edx
lea edx, [eax + esi]
mov ecx, ebx
sub edx, ebx
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x4c3250
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4c327d
push 8
push 0
push esi
call eax
push esi
mov ebp, eax
call dword [0x659f40]
add esp, 4
pop edi
pop ebx
pop esi
mov eax, ebp
pop ebp
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
push esi
call dword [0x659f40]
add esp, 4
pop edi
pop ebx
pop esi
mov eax, ebp
pop ebp
pop ecx
ret

Function at 0x4c32a0
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x658aa8]
xor eax, esp
mov dword [esp + 0x190], eax
test byte [esp + 0x198], 2
je 0x4c32ff
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4c32e5
mov eax, dword [esp]
cmp al, 2
jne 0x4c32df
shr eax, 8
cmp al, 2
je 0x4c32ff
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.00499a1c
add esp, 0x194
ret
push 3
push 2
push 0
push 6
call fcn.004c2fe0
add esp, 0x10
test eax, eax
je 0x4c333f
push 0x66d5c0
mov dword [0x66d5c8], 1
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor eax, eax
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.00499a1c
add esp, 0x194
ret
mov ecx, dword [esp + 0x190]
xor ecx, esp
mov dword [0x66d5c8], 0
xor eax, eax
call fcn.00499a1c
add esp, 0x194
ret
Function at 0x4c7b70
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x14
mov eax, dword [esi + 0xa90]
push 4
lea ecx, [esp + 4]
push ecx
push 8
shr eax, 0xc
push 0xffff
and eax, 1
push edi
mov dword [esp + 0x14], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x4c7baf
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.004c2070
add esp, 0xc
add esp, 0x14
ret
mov edx, dword [esi + 0xa50]
push edx
mov dword [esp + 0xc], 1
call fcn.004c1c20
imul eax, eax, 0x3e8
mov dword [esp + 4], eax
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0xa54]
push eax
call fcn.004c1c20
imul eax, eax, 0x3e8
add esp, 8
push 0
push 0
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push 0xc
lea edx, [esp + 0x20]
push edx
push 0x98000004
push edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4c7c28
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.004c2070
add esp, 0x10
add esp, 0x14
ret
Function at 0x4c83a0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x18c
mov eax, dword [0x658aa8]
xor eax, esp
mov dword [esp + 0x188], eax
push ebp
mov ebp, dword [esp + 0x194]
cmp dword [ebp + 0x90], 2
push edi
mov edi, dword [ebp]
mov dword [esp + 0xc], edi
je 0x4c855d
mov eax, dword [ebp + 0x294]
push ebx
push esi
test al, 2
jne 0x4c8552
test eax, 0x8000000
jne 0x4c8552
mov esi, dword [esp + 0x1a4]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x9c]
push ecx
mov ebx, 0x80
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x4c8440
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push ebx
lea edx, [esp + 0x11c]
mov esi, eax
push edx
push esi
call fcn.004b6fe0
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.004c2150
add esp, 0x1c
jmp 0x4c855b
push ebx
lea eax, [esp + 0x1c]
push 0
push eax
mov dword [esp + 0x1c], ebx
call fcn.004a0660
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4c8495
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push ebx
lea eax, [esp + 0x11c]
push eax
push esi
call fcn.004b6fe0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.004c2150
add esp, 0x1c
jmp 0x4c855b
lea edi, [ebp + 0x10a]
lea ebx, [ebp + 0x138]
lea esi, [esp + 0x98]
call fcn.004c8320
test eax, eax
jne 0x4c84ec
call fcn.0049e0be
mov esi, eax
call fcn.0049e0be
mov edx, dword [esi]
push 0x80
lea ecx, [esp + 0x11c]
push ecx
push edx
mov edi, eax
call fcn.004b6fe0
mov ecx, dword [esp + 0x20]
push eax
mov eax, dword [edi]
push eax
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ecx
call fcn.004c2150
add esp, 0x1c
jmp 0x4c855b
lea edi, [ebp + 0x5c]
mov ecx, 0xb
lea esi, [ebp + 0x10a]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ebx, [ebp + 0x16c]
lea edi, [ebp + 0x13c]
lea esi, [esp + 0x18]
call fcn.004c8320
test eax, eax
jne 0x4c8552
call fcn.0049e0be
mov esi, eax
call fcn.0049e0be
push 0x80
lea edx, [esp + 0x11c]
mov edi, eax
mov eax, dword [esi]
push edx
push eax
call fcn.004b6fe0
mov ecx, dword [edi]
mov edx, dword [esp + 0x20]
push eax
push ecx
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.004c2150
add esp, 0x1c
jmp 0x4c855b
push ebp
call fcn.004c82a0
add esp, 4
pop esi
pop ebx
mov ecx, dword [esp + 0x190]
pop edi
pop ebp
xor ecx, esp
call fcn.00499a1c
add esp, 0x18c
ret
Function at 0x4c8580
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x88
mov eax, dword [0x658aa8]
xor eax, esp
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x8c]
push esi
mov esi, dword [eax]
push 4
lea eax, [esp + 8]
push eax
push 1
push 6
push ecx
mov dword [esp + 0x18], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x4c85f7
push 0x80
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004b6fe0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004c2070
add esp, 0x18
pop esi
mov ecx, dword [esp + 0x84]
xor ecx, esp
call fcn.00499a1c
add esp, 0x88
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.004c2070
mov ecx, dword [esp + 0x90]
add esp, 8
pop esi
xor ecx, esp
call fcn.00499a1c
add esp, 0x88
ret

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

Disassembly:
mov eax, dword [esp + 4]
test byte [eax + 0x1fc], 1
je 0x4c878d
push eax
call fcn.004be9f0
add esp, 4
test eax, eax
jne 0x4c87ad
xor eax, eax
ret
mov eax, dword [eax + 0x1a8]
cmp eax, 0xffffffff
je 0x4c878a
push 2
push 1
lea ecx, [esp + 0xc]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x4c87ad
ret
mov eax, 1
ret
Function at 0x4d1e70
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
push str.Connected_for_receive
push 0x644ad4
push ecx
call fcn.004c2070
add esp, 0xc
mov eax, esi
mov dword [esi], 1
call fcn.004d0e90
test eax, eax
jne 0x4d1ea0
mov ecx, esi
jmp fcn.004d1340
ret
Function at 0x4d22d0
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x90
mov eax, dword [0x658aa8]
xor eax, esp
mov dword [esp + 0x8c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x9c]
mov ebx, dword [ebp + 0x398]
push esi
push edi
mov edi, dword [ebp]
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0x80
mov edx, dword [ebx + 0x154]
mov eax, dword [ebx + 0x15c]
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [ebx + 0x14]
push 0
add edx, 4
lea esi, [ebx + 0x15c]
push edx
push eax
push ecx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], edi
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [ebx + 0x148], 0
mov dword [ebx + 0x14c], eax
jne 0x4d2367
mov edx, dword [esp + 0x10]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [ebx + 0xc8]
push ecx
call fcn.004a26d0
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov dword [ebx + 0x148], edx
mov edx, dword [ebx + 0x14c]
cmp edx, 4
jge 0x4d23a2
push str.Received_too_short_packet
push edi
call fcn.004c2150
add esp, 8
mov dword [ebx + 0xc], 7
xor eax, eax
mov ecx, dword [esp + 0x9c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00499a1c
add esp, 0x90
ret
mov eax, esi
call fcn.004d1040
movzx eax, ax
mov dword [ebx + 0xc], eax
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x4d23bb
jmp dword [eax*4 + 0x4d24cc]
cmp edx, 4
jle case.0x4d23bb.4
mov eax, esi
call fcn.004d1050
movzx ecx, word [ebx + 0x40]
inc ecx
cmp cx, ax
jne case.0x4d23bb.4
add edx, 0xfffffffc
push edx
mov edx, dword [esi]
add edx, 4
push edx
push 1
push ebp
call fcn.004c25a0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4d240e
mov ecx, 5
mov eax, ebx
call fcn.004d2250
mov eax, esi
jmp 0x4d2389
mov eax, dword [ebx + 0x14c]
sub eax, 4
cdq
add dword [edi + 0xa0], eax
mov ecx, dword [edi + 0xa0]
adc dword [edi + 0xa4], edx
mov eax, dword [edi + 0xa4]
push eax
push ecx
push edi
call fcn.004e3dd0
add esp, 0xc
jmp case.0x4d23bb.4
mov ebp, dword [esi]
mov eax, esi
add ebp, 4
lea edi, [edx - 4]
call fcn.004d1050
movzx edx, ax
mov esi, ebp
mov dword [ebx + 8], edx
call fcn.004d1060
cmp eax, edi
jae 0x4d2470
mov eax, dword [esp + 0x18]
push ebp
push str.TFTP_error:__s_n
push eax
call fcn.004c2070
add esp, 0xc
mov ebp, dword [esp + 0x14]
push ebp
call fcn.004e4030
add esp, 4
test eax, eax
je 0x4d2387
mov ecx, 5
mov eax, ebx
call fcn.004d2250
mov eax, 0x2a
jmp 0x4d2389
mov ecx, dword [esi]
add edx, 0xfffffffe
push edx
add ecx, 2
push ecx
push ebx
call fcn.004d10e0
add esp, 0xc
test eax, eax
je case.0x4d23bb.4
jmp 0x4d2389
push str.Internal_error:_Unexpected_packet
push 0x637a18
push edi
call fcn.004c2150
add esp, 0xc
jmp case.0x4d23bb.4