joyce8/EMBER2024-capa huggingface dataset:
Function at 0x476d5f
Capabilities:
Persist via run registry key

Disassembly:
mov eax, 0x4a96a4
call fcn.004a8204
sub esp, 0x18
push ebx
push esi
push edi
mov ebx, ecx
xor edi, edi
cmp dword [ebx + 0x98], edi
je 0x476f46
cmp dword [ebx + 0xb4], edi
je 0x476f46
cmp dword [ebx + 0xf8], edi
je 0x476f46
mov dword [ebp - 0x10], edi
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 4], edi
call fcn.00405e57
push 0x4bad08
lea esi, [ebx + 0xc0]
mov byte [ebp - 4], 1
call fcn.00457ba6
test eax, eax
push edi
push dword [ebp - 0x14]
lea esi, [ebp - 0x10]
push reloc.OLEAUT32.dll_SysReAllocString
jne 0x476dd6
call fcn.00457bc5
jmp 0x476ddb
call fcn.004358fb
cmp eax, edi
jne 0x476dff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.00405bdc
cmp dword [ebp - 0x10], edi
je 0x476df8
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x476f49
call dword [0x4d65d8]
mov dword [ebp - 0x18], eax
lea eax, [ebx + 0x84]
cmp dword [eax + 0x18], 0x10
jb 0x476e19
mov esi, dword [eax + 4]
jmp 0x476e1c
lea esi, [eax + 4]
cmp esi, edi
je 0x476e32
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
cmp edi, 0x3fffffff
jle 0x476e36
xor eax, eax
jmp 0x476e4c
lea eax, [edi + edi]
call fcn.00488b30
mov eax, esp
push dword [ebp - 0x18]
push edi
push esi
mov esi, eax
call fcn.00408970
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00405e57
mov byte [ebp - 4], 2
mov eax, dword [0x4db1bc]
mov ecx, 0x4db1bc
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
lea eax, [ebx + 0xa0]
mov byte [ebp - 4], 3
cmp dword [eax + 0x18], 0x10
jb 0x476e82
mov esi, dword [eax + 4]
jmp 0x476e85
lea esi, [eax + 4]
test esi, esi
je 0x476e9b
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
cmp edi, 0x3fffffff
jle 0x476ea1
and dword [ebp - 0x1c], 0
jmp 0x476eba
lea eax, [edi + edi]
call fcn.00488b30
mov eax, esp
push dword [ebp - 0x18]
push edi
push esi
mov esi, eax
call fcn.00408970
mov dword [ebp - 0x1c], eax
cmp dword [ebx + 0x1c], 0x10
jb 0x476ec5
mov ebx, dword [ebx + 8]
jmp 0x476ec8
add ebx, 8
test ebx, ebx
je 0x476ede
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
cmp edi, 0x3fffffff
jle 0x476ee2
xor eax, eax
jmp 0x476ef6
lea eax, [edi + edi]
call fcn.00488b30
mov esi, esp
push dword [ebp - 0x18]
push edi
push ebx
call fcn.00408970
push dword [ebp - 0x1c]
push eax
push 0x4be9b0
lea eax, [ebp - 0x20]
call fcn.00406b6d
mov edi, dword [ebp - 0x20]
add esp, 0xc
push edi
push dword [ebp - 0x24]
lea esi, [ebp - 0x10]
call fcn.0043594f
lea eax, [edi - 0x10]
call fcn.00405bdc
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
call fcn.00405bdc
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.00405bdc
cmp dword [ebp - 0x10], 0
je 0x476f46
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
lea esp, [ebp - 0x30]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x477bfe
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 0x477c3b
cmp dword [ebp + 0x14], edi
je 0x477c3b
cmp ecx, edi
jne 0x477c42
call fcn.00481167
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.0047871b
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x477c56
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x477c77
cmp ebx, 0xffffffff
je 0x477c66
push ebx
push edi
push ecx
call fcn.0047a1f0
add esp, 0xc
cmp esi, edi
je 0x477c23
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x477c23
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x477c93
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x477c9a
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x477d8b
test word [esi + 0xc], 0x10c
je 0x477cee
mov eax, dword [esi + 4]
test eax, eax
je 0x477cee
jl 0x477dec
cmp ebx, eax
mov edi, ebx
jb 0x477cbf
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x477d93
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0047804d
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 0x477d83
cmp ebx, dword [ebp - 0xc]
jb 0x477d5b
cmp dword [ebp - 0xc], 0
je 0x477d18
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x477d0d
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x477d14
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x477d23
mov eax, SysReAllocString
cmp ebx, eax
ja 0x477d23
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x477dbf
push eax
push dword [ebp - 8]
push esi
call fcn.0047cac9
pop ecx
push eax
call fcn.004830a7
add esp, 0xc
test eax, eax
je 0x477dfe
cmp eax, 0xffffffff
je 0x477dec
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x477d83
push esi
call fcn.004829c6
cmp eax, 0xffffffff
pop ecx
je 0x477df0
cmp dword [ebp - 4], 0
je 0x477dbf
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 0x477ca2
mov eax, dword [ebp + 0x14]
jmp 0x477c3d
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x477daa
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.0047a1f0
add esp, 0xc
call fcn.00481167
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x477c33
cmp dword [ebp + 0xc], 0xffffffff
je 0x477dd5
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.0047a1f0
add esp, 0xc
call fcn.00481167
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x477c33
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x477c3d
or dword [esi + 0xc], 0x10
jmp 0x477df0
Function at 0x47ef5f
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x47ef8c
call fcn.0048117a
mov dword [eax], esi
call fcn.00481167
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.0047871b
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x47ef68
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x47efbb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0048118d
pop ecx
call fcn.00481167
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x47efe2
test al, 1
je 0x47efe2
test byte [esp + 0xc], 2
je 0x47efe2
call fcn.0048117a
mov dword [eax], 5
call fcn.00481167
mov dword [eax], 0xd
jmp 0x47efb2
xor eax, eax
pop esi
ret

Function at 0x47ff21
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4d52f8]
jne 0x47ff2b
repz ret
jmp fcn.0048e1ec

Function at 0x48813b
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 + 0x4d5e10]
je 0x488156
inc edi
cmp edi, 0x17
jb 0x488147
cmp edi, 0x17
jae 0x4882d6
push ebp
push 3
call fcn.0048ff66
cmp eax, 1
pop ecx
je 0x4882a2
push 3
call fcn.0048ff66
test eax, eax
pop ecx
jne 0x48818a
cmp dword [0x4d5150], 1
je 0x4882a2
cmp ebx, 0xfc
je 0x4882d5
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x4da7a0
push ebp
call fcn.0047f12d
add esp, 0xc
test eax, eax
je 0x4881c0
push esi
push esi
push esi
push esi
push esi
call fcn.0047861f
add esp, 0x14
push 0x104
mov esi, 0x4da7b9
push esi
push 0
mov byte [0x4da8bd], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x488204
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.0047f12d
add esp, 0xc
test eax, eax
je 0x488204
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0047861f
add esp, 0x14
push esi
call fcn.00478220
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x488249
push esi
call fcn.00478220
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x4daab4
push 0x4afb14
sub ecx, eax
push ecx
push eax
call fcn.0047c4d7
add esp, 0x14
test eax, eax
je 0x488249
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0047861f
add esp, 0x14
jmp 0x48824b
xor esi, esi
push 0x4afb10
push ebx
push ebp
call fcn.0048e549
add esp, 0xc
test eax, eax
je 0x48826b
push esi
push esi
push esi
push esi
push esi
call fcn.0047861f
add esp, 0x14
push dword [edi*8 + 0x4d5e14]
push ebx
push ebp
call fcn.0048e549
add esp, 0xc
test eax, eax
je 0x48828d
push esi
push esi
push esi
push esi
push esi
call fcn.0047861f
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.0048fda9
add esp, 0xc
jmp 0x4882d5
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x4882d5
cmp ebp, 0xffffffff
je 0x4882d5
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4d5e14]
push dword [esi]
call fcn.00478220
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 0x48fda9
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.004823d7
xor ebx, ebx
cmp dword [0x4db128], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x48fe7f
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x48ff5f
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x48ff5f
push eax
call fcn.00482369
mov dword [esp], 0x4b0598
push edi
mov dword [0x4db128], eax
call esi
push eax
call fcn.00482369
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x4db12c], eax
call esi
push eax
call fcn.00482369
mov dword [0x4db130], eax
lea eax, [ebp - 0xc]
push eax
call fcn.0047c856
test eax, eax
pop ecx
pop ecx
je 0x48fe4d
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0047861f
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x48fe7f
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00482369
cmp eax, ebx
pop ecx
mov dword [0x4db138], eax
je 0x48fe7f
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00482369
pop ecx
mov dword [0x4db134], eax
mov eax, dword [0x4db134]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x48ff04
cmp dword [0x4db138], ecx
je 0x48ff04
push eax
call fcn.004823e0
push dword [0x4db138]
mov esi, eax
call fcn.004823e0
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x48ff04
cmp edi, ebx
je 0x48ff04
call esi
cmp eax, ebx
je 0x48fed1
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x48fed1
test byte [ebp - 0x18], 1
jne 0x48ff04
lea eax, [ebp - 0x10]
push eax
call fcn.0047c88d
test eax, eax
pop ecx
je 0x48feec
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0047861f
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x48fefb
or dword [ebp + 0x10], 0x200000
jmp 0x48ff3f
or dword [ebp + 0x10], 0x40000
jmp 0x48ff3f
mov eax, dword [0x4db12c]
cmp eax, dword [ebp - 8]
je 0x48ff3f
push eax
call fcn.004823e0
cmp eax, ebx
pop ecx
je 0x48ff3f
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x48ff3f
mov eax, dword [0x4db130]
cmp eax, dword [ebp - 8]
je 0x48ff3f
push eax
call fcn.004823e0
cmp eax, ebx
pop ecx
je 0x48ff3f
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4db128]
call fcn.004823e0
cmp eax, ebx
pop ecx
je 0x48ff5f
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x48ff61
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x493ded
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x4d52f8]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.00493d2c
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.0047a1f0
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 0x493e3c
cmp dword [ebp - 0x1c], 5
jb 0x493e54
jmp 0x493e50
cmp dword [ebp - 0x10], 1
jne 0x493e54
cmp dword [ebp - 0x1c], 4
ja 0x493e50
jne 0x493e54
cmp dword [ebp - 0x18], 0
jbe 0x493e54
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4b0638
call fcn.00454f77
test eax, eax
jge 0x493e75
mov byte [0x4db260], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0047ff21
add ebp, 0x78
leave
ret

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

Disassembly:
cmp dword [0x4db1d8], 0
push esi
jne 0x494252
call fcn.0049417d
test eax, eax
je 0x494295
mov eax, dword [0x4db1d8]
cmp eax, 1
jne 0x494273
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x494295
pop esi
ret
push eax
call dword [0x4db1e0]
test eax, eax
jne 0x4942dd
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 0x494299
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x4db1d8]
call dword [0x4db1e0]
mov edi, eax
test edi, edi
je 0x4942c0
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x4942dc
lea edi, [esi + 0xff0]
push esi
push dword [0x4db1d8]
call dword [0x4db1dc]
add esi, 0x10
cmp esi, edi
jb 0x4942c6
mov eax, esi
pop edi
pop esi
ret
jmp 0x49423f

Function at 0x49436b
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x4d52f8]
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 0x4943ac
cmp byte [ebp - 0x194], 2
jne 0x4943a6
cmp byte [ebp - 0x193], 2
je 0x4943af
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047ff21
leave
ret

Function at 0x49c05d
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 0x49c08c
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 0x49c1ad
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x49c1cd
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 0x49c206
cmp eax, 2
jg 0x49c206
push dword [esi + 0xf0]
imul eax, eax, 3
push 1
add eax, 0x4b1430
push 2
push eax
call fcn.0047cc55
push dword [esi + 0xf0]
push 1
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.0047cc55
add esp, 0x20
xor eax, eax
ret

Function at 0x49c3cc
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 0x49c43e
push ebx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x2733
jne 0x49c418
and dword [ebp + 8], 0
mov dword [edi], 0x51
jmp 0x49c43d
push ebx
push esi
call fcn.004a557d
push eax
push str.Send_failure:__s
push dword [esi]
call fcn.0049c338
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 0x49caed
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x4d52f8]
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 0x49cc0a
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 0x49cb6a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004a557d
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.0049c338
add esp, 0x18
jmp 0x49cc11
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 0x49cb9d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004a557d
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x49cb5c
lea edi, [esi + 0xc8]
lea ebx, [esi + 0x9a]
lea esi, [ebp - 0x74]
call fcn.0049cab4
test eax, eax
jne 0x49cbd2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004a557d
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x80]
jmp 0x49cb5d
mov eax, dword [ebp - 0x78]
lea edi, [eax + 0xfc]
lea ebx, [eax + 0xcc]
lea esi, [ebp + 0xc]
call fcn.0049cab4
test eax, eax
jne 0x49cc07
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004a557d
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
jmp 0x49cbcd
mov esi, dword [ebp - 0x78]
push esi
call fcn.0049ca65
pop ecx
mov ecx, dword [ebp + 0x8c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047ff21
add ebp, 0x90
leave
ret

Function at 0x49cc29
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 0x49cc6e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004a557d
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0049c2c5
add esp, 0x14
jmp 0x49cc7b
push str.TCP_NODELAY_set_n
push esi
call fcn.0049c2c5
pop ecx
pop ecx
pop esi
leave
ret
Function at 0x49d0d2
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 0x49d125
mov ecx, dword [ecx + 0x514]
mov ecx, dword [ecx]
lea eax, [ecx + eax*4]
cmp dword [eax], 0
je 0x49d125
mov ecx, dword [ebp + 0xc]
test ecx, ecx
mov eax, dword [eax]
je 0x49d0ff
mov dword [ecx], eax
cmp dword [eax + 0x144], 0
mov esi, dword [eax + 0x12c]
jne 0x49d125
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x49d125
mov eax, esi
jmp 0x49d128
or eax, 0xffffffff
pop esi
pop ebp
ret
Function at 0x49e1fa
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 0x49e36c
push esi
mov esi, dword [ebp - 0x10]
test esi, esi
mov dword [ebp - 0xc], esi
je 0x49e351
push ebx
push edi
jmp 0x49e242
mov esi, dword [ebp - 0xc]
cmp dword [esi + 4], 2
jne 0x49e2e5
cmp dword [esi + 0x18], 0
je 0x49e2e5
mov eax, dword [esi + 0x10]
test eax, eax
jbe 0x49e2e5
push 0x10
pop edi
cmp eax, edi
jb 0x49e2e5
push 0x20
call dword [0x4d65dc]
mov ebx, eax
xor eax, eax
cmp ebx, eax
pop ecx
je 0x49e2f5
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 [0x4d65dc]
test eax, eax
pop ecx
mov dword [ebx + 0x18], eax
je 0x49e2fe
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 0x49e2cc
push eax
call dword [0x4d65e8]
test eax, eax
pop ecx
mov dword [ebx + 0x14], eax
je 0x49e30e
cmp dword [ebp - 4], 0
jne 0x49e2d5
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x49e2df
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 0x49e23f
jmp 0x49e327
mov dword [ebp - 8], 8
jmp 0x49e327
push ebx
mov dword [ebp - 8], 8
call dword [0x4d65e0]
jmp 0x49e326
push dword [ebx + 0x18]
mov dword [ebp - 8], 8
call dword [0x4d65e0]
push ebx
call dword [0x4d65e0]
pop ecx
pop ecx
xor esi, esi
cmp dword [ebp - 0x10], esi
pop edi
pop ebx
je 0x49e339
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 8], esi
je 0x49e34c
push dword [ebp - 4]
call fcn.0049e1be
pop ecx
mov dword [ebp - 4], esi
jmp 0x49e360
cmp dword [ebp - 4], esi
jne 0x49e360
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 0x49e6be
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 [0x4d65ec]
mov esi, eax
xor eax, eax
cmp esi, eax
pop ecx
pop ecx
mov dword [ebp - 4], 0xc
mov dword [edi + 0x3ac], esi
je 0x49e770
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.0049e57a
test eax, eax
pop ecx
pop ecx
je 0x49e770
lea ebx, [edi + 0x398]
push dword [ebx]
call fcn.00494a59
push dword [ebp + 8]
call dword [0x4d65e8]
test eax, eax
pop ecx
pop ecx
mov dword [ebx], eax
je 0x49e770
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
je 0x49e770
lea eax, [esi + 0x10]
push eax
push 0x49e5ee
call fcn.004a5da5
test eax, eax
pop ecx
pop ecx
mov dword [esi], eax
jne 0x49e78a
call fcn.00481167
mov eax, dword [eax]
mov dword [ebp - 4], eax
add edi, 0x398
push edi
call fcn.0049e66c
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x49e78d
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret