joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401020
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40103b
pop edi
pop ebx
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x401072
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x40106e
jmp 0x401060
cmp esi, eax
jae 0x401072
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401060
cmp esi, eax
jb 0x401079
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x413e72
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
xor ebx, ebx
call fcn.00416138
mov esi, dword [eax + 0xc]
push 5
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x413eab
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov ecx, dword [ebp - 4]
push esi
push dword [ebp + 0xc]
push ebx
call fcn.00413ab4
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 8

Function at 0x413f09
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [edi + 0x78], ebx
test ebx, 0xffff0000
jne 0x413f2d
cmp dword [edi + 0x74], 0
jne 0x413f2d
movzx eax, bx
mov dword [edi + 0x74], eax
call fcn.00416138
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push dword [ebp + 0xc]
mov ebx, eax
push ebx
mov ecx, edi
call fcn.00413eca
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x41c287
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
xor edi, edi
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], ebx
je 0x41c2ce
call fcn.00416138
mov esi, dword [eax + 0xc]
push pe_nt_image_headers32
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x41c2ce
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x41c2ea
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov ecx, dword [ebp - 4]
push edi
call fcn.0041bd8c
mov esi, eax
test edi, edi
je 0x41c2e8
test ebx, ebx
je 0x41c2e8
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x41c6c9
Capabilities:
Get graphical window text

Disassembly:
push 4
mov eax, 0x51de3c
call fcn.004f90b0
mov esi, ecx
cmp dword [esi + 0x6c], 0
jne 0x41c6ee
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextA]
jmp 0x41c740
call fcn.00404aff
push eax
lea ecx, [ebp - 0x10]
call fcn.00401390
mov ecx, dword [esi + 0x6c]
mov eax, dword [ecx]
and dword [ebp - 4], 0
lea edx, [ebp - 0x10]
push edx
call dword [eax + 0x8c]
push 0xffffffffffffffff
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004fc173
push eax
call fcn.00404918
add esp, 0x14
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
mov esi, eax
call fcn.004010d0
mov eax, esi
call fcn.004f9188
ret 8

Function at 0x451a84
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 4], ecx
test esi, esi
jne 0x451a9e
call fcn.00416138
mov esi, dword [eax + 0xc]
push dword [0x575f78]
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x451abc
xor eax, eax
pop edi
pop esi
leave
ret 8
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp + 0xc], eax
test eax, eax
je 0x451ab4
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
jne 0x451ae9
xor esi, esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop ebx
jmp 0x451ab6
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp - 4]
push eax
push ebx
call fcn.004519b2
mov esi, eax
jmp 0x451adb

Function at 0x483718
Capabilities:
Get graphical window text

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push dword [ebp + 0xc]
mov ecx, esi
call fcn.004833d7
cmp dword [esi], 0
mov edi, eax
mov dword [esi + 0xc], 1
je 0x483762
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [ebp + 0x10]
push eax
call fcn.004049f9
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [ebp + 0x10]
push 0xffffffffffffffff
call fcn.004049ca
jmp 0x48376d
mov eax, dword [ebp + 0x10]
push dword [eax]
push edi
call fcn.0041e2b7
pop edi
pop esi
pop ebp
ret 0xc
Function at 0x483773
Capabilities:
Get graphical window text

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 4]
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
call fcn.0041c393
push 0xfffffffffffffff0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowLongA]
push dword [ebp + 0xc]
and eax, 3
mov ecx, esi
cmp al, 3
je 0x4837b0
call fcn.004833d7
mov dword [esi + 0xc], 1
jmp 0x4837b5
call fcn.004833d7
cmp dword [esi], 0
je 0x4837fe
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
test eax, eax
jle 0x4837d6
lea ecx, [eax + 1]
push ecx
mov ecx, dword [ebp + 0x10]
push eax
call fcn.004049f9
jmp 0x4837e8
mov ecx, dword [ebp + 0x10]
push 0xff
call fcn.004013c0
push 0x100
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [ebp + 0x10]
push 0xffffffffffffffff
call fcn.004049ca
jmp 0x483822
mov esi, dword [ebp + 0x10]
push dword [esi]
push 0xffffffffffffffff
push 0x14d
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendMessageA]
cmp eax, 0xffffffff
jne 0x483822
push dword [esi]
push dword [ebp + 8]
call fcn.0041e2b7
pop esi
pop ebp
ret 0xc

Function at 0x4ca7af
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
test byte [esi + 4], 1
push edi
mov ebx, ecx
je 0x4ca7c7
mov edi, dword [esi + 0xc]
jmp 0x4ca807
push 5
push dword [esi + 0xc]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x4ca7e0
call fcn.004142e9
push edi
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
jne 0x4ca7f5
call fcn.004142e9
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
jne 0x4ca807
call fcn.004142e9
call fcn.00416138
cmp dword [eax + 0x3c], 0
je 0x4ca81c
push edi
mov ecx, ebx
call fcn.004c966d
mov edi, eax
push dword [ebp + 0xc]
push edi
call fcn.004ca6c9
mov dword [ebp + 8], eax
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x4ca83a
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
and dword [ebx + 0x7c], 0
mov eax, dword [ebp + 8]
test eax, eax
je 0x4ca846
mov edi, eax
mov dword [ebx + 0x7c], eax
or dword [esi + 4], 1
mov dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x4cc4ba
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push esi
mov esi, ecx
call fcn.004f1877
call fcn.00415b69
cmp dword [eax + 0x14], 0
jne 0x4cc4d7
mov ecx, esi
pop esi
jmp fcn.004cbfbf
pop esi
ret

Function at 0x4cf642
Capabilities:
Get common file path
Get file system object information

Disassembly:
mov edi, edi
push esi
mov esi, ecx
call fcn.004aeed1
call fcn.00415b69
cmp dword [eax + 0x14], 0
jne 0x4cf65f
mov ecx, esi
pop esi
jmp fcn.004cf015
pop esi
ret

Function at 0x4f90a1
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x5708c0]
jne 0x4f90ab
repz ret
jmp fcn.00506c2c
Function at 0x50e2a0
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x5708c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00502108
and dword [ebp - 0x14], 0
cmp dword [0x578ad0], 0
mov dword [ebp - 0x18], eax
jne 0x50e353
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x50e3fb
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x50e3fb
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x54f184
push ebx
mov dword [0x578ad0], eax
call edi
push eax
call esi
push 0x54f170
push ebx
mov dword [0x578ad4], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x578ad8], eax
call edi
push eax
call esi
mov dword [0x578ae0], eax
test eax, eax
je 0x50e353
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x578adc], eax
mov eax, dword [0x578adc]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x50e3ac
cmp dword [0x578ae0], ecx
je 0x50e3ac
push eax
call esi
push dword [0x578ae0]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x50e3ac
test ebx, ebx
je 0x50e3ac
call edi
test eax, eax
je 0x50e3a3
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x50e3a3
test byte [ebp - 8], 1
jne 0x50e3ac
or dword [ebp + 0x10], 0x200000
jmp 0x50e3df
mov eax, dword [0x578ad4]
cmp eax, dword [ebp - 0x18]
je 0x50e3df
push eax
call esi
test eax, eax
je 0x50e3df
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x50e3df
mov eax, dword [0x578ad8]
cmp eax, dword [ebp - 0x18]
je 0x50e3df
push eax
call esi
test eax, eax
je 0x50e3df
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x578ad0]
call esi
test eax, eax
je 0x50e3fb
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x50e3fd
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f90a1
leave
ret
Function at 0x512b40
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
mov ebx, dword [ebp + 8]
push edi
test ebx, ebx
je 0x512b67
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x512b67
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edi, dword [ebp + 0xc]
mov al, byte [edi]
test al, al
je 0x512c2b
push esi
mov esi, edi
mov ecx, edi
lea esp, [esp]
cmp al, 0x2f
je 0x512b88
cmp al, 0x5c
jne 0x512b8a
mov esi, ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x512b80
cmp esi, edi
je 0x512bbe
sub esi, edi
push esi
lea eax, [ebp - 0x208]
push edi
push eax
call fcn.004f85a0
lea ecx, [ebp - 0x208]
push ecx
push ebx
mov byte [ebp + esi - 0x208], 0
call fcn.00512b40
add esp, 0x14
mov byte [ebp - 0x104], 0
test ebx, ebx
je 0x512bdd
lea edx, [ebp - 0x104]
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x512bd3
mov eax, edi
mov edx, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x512be1
lea edi, [ebp - 0x104]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x512bf1
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [ebp - 0x104]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
pop esi
cmp eax, 0xffffffff
jne 0x512c2b
push 0
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
pop edi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x512d80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ebx
imul esi, dword [ebp + 0xc]
cmp byte [edi], 0
je 0x512db6
mov ecx, dword [ebp + 8]
mov edx, dword [edi + 4]
push 0
lea eax, [ebp + 0xc]
push eax
push esi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x512dac
mov byte [edi + 8], 1
mov eax, dword [ebp + 0xc]
xor edx, edx
div ebx
pop esi
pop ebp
ret
mov ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0x18]
lea edx, [ecx + esi]
cmp edx, eax
jbe 0x512dc7
sub eax, ecx
mov esi, eax
mov eax, dword [edi + 0x14]
add eax, ecx
mov ecx, dword [ebp + 8]
push esi
push eax
push ecx
call fcn.004f85a0
add dword [edi + 0x1c], esi
add esp, 0xc
mov eax, esi
xor edx, edx
div ebx
pop esi
pop ebp
ret

Function at 0x513140
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [edx]
movsx ecx, cl
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x551770]
xor ecx, eax
movzx eax, cl
add eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edx + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x551770]
mov dword [edx + 8], ecx
ret
Function at 0x513190
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
test ecx, ecx
jne 0x513197
xor eax, eax
ret
push esi
not eax
cmp edx, 8
jb 0x51326d
mov esi, edx
shr esi, 3
push edi
lea esp, [esp]
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x551770]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x551770]
movzx edi, byte [ecx + 2]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x551770]
movzx edi, byte [ecx + 3]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x551770]
movzx edi, byte [ecx + 4]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x551770]
movzx edi, byte [ecx + 5]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x551770]
movzx edi, byte [ecx + 6]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x551770]
movzx edi, byte [ecx + 7]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x551770]
add ecx, 8
sub edx, 8
dec esi
jne 0x5131b0
pop edi
test edx, edx
je 0x51328a
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x551770]
inc ecx
dec edx
jne 0x513271
not eax
pop esi
ret
Function at 0x513b50
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
cmp byte [esi], 0
je 0x513b97
cmp byte [esi + 1], 0
je 0x513b9f
mov eax, dword [esi + 4]
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [esi], 0
push ebx
je 0x513bb2
cmp byte [esi + 1], 0
je 0x513ba6
mov edx, dword [esi + 4]
push 1
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, eax
sub ebx, dword [esi + 0xc]
mov dword [ebp - 4], ebx
jmp 0x513bba
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x1c], ecx
jmp 0x513b71
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0
mov ebx, dword [ebp - 4]
jmp 0x513bba
mov eax, dword [esi + 0x1c]
mov dword [ebp - 4], eax
mov ebx, eax
push edi
mov edi, 0xffff
mov dword [ebp - 8], edi
cmp ebx, edi
jae 0x513bcc
mov dword [ebp - 8], ebx
mov edi, ebx
push 0x404
call fcn.004f707a
add esp, 4
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x513be9
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 4
mov dword [ebp - 0x14], 0xffffffff
cmp edi, eax
jbe 0x513cfd
jmp 0x513c09
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 4]
add eax, 0x400
mov dword [ebp - 0xc], edi
cmp eax, edi
ja 0x513c18
mov dword [ebp - 0xc], eax
mov eax, ebx
sub eax, dword [ebp - 0xc]
sub ebx, eax
mov dword [ebp - 0x1c], eax
cmp ebx, 0x404
jbe 0x513c2f
mov ebx, 0x404
cmp byte [esi], 0
je 0x513c54
cmp byte [esi + 1], 0
je 0x513cfd
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push 0
push 0
add ecx, eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x513c57
mov dword [esi + 0x1c], eax
cmp byte [esi], 0
mov edi, ebx
je 0x513c80
mov ecx, dword [ebp - 0x10]
mov edx, dword [esi + 4]
push 0
lea eax, [ebp - 0x18]
push eax
push ebx
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x513c7b
mov byte [esi + 8], 1
mov eax, dword [ebp - 0x18]
jmp 0x513ca9
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
lea edx, [eax + ebx]
cmp edx, ecx
jbe 0x513c91
sub ecx, eax
mov edi, ecx
mov ecx, dword [esi + 0x14]
mov edx, dword [ebp - 0x10]
push edi
add ecx, eax
push ecx
push edx
call fcn.004f85a0
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div ebx
cmp eax, 1
jne 0x513cfd
lea eax, [ebx - 3]
test eax, eax
js 0x513ceb
lea esp, [esp]
mov ecx, dword [ebp - 0x10]
dec eax
cmp byte [eax + ecx], 0x50
jne 0x513cdf
cmp byte [eax + ecx + 1], 0x4b
jne 0x513cdf
cmp byte [eax + ecx + 2], 5
jne 0x513cdf
cmp byte [eax + ecx + 3], 6
je 0x513ce5
test eax, eax
jns 0x513cc0
jmp 0x513ceb
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x513cfd
mov edx, dword [ebp - 8]
cmp dword [ebp - 0xc], edx
jb 0x513c00
mov eax, dword [ebp - 0x10]
push eax
call fcn.004f7040
mov eax, dword [ebp - 0x14]
add esp, 4
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x513d20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
cmp byte [esi], 0
push edi
mov edi, 1
je 0x513d53
mov edx, dword [esi + 4]
push 0
lea eax, [ebp - 8]
push eax
push edi
lea ecx, [ebp - 1]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x513d4e
mov byte [esi + 8], 1
mov edi, dword [ebp - 8]
jmp 0x513d7e
mov eax, dword [esi + 0x18]
push ebx
mov ebx, dword [esi + 0x1c]
lea ecx, [ebx + 1]
cmp ecx, eax
jbe 0x513d65
sub eax, ebx
mov edi, eax
mov edx, dword [esi + 0x14]
push edi
add edx, ebx
push edx
lea eax, [ebp - 1]
push eax
call fcn.004f85a0
add esp, 0xc
add ebx, edi
mov dword [esi + 0x1c], ebx
pop ebx
cmp edi, 1
pop edi
jne 0x513d93
movzx ecx, byte [ebp - 1]
mov edx, dword [ebp + 8]
mov dword [edx], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0
je 0x513d8d
cmp byte [esi + 8], 0
je 0x513d8d
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret

Function at 0x513db0
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov ecx, dword [esi + 8]
push ebx
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov ebx, edx
xor ebx, 1
imul ebx, edx
mov edx, dword [esi]
shr ebx, 8
push edi
xor al, bl
movsx edi, al
xor edi, edx
shr edx, 8
and edi, 0xff
mov ebx, dword [edi*4 + 0x551770]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edx*4 + 0x551770]
pop edi
mov dword [esi + 8], ecx
pop ebx
ret

Function at 0x516b40
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [esi], 0
push edi
jne 0x516bc3
cmp dword [esi + 4], 0xffffffff
jne 0x516bc3
lea edi, [esi + 0x140]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x516b67
sub eax, edx
mov al, byte [eax + esi + 0x13f]
cmp al, 0x5c
je 0x516b91
cmp al, 0x2f
je 0x516b91
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x516b80
mov ax, word [0x54fc60]
mov word [edi], ax
lea ecx, [ebp - 4]
push ecx
call fcn.00512f00
add esp, 4
test eax, eax
jne 0x516ba9
mov eax, dword [ebp - 4]
pop edi
mov esp, ebp
pop ebp
ret
call fcn.00516250
mov dword [esi], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
add eax, 0x200
pop edi
mov esp, ebp
pop ebp
ret
mov eax, 0x1000000
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x517420
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
push esi
push edi
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
je 0x5174a1
push 0x124
lea eax, [ebp - 0x124]
push 0
push eax
call fcn.004f9250
add esp, 0xc
lea ecx, [ebp - 0x128]
push ecx
push esi
mov dword [ebp - 0x128], 0x128
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x51749a
mov edi, dword [sym.imp.KERNEL32.dll_Process32Next]
lea edx, [ebp - 0x104]
push str.DySDKController.exe
push edx
call fcn.004f728e
add esp, 8
test eax, eax
je 0x5174a9
lea eax, [ebp - 0x128]
push eax
push esi
call edi
test eax, eax
jne 0x517474
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x5174c0
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x54fe34
mov esi, eax
push 0x65
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
jne 0x5174ff
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push str.C:Program_Files__x86_Bonjour32cvsd.xml
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x5174f6
push 0
lea eax, [ebp - 4]
push eax
push edi
push ebx
push esi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp edi, dword [ebp - 4]
pop edi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x517560
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
push esi
push edi
push 0x124
lea eax, [ebp - 0x124]
push 0
push eax
call fcn.004f9250
add esp, 0xc
push 0
push 2
mov dword [ebp - 0x128], 0x128
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
lea ecx, [ebp - 0x128]
mov esi, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x5175d2
mov edi, dword [sym.imp.KERNEL32.dll_Process32Next]
nop
lea edx, [ebp - 0x104]
push ebx
push edx
call fcn.004f728e
add esp, 8
test eax, eax
je 0x5175df
lea eax, [ebp - 0x128]
push eax
push esi
call edi
test eax, eax
jne 0x5175b0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x120]
pop edi
pop esi
mov esp, ebp
pop ebp
ret