joyce8/EMBER2024-capa huggingface dataset:
Function at 0x504204
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov eax, 0x69ee98
call fcn.006375a8
sub esp, 0x50
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov ecx, 0x9c
mov dword [ebp - 0x14], ebx
push edi
mov eax, dword [esi + 8]
sub eax, dword [esi + 4]
cdq
idiv ecx
add eax, 1
je 0x504356
lea edi, [esi + 0x28]
and dword [ebp - 0x1c], 0
xor eax, eax
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
and dword [ebp - 4], eax
test ebx, ebx
jne 0x504283
push dword [esi + 0x24]
push dword [esi + 0x20]
call fcn.004918b1
push eax
lea eax, [ebp - 0x5c]
push str._sPartFile__LX.dat
push eax
call fcn.004638e7
add esp, 0x14
lea ecx, [ebp - 0x2c]
push eax
call fcn.0042623d
push ebx
push 1
lea ecx, [ebp - 0x5c]
call fcn.004267c2
mov byte [ebp - 0x10], bl
jmp 0x5042b4
imul edi, ebx, 0x9c
lea ecx, [ebp - 0x2c]
mov ebx, dword [esi + 4]
lea eax, [ebx - 0x68]
add eax, edi
cmp ecx, eax
je 0x5042a2
push 0xffffffffffffffff
push 0
push eax
call fcn.0042692e
mov al, byte [edi + ebx - 0x36]
lea edi, [esi + 0x28]
mov ebx, dword [ebp - 0x14]
shr al, 2
and al, 1
mov byte [ebp - 0x10], al
push 0
lea eax, [ebp - 0x2c]
push eax
sub esp, 0x18
mov ecx, esp
push dword [ebp + 8]
call fcn.0042615e
lea eax, [ebp - 0x44]
push eax
call fcn.0045e7e8
cmp dword [ebp - 0x30], 8
mov eax, dword [ebp - 0x44]
mov byte [ebp - 4], 1
jae 0x5042e0
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x504303
cmp dword [ebp - 0x30], 8
mov ecx, dword [ebp - 0x44]
jae 0x5042f8
lea ecx, [ebp - 0x44]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
push 1
push dword [ebp - 0x10]
lea eax, [ebp - 0x2c]
push dword [ebp + 8]
push edi
push eax
push eax
call fcn.00503c61
push 0
lea ecx, [ebp - 0x44]
mov edi, eax
push 1
call fcn.004267c2
lea ecx, [ebp - 0x2c]
push 0
push 1
test edi, edi
jne 0x504372
or dword [ebp - 4], 0xffffffff
call fcn.004267c2
mov eax, dword [esi + 8]
lea edi, [esi + 0x28]
sub eax, dword [esi + 4]
mov ecx, 0x9c
cdq
inc ebx
idiv ecx
mov dword [ebp - 0x14], ebx
inc eax
cmp ebx, eax
jne 0x504235
mov ecx, esi
call fcn.00502e73
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.004267c2
mov eax, edi
jmp 0x50435f
Function at 0x504e15
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
mov eax, 0x69ef2a
call fcn.006375a8
sub esp, 0x60
and dword [ebp - 0x10], 0
push ebx
push esi
push edi
mov edi, ecx
xor bl, bl
lea esi, [edi + 0x28]
cmp dword [esi + 0x14], 8
jb 0x504e3a
mov eax, dword [esi]
jmp 0x504e3c
mov eax, esi
push eax
call fcn.0045eb30
push esi
test al, al
je 0x504e56
lea ecx, [ebp - 0x6c]
call fcn.0042615e
mov ecx, eax
xor eax, eax
inc eax
jmp 0x504e64
lea eax, [ebp - 0x54]
push eax
call fcn.00470d3f
push 2
mov ecx, eax
pop eax
push ecx
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x10], eax
call fcn.0042613c
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], 1
test al, 2
je 0x504e93
push 0
and eax, 0xfffffffd
lea ecx, [ebp - 0x54]
push 1
mov dword [ebp - 0x10], eax
call fcn.004267c2
mov eax, dword [ebp - 0x10]
mov byte [ebp - 4], 2
test al, 1
je 0x504ea7
push 0
push 1
lea ecx, [ebp - 0x6c]
call fcn.004267c2
lea eax, [ebp - 0x3c]
mov ecx, edi
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.005034e3
xor esi, esi
cmp dword [ebp - 0x14], esi
jbe 0x504f30
push esi
lea ecx, [ebp - 0x24]
call fcn.005302e7
cmp dword [eax + 0x14], 8
jb 0x504ece
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
mov edx, dword [ebp - 0x14]
mov ecx, eax
cmp ecx, 0xffffffff
je 0x504efb
test cl, 0x10
jne 0x504f2e
lea eax, [edx - 1]
cmp esi, eax
je 0x504f06
test ecx, 0x1000
jne 0x504f02
test ecx, 0x400
jne 0x504f02
inc esi
cmp esi, edx
jb 0x504ebd
jmp 0x504f30
xor bl, bl
jmp 0x504f30
push esi
lea ecx, [ebp - 0x24]
call fcn.005302e7
cmp dword [eax + 0x14], 8
jb 0x504f17
mov eax, dword [eax]
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_GetVolumeInformationW]
test eax, eax
setne bl
jmp 0x504f30
mov bl, 1
lea ecx, [ebp - 0x24]
call fcn.0047379d
push 8
push 1
push dword [ebp - 0x24]
call fcn.004266bf
and dword [ebp - 0x24], 0
lea ecx, [ebp - 0x3c]
push 0
push 1
call fcn.004267c2
mov ecx, dword [ebp - 0xc]
mov al, bl
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
Function at 0x505cdb
Capabilities:
Access peb ldr_data
Get kernel32 base address
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x69efe8
call fcn.006375a8
push ecx
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x10], esi
call fcn.00519c6e
xor ebx, ebx
mov dword [esi + 0xc], 0x6d9244
mov dword [ebp - 4], ebx
mov dword [esi + 0x10], 0x6b6d64
mov dword [esi + 0x14], ebx
mov eax, dword [ebp + 0xc]
mov dl, byte [ebp + 8]
mov dword [esi], 0x6d92c8
mov dword [esi + 0xc], 0x6d9660
mov dword [esi + 0x10], 0x6d981c
mov byte [esi + 0x18], dl
mov dword [esi + 0x1c], ebx
mov byte [esi + 0x24], bl
mov dword [esi + 0x28], ebx
mov byte [esi + 0x30], bl
mov ecx, dword [eax]
movzx eax, dl
push eax
push ecx
lea ecx, [esi + 0x34]
mov byte [ebp - 4], 2
call fcn.00502151
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x64], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x40], ebx
mov dword [esi + 0x44], ebx
mov dword [esi + 0x48], ebx
mov dword [esi + 0x4c], ebx
mov dword [esi + 0x50], ebx
mov dword [esi + 0x54], ebx
mov dword [esi + 0x58], ebx
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x60], ebx
mov dword [esi + 0x68], eax
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x70], ebx
mov dword [esi + 0x74], ebx
mov dword [esi + 0x78], ebx
push 0x7abd30
mov dword [esi + 0x7c], ebx
mov dword [esi + 0x2c], ebx
call dword [sym.imp.KERNEL32.DLL_InterlockedIncrement]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x20], eax
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x507d1c
Capabilities:
Get memory capacity

Disassembly:
mov eax, 0x6ae060
call fcn.006375a8
sub esp, 0x24
push esi
push edi
mov al, 1
mov ecx, 0x7abd35
xchg byte [ecx], al
push str.ntdll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
push str.NtSetInformationFile
push eax
mov dword [0x7ac1f8], eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push 0xc
mov dword [0x79e1e0], eax
call fcn.00637305
pop ecx
mov ecx, eax
mov dword [ebp - 0x10], ecx
test ecx, ecx
je 0x507d88
mov edi, ecx
xor eax, eax
xor esi, esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ecx + 4], 0x6b6d64
mov dword [ecx + 8], esi
mov dword [ecx], 0x6d9b24
mov dword [ecx + 4], 0x6d9b38
jmp 0x507d8c
xor esi, esi
mov ecx, esi
mov dword [ebp - 0x10], ecx
test ecx, ecx
je 0x507d99
mov eax, dword [ecx]
push ecx
call dword [eax + 4]
lea eax, [ebp - 0x10]
mov dword [ebp - 4], esi
push eax
call fcn.00536270
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], 1
test eax, eax
je 0x507db9
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
or dword [ebp - 4], 0xffffffff
mov edi, 0x6c7038
push 0x6d9bfc
push edi
call fcn.00462194
push str.SetFileValidData
push edi
mov dword [0x7ac1c4], eax
call fcn.00462194
mov dword [0x7ac1c8], eax
test eax, eax
je 0x507df7
push 2
push str.SeManageVolumePrivilege
call fcn.00460146
mov byte [0x7ac1a4], al
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.DLL_CreateEventA]
push 0x6d9c40
push 0x7ac1cc
mov dword [0x7ac1a8], eax
call fcn.00469208
push 0x6d9c44
push 0x7ada00
call fcn.00469208
push 0x6d9c48
push 0x7ac1ac
call fcn.00469208
call fcn.004f151c
push 0x6d9c4c
push 0x77f980
call fcn.004f156d
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalMemoryStatus]
mov ecx, 0x8000000
cmp dword [ebp - 0x28], ecx
push esi
sbb eax, eax
and eax, 0xf8800000
add eax, ecx
push eax
push esi
push dword [ebp - 0x28]
mov dword [0x7abd3c], eax
push str.total_physical_memory__Ld_max_disk_cache__Ld
call fcn.00479bc5
add esp, 0x14
call fcn.00542ab2
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
Function at 0x50a2e2
Capabilities:
Clear file content
Get file attributes

Disassembly:
push ebp
mov ebp, esp
cmp byte [0x7ac1a4], 0
push ebx
push esi
push edi
je 0x50a2fe
cmp byte [0x7abd41], 0
je 0x50a2fe
xor bl, bl
jmp 0x50a300
mov bl, 1
cmp byte [ebp + 0x20], 0
mov edi, dword [ebp + 8]
je 0x50a338
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14], 8
jb 0x50a314
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
test eax, 0x200
je 0x50a35b
push 0
lea eax, [ebp + 8]
mov byte [ebp + 0x23], 0
push eax
push 0
push 0
push 1
lea eax, [ebp + 0x23]
push eax
jmp 0x50a34f
cmp byte [0x7abd40], 0
je 0x50a35b
push 0
lea eax, [ebp + 8]
push eax
push 0
push 0
push 0
push 0
push 0x900c4
push edi
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
cmp byte [ebp + 0x1c], 0
jne 0x50a3cc
mov esi, dword [ebp + 0x10]
add esi, 8
mov byte [0x7abd34], 1
test bl, bl
je 0x50a37f
push dword [esi + 4]
push dword [esi]
push edi
call fcn.0045fde3
jmp 0x50a39e
push 0
push dword [esi + 4]
push dword [esi]
push edi
call fcn.0045fb50
and eax, edx
cmp eax, 0xffffffff
je 0x50a3d6
push edi
call dword [sym.imp.KERNEL32.DLL_SetEndOfFile]
test eax, eax
je 0x50a3d6
cmp byte [0x7ac1a4], 0
je 0x50a3c5
cmp byte [0x7abd41], 0
je 0x50a3c5
cmp byte [0x7abd40], 0
jne 0x50a3c5
push dword [esi + 4]
push dword [esi]
push edi
call dword [0x7ac1c8]
mov byte [0x7abd34], 0
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
pop ebp
ret 0x1c
mov byte [0x7abd34], 0
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
xor eax, eax
jmp 0x50a3cf

Function at 0x50bcf0
Capabilities:
Resume thread
Suspend thread

Disassembly:
mov eax, 0x6a284e
call fcn.006375a8
sub esp, 0x14
push ebx
xor ebx, ebx
mov byte [ebp - 0xd], 1
push edi
mov edi, ecx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
lea eax, [ebp - 0x20]
mov dword [ebp - 4], ebx
push eax
push dword [edi + 4]
call fcn.0050ba74
test al, al
je 0x50bdaa
mov ecx, dword [ebp - 0x1c]
mov eax, ecx
mov edx, dword [ebp - 0x20]
sub eax, edx
sar eax, 2
push esi
mov esi, ebx
test eax, eax
je 0x50bd7b
push dword [edx + esi*4]
call dword [sym.imp.KERNEL32.DLL_SuspendThread]
cmp eax, 0xffffffff
jne 0x50bd66
mov byte [ebp - 0xd], bl
mov edi, ebx
test esi, esi
jle 0x50bd66
mov eax, dword [ebp - 0x20]
push dword [eax + edi*4]
call dword [sym.imp.KERNEL32.DLL_ResumeThread]
inc edi
cmp edi, esi
jl 0x50bd55
mov ecx, dword [ebp - 0x1c]
inc esi
mov edx, dword [ebp - 0x20]
mov eax, ecx
sub eax, edx
sar eax, 2
cmp esi, eax
jb 0x50bd3e
mov edi, dword [ebp - 0x14]
sub ecx, edx
sar ecx, 2
pop esi
test ecx, ecx
je 0x50bd9e
push dword [edx + ebx*4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 0x1c]
inc ebx
mov edx, dword [ebp - 0x20]
sub eax, edx
sar eax, 2
cmp ebx, eax
jb 0x50bd85
mov al, byte [ebp - 0xd]
test al, al
je 0x50bda8
inc dword [edi + 0x14]
mov bl, al
lea ecx, [ebp - 0x20]
call fcn.005271d7
mov ecx, dword [ebp - 0xc]
mov al, bl
pop edi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
Function at 0x50be5c
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x69f779
call fcn.006375a8
sub esp, 0x38
and dword [ebp - 0x14], 0
push ebx
push esi
push edi
mov edi, ecx
lea ebx, [edi + 0xd0]
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x50be7d
push 0
lea eax, [ebp - 0x14]
sub esi, ecx
push eax
mov eax, 0xbb7
sub eax, esi
push eax
lea eax, [ebx + esi]
push eax
push dword [edi + 0xa8]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
mov eax, dword [ebp - 0x14]
je 0x50beb3
mov byte [ebp - 0xd], 1
test eax, eax
jne 0x50beb7
mov byte [ebp - 0xd], 0
add eax, esi
push 0xa
push ebx
mov byte [eax + edi + 0xd0], 0
mov eax, dword [ebp - 0x14]
add dword [edi + 0xc], eax
adc dword [edi + 0x10], 0
call fcn.006522b0
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x50beec
push 0xd
push ebx
call fcn.006522b0
pop ecx
pop ecx
mov esi, eax
jmp 0x50bfcf
push ebx
lea ecx, [ebp - 0x44]
call fcn.0040d4cf
mov eax, esi
mov dword [ebp - 0x18], 0xf
sub eax, edi
xor ecx, ecx
sub eax, 0xd0
mov dword [ebp - 4], ecx
push eax
push ecx
lea eax, [ebp - 0x44]
mov dword [ebp - 0x1c], ecx
mov byte [ebp - 0x2c], cl
lea ecx, [ebp - 0x2c]
push eax
call fcn.0040d9ee
push 0
push 1
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 2
call fcn.0040daff
jmp 0x50bf35
cmp al, 0x20
jae 0x50bf3b
inc esi
mov al, byte [esi]
test al, al
jne 0x50bf30
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x50bf40
sub ecx, edx
lea eax, [ecx + 1]
push eax
push esi
push ebx
call fcn.0064f4c0
push 0xa
push ebx
call fcn.006522b0
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x50bf73
push 0xd
push ebx
call fcn.006522b0
pop ecx
mov esi, eax
pop ecx
test esi, esi
setne al
lea ecx, [edi + 0xac]
movzx eax, al
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00544f77
lea ecx, [edi + 0xac]
call fcn.00545019
fmul qword [0x6c2df0]
call fcn.00637ea0
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
test eax, eax
je 0x50bfbf
lea ecx, [edi + 0xac]
call fcn.00544c5a
call fcn.00637ea0
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x10], eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
push 0
push 1
call fcn.0040daff
test esi, esi
jne 0x50beec
cmp byte [ebp - 0xd], 0
jne 0x50be78
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
Function at 0x50c933
Capabilities:
Resume thread

Disassembly:
mov eax, 0x69f856
call fcn.006375a8
sub esp, 0xc
push esi
xor esi, esi
push edi
mov edi, ecx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], esi
cmp dword [edi + 0x14], esi
je 0x50c99e
lea eax, [ebp - 0x18]
push eax
push dword [edi + 4]
call fcn.0050ba74
test al, al
je 0x50c99e
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x50c99b
push dword [ecx + esi*4]
call dword [sym.imp.KERNEL32.DLL_ResumeThread]
mov eax, dword [ebp - 0x18]
push dword [eax + esi*4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 0x14]
inc esi
mov ecx, dword [ebp - 0x18]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x50c976
dec dword [edi + 0x14]
lea ecx, [ebp - 0x18]
call fcn.005271d7
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
Function at 0x51078c
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push 1
push 0
push 2
push 2
mov esi, ecx
call fcn.004778a4
mov eax, dword [esi + 4]
mov ecx, esi
mov edi, dword [ebp + 8]
push edi
mov dword [esi + 0x18], eax
call fcn.00475e2a
test eax, eax
je 0x5107d3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.UPnP:_Unable_to_bind_to_UPnP_port:__d
push 1
call fcn.005100a8
add esp, 0xc
xor al, al
jmp 0x510860
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [edi + 0xc]
push 4
push eax
push 9
push 0
push dword [esi + 4]
call ebx
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x510805
call edi
push eax
push str.UPnP:_Could_not_setup_socket_to_send_multicast_packets:__d
push 1
call fcn.005100a8
add esp, 0xc
push 4
lea eax, [ebp - 4]
mov dword [ebp - 4], 0xff
push eax
push 4
push 0
push dword [esi + 4]
call ebx
test eax, eax
je 0x510831
call edi
push eax
push str.UPnP:_Could_not_set_unicast_TTL:__d
push 1
call fcn.005100a8
add esp, 0xc
push 4
lea eax, [ebp - 4]
mov dword [ebp - 4], 0xff
push eax
push 0xa
push 0
push dword [esi + 4]
call ebx
pop ebx
test eax, eax
je 0x51085e
call edi
push eax
push str.UPnP:_Could_not_set_multicast_TTL:__d
push 1
call fcn.005100a8
add esp, 0xc
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x510868
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push 0
push 2
pop eax
push eax
push eax
mov ebx, ecx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx], eax
cmp eax, 0xffffffff
jne 0x5108a2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.UPnP:_Unable_to_create_socket:__d
push 1
call fcn.005100a8
add esp, 0xc
xor al, al
jmp 0x5109aa
lea ecx, [ebp - 4]
mov dword [ebp - 4], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x51089b
push esi
push 4
lea eax, [ebp - 8]
xor esi, esi
push eax
push 4
push 0xffff
push dword [ebx]
inc esi
mov dword [ebp - 8], esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x5108f1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.UPnP:_Unable_to_setsockopt:__d
push esi
call fcn.005100a8
jmp 0x510936
push edi
xor eax, eax
lea edi, [ebp - 0x20]
stosd dword es:[edi], eax
push 2
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
pop eax
push 0x76c
mov word [ebp - 0x20], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x20]
push 0x10
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_bind]
pop edi
test eax, eax
je 0x51093b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x6da484
push esi
call fcn.0050fefa
add esp, 0xc
jmp 0x510996
mov esi, dword [sym.imp.WS2_32.dll_inet_addr]
push str.239.255.255.250
call esi
push str.0.0.0.0
mov dword [ebp - 0x10], eax
call esi
push 8
mov dword [ebp - 0xc], eax
xor esi, esi
lea eax, [ebp - 0x10]
push eax
push 0xc
push esi
push dword [ebx]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x51099a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.UPnP:_Could_not_join_multicast_group:__d
push 1
call fcn.005100a8
add esp, 0xc
mov byte [0x7ac21f], 1
or dword [0x7ac220], 0xffffffff
mov dword [0x7ac224], esi
xor al, al
jmp 0x5109a9
push str.UPnP:_Joined_multicast_group
push esi
call fcn.0050fefa
pop ecx
pop ecx
mov al, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
xor eax, eax
mov word [ebp - 4], 0
lea edi, [ebp - 0x14]
mov esi, ecx
stosd dword es:[edi], eax
push 2
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, 0xe714
pop edi
push dword [ebp + 8]
mov word [ebp - 0x14], di
mov word [ebp - 0x12], ax
call dword [sym.imp.WS2_32.dll_htonl]
push 0x10
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
push 0
push edi
lea eax, [ebp - 4]
push eax
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_sendto]
xor ecx, ecx
test eax, eax
pop edi
setg al
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x5113bd
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
push edi
push dword [ebp + 0x14]
lea eax, [ebp - 0xc]
mov esi, ecx
push dword [ebp + 0x10]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
call fcn.00511331
xor eax, eax
lea edi, [ebp - 0x1c]
stosd dword es:[edi], eax
push 2
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
pop eax
push dword [ebp + 8]
mov word [ebp - 0x1c], ax
mov eax, 0xe714
mov word [ebp - 0x1a], ax
call dword [sym.imp.WS2_32.dll_htonl]
push 0x10
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push eax
push 0
push 0xc
lea eax, [ebp - 0xc]
push eax
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_sendto]
xor ecx, ecx
test eax, eax
pop edi
setg al
pop esi
mov esp, ebp
pop ebp
ret 0x10

Function at 0x511427
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
push 1
push 0
push 2
push 2
mov esi, ecx
call fcn.004778a4
push 4
lea eax, [ebp - 4]
mov dword [ebp - 4], 1
push eax
push 4
push 0xffff
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x511462
xor al, al
jmp 0x511486
push 0x14e7
call fcn.00511372
push eax
lea ecx, [ebp - 0x18]
call fcn.004c870d
push eax
mov ecx, esi
call fcn.00475e2a
mov ecx, esi
call fcn.00477018
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x51df3e
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ecx
push esi
push edi
mov edi, ecx
mov esi, dword [edi + 0x18]
jmp 0x51df5a
mov ecx, dword [esi]
push 0xffffffffffffffff
mov ecx, dword [ecx + 0xd8]
call fcn.005043b0
add esi, 4
cmp esi, dword [edi + 0x1c]
jne 0x51df48
push dword [esp + 8]
mov eax, dword [edi + 0x18]
lea esi, [edi + 0x24]
push esi
mov dword [edi + 0x1c], eax
push dword [esi + 4]
push dword [esi]
call fcn.0051b869
mov eax, dword [esi]
push 1
mov dword [esi + 4], eax
push dword [edi + 0x3c]
call fcn.0045e47c
xor eax, eax
lea ecx, [edi + 0x78]
push eax
mov dword [edi + 0x3c], eax
mov dword [edi + 0x34], eax
mov dword [edi + 0x38], eax
call fcn.005054a3
pop edi
pop esi
pop ecx
ret

Function at 0x5271fd
Capabilities:
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0x194
cmp dword [eax + 0x14], 0x10
push ebx
mov ebx, ecx
jb 0x527214
mov eax, dword [eax]
push esi
mov esi, dword [ebp + 8]
push edi
push eax
movzx eax, word [esi + 0x10]
push eax
push str.BT_SEARCH__HTTP_1.1_r_nHost:_239.192.152.143:6771_r_nPort:__u_r_nInfohash:__s_r_n_r_n_r_n
lea eax, [ebp - 0x194]
push 0x100
push eax
call fcn.00462cfa
add esp, 0x14
mov byte [ebp - 0x95], 0
lea edi, [ebp - 0x14]
mov eax, 0x1a73
push 5
pop ecx
rep movsd dword es:[edi], dword [esi]
mov word [ebp - 4], ax
lea ecx, [ebp - 0x14]
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x94]
push eax
call fcn.0047752e
lea ecx, [ebp - 0x194]
pop edi
lea edx, [ecx + 1]
pop esi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x52726e
push dword [ebp + 0xc]
lea eax, [ebp - 0x94]
sub ecx, edx
push eax
push 0
push ecx
lea eax, [ebp - 0x194]
push eax
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_sendto]
xor ecx, ecx
test eax, eax
pop ebx
setg al
mov esp, ebp
pop ebp
ret 8
Function at 0x5274d5
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x20
push ebx
push esi
push edi
push 1
xor ebx, ebx
mov edi, ecx
push ebx
push 2
push 2
call fcn.004778a4
cmp dword [edi + 4], 0xffffffff
jne 0x527509
mov esi, dword [edi]
push ebx
push 1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov ecx, edi
call dword [esi + 0x14]
xor al, al
jmp 0x52762c
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [esp + 0xc]
push 4
push eax
push 4
push 0xffff
push dword [edi + 4]
mov dword [esp + 0x20], 1
call esi
test eax, eax
jne 0x527502
mov ebx, dword [esp + 0x30]
push ebp
mov ebp, dword [sym.imp.WS2_32.dll_ntohl]
push dword [ebx + 0xc]
call ebp
push 0x1a73
push eax
lea ecx, [esp + 0x24]
call fcn.004c870d
push eax
mov ecx, edi
call fcn.00475e2a
test eax, eax
jne 0x52761e
push dword [ebx + 0xc]
mov byte [esp + 0x38], al
mov word [esp + 0x39], ax
mov byte [esp + 0x3b], al
call ebp
push eax
call dword [sym.imp.WS2_32.dll_htonl]
push 4
mov dword [esp + 0x38], eax
lea eax, [esp + 0x38]
push eax
push 9
push 0
push dword [edi + 4]
call esi
test eax, eax
jne 0x52761e
and dword [esp + 0x14], eax
and dword [esp + 0x18], eax
push str.239.192.152.143
call dword [sym.imp.WS2_32.dll_inet_addr]
push dword [ebx + 0xc]
mov dword [esp + 0x18], eax
call ebp
push eax
call dword [sym.imp.WS2_32.dll_htonl]
push 8
mov dword [esp + 0x1c], eax
xor ebx, ebx
lea eax, [esp + 0x18]
push eax
push 0xc
push ebx
push dword [edi + 4]
call esi
test eax, eax
jne 0x52761e
push 4
pop ebp
push ebp
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 1
push eax
push 0xb
push ebx
push dword [edi + 4]
call esi
test eax, eax
jne 0x52761e
push ebp
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0xff
push eax
push ebp
push ebx
push dword [edi + 4]
call esi
test eax, eax
jne 0x52761e
push ebp
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0xff
push eax
push 0xa
push ebx
push dword [edi + 4]
call esi
test eax, eax
je 0x527622
xor al, al
jmp 0x52762b
mov ecx, edi
call fcn.00477018
mov al, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x20
ret 4