joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40191f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x14]
xor eax, eax
push edi
cmp esi, eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
jne 0x401940
lea esi, [ebx + ebx*4]
mov edi, dword [sym.imp.ole32.dll_CoTaskMemAlloc]
lea eax, [ebx + 0x14]
push eax
call edi
push esi
mov dword [ebp + 0x14], eax
call edi
cmp dword [ebp + 0x14], 0
mov edi, eax
je 0x4019ca
test edi, edi
je 0x4019ca
lea eax, [ebp - 0xc]
push 0
push eax
push ebx
push dword [ebp + 0x14]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4019ca
push ebx
lea eax, [ebp - 4]
push dword [ebp + 0x14]
mov dword [ebp - 4], esi
push eax
push edi
call fcn.004027d0
add esp, 0x10
test eax, eax
je 0x4019ae
cmp eax, 0xfffffffb
jne 0x4019c6
and dword [ebp - 8], 0
add esi, esi
cmp esi, 0x20000000
ja 0x4019ca
push esi
push edi
call dword [sym.imp.ole32.dll_CoTaskMemRealloc]
mov edi, eax
test edi, edi
jmp 0x401973
push dword [ebp + 0x10]
push dword [ebp - 4]
push edi
call fcn.004019e0
add esp, 0xc
mov dword [ebp - 8], 1
jmp 0x4019ca
and dword [ebp - 8], 0
push dword [ebp + 0x14]
mov esi, dword [sym.imp.ole32.dll_CoTaskMemFree]
call esi
push edi
call esi
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4019e0
Capabilities:
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x320
and byte [ebp - 0x110], 0
push ebx
push esi
push edi
push 0x41
xor eax, eax
and byte [ebp - 0x218], al
pop ecx
lea edi, [ebp - 0x10f]
and byte [ebp - 0x320], al
rep stosd dword es:[edi], eax
push 0x41
lea edi, [ebp - 0x217]
pop ecx
and dword [ebp - 8], eax
rep stosd dword es:[edi], eax
push 0x41
lea edi, [ebp - 0x31f]
pop ecx
rep stosd dword es:[edi], eax
mov edi, str.EAC_ARCHIVEDATA00
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, dword [ebp + 8]
mov esi, eax
test ebx, ebx
je 0x401b7a
cmp dword [ebp + 0x10], 0
je 0x401b7a
lea eax, [esi + 0x140]
cmp dword [ebp + 0xc], eax
jbe 0x401b7a
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x320]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x320]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x401b88
mov eax, dword [ebp + 0xc]
lea edi, [esi + ebx]
sub eax, esi
mov dword [ebp + 8], eax
je 0x401b7a
mov ebx, 0x104
jmp 0x401a9a
mov eax, dword [ebp + 8]
push dword [ebp + 0xc]
lea ecx, [edi + 0x2c]
mov esi, edi
push eax
push ecx
call fcn.004020d7
add esp, 0xc
lea eax, [edi + 0x2c]
push eax
lea eax, [ebp - 0x110]
push dword [ebp + 0x10]
push str._s_s
push ebx
push eax
call fcn.004118f0
add esp, 0x14
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x218]
push ebx
push eax
call fcn.004118d9
push 0x5c
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004021fa
test eax, eax
je 0x401aff
and byte [eax], 0
lea eax, [ebp - 0x218]
push eax
call fcn.004023a5
xor eax, eax
push eax
push eax
push 2
push eax
push eax
lea eax, [ebp - 0x110]
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x401b82
lea ecx, [ebp - 8]
push 0
push ecx
add edi, 0x140
push dword [esi + 0x20]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esi + 0x14]
push eax
lea eax, [esi + 0xc]
push eax
lea eax, [esi + 4]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov esi, dword [esi + 0x20]
mov eax, 0xfffffec0
sub eax, esi
add edi, esi
add dword [ebp + 8], eax
jne 0x401a97
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
jmp 0x401b7d
Function at 0x401b8c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
push ebx
push esi
push edi
push 0x41
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x11b]
mov byte [ebp - 0x11c], bl
push 0x41
rep stosd dword es:[edi], eax
pop ecx
lea edi, [ebp - 0x223]
mov byte [ebp - 0x224], bl
mov byte [ebp - 0x14], bl
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x13]
cmp dword [ebp + 8], ebx
stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ebx
stosb byte es:[edi], al
je 0x401cf4
cmp dword [ebp + 0xc], ebx
je 0x401cf4
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, 0x105
lea eax, [ebp - 0x11c]
push esi
push eax
push dword [ebp + 8]
call fcn.00401df8
test eax, eax
je 0x401cf4
lea eax, [ebp - 0x224]
push esi
push eax
lea eax, [ebp - 0x11c]
push eax
push dword [ebp + 0xc]
call fcn.00401ea2
test eax, eax
je 0x401cf4
push ebx
push ebx
push 3
push ebx
push 1
lea eax, [ebp - 0x11c]
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp + 8], esi
je 0x401cf4
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x14]
push 7
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 2
push ebx
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
call esi
push dword [ebp + 8]
call fcn.00401cfd
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
call fcn.0040186c
mov edi, eax
add esp, 0xc
cmp edi, ebx
mov dword [ebp + 0xc], edi
je 0x401ceb
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
neg edi
push 1
push ebx
lea eax, [edi - 0x64]
push eax
push dword [ebp + 8]
call esi
cmp eax, 0xffffffff
je 0x401ceb
cmp eax, ebx
jne 0x401cc4
lea eax, [ebp - 0x14]
push 0x414290
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x401ceb
mov dword [ebp - 8], 1
push dword [ebp - 4]
lea eax, [ebp - 0x224]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040191f
add esp, 0x10
push 1
push ebx
push edi
push dword [ebp + 8]
call esi
cmp dword [ebp - 8], 1
jne 0x401c6c
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 8
Function at 0x401cfd
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
push ebx
xor ebx, ebx
cmp dword [ebp + 8], 0xffffffff
push esi
push edi
mov dword [ebp - 8], ebx
je 0x401de7
push 9
xor eax, eax
pop ecx
lea edi, [ebp - 0x37]
mov byte [ebp - 0x38], bl
push str.33D55E00_1916_4656_A942_92D420609FC0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x38]
push 0x27
push eax
call fcn.004118d9
lea eax, [ebp - 0x38]
push eax
call fcn.00401000
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
push ebx
push ebx
push dword [ebp + 8]
call esi
push 0x18
mov edx, eax
pop ecx
xor eax, eax
lea edi, [ebp - 0x9b]
mov byte [ebp - 0x9c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [edx - 0x64]
mov dword [ebp - 0xc], edx
cmp eax, ebx
mov dword [ebp - 4], ebx
jbe 0x401ddf
lea edi, [edx - 0x64]
push 0x64
lea eax, [ebp - 0x9c]
push ebx
push eax
call fcn.0040c590
add esp, 0xc
push ebx
push ebx
push edi
push dword [ebp + 8]
call esi
cmp eax, 0xffffffff
je 0x401dcd
lea eax, [ebp - 0x10]
push ebx
push eax
lea eax, [ebp - 0x9c]
push 0x64
push eax
push dword [ebp + 8]
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401dcd
lea eax, [ebp - 0x38]
mov byte [ebp - 0x75], bl
push eax
lea eax, [ebp - 0x9c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x401def
mov eax, dword [ebp - 0xc]
inc dword [ebp - 4]
add eax, 0xffffff9c
dec edi
cmp dword [ebp - 4], eax
jb 0x401d78
mov edx, dword [ebp - 0xc]
push ebx
push ebx
push edx
push dword [ebp + 8]
call esi
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret
mov dword [ebp - 8], 1
jmp 0x401de7

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push ebx
push edi
push 0x41
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x107]
mov byte [ebp - 0x108], bl
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 8]
cmp edi, ebx
je 0x401e9a
cmp dword [ebp + 0xc], ebx
je 0x401e9a
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x401e9a
mov al, byte [edi + 1]
cmp al, 0x3a
je 0x401e64
cmp byte [edi], 0x5c
jne 0x401e3f
cmp al, 0x5c
je 0x401e64
push esi
mov esi, 0x104
push ebx
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.00402236
push edi
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.00411948
pop esi
jmp 0x401e72
lea eax, [ebp - 0x108]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401e9a
push dword [ebp + 0x10]
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 1
pop ebx
mov eax, ebx
pop edi
pop ebx
leave
ret 0xc
Function at 0x402174
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
xor esi, esi
cmp dword [ebp + 8], esi
mov dword [ebp - 4], esi
je 0x4021c8
cmp dword [ebp + 0xc], esi
je 0x4021c8
lea eax, [ebp - 4]
push eax
push 0x20019
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4021c8
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4021bf
push 1
pop esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
leave
ret 0x18

Function at 0x4022e2
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x56c
push ebx
push edi
push 0x10
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x54]
mov dword [ebp - 0x58], ebx
rep stosd dword es:[edi], eax
mov ecx, 0x144
lea edi, [ebp - 0x56b]
mov byte [ebp - 0x56c], bl
or dword [ebp - 4], 0xffffffff
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], ebx
cmp dword [ebp + 8], ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
je 0x40239c
push dword [ebp + 8]
lea eax, [ebp - 0x56c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp + 0x10]
cmp eax, ebx
jne 0x402347
mov dword [ebp - 0x58], 0x44
lea eax, [ebp - 0x58]
lea ecx, [ebp - 0x14]
push ecx
push eax
push ebx
push ebx
push ebx
push 1
push ebx
lea eax, [ebp - 0x56c]
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40239c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x10]
call esi
push dword [ebp + 0xc]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x402396
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x402396
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x14]
call esi
pop esi
mov eax, dword [ebp - 4]
pop edi
pop ebx
leave
ret 0xc
Function at 0x4023a5
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
and byte [ebp - 0x108], 0
push esi
push edi
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x107]
mov esi, dword [ebp + 8]
rep stosd dword es:[edi], eax
and dword [ebp - 4], 0
stosw word es:[edi], ax
test esi, esi
stosb byte es:[edi], al
je 0x4024d7
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4024d0
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x104
jge 0x4024d7
push ebx
lea eax, [ebp - 0x108]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edi, [ebp - 0x108]
push 0x5c
push edi
call fcn.004021cf
mov esi, eax
test esi, esi
jne 0x402429
push 0x2f
push edi
call fcn.004021cf
mov esi, eax
test esi, esi
je 0x40249e
lea eax, [ebp - 0x108]
cmp esi, eax
jbe 0x40246e
movsx eax, byte [esi - 1]
cmp eax, 0x81
jl 0x402445
cmp eax, 0x9f
jle 0x402453
cmp eax, 0xe0
jl 0x40246e
cmp eax, 0xef
jg 0x40246e
mov al, byte [esi]
cmp al, 0x40
jl 0x40245d
cmp al, 0x7e
jle 0x402496
movsx eax, al
cmp eax, 0x80
jl 0x40246e
cmp eax, 0xfc
jle 0x402496
mov bl, byte [esi]
and byte [esi], 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x402494
lea eax, [ebp - 0x108]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov byte [esi], bl
lea edi, [esi + 1]
jmp 0x40240d
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea eax, [ebp - 0x108]
push eax
call esi
cmp eax, 0xffffffff
pop ebx
jne 0x4024c6
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp + 8]
call esi
cmp eax, 0xffffffff
je 0x4024d7
mov dword [ebp - 4], 1
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret 4
Function at 0x4024e0
Capabilities:
Check for time delay via gettickcount
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
push esi
push edi
push 0x4f
xor edx, edx
pop ecx
xor eax, eax
and byte [ebp - 0x354], al
lea edi, [ebp - 0x148]
mov dword [ebp - 0x14c], edx
push 0x40
rep stosd dword es:[edi], eax
pop ecx
lea edi, [ebp - 0x353]
rep stosd dword es:[edi], eax
and byte [ebp - 0x250], dl
push 0x40
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x24f]
cmp dword [ebp + 8], edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0xc], edx
stosb byte es:[edi], al
je 0x4026b4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x100
jge 0x4026b4
push dword [ebp + 8]
lea eax, [ebp - 0x354]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 1
lea eax, [ebp - 0x354]
pop esi
push esi
push eax
call fcn.004026bd
lea eax, [ebp - 0x354]
push 0x41429c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x14c]
push eax
lea eax, [ebp - 0x354]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x4026b4
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0xc], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea eax, [ebp - 0x120]
push 0x414298
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x402661
lea eax, [ebp - 0x120]
push 0x414294
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x402661
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x250]
push dword [ebp + 8]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [ebp - 0x14c]
add esp, 0x10
and eax, 0x10
test al, al
lea eax, [ebp - 0x250]
push eax
je 0x40261c
call fcn.004024e0
jmp 0x402661
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x402661
call ebx
mov dword [ebp - 8], eax
lea eax, [ebp - 0x250]
push eax
call esi
cmp eax, 0xffffffff
je 0x402661
mov eax, dword [ebp - 8]
add eax, 0x3a98
mov dword [ebp - 8], eax
call ebx
cmp eax, dword [ebp - 8]
jae 0x402661
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x250]
push eax
call esi
cmp eax, 0xffffffff
jne 0x402644
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 4]
call edi
test eax, eax
jne 0x4025b2
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
call ebx
push dword [ebp + 8]
mov edi, eax
call esi
cmp eax, 0xffffffff
je 0x4026b3
add edi, 0x3a98
call ebx
cmp eax, edi
jae 0x4026b3
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp + 8]
call esi
cmp eax, 0xffffffff
jne 0x40269b
pop ebx
mov eax, dword [ebp - 0xc]
pop edi
pop esi
leave
ret 4
Function at 0x4093fc
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
mov esi, ecx
dec esi
test esi, esi
jl 0x409456
inc esi
xor edi, edi
cmp edi, 1
jne 0x409422
mov eax, dword [ebp + 0xc]
push eax
call sub.kernel32.dll_Sleep
jmp 0x409430
cmp edi, 1
jle 0x409430
mov eax, dword [ebp + 8]
push eax
call sub.kernel32.dll_Sleep
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00408ee0
test eax, eax
jne 0x409456
call sub.kernel32.dll_GetLastError_1
cmp eax, 2
je 0x409456
call sub.kernel32.dll_GetLastError_1
cmp eax, 3
je 0x409456
inc edi
dec esi
jne 0x409412
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8

Function at 0x4096e8
Capabilities:
Identify system language via api

Disassembly:
push ebx
push esi
push edi
push ebp
cmp dword [0x40cca4], 0
je 0x409731
mov edi, dword [0x40cde4]
dec edi
test edi, edi
jl 0x409731
inc edi
xor esi, esi
mov eax, esi
shl eax, 6
add eax, esi
mov edx, dword [0x40cde0]
mov edx, dword [edx + eax]
mov eax, dword [0x40cca4]
call fcn.00404b90
test eax, eax
jne 0x40972d
mov eax, esi
call fcn.0040969c
jmp 0x4097f6
inc esi
dec edi
jne 0x409703
mov al, byte [0x40cdc8]
sub al, 1
jb 0x40973e
je 0x409747
jmp 0x409750
call fcn.00406f84
mov ebp, eax
jmp 0x409752
call sub.kernel32.dll_GetUserDefaultLangID
mov ebp, eax
jmp 0x409752
xor ebp, ebp
test bp, bp
je 0x4097ef
mov edi, dword [0x40cde4]
dec edi
test edi, edi
jl 0x40979e
inc edi
xor esi, esi
mov eax, esi
shl eax, 6
add eax, esi
mov edx, dword [0x40cde0]
lea ebx, [edx + eax]
movzx eax, bp
cmp eax, dword [ebx + 0x28]
jne 0x40979a
cmp dword [ebx + 0x2c], 0
je 0x409791
call sub.kernel32.dll_GetACP
cmp eax, dword [ebx + 0x2c]
jne 0x40979a
mov eax, esi
call fcn.0040969c
jmp 0x4097f6
inc esi
dec edi
jne 0x409769
mov edi, dword [0x40cde4]
dec edi
test edi, edi
jl 0x4097ef
inc edi
xor esi, esi
mov eax, esi
shl eax, 6
add eax, esi
mov edx, dword [0x40cde0]
lea ebx, [edx + eax]
mov eax, dword [ebx + 0x28]
and eax, 0x3ff
mov edx, ebp
and dx, 0x3ff
movzx edx, dx
cmp eax, edx
jne 0x4097eb
cmp dword [ebx + 0x2c], 0
je 0x4097e2
call sub.kernel32.dll_GetACP
cmp eax, dword [ebx + 0x2c]
jne 0x4097eb
mov eax, esi
call fcn.0040969c
jmp 0x4097f6
inc esi
dec edi
jne 0x4097ac
xor eax, eax
call fcn.0040969c
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x4ae008], 0x8088405
inc edx
mov dword [ebx + 0x4ae008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x41d2ec
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ebp
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
cld
mov dl, 0x80
mov al, byte [esi]
add esi, 1
mov byte [edi], al
add edi, 1
mov ebx, 2
add dl, dl
jne 0x41d31d
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41d305
add dl, dl
jne 0x41d328
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41d379
xor eax, eax
add dl, dl
jne 0x41d335
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41d416
add dl, dl
jne 0x41d344
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41d34f
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41d35a
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41d365
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41d36f
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41d314
mov eax, 1
add dl, dl
jne 0x41d387
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41d392
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41d37e
sub eax, ebx
mov ebx, 1
jne 0x41d3c5
mov ecx, 1
add dl, dl
jne 0x41d3ab
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41d3b6
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41d3a2
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41d314
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41d3dc
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41d3e7
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41d3d3
cmp eax, 0x7d00
sbb ecx, 0xffffffff
cmp eax, 0x500
sbb ecx, 0xffffffff
cmp eax, 0x80
adc ecx, 0
cmp eax, 0x80
adc ecx, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41d314
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41d437
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x41d314
pop ebp
sub edi, dword [ebp - 8]
mov dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x41f504
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov ebx, edx
xor edx, edx
push ebp
push 0x4919f2
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
mov dword [ebp - 8], edx
mov esi, ebx
xor ecx, ecx
cmp byte [eax + 0x6a], 0
je 0x41f553
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [esi + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x88]
test edx, edx
je 0x41f572
mov ecx, edx
add ecx, ebx
jmp 0x41f572
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [esi + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x78]
test edx, edx
je 0x41f572
mov ecx, edx
add ecx, ebx
test ecx, ecx
je 0x41f5e4
mov esi, dword [ecx + 0x18]
mov eax, dword [ecx + 0x1c]
add eax, ebx
mov dword [ebp - 0x10], eax
mov edi, dword [ecx + 0x20]
add edi, ebx
mov eax, dword [ecx + 0x24]
add eax, ebx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
cmp eax, 0xffff
jbe 0x41f5cd
test esi, esi
jbe 0x41f5e4
mov eax, dword [edi]
add eax, ebx
mov edx, dword [ebp - 4]
call fcn.004088f4
test eax, eax
jne 0x41f5bf
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
jmp 0x41f5e4
add dword [ebp - 0xc], 2
add edi, 4
dec esi
test esi, esi
ja 0x41f59c
jmp 0x41f5e4
mov edx, eax
sub edx, dword [ecx + 0x10]
cmp edx, dword [ecx + 0x14]
jae 0x41f5e4
mov eax, edx
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4919f9
ret