joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407a0a
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x42a050]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov esi, 0x4046b0
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push eax
mov dword [ebp - 0x38], eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
push 6
mov dword [ebx], eax
pop ecx
xor eax, eax
xor esi, esi
lea edi, [ebp - 0x34]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
push esi
mov dword [ebp - 0x40], esi
call edi
mov dword [ebp - 0x3c], eax
or eax, 1
push eax
call edi
mov eax, dword [ebx]
dec eax
dec eax
je 0x407a71
dec eax
je 0x407acb
sub eax, 3
jne 0x407a99
mov dword [ebx], 3
jmp 0x407acb
mov eax, dword [ebp - 0x38]
mov ax, word [eax]
push esi
push esi
push 3
push esi
push 3
mov word [ebp - 0x10], ax
push SysReAllocString
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x38], eax
cmp eax, 0xffffffff
jne 0x407a9d
mov dword [ebx], esi
jmp 0x407acb
push esi
lea ecx, [ebp - 0x40]
push ecx
push 0x18
lea ecx, [ebp - 0x34]
push ecx
push esi
push esi
push 0x70000
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x407ac0
cmp dword [ebp - 0x2c], 0xb
je 0x407acb
push dword [ebp - 0x38]
mov dword [ebx], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x3c]
call edi
mov ecx, dword [ebp - 8]
pop edi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.004191d5
leave
ret 4
Function at 0x407ae7
Capabilities:
Create directory
Delete directory
Move file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
xor ebx, ebx
push ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
call edi
mov dword [ebp - 0x14], eax
or eax, 1
push eax
call edi
mov dword [ebp - 0xc], ebx
lea eax, [ebp - 4]
push eax
call fcn.0040746a
mov esi, eax
cmp esi, ebx
jl 0x407bec
push dword [ebp - 4]
lea eax, [ebp - 8]
push dword [ebp + 8]
push 0x4046e0
push eax
call fcn.00408b7e
mov esi, eax
add esp, 0x10
cmp esi, ebx
jl 0x407bf3
push dword [ebp - 8]
lea esi, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
call fcn.00409926
mov esi, eax
cmp esi, ebx
jl 0x407bfa
mov esi, dword [ebp - 0x10]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x407b82
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x407b82
push 4
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp esi, ebx
je 0x407b8c
push esi
call fcn.00408e6f
cmp dword [ebp - 4], ebx
je 0x407b99
push dword [ebp - 4]
call fcn.00408e6f
cmp dword [ebp - 8], ebx
je 0x407ba6
push dword [ebp - 8]
call fcn.00408e6f
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
cmp dword [ebp - 0x10], ebx
jne 0x407c09
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x3e8
jl 0x407b0f
xor esi, esi
inc esi
cmp dword [ebp - 4], ebx
je 0x407bd1
push dword [ebp - 4]
call fcn.00408e6f
cmp dword [ebp - 8], ebx
je 0x407bde
push dword [ebp - 8]
call fcn.00408e6f
push dword [ebp - 0x14]
call edi
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 4
push 0x4046c0
jmp 0x407bff
push 0x4046ec
jmp 0x407bff
push 0x404718
push esi
call fcn.0040854a
pop ecx
pop ecx
jmp 0x407bc4
xor esi, esi
jmp 0x407bde
Function at 0x40805a
Capabilities:
Get common file path
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 4], 0
and dword [ebp - 8], 0
push edi
mov edi, dword [0x42b14c]
cmp edi, 1
jne 0x408228
push ebx
push esi
mov ebx, 0x104
mov eax, ebx
lea esi, [ebp - 4]
call fcn.004087eb
mov edi, eax
test edi, edi
jns 0x40809b
push 0x404adc
jmp 0x40821e
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x4080d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x4080c3
and edi, 0xffff
or edi, 0x80070000
test edi, edi
js 0x4080ca
mov edi, 0x80004005
push 0x404b04
jmp 0x40821e
cmp eax, ebx
jbe 0x4080fa
lea esi, [ebp - 4]
mov ebx, eax
call fcn.004087eb
mov edi, eax
test edi, edi
js 0x408091
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x4080a9
cmp eax, ebx
ja 0x4080a9
push dword [ebp - 4]
lea eax, [ebp - 8]
push 0x404b28
push eax
call fcn.00408b7e
mov edi, eax
add esp, 0xc
test edi, edi
jns 0x40811e
push 0x404b48
jmp 0x40821e
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
jne 0x408158
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x408147
and edi, 0xffff
or edi, 0x80070000
test edi, edi
js 0x40814e
mov edi, 0x80004005
push 0x404b78
jmp 0x40821e
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x404b94
push ebx
call esi
mov dword [0x42bf44], eax
test eax, eax
je 0x4081f8
push 0x404ba0
push ebx
call esi
mov dword [0x42bf40], eax
test eax, eax
je 0x4081f8
push 0x404bb0
push ebx
call esi
mov dword [0x42bf3c], eax
test eax, eax
je 0x4081f8
push 0x404bc0
push ebx
call esi
mov dword [0x42bf38], eax
test eax, eax
je 0x4081f8
push 0x404bd4
push ebx
call esi
mov dword [0x42bf34], eax
test eax, eax
je 0x4081f8
push 0x404be0
push ebx
call esi
mov dword [0x42bf30], eax
test eax, eax
je 0x4081f8
push 0x404bf4
push ebx
call esi
mov dword [0x42bf2c], eax
test eax, eax
je 0x4081f8
push 0x404c0c
push ebx
call esi
mov dword [0x42bf28], eax
test eax, eax
je 0x4081f8
push 0x404c60
push 1
call fcn.004084c7
jmp 0x408224
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x408212
and edi, 0xffff
or edi, 0x80070000
test edi, edi
js 0x408219
mov edi, 0x80004005
push 0x404c24
push edi
call fcn.0040854a
pop ecx
pop ecx
pop esi
pop ebx
cmp dword [ebp - 4], 0
mov dword [0x42b14c], edi
je 0x40823c
push dword [ebp - 4]
call fcn.00408e6f
cmp dword [ebp - 8], 0
je 0x40824a
push dword [ebp - 8]
call fcn.00408e6f
mov eax, edi
pop edi
leave
ret
Function at 0x4085b2
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x42a050]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor edi, edi
cmp dword [0x42b140], 0xffffffff
mov eax, 0x104
mov dword [ebp - 0x424], eax
mov dword [ebp - 0x420], edi
mov dword [ebp - 0x41c], edi
mov dword [ebp - 0x418], edi
je 0x408702
cmp dword [0x42c120], edi
je 0x408702
push eax
lea eax, [ebp - 0x20c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, 0x208
test eax, eax
jne 0x40862a
push esi
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.0041de40
add esp, 0xc
push ebx
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.00409a63
test eax, eax
jns 0x40864d
xor ebx, ebx
jmp 0x408659
mov edi, dword [ebp - 0x420]
mov ebx, dword [ebp - 0x41c]
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
jne 0x408682
push esi
push eax
lea eax, [ebp - 0x414]
push eax
call fcn.0041de40
add esp, 0xc
lea esi, [ebp - 0x418]
call fcn.00408e9c
mov esi, eax
test esi, esi
js 0x4086dc
push dword [ebp - 0x418]
push 0x404dfc
push 1
call fcn.004084c7
movzx eax, bx
push eax
movzx eax, di
shr ebx, 0x10
push ebx
push eax
shr edi, 0x10
push edi
lea eax, [ebp - 0x20c]
push eax
push 0x404e18
push 1
call fcn.004084c7
push 0x404da8
push 0x404db4
push 1
call fcn.004084c7
add esp, 0x34
xor edi, edi
pop ebx
cmp dword [ebp - 0x418], edi
je 0x4086f2
push dword [ebp - 0x418]
call fcn.00408e6f
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004191d5
leave
ret
xor esi, esi
inc esi
jmp 0x4086df

Function at 0x40870c
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
push dword [ebp + 0xc]
xor edi, edi
push dword [ebp + 8]
lea ebx, [ebp - 4]
mov dword [ebp - 4], edi
xor esi, esi
mov dword [ebp - 8], edi
call fcn.00408c9a
mov dword [ebp + 0xc], eax
cmp eax, edi
jl 0x4087a7
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp + 8], eax
cmp eax, edi
jbe 0x408770
push edi
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 8]
sub eax, esi
push eax
mov eax, dword [ebp - 4]
add eax, esi
push eax
push dword [0x42b140]
call ebx
test eax, eax
je 0x4087be
add esi, dword [ebp - 8]
cmp esi, dword [ebp + 8]
jb 0x40874b
cmp dword [ebp + 0x10], edi
je 0x4087a7
push edi
lea eax, [ebp - 8]
push eax
push 2
push 0x404da4
push dword [0x42b140]
call ebx
test eax, eax
jne 0x4087a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
cmp eax, edi
jle 0x4087a7
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 0xc], eax
cmp dword [ebp - 4], edi
pop edi
pop esi
pop ebx
je 0x4087b7
push dword [ebp - 4]
call fcn.00408e6f
mov eax, dword [ebp + 0xc]
leave
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
cmp eax, edi
jle 0x4087d8
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], edi
jl 0x4087a7
mov dword [ebp + 0xc], 0x80004005
jmp 0x4087a7
Function at 0x4091d3
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push ebx
push esi
push edi
push dword [ebp + 8]
lea esi, [ebp - 4]
call fcn.00409926
mov ebx, dword [ebp - 4]
mov edi, eax
test edi, edi
js 0x4092a3
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40920c
test al, 0x10
jne 0x4092a3
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4092a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4092a1
movzx eax, word [ebx]
xor esi, esi
mov ecx, ebx
test ax, ax
je 0x40924e
cmp ax, 0x5c
jne 0x40923f
mov esi, ecx
add ecx, 2
movzx eax, word [ecx]
test ax, ax
jne 0x409237
test esi, esi
jne 0x409255
mov edi, 0x80070003
jmp 0x4092a3
push dword [ebp + 0xc]
xor eax, eax
push ebx
mov word [esi], ax
call fcn.004091d3
mov edi, eax
push 0x5c
pop eax
mov word [esi], ax
test edi, edi
js 0x4092a3
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4092a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40928f
xor edi, edi
inc edi
jmp 0x4092a3
test eax, eax
jle 0x40929d
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
jmp 0x4092a3
xor edi, edi
test ebx, ebx
je 0x4092ad
push ebx
call fcn.00408e6f
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x409a63
Capabilities:
Get file version info

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push dword [ebp + 8]
xor ebx, ebx
lea esi, [ebp - 4]
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
call fcn.00409926
mov esi, eax
cmp esi, ebx
jl 0x409b50
push edi
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov edi, eax
cmp edi, ebx
jne 0x409ace
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x409abe
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x409b4f
mov esi, 0x80004005
jmp 0x409b4f
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp + 8], eax
cmp eax, ebx
jne 0x409ae4
mov esi, 0x8007000e
jmp 0x409b4f
push eax
push edi
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x409b10
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x4050ac
push dword [ebp + 8]
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
jne 0x409b33
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x409b2a
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x409b46
mov esi, 0x80004005
jmp 0x409b46
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [eax + 0xc]
mov dword [edx], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
cmp dword [ebp - 4], ebx
je 0x409b5d
push dword [ebp - 4]
call fcn.00408e6f
mov eax, esi
pop esi
pop ebx
leave
ret 0xc

Function at 0x409bb0
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
xor esi, esi
xor edi, edi
cmp dword [ebp + 0x10], esi
jbe 0x409c0e
and dword [ebp - 4], edi
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x10]
sub eax, esi
push eax
mov eax, dword [ebp + 0xc]
add eax, esi
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409bed
add esi, dword [ebp - 4]
cmp esi, dword [ebp + 0x10]
jb 0x409bc1
jmp 0x409c0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x409c07
and edi, 0xffff
or edi, 0x80070000
test edi, edi
js 0x409c0e
mov edi, 0x80004005
test ebx, ebx
je 0x409c14
mov dword [ebx], esi
mov eax, edi
pop edi
pop esi
leave
ret 0xc
Function at 0x409c21
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push ebx
push esi
push edi
push dword [ebp + 8]
lea esi, [ebp - 4]
call fcn.00409926
mov ebx, dword [ebp - 4]
mov edi, eax
test edi, edi
js 0x409c8b
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x409c8b
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 2
je 0x409c8b
cmp eax, 3
je 0x409c8b
push 4
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x409c8b
call esi
mov edi, eax
test edi, edi
jle 0x409c84
and edi, 0xffff
or edi, 0x80070000
test edi, edi
js 0x409c8b
mov edi, 0x80004005
test ebx, ebx
je 0x409c95
push ebx
call fcn.00408e6f
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40a003
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x100a4
call fcn.00420fc0
mov eax, dword [0x42a050]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 7
mov esi, ecx
pop ecx
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x10090], ebx
lea edi, [ebp - 0x1008c]
push 0x48
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x10070]
push ebx
push eax
call fcn.0041de40
add esp, 0xc
xor eax, eax
push 7
mov byte [ebp - 0x24], bl
pop ecx
lea edi, [ebp - 0x23]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x10094], eax
cmp eax, ebx
jne 0x40a06f
mov dword [ebp - 0x10094], 0x403a30
mov eax, fcn.004064d8
test eax, eax
je 0x40a099
mov eax, dword [esi + 0x10]
push ebx
push dword [eax + 0x14]
push dword [eax + 0x10]
push dword [ebp - 0x10094]
push 3
call fcn.004064d8
mov ebx, eax
test ebx, ebx
jne 0x40a20c
lea eax, [ebp - 0x10090]
push eax
call fcn.00423bd0
mov eax, dword [esi + 0x10]
push dword [eax + 0xc]
push dword [eax + 8]
push dword [esi]
call fcn.00409b6a
mov ebx, eax
xor edi, edi
cmp ebx, edi
jl 0x40a20c
mov eax, fcn.004064d8
test eax, eax
je 0x40a0e4
push edi
push edi
push edi
push dword [ebp - 0x10094]
push 4
call fcn.004064d8
mov ebx, eax
cmp ebx, edi
jne 0x40a20c
xor ebx, ebx
mov dword [ebp - 0x1009c], ebx
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
sub ecx, edi
sbb eax, dword [ebp - 0x1009c]
cmp eax, ebx
jb 0x40a110
ja 0x40a10b
cmp ecx, 0x10000
jbe 0x40a110
mov ecx, 0x10000
push ebx
lea eax, [ebp - 0x100a4]
push eax
push ecx
lea eax, [ebp - 0x10028]
push eax
push dword [esi]
mov dword [ebp - 0x100a4], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a198
push dword [ebp - 0x100a4]
lea eax, [ebp - 0x10028]
push eax
lea eax, [ebp - 0x10090]
push eax
call fcn.00424740
add edi, dword [ebp - 0x100a4]
push ebx
adc dword [ebp - 0x1009c], ebx
push dword [ebp - 0x1009c]
mov dword [ebp - 0x100a0], edi
push edi
push dword [ebp - 0x10094]
push 4
call fcn.004064d8
mov ebx, eax
test ebx, ebx
jne 0x40a20c
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp - 0x1009c]
cmp ecx, dword [eax + 0x14]
ja 0x40a1bb
jb 0x40a191
cmp edi, dword [eax + 0x10]
jae 0x40a1bb
xor ebx, ebx
jmp 0x40a0ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x40a1b2
and ebx, 0xffff
or ebx, 0x80070000
test ebx, ebx
js 0x40a20c
mov ebx, 0x80004005
jmp 0x40a20c
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x10090]
push eax
call fcn.00424850
mov esi, dword [esi + 0x10]
push 0x20
add esi, 0x18
pop ecx
lea edi, [ebp - 0x24]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40a1e2
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40a1b4
mov eax, fcn.004064d8
test eax, eax
je 0x40a20c
push 0
push dword [ebp - 0x1009c]
push dword [ebp - 0x100a0]
push dword [ebp - 0x10094]
push 5
call fcn.004064d8
mov ebx, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.004191d5
leave
ret
Function at 0x40a505
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
xor esi, esi
push esi
push esi
push dword [edi]
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x1c], esi
call fcn.00409b6a
mov dword [ebp - 4], eax
cmp eax, esi
jl 0x40a675
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
cmp dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
jne 0x40a572
mov eax, 0x20000
push eax
push 8
mov dword [ebp - 0xc], eax
call esi
push eax
call ebx
mov dword [ebp - 8], eax
test eax, eax
jne 0x40a58e
mov dword [ebp - 4], 0x8007000e
jmp 0x40a675
mov eax, dword [ebp - 0x18]
push eax
push dword [ebp - 8]
mov dword [ebp - 0xc], eax
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x40a603
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0xc]
and dword [ebp - 0x20], 0
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 4]
sub ecx, eax
add eax, dword [ebp - 8]
push ecx
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a60c
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0xc]
push dword [ebp - 8]
call fcn.0040a681
mov dword [ebp - 4], eax
cmp eax, 0x8007007a
je 0x40a543
test eax, eax
js 0x40a658
push dword [ebp - 0x10]
push 8
call esi
push eax
call ebx
mov dword [edi + 8], eax
test eax, eax
je 0x40a603
mov eax, dword [ebp - 0x14]
push dword [eax + 0x20]
push 8
call esi
push eax
call ebx
mov dword [edi + 0xc], eax
test eax, eax
jne 0x40a635
mov dword [ebp - 4], 0x8007000e
jmp 0x40a658
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
test eax, eax
jle 0x40a626
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jl 0x40a658
mov dword [ebp - 4], 0x80004005
jmp 0x40a658
push dword [ebp - 0x10]
mov ebx, dword [ebp - 0x14]
push ebx
push dword [edi + 8]
call fcn.00421150
add esp, 0xc
push dword [ebx + 0x20]
push dword [ebp - 0x1c]
push dword [edi + 0xc]
call fcn.00421150
add esp, 0xc
cmp dword [ebp - 8], 0
je 0x40a675
push dword [ebp - 8]
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jne 0x40a675
call fcn.00409a29
mov eax, dword [ebp - 4]
pop esi
pop ebx
leave
ret
Function at 0x40a681
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 0xc], 0
mov eax, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
and dword [edi], 0
cmp dword [ebp + 0xc], 0x40
jae 0x40a6ad
mov dword [edi], 0x138
mov eax, 0x8007007a
jmp 0x40a7a7
mov ecx, 0x5a4d
cmp cx, word [eax]
je 0x40a6c1
mov eax, 0x8007000d
jmp 0x40a7a7
push esi
mov esi, dword [eax + 0x3c]
cmp dword [ebp + 0xc], esi
jae 0x40a6dc
add esi, 0xf8
mov dword [edi], esi
mov eax, 0x8007007a
jmp 0x40a7a6
lea ecx, [esi + eax]
cmp dword [ecx], 0x4550
je 0x40a6f1
mov eax, 0x8007000d
jmp 0x40a7a6
movzx eax, word [ecx + 6]
movzx edx, word [ecx + 0x14]
push ebx
mov ebx, eax
imul ebx, ebx, 0x28
add ebx, esi
lea esi, [ebx + edx + 0x18]
mov dword [ebp - 8], eax
cmp dword [ebp + 0xc], esi
jae 0x40a711
mov dword [edi], esi
jmp 0x40a787
lea ebx, [edx + ecx + 0x18]
xor edx, edx
test eax, eax
je 0x40a76e
mov dword [ebp - 4], ebx
mov esi, dword [ebp - 4]
push 8
pop ecx
mov edi, 0x4050cc
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40a734
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40a742
add dword [ebp - 4], 0x28
inc edx
cmp edx, dword [ebp - 8]
jb 0x40a71e
cmp dword [ebp - 8], edx
jbe 0x40a76e
imul edx, edx, 0x28
lea ecx, [edx + ebx]
mov edx, dword [ecx + 0x14]
mov esi, dword [ecx + 0x10]
add esi, edx
cmp dword [ebp + 0xc], esi
jae 0x40a761
mov eax, dword [ebp + 0x10]
mov dword [eax], esi
jmp 0x40a787
mov edi, dword [ebp + 8]
add edx, edi
cmp dword [edx], 0xb0c50003
je 0x40a775
mov eax, 0x8007000d
jmp 0x40a7a5
mov esi, dword [edx + 0x24]
mov eax, dword [edx + 0x20]
add eax, esi
cmp dword [ebp + 0xc], eax
jae 0x40a78e
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov eax, 0x8007007a
jmp 0x40a7a5
mov eax, dword [ebp + 0x14]
mov dword [eax], edx
mov eax, dword [ecx + 8]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov eax, dword [ebp + 0x1c]
add esi, edi
mov dword [eax], esi
mov eax, dword [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret 0x18
Function at 0x40a7b1
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x270
mov eax, dword [0x42a050]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
or dword [ebp - 0x264], 0xffffffff
push ebx
inc eax
mov dword [ebp - 0x26c], eax
push esi
lea eax, [ebp - 0x260]
xor ebx, ebx
push eax
mov dword [ebp - 0x260], ebx
mov dword [ebp - 0x25c], ebx
call fcn.00409711
mov esi, eax
cmp esi, ebx
jl 0x40a984
push dword [ebp - 0x260]
xor eax, eax
lea ecx, [ebp - 0x25c]
call fcn.00408889
mov esi, eax
cmp esi, ebx
jl 0x40a96f
push ebx
push 0x4050d8
lea eax, [ebp - 0x25c]
call fcn.00408abb
mov esi, eax
cmp esi, ebx
jl 0x40a96f
lea eax, [ebp - 0x258]
push eax
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x268], eax
cmp eax, 0xffffffff
jne 0x40a873
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x40a86d
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x40a96f
test byte [ebp - 0x258], 0x10
jne 0x40a8f7
mov eax, dword [ebp - 0x23c]
mov edx, dword [edi + 0x10]
xor ecx, ecx
xor ebx, ebx
add ecx, dword [ebp - 0x238]
adc eax, ebx
cmp ecx, dword [edx + 0x10]
jne 0x40a8f7
cmp eax, dword [edx + 0x14]
jne 0x40a8f7
push dword [ebp - 0x260]
xor eax, eax
lea ecx, [ebp - 0x25c]
call fcn.00408889
mov esi, eax
test esi, esi
js 0x40a945
push ebx
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x25c]
call fcn.00408abb
mov esi, eax
test esi, esi
js 0x40a945
mov eax, dword [ebp + 8]
lea ecx, [eax + 4]
push ecx
push dword [eax]
lea ecx, [ebp - 0x264]
push dword [ebp - 0x25c]
lea edx, [ebp - 0x26c]
call fcn.0040a9ae
mov esi, eax
test esi, esi
jns 0x40a914
lea eax, [ebp - 0x258]
push eax
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40a873
jmp 0x40a92a
push dword [ebp - 0x25c]
lea ecx, [edi + 4]
xor eax, eax
call fcn.00408889
mov esi, eax
test esi, esi
js 0x40a945
mov eax, dword [ebp - 0x264]
cmp eax, 0xffffffff
jne 0x40a93c
mov esi, 0x80070002
jmp 0x40a95a
or dword [ebp - 0x264], 0xffffffff
mov dword [edi], eax
cmp dword [ebp - 0x264], 0xffffffff
je 0x40a95a
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x268], 0xffffffff
je 0x40a96f
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindClose]
xor ebx, ebx
cmp dword [ebp - 0x25c], ebx
je 0x40a984
push dword [ebp - 0x25c]
call fcn.00408e6f
cmp dword [ebp - 0x260], ebx
je 0x40a997
push dword [ebp - 0x260]
call fcn.00408e6f
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.004191d5
leave
ret 8