joyce8/EMBER2024-capa huggingface dataset:
Function at 0x44e735
Capabilities:
Capture webcam image

Disassembly:
sub esp, 0x44
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x44e84d
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x44e84d
mov eax, dword [esi + 0x3c]
push eax
call fcn.00463306
mov esi, eax
test esi, esi
je 0x44e84d
mov ebx, dword [esp + 0x58]
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push ebx
push 0x419
push ecx
call ebp
mov edi, eax
test edi, edi
jl 0x44e84d
mov ecx, esi
call fcn.0044e6a0
cmp edi, eax
jge 0x44e84d
mov eax, dword [esi + 0xc4]
mov edx, dword [esi + 0xc0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
xor ecx, ecx
mov dword [esp + 0x28], edx
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x38], edi
jne 0x44e7d3
mov dword [esp + 0x34], 1
jmp 0x44e82e
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0x433
push edx
call ebp
test eax, eax
je 0x44e84d
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], ecx
mov dword [eax], 0
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x10]
add edx, 2
push eax
push ecx
mov dword [esp + 0x1c], edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], 3
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
xor ecx, ecx
push ecx
lea ecx, [esp + 0x2c]
push ecx
push 0x7d8
call fcn.0044dc90
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret 0xc

Function at 0x463caa
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x463ce2
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00461d37
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00461d0f
jmp 0x463cee
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x46539f
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4653e1
call fcn.0046ae54
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4653e1
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4653d8
xor eax, eax
jmp 0x4653e9
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004653ef
pop edi
pop esi
pop ebx
ret 4
Function at 0x46b384
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x46b3b2
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x46b3d0
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0046b2ea
jmp 0x46b3d0
mov eax, dword [esi + 0x14]
test eax, eax
je 0x46b3d0
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0046b2ea
test edi, edi
mov eax, edi
jne 0x46b3ba
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401410
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp dword [esi + 8], ebx
je 0x4014ba
cmp dword [ebp + 8], ebx
je 0x4014ba
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x401438
mov eax, 0x40c1bc
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4014ba
push 0x4100b0
push dword [ebp + 8]
call sub.MSVCRT.dll_fopen
mov edi, eax
pop ecx
cmp edi, ebx
pop ecx
je 0x4014ba
mov eax, dword [0x411384]
cmp eax, ebx
jne 0x401467
mov eax, 0x40c1bc
push edi
push dword [0x40c1c8]
push 1
pop ebx
push ebx
push eax
call sub.MSVCRT.dll_fwrite
and dword [ebp + 8], 0
push edi
push 4
lea eax, [ebp + 8]
push ebx
push eax
call sub.MSVCRT.dll_fwrite
push edi
push 4
lea eax, [esi + 0x20]
push ebx
push eax
call sub.MSVCRT.dll_fwrite
mov eax, dword [esi + 8]
mov esi, dword [esi + 4]
add esp, 0x30
test esi, esi
jne 0x4014a8
mov esi, 0x40c1bc
push edi
push eax
push ebx
push esi
call sub.MSVCRT.dll_fwrite
push edi
call sub.MSVCRT.dll_fclose
add esp, 0x14
pop edi
mov eax, ebx
pop esi
pop ebx
pop ebp
ret 4

Function at 0x401733
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
sub esp, 0x194
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push esi
push edi
push str.WinInet.dll
xor edi, edi
call ebp
mov esi, eax
test esi, esi
je 0x4017dd
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.InternetGetConnectedState
push esi
call ebx
test eax, eax
je 0x40177f
and dword [esp + 0x10], edi
lea ecx, [esp + 0x10]
push edi
push ecx
call eax
test eax, eax
je 0x40177f
mov edi, dword [esp + 0x10]
and edi, 0x17
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test edi, edi
je 0x4017dd
lea eax, [esp + 0x14]
push eax
push 0x101
call sub.WS2_32.dll_WSAStartup
push str.www.lockxls.com
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x4017aa
push 1
pop edi
call sub.WS2_32.dll_WSACleanup
test edi, edi
je 0x4017dd
push str.url.dll
call ebp
mov esi, eax
test esi, esi
je 0x4017dd
push str.InetIsOffline
push esi
call ebx
test eax, eax
je 0x4017d6
push 0
call eax
test eax, eax
je 0x4017d6
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x194
ret
Function at 0x401f74
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, 0x40aaf1
call fcn.00409d50
sub esp, 0x144
mov al, byte [ebp - 0xd]
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
push ebx
mov dword [ebp - 0x28], esi
mov byte [esi], al
call fcn.004010d6
mov al, byte [ebp - 0xd]
lea edi, [esi + 0x10]
push ebx
mov ecx, edi
mov dword [ebp - 4], ebx
mov byte [edi], al
call fcn.004010d6
mov al, byte [ebp - 0xd]
lea ecx, [esi + 0x20]
push ebx
mov byte [ebp - 4], 1
mov byte [ecx], al
call fcn.004010d6
mov al, byte [ebp - 0xd]
lea ecx, [esi + 0x30]
push ebx
mov byte [ebp - 4], 2
mov byte [ecx], al
call fcn.004010d6
mov byte [ebp - 4], 3
mov dword [esi + 0x40], 0xc
push dword [esi + 0x40]
lea eax, [ebp - 0x150]
push str.SOFTWAREMicrosoftOffice_ld.0ExcelInstallRoot
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0xc
lea eax, [ebp - 0x150]
lea ecx, [ebp - 0x4c]
push 1
push 0x80000002
push eax
call fcn.0040216c
cmp dword [ebp - 0x4c], ebx
mov byte [ebp - 4], 4
je 0x4020d7
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.004010d6
push edi
push str.Path
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 5
call fcn.0040223a
test eax, eax
je 0x4020c9
mov eax, dword [esi + 0x18]
cmp eax, ebx
je 0x4020c9
dec eax
cmp dword [edi + 8], eax
mov dword [ebp - 0x14], eax
jb 0x402066
cmp dword [edi + 4], ebx
je 0x402066
mov ecx, edi
call fcn.004025dc
mov eax, dword [edi + 4]
add eax, dword [ebp - 0x14]
jmp 0x40206b
mov eax, 0x40c1bc
cmp byte [eax], 0x5c
je 0x402088
push 0x410220
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push 0x410220
mov ecx, edi
call fcn.00401e53
push dword [0x40c1b8]
lea ecx, [ebp - 0x24]
push ebx
push edi
call fcn.00401008
push str.excel.exe
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push str.excel.exe
lea ecx, [ebp - 0x24]
call fcn.00401e53
mov eax, dword [ebp - 0x20]
cmp eax, ebx
jne 0x4020bd
mov eax, 0x40c1bc
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4020f5
push 1
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.004010d6
cmp dword [ebp - 0x4c], ebx
mov byte [ebp - 4], 3
je 0x4020e6
push dword [ebp - 0x4c]
call dword [ebp - 0x40]
dec dword [esi + 0x40]
cmp dword [esi + 0x40], 8
jg 0x401fdb
jmp 0x402157
push dword [0x40c1b8]
lea eax, [ebp - 0x24]
mov ecx, esi
push ebx
push eax
call fcn.00401008
push dword [esi + 0x40]
lea eax, [ebp - 0x150]
push str.SOFTWAREMicrosoftOffice_ld.0_
push eax
call sub.MSVCRT.dll_sprintf
lea eax, [ebp - 0x150]
push eax
call sub.MSVCRT.dll_strlen
add esp, 0x10
lea ecx, [esi + 0x30]
push eax
lea eax, [ebp - 0x150]
push eax
call fcn.00401112
push 1
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.004010d6
cmp dword [ebp - 0x4c], ebx
mov byte [ebp - 4], 3
je 0x402157
push dword [ebp - 0x4c]
call dword [ebp - 0x40]
or dword [esi + 0x44], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x40216c
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push ebx
push esi
push edi
mov edi, ecx
mov esi, str.advapi32.dll
push esi
and dword [edi], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
test ebx, ebx
jne 0x402197
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.RegOpenKeyExA
push ebx
call esi
push str.RegCreateKeyExA
push ebx
mov dword [edi + 4], eax
call esi
push str.RegCloseKey
push ebx
mov dword [edi + 8], eax
call esi
push str.RegQueryValueExA
push ebx
mov dword [edi + 0xc], eax
call esi
push str.RegSetValueExA
push ebx
mov dword [edi + 0x10], eax
call esi
push str.RegEnumKeyExA
push ebx
mov dword [edi + 0x14], eax
call esi
push str.RegEnumValueA
push ebx
mov dword [edi + 0x18], eax
call esi
push str.RegDeleteValueA
push ebx
mov dword [edi + 0x1c], eax
call esi
mov dword [edi + 0x20], eax
xor eax, eax
cmp dword [ebp + 0x10], eax
je 0x40220b
push edi
push 1
push eax
push dword [ebp + 8]
push dword [ebp + 0xc]
call dword [edi + 4]
jmp 0x402226
lea ecx, [ebp - 4]
push ecx
push edi
push eax
push 0xf003f
push eax
push 0x4112d0
push eax
push dword [ebp + 8]
push dword [ebp + 0xc]
call dword [edi + 8]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x404780
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x40478e
xor eax, eax
pop ebp
ret
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x10], 8
push esi
push edi
not eax
mov ecx, 0xff
jb 0x40486f
mov edi, dword [ebp + 0x10]
push ebx
shr edi, 3
movzx ebx, byte [edx]
mov esi, eax
sub dword [ebp + 0x10], 8
and esi, ecx
xor esi, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [esi*4 + 0x40d5a4]
xor eax, ebx
inc edx
mov esi, eax
movzx ebx, byte [edx]
and esi, ecx
xor esi, ebx
movzx ebx, byte [edx + 1]
mov esi, dword [esi*4 + 0x40d5a4]
shr eax, 8
xor esi, eax
inc edx
mov eax, esi
and eax, ecx
xor eax, ebx
movzx ebx, byte [edx + 1]
mov eax, dword [eax*4 + 0x40d5a4]
shr esi, 8
xor eax, esi
inc edx
mov esi, eax
and esi, ecx
xor esi, ebx
movzx ebx, byte [edx + 1]
mov esi, dword [esi*4 + 0x40d5a4]
shr eax, 8
xor esi, eax
inc edx
mov eax, esi
and eax, ecx
xor eax, ebx
movzx ebx, byte [edx + 1]
mov eax, dword [eax*4 + 0x40d5a4]
shr esi, 8
xor eax, esi
inc edx
mov esi, eax
and esi, ecx
xor esi, ebx
movzx ebx, byte [edx + 1]
mov esi, dword [esi*4 + 0x40d5a4]
shr eax, 8
xor esi, eax
inc edx
mov eax, esi
and eax, ecx
xor eax, ebx
movzx ebx, byte [edx + 1]
mov eax, dword [eax*4 + 0x40d5a4]
shr esi, 8
xor eax, esi
inc edx
mov esi, eax
and esi, ecx
xor esi, ebx
shr eax, 8
mov esi, dword [esi*4 + 0x40d5a4]
xor eax, esi
inc edx
dec edi
jne 0x4047ab
pop ebx
cmp dword [ebp + 0x10], 0
je 0x404890
movzx edi, byte [edx]
mov esi, eax
and esi, ecx
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x40d5a4]
xor eax, esi
inc edx
dec dword [ebp + 0x10]
jne 0x404875
pop edi
pop esi
not eax
pop ebp
ret

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

Disassembly:
mov ecx, dword [esp + 4]
push esi
push edi
mov edx, 0xff
mov esi, dword [ecx]
movzx edi, byte [esp + 0x10]
mov eax, esi
and eax, edx
xor eax, edi
shr esi, 8
mov eax, dword [eax*4 + 0x40d5a4]
xor eax, esi
mov esi, dword [ecx + 8]
mov dword [ecx], eax
and eax, edx
add eax, dword [ecx + 4]
mov edi, esi
and edi, edx
imul eax, eax, 0x8088405
inc eax
mov dword [ecx + 4], eax
shr eax, 0x18
xor eax, edi
pop edi
shr esi, 8
mov eax, dword [eax*4 + 0x40d5a4]
xor eax, esi
pop esi
mov dword [ecx + 8], eax
ret

Function at 0x4050ce
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0xc]
imul edi, dword [ebp + 0x10]
cmp byte [esi], 0
je 0x405102
lea eax, [ebp + 8]
push 0
push eax
push edi
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4050fd
mov byte [esi + 8], 1
mov eax, dword [ebp + 8]
jmp 0x40512a
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
lea edx, [ecx + edi]
cmp edx, eax
jbe 0x405113
sub eax, ecx
mov edi, eax
mov eax, dword [esi + 0x14]
push edi
add eax, ecx
push eax
push dword [ebp + 8]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
pop edi
div dword [ebp + 0xc]
pop esi
pop ebp
ret
Function at 0x405ec3
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x405f6b
cmp dword [esi + 4], 0xffffffff
jne 0x405f6b
push edi
lea edi, [esi + 0x140]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push edi
call sub.MSVCRT.dll_strlen
mov al, byte [eax + esi + 0x13f]
pop ecx
cmp al, 0x5c
je 0x405f13
cmp al, 0x2f
je 0x405f13
push 0x410220
push edi
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
cmp dword [ebp + 0x10], 1
pop edi
jne 0x405f35
push 1
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x405f35
mov eax, 0x2000000
jmp 0x405f70
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00404ef2
add esp, 0x10
test eax, eax
jne 0x405f53
mov eax, dword [ebp - 4]
jmp 0x405f70
push eax
call fcn.00405324
mov dword [esi], eax
pop ecx
neg eax
sbb eax, eax
and ax, 0xfe00
add eax, 0x200
jmp 0x405f70
mov eax, 0x1000000
pop esi
leave
ret 0xc

Function at 0x4063ab
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]
test ebx, ebx
push edi
je 0x4063d2
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4063d2
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edi, dword [ebp + 0xc]
mov al, byte [edi]
test al, al
je 0x40646d
push esi
mov esi, edi
mov ecx, edi
cmp al, 0x2f
je 0x4063ec
cmp al, 0x5c
jne 0x4063ee
mov esi, ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x4063e4
cmp esi, edi
je 0x406422
sub esi, edi
lea eax, [ebp - 0x208]
push esi
push edi
push eax
call sub.MSVCRT.dll_memcpy
and byte [ebp + esi - 0x208], 0
lea eax, [ebp - 0x208]
push eax
push ebx
call fcn.004063ab
add esp, 0x14
and byte [ebp - 0x104], 0
pop esi
test ebx, ebx
je 0x40643d
lea eax, [ebp - 0x104]
push ebx
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
lea eax, [ebp - 0x104]
push edi
push eax
call sub.MSVCRT.dll_strcat
pop ecx
lea eax, [ebp - 0x104]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40646d
lea eax, [ebp - 0x104]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
pop edi
pop ebx
leave
ret
Function at 0x406aa4
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 4], 0
push esi
push dword [ebp + 8]
mov esi, ecx
mov dword [ebp - 8], esi
call fcn.00406a3b
test eax, eax
je 0x406b55
push ebx
push edi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x406b4c
push edi
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
mov ebx, eax
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x406b4c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
mov dword [ebp + 0x14], eax
je 0x406b4c
mov edi, dword [ebp + 0x18]
cmp ebx, edi
jbe 0x406b4c
mov esi, dword [ebp + 0x1c]
test esi, esi
jne 0x406b12
mov esi, ebx
lea eax, [edi + esi]
cmp eax, ebx
jbe 0x406b1d
sub ebx, edi
mov esi, ebx
mov ebx, dword [ebp + 0xc]
and byte [ebp + 0xb], 0
lea eax, [ebp + 0xb]
mov ecx, ebx
push eax
push esi
call fcn.00401c50
mov eax, dword [ebp + 0x14]
push esi
add eax, edi
push eax
push dword [ebx + 4]
call sub.MSVCRT.dll_memcpy
mov esi, dword [ebp - 8]
add esp, 0xc
mov dword [ebp - 4], 1
mov ecx, esi
call fcn.00406a24
pop edi
pop ebx
mov eax, dword [ebp - 4]
pop esi
leave
ret 0x18
Function at 0x407264
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 4]
push esi
push edi
mov edx, 0xff
mov esi, dword [ecx]
movzx edi, byte [esp + 0x10]
mov eax, esi
and eax, edx
xor eax, edi
shr esi, 8
mov eax, dword [eax*4 + 0x40db70]
xor eax, esi
mov esi, dword [ecx + 8]
mov dword [ecx], eax
and eax, edx
add eax, dword [ecx + 4]
mov edi, esi
and edi, edx
imul eax, eax, 0x8088405
inc eax
mov dword [ecx + 4], eax
shr eax, 0x18
xor eax, edi
pop edi
shr esi, 8
mov eax, dword [eax*4 + 0x40db70]
xor eax, esi
pop esi
mov dword [ecx + 8], eax
ret

Function at 0x407313
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 0xc]
cmp byte [esi + 0x2d], 0
je 0x407387
mov eax, dword [esi + 0x3c]
xor ebx, ebx
cmp eax, ebx
je 0x40733f
cmp dword [esi + 0x40], edi
jae 0x40733f
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov dword [esi + 0x3c], ebx
cmp dword [esi + 0x3c], ebx
jne 0x407354
lea eax, [edi + edi]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
push edi
push dword [ebp + 8]
push dword [esi + 0x3c]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
test edi, edi
jbe 0x407384
mov eax, dword [esi + 0x3c]
mov al, byte [ebx + eax]
push eax
lea eax, [esi + 0x30]
push eax
call fcn.004072d2
pop ecx
pop ecx
mov ecx, dword [esi + 0x3c]
mov byte [ebx + ecx], al
inc ebx
cmp ebx, edi
jb 0x407367
mov edx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x4073b6
mov eax, dword [esi + 0x24]
lea ebx, [eax + edi]
cmp ebx, dword [esi + 0x28]
jb 0x4073a2
mov dword [esi + 0x14], 0x30000
jmp 0x4073d8
push edi
add eax, ecx
push edx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add dword [esi + 0x24], edi
mov eax, edi
jmp 0x4073da
mov eax, dword [esi + 4]
test eax, eax
je 0x4073d1
lea ecx, [ebp + 8]
push 0
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
jmp 0x4073da
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x4075ac
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
inc dword [0x4113ac]
push dword [0x4113ac]
lea eax, [ebp - 0x100]
push ecx
push str._ld_ld
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0x10
push dword [ebp + 8]
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x100]
push eax
push dword [ebp + 8]
call sub.MSVCRT.dll_strcat
push str..tmp
push dword [ebp + 8]
call sub.MSVCRT.dll_strcat
add esp, 0x10
leave
ret 4
Function at 0x407651
Capabilities:
Check if file exists
Delete file
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
push esi
push edi
xor edi, edi
cmp dword [ebp + 8], edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edi
je 0x40772c
cmp dword [ebp + 0xc], edi
je 0x40772c
push dword [ebp + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call ebx
inc eax
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0xc], eax
jne 0x4076a0
push dword [ebp + 0x10]
call esi
cmp eax, edi
je 0x40772c
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x110]
push eax
call fcn.004075ac
lea eax, [ebp - 0x110]
push eax
call ebx
inc eax
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0xc], eax
jne 0x4076d0
lea eax, [ebp - 0x110]
push eax
call esi
cmp eax, edi
je 0x407715
lea eax, [ebp - 0x110]
push 0x4100b0
push eax
call sub.MSVCRT.dll_fopen
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x407715
push edi
push dword [ebp + 0xc]
push 1
push dword [ebp + 8]
call sub.MSVCRT.dll_fwrite
push edi
call sub.MSVCRT.dll_fclose
mov ecx, dword [ebp - 8]
add esp, 0x14
lea eax, [ebp - 0x110]
push dword [ebp + 0x10]
push eax
call fcn.00407607
mov dword [ebp - 4], eax
lea eax, [ebp - 0x110]
push eax
call ebx
cmp eax, 0xffffffff
je 0x40772c
lea eax, [ebp - 0x110]
push eax
call esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x407736
Capabilities:
Delete file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
push ebx
push esi
lea eax, [ebp - 0x128]
push edi
mov edi, ecx
push eax
call fcn.004075ac
mov esi, dword [ebp + 8]
xor ebx, ebx
mov ecx, dword [esi + 4]
test ecx, ecx
jne 0x407760
xor eax, eax
jmp 0x407765
mov eax, dword [esi + 8]
sub eax, ecx
lea edx, [ebp - 0x128]
push edx
push eax
push ecx
mov ecx, edi
call fcn.00407651
test eax, eax
je 0x4077f4
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x128]
push eax
call sub.MSVCRT.dll__stat
pop ecx
test eax, eax
pop ecx
jne 0x4077f4
lea eax, [ebp - 0x128]
push 0x4100b4
push eax
call sub.MSVCRT.dll_fopen
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x4077f4
and byte [ebp + 0xb], 0
lea eax, [ebp + 0xb]
push eax
mov ecx, esi
push dword [ebp - 0x10]
call fcn.00401c50
mov eax, dword [esi + 4]
push edi
push dword [ebp - 0x10]
push 1
push eax
call sub.MSVCRT.dll_fread
push edi
mov ebx, eax
call sub.MSVCRT.dll_fclose
and byte [ebp + 0xb], 0
add esp, 0x14
lea eax, [ebp + 0xb]
mov ecx, esi
push eax
push ebx
call fcn.00401c50
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 1
pop ebx
pop edi
mov eax, ebx
pop esi
pop ebx
leave
ret 4
Function at 0x407b6c
Capabilities:
Write file on windows

Disassembly:
push esi
push edi
push 0x4100b0
xor esi, esi
push dword [esp + 0x10]
call sub.MSVCRT.dll_fopen
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x407baf
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x407b95
xor eax, eax
jmp 0x407b9a
mov eax, dword [eax + 8]
sub eax, ecx
push edi
push eax
push 1
pop esi
push esi
push ecx
call sub.MSVCRT.dll_fwrite
push edi
call sub.MSVCRT.dll_fclose
add esp, 0x14
mov eax, esi
pop edi
pop esi
ret
Function at 0x4085c2
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, 0x40ad60
call fcn.00409d50
push ecx
lea ecx, [ebp - 0x10]
call fcn.004075a9
mov eax, dword [ebp + 8]
and dword [ebp - 4], 0
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x4085e7
xor eax, eax
jmp 0x4085ec
mov eax, dword [eax + 8]
sub eax, ecx
push esi
push dword [ebp + 0xc]
push eax
push ecx
lea ecx, [ebp - 0x10]
call fcn.00407651
mov esi, eax
test esi, esi
jne 0x408611
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x408611
push 1
pop esi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00402853
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop esi
mov dword fs:[0], ecx
leave
ret