joyce8/EMBER2024-capa huggingface dataset:
Function at 0x51c50b
Capabilities:
Delete file

Disassembly:
mov eax, 0x6db235
call fcn.006899cc
sub esp, 0x78
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.0047050d
test al, al
je 0x51c71b
push ebx
xor ebx, ebx
push esi
cmp byte [ebp + 0xc], bl
je 0x51c644
push edi
call fcn.004703f1
mov esi, eax
test esi, esi
je 0x51c719
call fcn.004a5ea3
push eax
push 0x21
lea ecx, [ebp - 0x1c]
call fcn.004a5cc2
push edi
push str.fileName
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], ebx
call fcn.00476974
push esi
push str.error
lea ecx, [ebp - 0x1c]
call fcn.00476974
lea eax, [ebp - 0x1c]
push eax
call fcn.004a716d
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.004a5d2b
push esi
push edi
push str.Warning:_Delete_to_trash_failed_for__S._Error:__d._Deleting_permanently.
push 0x800
call fcn.0049be8f
add esp, 0x10
lea eax, [ebp - 0x54]
push esi
push eax
call fcn.0045c302
lea eax, [ebp - 0x54]
mov dword [ebp - 4], 1
push eax
push str._to_trash_:1___error_code_:
lea eax, [ebp - 0x6c]
push eax
call fcn.0044876b
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 3
call fcn.0040fad0
push 0xa
mov dword [ebp - 0x24], ebx
lea ecx, [ebp - 0x24]
push str.deletefail
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], 0xf
mov byte [ebp - 0x24], bl
call fcn.00414b60
push ebx
push ebx
push ebx
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x6c]
push eax
push 0x21
call fcn.00492aa8
mov eax, dword [ebp - 0x10]
cmp eax, 0x10
jb 0x51c638
mov ecx, dword [ebp - 0x24]
inc eax
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], ecx
cmp eax, 0x1000
jb 0x51c62f
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
call fcn.0044810a
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push eax
push ecx
call fcn.0068976d
pop ecx
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.0040fad0
push edi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x51c719
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
push esi
push edi
push str.Warning:_Delete_to_trash_failed_for__S._Error:__d._Deleting_permanently.
push 0x800
call fcn.0049be8f
add esp, 0x10
lea eax, [ebp - 0x6c]
push esi
push eax
call fcn.004831df
lea eax, [ebp - 0x6c]
mov dword [ebp - 4], 5
push eax
push str._to_trash_:0___error_code_:
lea eax, [ebp - 0x84]
push eax
call fcn.0044876b
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 7
call fcn.0040fad0
push 0xa
mov dword [ebp - 0x3c], ebx
lea ecx, [ebp - 0x3c]
push str.deletefail
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], 0xf
mov byte [ebp - 0x3c], bl
call fcn.00414b60
push ebx
push ebx
push ebx
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x84]
push eax
push 0x21
call fcn.00492aa8
mov eax, dword [ebp - 0x28]
cmp eax, 0x10
jb 0x51c70e
mov ecx, dword [ebp - 0x3c]
inc eax
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], ecx
cmp eax, 0x1000
jb 0x51c705
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
call fcn.0044810a
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push eax
push ecx
call fcn.0068976d
pop ecx
pop ecx
lea ecx, [ebp - 0x84]
call fcn.0040fad0
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
leave
ret 8
Function at 0x51d0a6
Capabilities:
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ebp, 0xa0
xor ecx, ecx
mov dword [esp + 0x14], ebp
mov bl, 1
mov dword [esp + 0x10], ecx
mov eax, dword [edi + 8]
mov esi, dword [edi + 4]
sub eax, esi
cdq
idiv ebp
test eax, eax
je 0x51d146
mov ebp, ecx
lea eax, [esi + ebp]
test byte [eax + 0x6a], 0x20
jne 0x51d12a
push eax
lea eax, [esp + 0x1c]
mov ecx, edi
push eax
call fcn.0051c96f
cmp dword [esp + 0x2c], 8
lea eax, [esp + 0x18]
jb 0x51d0f6
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
or eax, 1
lea ecx, [esp + 0x18]
cmp dword [esp + 0x2c], 8
jb 0x51d10f
mov ecx, dword [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
neg eax
lea ecx, [esp + 0x18]
sbb al, al
and bl, al
call fcn.0044823e
mov ecx, dword [esp + 0x10]
mov eax, dword [edi + 8]
inc ecx
mov esi, dword [edi + 4]
add ebp, 0xa0
sub eax, esi
mov dword [esp + 0x10], ecx
cdq
idiv dword [esp + 0x14]
cmp ecx, eax
jb 0x51d0d1
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x20
ret

Function at 0x51d150
Capabilities:
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ebp, 0xa0
xor ecx, ecx
mov dword [esp + 0x14], ebp
mov bl, 1
mov dword [esp + 0x10], ecx
mov eax, dword [edi + 8]
mov esi, dword [edi + 4]
sub eax, esi
cdq
idiv ebp
test eax, eax
je 0x51d1f0
mov ebp, ecx
lea eax, [esi + ebp]
test byte [eax + 0x6a], 0x20
jne 0x51d1d4
push eax
lea eax, [esp + 0x1c]
mov ecx, edi
push eax
call fcn.0051c96f
cmp dword [esp + 0x2c], 8
lea eax, [esp + 0x18]
jb 0x51d1a0
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
and eax, 0xfffffffe
lea ecx, [esp + 0x18]
cmp dword [esp + 0x2c], 8
jb 0x51d1b9
mov ecx, dword [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
neg eax
lea ecx, [esp + 0x18]
sbb al, al
and bl, al
call fcn.0044823e
mov ecx, dword [esp + 0x10]
mov eax, dword [edi + 8]
inc ecx
mov esi, dword [edi + 4]
add ebp, 0xa0
sub eax, esi
mov dword [esp + 0x10], ecx
cdq
idiv dword [esp + 0x14]
cmp ecx, eax
jb 0x51d17b
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x20
ret
Function at 0x51d7cd
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov eax, 0x6db2da
call fcn.006899cc
sub esp, 0x5c
push ebx
mov ebx, ecx
xor ecx, ecx
push esi
push edi
mov esi, 0xa0
mov eax, dword [ebx + 8]
mov edi, dword [ebx + 4]
sub eax, edi
cdq
idiv esi
add eax, 1
jmp 0x51d949
xor edx, edx
mov dword [ebp - 0x24], 7
xor eax, eax
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x28], edx
mov word [ebp - 0x38], ax
mov dword [ebp - 4], edx
test ecx, ecx
jne 0x51d857
mov edi, dword [ebx + 0x20]
mov esi, dword [ebx + 0x24]
call fcn.004a6583
push esi
push edi
push eax
lea eax, [ebp - 0x68]
push str._sPartFile__LX.dat
push eax
call fcn.00475719
lea ecx, [ebp - 0x38]
add esp, 0x14
cmp ecx, eax
je 0x51d848
mov byte [ebp - 0x20], 0
push dword [ebp - 0x20]
push eax
call fcn.00448215
lea ecx, [ebp - 0x68]
call fcn.0044823e
xor edx, edx
mov byte [ebp - 0x10], dl
jmp 0x51d879
imul esi, ecx, 0xa0
lea eax, [edi - 0x68]
lea ecx, [ebp - 0x38]
add eax, esi
push eax
call fcn.004480a2
mov al, byte [esi + edi - 0x36]
shr al, 2
and al, 1
xor edx, edx
mov byte [ebp - 0x10], al
push edx
lea eax, [ebp - 0x38]
push eax
sub esp, 0x18
mov ecx, esp
push dword [ebp + 8]
mov dword [ecx], edx
mov dword [ecx + 0x10], edx
mov dword [ecx + 0x14], edx
call fcn.00448193
lea eax, [ebp - 0x50]
push eax
call fcn.0046f4a0
push 8
pop edi
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 1
cmp dword [ebp - 0x3c], edi
jb 0x51d8ae
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x51d8d0
lea ecx, [ebp - 0x50]
cmp dword [ebp - 0x3c], edi
jb 0x51d8c5
mov ecx, dword [ebp - 0x50]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
push 1
push dword [ebp - 0x10]
lea eax, [ebx + 0x28]
push dword [ebp + 8]
push eax
lea eax, [ebp - 0x38]
push eax
push eax
call fcn.0051d1fa
lea ecx, [ebp - 0x50]
mov esi, eax
call fcn.0044823e
mov eax, dword [ebp - 0x24]
test esi, esi
jne 0x51d96c
or dword [ebp - 4], 0xffffffff
cmp eax, edi
jb 0x51d932
mov ecx, dword [ebp - 0x38]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ecx
cmp eax, 0x1000
jb 0x51d929
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.0044810a
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
push eax
push ecx
call fcn.0068976d
pop ecx
pop ecx
mov eax, dword [ebx + 8]
mov esi, 0xa0
mov edi, dword [ebx + 4]
sub eax, edi
cdq
idiv esi
mov ecx, dword [ebp - 0x1c]
inc ecx
inc eax
cmp ecx, eax
mov dword [ebp - 0x1c], ecx
jne 0x51d7f9
mov ecx, ebx
call fcn.0051c276
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4
cmp eax, edi
jb 0x51d9a3
mov ecx, dword [ebp - 0x38]
lea eax, [eax*2 + 2]
mov dword [ebp + 8], eax
mov dword [ebp - 0x1c], ecx
cmp eax, 0x1000
jb 0x51d99a
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0044810a
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x1c]
push eax
push ecx
call fcn.0068976d
pop ecx
pop ecx
mov eax, esi
jmp 0x51d95b
Function at 0x51e4a6
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
mov eax, 0x6db370
call fcn.006899cc
sub esp, 0x6c
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0xd], bl
lea esi, [edi + 0x28]
push esi
call fcn.0046f858
push esi
test al, al
je 0x51e4e5
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
call fcn.00448193
lea eax, [ebp - 0x48]
inc ebx
jmp 0x51e4f1
lea eax, [ebp - 0x78]
push eax
call fcn.00484977
push 2
pop ebx
push eax
lea ecx, [ebp - 0x60]
call fcn.00447f71
mov dword [ebp - 4], 1
test bl, 2
je 0x51e511
lea ecx, [ebp - 0x78]
and ebx, 0xfffffffd
call fcn.0044823e
mov byte [ebp - 4], 2
test bl, 1
je 0x51e555
mov eax, dword [ebp - 0x34]
cmp eax, 8
jb 0x51e555
mov ecx, dword [ebp - 0x48]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ecx
cmp eax, 0x1000
jb 0x51e54c
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.0044810a
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
push eax
push ecx
call fcn.0068976d
pop ecx
pop ecx
lea eax, [ebp - 0x60]
mov ecx, edi
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.0051c9fe
xor ebx, ebx
mov esi, ebx
cmp dword [ebp - 0x20], ebx
jbe 0x51e5fe
lea edi, [ebp - 0x30]
mov eax, dword [ebp - 0x24]
lea ecx, [eax + esi]
mov eax, dword [edi + 8]
dec eax
and ecx, eax
mov eax, dword [edi + 4]
mov eax, dword [eax + ecx*4]
cmp dword [eax + 0x14], 8
jb 0x51e58e
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
mov edx, dword [ebp - 0x20]
mov ecx, eax
cmp ecx, 0xffffffff
je 0x51e5bb
test cl, 0x10
jne 0x51e5fa
lea eax, [edx - 1]
cmp esi, eax
je 0x51e5c7
test ecx, 0x1000
jne 0x51e5c2
test ecx, 0x400
jne 0x51e5c2
inc esi
cmp esi, edx
jb 0x51e574
jmp 0x51e5fe
mov byte [ebp - 0xd], bl
jmp 0x51e5fe
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x30]
lea ecx, [eax + esi]
mov eax, dword [edx + 8]
dec eax
and ecx, eax
mov eax, dword [edx + 4]
mov eax, dword [eax + ecx*4]
cmp dword [eax + 0x14], 8
jb 0x51e5e4
mov eax, dword [eax]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_GetVolumeInformationW]
test eax, eax
setne byte [ebp - 0xd]
jmp 0x51e5fe
mov byte [ebp - 0xd], 1
lea ecx, [ebp - 0x30]
call fcn.004878dd
mov ecx, dword [ebp - 0x30]
push 8
push ecx
mov dword [ebp - 0x30], ebx
call fcn.0068976d
pop ecx
pop ecx
lea ecx, [ebp - 0x60]
call fcn.0044823e
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0xd]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x51edb7
Capabilities:
Get process heap flags

Disassembly:
mov eax, 0x6d33f6
call fcn.006899cc
push ecx
push esi
mov esi, ecx
push edi
push dword [ebp + 8]
mov dword [ebp - 0x10], esi
xor edi, edi
mov dword [esi], edi
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
call fcn.00448193
push dword [ebp + 0xc]
lea ecx, [esi + 0x18]
mov dword [ebp - 4], edi
mov dword [ecx], edi
mov dword [ecx + 0x10], edi
mov dword [ecx + 0x14], edi
call fcn.00448193
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], eax
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 0xc

Function at 0x51efc5
Capabilities:
Access peb ldr_data
Get kernel32 base address
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x6db433
call fcn.006899cc
push ecx
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x10], esi
call fcn.00531db3
xor ebx, ebx
mov dword [esi + 0xc], 0x715d4c
mov dword [ebp - 4], ebx
mov dword [esi + 0x10], 0x6f60fc
mov dword [esi + 0x14], ebx
mov al, byte [ebp + 8]
lea ecx, [esi + 0x34]
mov byte [esi + 0x18], al
movzx eax, al
push eax
mov eax, dword [ebp + 0xc]
mov dword [esi], 0x715dd0
mov dword [esi + 0xc], 0x715e0c
mov dword [esi + 0x10], 0x715e90
mov dword [esi + 0x1c], ebx
mov byte [esi + 0x24], bl
mov dword [esi + 0x28], ebx
mov byte [esi + 0x30], bl
push dword [eax]
mov byte [ebp - 4], 2
call fcn.0051b52c
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
xor eax, eax
mov dword [esi + 0x7c], ebx
inc eax
mov dword [esi + 0x2c], ebx
lock xadd dword [0x7f24b4], eax
inc eax
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x20], eax
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10
Function at 0x52122a
Capabilities:
Get memory capacity

Disassembly:
mov eax, 0x6d7716
call fcn.006899cc
sub esp, 0x24
push esi
push edi
mov al, 1
mov ecx, 0x7f24cf
xchg byte [ecx], al
push 0x716750
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
push str.NtSetInformationFile
push eax
mov dword [0x7f298c], eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push 0xc
mov dword [0x7e4884], eax
call fcn.0068973d
pop ecx
mov ecx, eax
xor esi, esi
mov dword [ebp - 0x10], ecx
test ecx, ecx
je 0x5212a3
mov edi, ecx
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ecx + 4], 0x6f60fc
mov dword [ecx + 8], esi
mov dword [ecx], 0x71669c
mov dword [ecx + 4], 0x7166b0
mov dword [ebp - 0x10], ecx
test ecx, ecx
je 0x5212a6
mov eax, dword [ecx]
push ecx
call dword [eax + 4]
jmp 0x5212a6
mov dword [ebp - 0x10], esi
lea eax, [ebp - 0x10]
mov dword [ebp - 4], esi
push eax
call fcn.0054dbad
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], 1
test eax, eax
je 0x5212c6
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
or dword [ebp - 4], 0xffffffff
mov edi, 0x702d00
push 0x716774
push edi
call fcn.00473e2b
push str.SetFileValidData
push edi
mov dword [0x7f296c], eax
call fcn.00473e2b
mov dword [0x7f2970], eax
test eax, eax
je 0x521304
push 2
push str.SeManageVolumePrivilege
call fcn.0047172f
mov byte [0x7f24cd], al
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.DLL_CreateEventA]
push 0x7167b8
push 0x7f2974
mov dword [0x7f2950], eax
call fcn.0047b95a
push 0x7167bc
push 0x7f41a8
call fcn.0047b95a
push 0x7167c0
push 0x7f2954
call fcn.0047b95a
call fcn.005083d6
push 0x7167c4
push 0x7c2f8c
call fcn.0050841d
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 [0x7f246c], eax
push str.total_physical_memory__Ld_max_disk_cache__Ld
call fcn.0048e8e7
add esp, 0x14
call fcn.0055a1d4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret
Function at 0x523af2
Capabilities:
Clear file content
Get file attributes

Disassembly:
push ebp
mov ebp, esp
cmp byte [0x7f24cd], 0
push ebx
push esi
push edi
je 0x523b0e
cmp byte [0x7f2471], 0
je 0x523b0e
xor bl, bl
jmp 0x523b10
mov bl, 1
cmp byte [ebp + 0x20], 0
mov esi, dword [ebp + 8]
je 0x523b48
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14], 8
jb 0x523b24
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
test eax, 0x200
je 0x523b6b
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 0x523b5f
cmp byte [0x7f2470], 0
je 0x523b6b
push 0
lea eax, [ebp + 8]
push eax
push 0
push 0
push 0
push 0
push 0x900c4
push esi
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
cmp byte [ebp + 0x1c], 0
jne 0x523bdc
mov edi, dword [ebp + 0x10]
mov byte [0x7f24b8], 1
test bl, bl
je 0x523b8d
push dword [edi + 0xc]
push dword [edi + 8]
push esi
call fcn.004710d2
jmp 0x523bad
push 0
push dword [edi + 0xc]
push dword [edi + 8]
push esi
call fcn.00470ddd
and eax, edx
cmp eax, 0xffffffff
je 0x523be6
push esi
call dword [sym.imp.KERNEL32.DLL_SetEndOfFile]
test eax, eax
je 0x523be6
cmp byte [0x7f24cd], 0
je 0x523bd5
cmp byte [0x7f2471], 0
je 0x523bd5
cmp byte [0x7f2470], 0
jne 0x523bd5
push dword [edi + 0xc]
push dword [edi + 8]
push esi
call dword [0x7f2970]
mov byte [0x7f24b8], 0
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
pop ebp
ret 0x1c
mov byte [0x7f24b8], 0
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
xor eax, eax
jmp 0x523bdf

Function at 0x524e54
Capabilities:
Resume thread
Suspend thread

Disassembly:
mov eax, 0x6dbb64
call fcn.006899cc
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.00524bd0
mov edx, dword [ebp - 0x20]
test al, al
je 0x524f0a
mov ecx, dword [ebp - 0x1c]
mov eax, ecx
sub eax, edx
sar eax, 2
push esi
mov esi, ebx
test eax, eax
je 0x524edb
push dword [edx + esi*4]
call dword [sym.imp.KERNEL32.DLL_SuspendThread]
cmp eax, 0xffffffff
jne 0x524ec6
mov byte [ebp - 0xd], bl
mov edi, ebx
test esi, esi
jle 0x524ec6
mov eax, dword [ebp - 0x20]
push dword [eax + edi*4]
call dword [sym.imp.KERNEL32.DLL_ResumeThread]
inc edi
cmp edi, esi
jl 0x524eb5
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 0x524e9e
mov edi, dword [ebp - 0x14]
sub ecx, edx
sar ecx, 2
pop esi
test ecx, ecx
je 0x524efe
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 0x524ee5
mov al, byte [ebp - 0xd]
test al, al
je 0x524f08
inc dword [edi + 0x18]
mov bl, al
test edx, edx
je 0x524f1d
mov ecx, dword [ebp - 0x18]
sub ecx, edx
and ecx, 0xfffffffc
push ecx
push edx
call fcn.00447e20
mov ecx, dword [ebp - 0xc]
mov al, bl
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x525aff
Capabilities:
Resume thread

Disassembly:
mov eax, 0x6d6ea8
call fcn.006899cc
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 + 0x18], esi
je 0x525b7d
lea eax, [ebp - 0x18]
push eax
push dword [edi + 4]
call fcn.00524bd0
mov ecx, dword [ebp - 0x18]
test al, al
je 0x525b6a
mov eax, dword [ebp - 0x14]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x525b67
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 0x525b42
dec dword [edi + 0x18]
test ecx, ecx
je 0x525b7d
mov eax, dword [ebp - 0x10]
sub eax, ecx
and eax, 0xfffffffc
push eax
push ecx
call fcn.00447e20
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret
Function at 0x5299bf
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.0048bdae
mov eax, dword [esi + 4]
mov ecx, esi
mov edi, dword [ebp + 8]
push edi
mov dword [esi + 0x18], eax
call fcn.0048a250
test eax, eax
je 0x529a06
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.UPnP:_Unable_to_bind_to_UPnP_port:__d
push 1
call fcn.00529289
add esp, 0xc
xor al, al
jmp 0x529a93
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 0x529a38
call edi
push eax
push str.UPnP:_Could_not_setup_socket_to_send_multicast_packets:__d
push 1
call fcn.00529289
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 0x529a64
call edi
push eax
push str.UPnP:_Could_not_set_unicast_TTL:__d
push 1
call fcn.00529289
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 0x529a91
call edi
push eax
push str.UPnP:_Could_not_set_multicast_TTL:__d
push 1
call fcn.00529289
add esp, 0xc
mov al, 1
pop edi
pop esi
leave
ret 4
Function at 0x529a99
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 0x529ad3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.UPnP:_Unable_to_create_socket:__d
push 1
call fcn.00529289
add esp, 0xc
xor al, al
jmp 0x529bdb
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 0x529acc
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 0x529b22
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.UPnP:_Unable_to_setsockopt:__d
push esi
call fcn.00529289
jmp 0x529b67
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 0x529b6c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x717024
push esi
call fcn.005290ee
add esp, 0xc
jmp 0x529bc7
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 0x529bcb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.UPnP:_Could_not_join_multicast_group:__d
push 1
call fcn.00529289
add esp, 0xc
mov byte [0x7f29c7], 1
or dword [0x7f29c8], 0xffffffff
mov dword [0x7f29cc], esi
xor al, al
jmp 0x529bda
push str.UPnP:_Joined_multicast_group
push esi
call fcn.005290ee
pop ecx
pop ecx
mov al, 1
pop esi
pop ebx
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 2
pop edi
push dword [ebp + 8]
xor ebx, ebx
mov word [ebp - 0x14], di
mov eax, 0xe714
mov word [ebp - 4], bx
mov esi, ecx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
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 ebx
push edi
lea eax, [ebp - 4]
push eax
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_sendto]
pop edi
test eax, eax
pop esi
setg al
pop ebx
leave
ret 4