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

Disassembly:
push ebp
lea ebp, [esp - 0xa0]
sub esp, 0x120
mov eax, dword [0x513454]
xor eax, ebp
mov dword [ebp + 0x9c], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x74]
push eax
xor ebx, ebx
mov esi, 0x20019
push esi
push ebx
push str.SystemCurrentControlSetControlNetwork4D36E972_E325_11CE_BFC1_08002BE10318
push reloc.OLEAUT32.dll_SysReAllocString
mov edi, ecx
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x48afdf
push edi
lea eax, [ebp - 0x6c]
push str._sConnection
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x70]
push eax
push esi
push ebx
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x48afdf
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x80]
push eax
push ebx
push str.MediaSubType
push dword [ebp - 0x70]
mov edi, 0x104
mov dword [ebp - 0x80], 1
mov dword [ebp - 0x78], edi
call esi
test eax, eax
jne 0x48af9d
cmp dword [ebp - 0x6c], 1
jne 0x48afdf
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x80]
push eax
push ebx
push str.PnpInstanceID
push dword [ebp - 0x70]
mov dword [ebp - 0x78], edi
call esi
test eax, eax
jne 0x48afdf
mov esi, 0x501868
push esi
call fcn.00494970
push eax
lea eax, [ebp - 0x6c]
push esi
push eax
call fcn.00497ba6
add esp, 0x10
test eax, eax
jne 0x48afdf
mov dword [ebp - 0x7c], 1
cmp dword [ebp - 0x70], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x48afef
push dword [ebp - 0x70]
call esi
cmp dword [ebp - 0x74], ebx
je 0x48aff9
push dword [ebp - 0x74]
call esi
mov ecx, dword [ebp + 0x9c]
mov eax, dword [ebp - 0x7c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049b84b
add ebp, 0xa0
leave
ret

Function at 0x48ba36
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0xa0
mov eax, dword [0x513454]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
push 0x9a
lea eax, [ebp - 0x27]
push 0
push eax
mov byte [ebp - 0x28], 0
call fcn.004923b0
add esp, 0xc
push 0x9b
lea eax, [ebp - 0x28]
push eax
xor esi, esi
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x48ba8d
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x48ba8d
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov esi, dword [eax]
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0049b84b
add ebp, 0x78
leave
ret
Function at 0x48ba9f
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e2a31
mov eax, dword fs:[0]
push eax
mov eax, 0x385c
call fcn.004a68e0
mov eax, dword [0x513454]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x371c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x3718], eax
lea eax, [ebp - 0x3760]
or esi, 0xffffffff
call fcn.00423603
lea eax, [ebp - 0x3710]
call fcn.0042c239
xor edi, edi
mov dword [ebp - 4], edi
mov eax, dword [0x519a54]
mov ecx, 0x519a54
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x3714], ebx
push 0x18e
lea eax, [ebp - 0x19e]
push edi
mov byte [ebp - 4], 1
push eax
mov word [ebp - 0x1a0], di
call fcn.004923b0
add esp, 0xc
lea eax, [ebp - 0x1a0]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp eax, edi
jne 0x48bc17
mov edi, dword [ebp - 0x371c]
lea eax, [ebp - 0x3760]
push eax
lea eax, [ebp - 0x3710]
push eax
mov dword [ebp - 0x375c], str.POST
call fcn.0042c384
test al, al
je 0x48bc11
cmp dword [ebp - 0x1c4], 0xc8
jne 0x48bc11
mov eax, dword [ebp - 0x1b8]
mov ecx, dword [ebp - 0x2648]
push dword [ebp - 0x1bc]
add ecx, eax
add ecx, dword [ebp - 0x1b4]
lea eax, [ebp - 0x3714]
push ecx
call fcn.0042702b
push 0x4f6898
lea eax, [ebp - 0x3714]
push eax
call fcn.00427008
mov ebx, dword [ebp - 0x3714]
push ebx
lea esi, [ebp - 0x3864]
call fcn.004020e1
mov byte [ebp - 4], 2
push dword [eax]
push dword [ebp - 0x3718]
call fcn.00401b70
lea eax, [ebp - 0x3860]
mov byte [ebp - 4], 1
cmp dword [ebp - 0x3864], eax
je 0x48bc04
push dword [ebp - 0x3864]
call fcn.00492a2f
pop ecx
mov eax, dword [ebp - 0x3718]
call fcn.004270e9
xor esi, esi
call dword [sym.imp.WS2_32.dll_WSACleanup]
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 0
call fcn.0040153b
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3710]
call fcn.00427f77
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049b84b
leave
ret
Function at 0x48bd2f
Capabilities:
Encode data using xor

Disassembly:
push ebp
sub esp, 0x80
lea ebp, [esp - 4]
mov eax, dword [0x513454]
xor eax, ebp
mov dword [ebp + 0x80], eax
push 0x128
mov eax, 0x4e251f
call fcn.0049bf27
mov eax, dword [ebp + 0x8c]
xor ebx, ebx
mov dword [ebp - 0x18], ebx
push 0x7f
mov dword [ebp - 0x14], eax
xor edi, edi
lea eax, [ebp + 1]
push ebx
inc edi
push eax
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], 2
mov dword [ebp - 0x28], 3
mov dword [ebp - 0x24], 4
mov dword [ebp - 0x20], 5
mov byte [ebp], bl
call fcn.004923b0
add esp, 0xc
push str.mo:_72Bilrqgb8ls5kn8z
lea esi, [ebp - 0xb4]
call fcn.00427f5c
mov dword [ebp - 4], edi
mov esi, dword [eax]
cmp esi, ebx
je 0x48bde6
push esi
call fcn.00494970
test eax, eax
pop ecx
mov dword [ebp - 0x1c], eax
jle 0x48bde6
mov dword [ebp - 0x10], esi
lea eax, [ebp]
sub dword [ebp - 0x10], eax
mov eax, ebx
cdq
push 5
pop esi
idiv esi
lea ecx, [ebp + ebx]
mov al, byte [ebp + edx*4 - 0x30]
mov edx, dword [ebp - 0x10]
xor al, byte [edx + ecx]
inc ebx
cmp ebx, dword [ebp - 0x1c]
mov byte [ecx], al
jl 0x48bdc8
lea eax, [ebp - 0xb0]
mov byte [ebp - 4], 0
cmp dword [ebp - 0xb4], eax
je 0x48be04
push dword [ebp - 0xb4]
call fcn.00492a2f
pop ecx
lea eax, [ebp]
push eax
lea esi, [ebp - 0x134]
call fcn.004020e1
mov dword [ebp - 4], 2
push dword [eax]
mov eax, dword [ebp - 0x14]
call fcn.004019de
lea eax, [ebp - 0x130]
mov byte [ebp - 4], 0
cmp dword [ebp - 0x134], eax
mov dword [ebp - 0x18], edi
je 0x48be45
push dword [ebp - 0x134]
call fcn.00492a2f
pop ecx
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x80]
xor ecx, ebp
call fcn.0049b84b
add ebp, 0x84
leave
ret

Function at 0x490db1
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x513454]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.00490cf0
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.004923b0
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 0x490e00
cmp dword [ebp - 0x1c], 5
jb 0x490e18
jmp 0x490e14
cmp dword [ebp - 0x10], 1
jne 0x490e18
cmp dword [ebp - 0x1c], 4
ja 0x490e14
jne 0x490e18
cmp dword [ebp - 0x18], 0
jbe 0x490e18
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4e49dc
call fcn.004393a3
test eax, eax
jge 0x490e39
mov byte [0x51baa8], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0049b84b
add ebp, 0x78
leave
ret
Function at 0x491281
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x519a70], 0
push esi
jne 0x4911f4
call fcn.0049111f
test eax, eax
je 0x491237
mov eax, dword [0x519a70]
cmp eax, 1
jne 0x491215
push 0xd
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
test eax, eax
je 0x491237
pop esi
ret
push eax
call dword [0x519a78]
test eax, eax
jne 0x49127f
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 0x49123b
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x519a70]
call dword [0x519a78]
mov edi, eax
test edi, edi
je 0x491262
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.DLL_VirtualFree]
mov eax, edi
jmp 0x49127e
lea edi, [esi + 0xff0]
push esi
push dword [0x519a70]
call dword [0x519a74]
add esi, 0x10
cmp esi, edi
jb 0x491268
mov eax, esi
pop edi
pop esi
ret
jmp 0x4911e1

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

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x4946d3
call fcn.00497f81
mov dword [eax], esi
call fcn.00497f6e
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.004933e2
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x4946af
push dword [esp + 8]
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x494702
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call fcn.00497f94
pop ecx
call fcn.00497f6e
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x494729
test al, 1
je 0x494729
test byte [esp + 0xc], 2
je 0x494729
call fcn.00497f81
mov dword [eax], 5
call fcn.00497f6e
mov dword [eax], 0xd
jmp 0x4946f9
xor eax, eax
pop esi
ret
Function at 0x4994ee
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 0x49952b
cmp dword [ebp + 0x14], edi
je 0x49952b
cmp ecx, edi
jne 0x499532
call fcn.00497f6e
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.004933e2
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x499546
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x499567
cmp ebx, 0xffffffff
je 0x499556
push ebx
push edi
push ecx
call fcn.004923b0
add esp, 0xc
cmp esi, edi
je 0x499513
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x499513
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x499583
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x49958a
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x49967b
test word [esi + 0xc], 0x10c
je 0x4995de
mov eax, dword [esi + 4]
test eax, eax
je 0x4995de
jl 0x4996dc
cmp ebx, eax
mov edi, ebx
jb 0x4995af
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x499683
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.004926c7
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 0x499673
cmp ebx, dword [ebp - 0xc]
jb 0x49964b
cmp dword [ebp - 0xc], 0
je 0x499608
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x4995fd
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x499604
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x499613
mov eax, SysReAllocString
cmp ebx, eax
ja 0x499613
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x4996af
push eax
push dword [ebp - 8]
push esi
call fcn.004a8f41
pop ecx
push eax
call fcn.004a8e44
add esp, 0xc
test eax, eax
je 0x4996ee
cmp eax, 0xffffffff
je 0x4996dc
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x499673
push esi
call fcn.004a8763
cmp eax, 0xffffffff
pop ecx
je 0x4996e0
cmp dword [ebp - 4], 0
je 0x4996af
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 0x499592
mov eax, dword [ebp + 0x14]
jmp 0x49952d
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x49969a
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.004923b0
add esp, 0xc
call fcn.00497f6e
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x499523
cmp dword [ebp + 0xc], 0xffffffff
je 0x4996c5
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.004923b0
add esp, 0xc
call fcn.00497f6e
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x499523
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x49952d
or dword [esi + 0xc], 0x10
jmp 0x4996e0
Function at 0x49b84b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x513454]
jne 0x49b855
repz ret
jmp fcn.004aca79

Function at 0x4a4017
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 + 0x513bf0]
je 0x4a4032
inc edi
cmp edi, 0x17
jb 0x4a4023
cmp edi, 0x17
jae 0x4a41b2
push ebp
push 3
call fcn.004aec6d
cmp eax, 1
pop ecx
je 0x4a417e
push 3
call fcn.004aec6d
test eax, eax
pop ecx
jne 0x4a4066
cmp dword [0x513450], 1
je 0x4a417e
cmp ebx, 0xfc
je 0x4a41b1
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x519f00
push ebp
call fcn.00497ff7
add esp, 0xc
test eax, eax
je 0x4a409c
push esi
push esi
push esi
push esi
push esi
call fcn.004932e6
add esp, 0x14
push 0x104
mov esi, 0x519f19
push esi
push 0
mov byte [0x51a01d], 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x4a40e0
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00497ff7
add esp, 0xc
test eax, eax
je 0x4a40e0
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.004932e6
add esp, 0x14
push esi
call fcn.00494970
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4a4125
push esi
call fcn.00494970
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x51a214
push 0x4e5db4
sub ecx, eax
push ecx
push eax
call fcn.004a7663
add esp, 0x14
test eax, eax
je 0x4a4125
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.004932e6
add esp, 0x14
jmp 0x4a4127
xor esi, esi
push 0x4e5db0
push ebx
push ebp
call fcn.004a75f2
add esp, 0xc
test eax, eax
je 0x4a4147
push esi
push esi
push esi
push esi
push esi
call fcn.004932e6
add esp, 0x14
push dword [edi*8 + 0x513bf4]
push ebx
push ebp
call fcn.004a75f2
add esp, 0xc
test eax, eax
je 0x4a4169
push esi
push esi
push esi
push esi
push esi
call fcn.004932e6
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004aeab0
add esp, 0xc
jmp 0x4a41b1
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.DLL_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x4a41b1
cmp ebp, 0xffffffff
je 0x4a41b1
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x513bf4]
push dword [esi]
call fcn.00494970
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 0x4aeab0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0049fe5a
xor ebx, ebx
cmp dword [0x51a888], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4aeb86
push str.USER32.DLL
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4aec66
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x4aec66
push eax
call fcn.0049fdec
mov dword [esp], 0x4e8218
push edi
mov dword [0x51a888], eax
call esi
push eax
call fcn.0049fdec
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x51a88c], eax
call esi
push eax
call fcn.0049fdec
mov dword [0x51a890], eax
lea eax, [ebp - 0xc]
push eax
call fcn.004a3da4
test eax, eax
pop ecx
pop ecx
je 0x4aeb54
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004932e6
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4aeb86
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0049fdec
cmp eax, ebx
pop ecx
mov dword [0x51a898], eax
je 0x4aeb86
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0049fdec
pop ecx
mov dword [0x51a894], eax
mov eax, dword [0x51a894]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x4aec0b
cmp dword [0x51a898], ecx
je 0x4aec0b
push eax
call fcn.0049fe63
push dword [0x51a898]
mov esi, eax
call fcn.0049fe63
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x4aec0b
cmp edi, ebx
je 0x4aec0b
call esi
cmp eax, ebx
je 0x4aebd8
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4aebd8
test byte [ebp - 0x18], 1
jne 0x4aec0b
lea eax, [ebp - 0x10]
push eax
call fcn.004a3ddb
test eax, eax
pop ecx
je 0x4aebf3
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004932e6
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x4aec02
or dword [ebp + 0x10], 0x200000
jmp 0x4aec46
or dword [ebp + 0x10], 0x40000
jmp 0x4aec46
mov eax, dword [0x51a88c]
cmp eax, dword [ebp - 8]
je 0x4aec46
push eax
call fcn.0049fe63
cmp eax, ebx
pop ecx
je 0x4aec46
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x4aec46
mov eax, dword [0x51a890]
cmp eax, dword [ebp - 8]
je 0x4aec46
push eax
call fcn.0049fe63
cmp eax, ebx
pop ecx
je 0x4aec46
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x51a888]
call fcn.0049fe63
cmp eax, ebx
pop ecx
je 0x4aec66
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4aec68
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4bb068
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x513454]
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 0x4bb0a9
cmp byte [ebp - 0x194], 2
jne 0x4bb0a3
cmp byte [ebp - 0x193], 2
je 0x4bb0ac
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049b84b
leave
ret

Function at 0x4c2d5a
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 0x4c2d89
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 0x4c2eaa
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x4c2eca
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 0x4c2f03
cmp eax, 2
jg 0x4c2f03
push dword [esi + 0xf0]
imul eax, eax, 3
push 1
add eax, 0x4e9518
push 2
push eax
call fcn.0049a917
push dword [esi + 0xf0]
push 1
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.0049a917
add esp, 0x20
xor eax, eax
ret

Function at 0x4c30c9
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 0x4c313b
push ebx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x2733
jne 0x4c3115
and dword [ebp + 8], 0
mov dword [edi], 0x51
jmp 0x4c313a
push ebx
push esi
call fcn.004cc27a
push eax
push str.Send_failure:__s
push dword [esi]
call fcn.004c3035
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 0x4c37ea
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x513454]
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 0x4c3907
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 0x4c3867
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004cc27a
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.004c3035
add esp, 0x18
jmp 0x4c390e
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 0x4c389a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004cc27a
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4c3859
lea edi, [esi + 0xc8]
lea ebx, [esi + 0x9a]
lea esi, [ebp - 0x74]
call fcn.004c37b1
test eax, eax
jne 0x4c38cf
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004cc27a
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x80]
jmp 0x4c385a
mov eax, dword [ebp - 0x78]
lea edi, [eax + 0xfc]
lea ebx, [eax + 0xcc]
lea esi, [ebp + 0xc]
call fcn.004c37b1
test eax, eax
jne 0x4c3904
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004cc27a
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
jmp 0x4c38ca
mov esi, dword [ebp - 0x78]
push esi
call fcn.004c3762
pop ecx
mov ecx, dword [ebp + 0x8c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049b84b
add ebp, 0x90
leave
ret

Function at 0x4c3926
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 0x4c396b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004cc27a
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004c2fc2
add esp, 0x14
jmp 0x4c3978
push str.TCP_NODELAY_set_n
push esi
call fcn.004c2fc2
pop ecx
pop ecx
pop esi
leave
ret
Function at 0x4c3dcf
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 0x4c3e22
mov ecx, dword [ecx + 0x514]
mov ecx, dword [ecx]
lea eax, [ecx + eax*4]
cmp dword [eax], 0
je 0x4c3e22
mov ecx, dword [ebp + 0xc]
test ecx, ecx
mov eax, dword [eax]
je 0x4c3dfc
mov dword [ecx], eax
cmp dword [eax + 0x144], 0
mov esi, dword [eax + 0x12c]
jne 0x4c3e22
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4c3e22
mov eax, esi
jmp 0x4c3e25
or eax, 0xffffffff
pop esi
pop ebp
ret