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

Disassembly:
push ebp
lea ebp, [esp - 0x394]
sub esp, 0x414
mov eax, dword [0x455090]
xor eax, ebp
mov dword [ebp + 0x390], eax
mov eax, dword [ebp + 0x39c]
push ebx
mov ebx, dword [ebp + 0x3a0]
push esi
push edi
xor esi, esi
push 2
push esi
push eax
mov edi, edx
mov dword [ebp - 0x7c], ecx
mov dword [ebp - 0x80], esi
mov dword [ebp - 0x74], esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [ebp - 0x78], eax
cmp eax, esi
jne 0x403fb5
call fcn.00402ba7
mov esi, eax
jmp 0x404073
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
cmp edi, esi
jne 0x403fce
call fcn.00402ba7
jmp 0x404068
push edi
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
cmp ebx, esi
je 0x403fc4
push edi
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
lea eax, [edi + 1]
cmp eax, edi
jae 0x404008
lea eax, [ebp - 0x70]
cmp dword [ebp - 0x74], eax
je 0x404001
lea eax, [ebp - 0x74]
call fcn.004113d5
mov eax, 0x8007000e
jmp 0x404085
push 2
push eax
call fcn.004030fd
pop ecx
pop ecx
cmp eax, 0x400
jbe 0x404025
push eax
lea eax, [ebp - 0x74]
push eax
call fcn.004030bc
jmp 0x40402b
lea eax, [ebp - 0x70]
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x74], esi
jne 0x404037
mov esi, 0x8007000e
jmp 0x40406a
push edi
push dword [ebp - 0x74]
push edi
push ebx
push esi
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, esi
je 0x403fc4
mov edx, dword [ebp - 0x74]
push dword [ebp + 0x3a4]
xor ecx, ecx
mov word [edx + eax*2], cx
mov ecx, dword [ebp - 0x74]
lea edx, [ebp - 0x80]
call fcn.00403e19
mov esi, eax
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x70]
cmp dword [ebp - 0x74], eax
je 0x404083
lea eax, [ebp - 0x74]
call fcn.004113d5
mov eax, esi
mov ecx, dword [ebp + 0x390]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043028b
add ebp, 0x394
leave
ret 0xc

Function at 0x4042c7
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push dword [esp + 0xc]
mov esi, eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4042de
pop esi
ret
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x404313
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x40430f
cmp edi, eax
jae 0x404313
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x404301
cmp edi, eax
jb 0x404317
xor eax, eax
jmp 0x404320
movzx eax, word [edi]
neg eax
sbb eax, eax
and eax, edi
pop edi
pop esi
ret
Function at 0x4071b6
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x455090]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
test byte [eax + 0x6c], 1
jne 0x4071d3
xor al, al
jmp 0x407249
push edi
push eax
call fcn.00408135
mov edi, eax
mov eax, dword [edi]
mov ecx, dword [eax - 0xc]
cmp ecx, 3
jl 0x407212
test ecx, ecx
jge 0x4071f4
push 0x80070057
call fcn.0040468d
cmp word [eax], 0x5c
jne 0x407216
cmp ecx, 1
jl 0x4071ea
cmp word [eax + 2], 0x5c
jne 0x407216
cmp ecx, 2
jl 0x4071ea
cmp word [eax + 4], 0x5c
je 0x407216
xor al, al
jmp 0x407248
push esi
xor esi, esi
test esi, esi
jl 0x4071ea
mov ecx, esi
mov eax, edi
call fcn.00408e17
mov word [ebp + esi*2 - 0xc], ax
inc esi
cmp esi, 3
jl 0x407219
xor eax, eax
mov word [ebp - 6], ax
pop esi
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
setne al
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043028b
leave
ret 4

Function at 0x407257
Capabilities:
Check if file exists
Copy file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
call fcn.00408135
lea ecx, [ebp - 4]
mov esi, eax
call fcn.00409c5b
push 0x5c
call fcn.00408c62
mov ecx, dword [esi]
mov ecx, dword [ecx - 0xc]
inc eax
lea edx, [ebp - 8]
push edx
sub ecx, eax
mov edx, eax
mov eax, esi
call fcn.00408cf8
mov ebx, dword [ebp - 8]
push dword [ebx - 0xc]
lea eax, [ebp - 4]
push ebx
call fcn.00402383
lea eax, [ebx - 0x10]
call fcn.004046b1
mov ebx, dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4072bd
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esi]
push 0
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x4072d8
xor esi, esi
inc esi
mov dword [edi + 0x10], esi
jmp 0x407359
push esi
lea ebx, [edi + 0x18]
push ebx
push 3
pop eax
call fcn.0041510a
mov eax, dword [0x456f60]
mov ecx, 0x456f60
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 8], eax
xor esi, esi
push esi
lea eax, [ebp - 0xc]
push eax
push ebx
call fcn.00415200
push dword [eax]
mov ebx, dword [ebp - 4]
push ebx
lea eax, [ebp - 8]
push 0x4496d8
push eax
call fcn.004096ad
mov eax, dword [ebp - 0xc]
add esp, 0x10
add eax, 0xfffffff0
call fcn.004046b1
lea eax, [edi + 0x168]
call fcn.00414e69
push esi
push 0x20
push esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.0040f3e6
add esp, 0x14
test al, al
jne 0x40734e
inc esi
mov dword [edi + 0x10], esi
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
call fcn.004046b1
lea eax, [ebx - 0x10]
call fcn.004046b1
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x409fe0
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x26c
mov eax, dword [0x455090]
xor eax, esp
mov dword [esp + 0x268], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
sub eax, 0x10
mov dword [esp + 0x1c], edi
call fcn.00409baf
add eax, 0x10
lea esi, [esp + 0xc]
mov dword [esp + 0xc], eax
call fcn.00409c29
push 0x449968
mov eax, esi
push eax
call fcn.00402192
xor esi, esi
push 0x24c
lea eax, [esp + 0x28]
push esi
push eax
mov dword [esp + 0x2c], esi
call fcn.004302b0
add esp, 0xc
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
je 0x40a142
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileW]
cmp word [esp + 0x4c], 0x2e
jne 0x40a098
cmp word [esp + 0x4e], si
je 0x40a084
cmp word [esp + 0x4e], 0x2e
jne 0x40a098
cmp word [esp + 0x50], si
jne 0x40a098
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x18]
call ebx
mov dword [esp + 0x18], eax
jmp 0x40a136
test byte [esp + 0x20], 0x10
je 0x40a0f8
mov eax, dword [edi]
sub eax, 0x10
call fcn.00409baf
add eax, 0x10
lea esi, [esp + 0x10]
mov dword [esp + 0x10], eax
call fcn.00409c29
lea eax, [esp + 0x4c]
push eax
mov eax, esi
push eax
call fcn.00402192
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x18]
call ebx
mov dword [esp + 0x18], eax
mov eax, esi
push eax
call fcn.00409fe0
pop ecx
call fcn.004020e5
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
call fcn.004046b1
jmp 0x40a136
mov eax, edi
lea edi, [esp + 0xc]
call fcn.004088ee
mov esi, edi
call fcn.00409c29
lea eax, [esp + 0x4c]
push eax
mov eax, edi
push eax
call fcn.00402192
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x18]
call ebx
mov dword [esp + 0x18], eax
call fcn.004020e5
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, dword [esp + 0x1c]
xor esi, esi
cmp dword [esp + 0x18], esi
jne 0x40a066
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
call fcn.004046b1
mov ecx, dword [esp + 0x274]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0043028b
mov esp, ebp
pop ebp
ret
Function at 0x40a1e3
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x456f60]
push esi
mov ecx, 0x456f60
call dword [eax + 0xc]
mov esi, dword [ebp + 0xc]
add eax, 0x10
mov dword [ebp - 4], eax
mov eax, dword [esi]
mov ecx, dword [eax - 0xc]
dec ecx
js 0x40a2aa
push edi
mov eax, esi
call fcn.00408e17
cmp ax, 0x5c
jne 0x40a241
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
lea ecx, [eax - 1]
lea edx, [ebp - 0xc]
mov eax, esi
call fcn.00408d6f
lea edi, [ebp - 4]
call fcn.004088ee
mov eax, dword [ebp - 0xc]
add eax, 0xfffffff0
call fcn.004046b1
jmp 0x40a24b
mov eax, esi
lea edi, [ebp - 4]
call fcn.004088ee
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov ecx, dword [esi]
mov edx, dword [eax - 0xc]
cmp edx, dword [ecx - 0xc]
pop edi
jl 0x40a267
add eax, 0xfffffff0
call fcn.004046b1
pop esi
leave
ret
push 0x5c
call fcn.00408c62
mov ecx, eax
lea edx, [ebp - 8]
mov eax, esi
call fcn.00408d6f
mov eax, dword [ebp - 8]
cmp dword [eax - 0xc], 0
je 0x40a29a
push dword [esi]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
call fcn.0040a1e3
pop ecx
pop ecx
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
call fcn.004046b1
mov eax, dword [ebp - 4]
jmp 0x40a25c
push 0x80070057
call fcn.0040468d
int3

Function at 0x40a2b5
Capabilities:
Get disk information

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0xd4
mov eax, dword [0x455090]
xor eax, ebp
mov dword [ebp + 0x74], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x54]
mov esi, ecx
xor edi, edi
push eax
push 0x64
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov dword [ebp - 0x58], eax
lea ebx, [ebp + edi*2 - 0x54]
push ebx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0x40a31f
push ebx
lea eax, [ebp - 0x5c]
call fcn.004045e3
lea ebx, [ebp - 0x5c]
call fcn.004095ec
mov eax, dword [ebp - 0x5c]
add eax, 0xfffffff0
call fcn.004046b1
jmp 0x40a31f
cmp word [ebp + edi*2 - 0x54], 0
je 0x40a324
inc edi
cmp edi, dword [ebp - 0x58]
jb 0x40a316
inc edi
cmp edi, dword [ebp - 0x58]
jb 0x40a2e8
mov ecx, dword [ebp + 0x74]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043028b
add ebp, 0x78
leave
ret
Function at 0x40a688
Capabilities:
Create directory
Delete directory

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
sub esp, 0x28
push ebx
push esi
push edi
call fcn.0040a33e
test al, al
je 0x40a6a4
xor eax, eax
jmp 0x40a79f
mov eax, dword [ebp + 8]
call fcn.0040a474
mov byte [ebp - 1], al
lea eax, [ebp - 0x24]
xor ebx, ebx
push eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
call fcn.0040a4ff
mov edi, dword [ebp - 0x20]
cmp edi, ebx
pop ecx
jg 0x40a6dd
push ebx
push ebx
push 1
push 0xc000008c
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
sub eax, 0x10
call fcn.00409baf
mov esi, eax
add esi, 0x10
dec edi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x18], edi
cmp byte [ebp + 0xc], bl
je 0x40a6ff
inc edi
mov dword [ebp - 0x18], edi
xor eax, eax
inc eax
cmp edi, eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], eax
jle 0x40a780
mov edi, 0x4498c0
jmp 0x40a715
xor ebx, ebx
lea eax, [esi - 0x10]
call fcn.00409baf
add eax, 0x10
mov dword [ebp - 8], eax
push edi
lea eax, [ebp - 8]
push eax
call fcn.00402192
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x24]
call fcn.0040ddda
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
lea eax, [ebp - 8]
call fcn.00402383
push ebx
mov ebx, dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40a7a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
cmp eax, 0xb7
je 0x40a7b6
cmp byte [ebp - 1], 0
jne 0x40a7b6
cmp dword [ebp - 0x10], 1
jle 0x40a778
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea eax, [ebx - 0x10]
call fcn.004046b1
lea eax, [esi - 0x10]
call fcn.004046b1
lea esi, [ebp - 0x24]
call fcn.00408e65
mov eax, dword [ebp - 0x14]
sub eax, 0xb7
neg eax
sbb eax, eax
and eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x40a7b6
lea ebx, [ebp - 8]
call fcn.004095ec
mov ebx, dword [ebp - 8]
push edi
lea eax, [ebp - 0xc]
push eax
call fcn.00402192
mov esi, dword [ebp - 0x10]
mov eax, esi
lea ecx, [ebp - 0x24]
call fcn.0040ddda
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
lea eax, [ebp - 0xc]
call fcn.00402383
lea eax, [ebx - 0x10]
call fcn.004046b1
inc esi
cmp esi, dword [ebp - 0x18]
mov dword [ebp - 0x10], esi
mov esi, dword [ebp - 0xc]
jl 0x40a713
jmp 0x40a780
Function at 0x40b150
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov ebx, dword [ebp + 8]
cmp byte [ebx + 0xc0], 0
push esi
push edi
je 0x40b2ce
cmp byte [ebx + 0xd8], 0
jne 0x40b2ce
lea esi, [ebx + 0x84]
cmp dword [esi], 3
je 0x40b1ad
call fcn.0040c6af
mov esi, dword [esi]
cmp esi, 2
je 0x40b1ad
cmp esi, 1
je 0x40b1ad
mov eax, dword [ebx + 0x44]
mov ecx, eax
shr ecx, 3
test cl, 1
jne 0x40b1a6
shr eax, 6
test al, 1
je 0x40b1ad
mov eax, ebx
call fcn.0040b916
mov ecx, dword [ebx + 0xa8]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
cmp ecx, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], eax
jle 0x40b21e
lea eax, [ebx + 0xa4]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
call fcn.0040ddda
push dword [eax]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, eax
call edi
test esi, esi
jne 0x40b213
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
call fcn.0040ddda
mov ebx, eax
lea esi, [ebp - 0x24]
call fcn.004095ec
mov ebx, dword [ebp + 8]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jl 0x40b1e0
mov esi, dword [ebx + 0xb4]
dec esi
mov dword [ebp - 4], esi
js 0x40b270
lea eax, [ebx + 0xb0]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
mov eax, esi
call fcn.0040ddda
push dword [eax]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov dword [ebp - 0xc], eax
call edi
cmp dword [ebp - 0xc], 0
jne 0x40b26a
mov ecx, dword [ebp - 8]
mov eax, esi
call fcn.0040ddda
mov ebx, eax
lea esi, [ebp - 0x18]
call fcn.004095ec
mov ebx, dword [ebp + 8]
mov esi, dword [ebp - 4]
dec esi
mov dword [ebp - 4], esi
jns 0x40b233
lea eax, [ebx + 0xa4]
lea edi, [ebp - 0x24]
call fcn.0040dc06
lea esi, [ebx + 0xb0]
call fcn.00408e65
mov edi, dword [ebp - 0x14]
jmp 0x40b29f
mov eax, edi
lea ecx, [ebp - 0x18]
call fcn.0040ddda
mov ebx, eax
call fcn.004095ec
dec edi
jns 0x40b28e
mov eax, dword [ebp + 8]
xor ecx, ecx
cmp dword [eax + 0xa8], ecx
jne 0x40b2b8
cmp dword [eax + 0xb4], ecx
jne 0x40b2b8
inc ecx
lea esi, [ebp - 0x18]
mov byte [eax + 0xd8], cl
call fcn.00408e65
lea esi, [ebp - 0x24]
call fcn.00408e65
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40b916
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
mov edi, eax
mov eax, dword [edi + 0x5c]
sub eax, 0x10
call fcn.00409baf
add eax, 0x10
xor edx, edx
mov dword [ebp - 4], eax
mov eax, dword [edi + 0x44]
inc edx
test dl, al
jne 0x40b968
shr eax, 3
movzx ecx, al
and al, dl
and ecx, edx
movzx eax, al
add ecx, ecx
or ecx, edx
neg eax
sbb eax, eax
and eax, 7
push ecx
push eax
mov eax, edi
call fcn.0040c0e6
lea ecx, [edi + 0x6c]
call fcn.0040dd5a
add eax, 0x18
jmp 0x40b9ae
shr eax, 6
test dl, al
je 0x40b9cf
lea esi, [ebp - 8]
mov ecx, edi
call fcn.0040d534
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
lea eax, [ebp - 4]
call fcn.00402383
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
call fcn.004046b1
lea esi, [ebp - 4]
call fcn.00409c29
push 6
mov eax, edi
call fcn.0040c12a
lea ecx, [edi + 0x98]
call fcn.00415585
lea edi, [ebp - 8]
call fcn.00409e3e
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
lea eax, [ebp - 4]
call fcn.00402383
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
call fcn.004046b1
lea eax, [ebp - 4]
push eax
call fcn.00409fe0
mov esi, dword [ebp - 4]
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea eax, [esi - 0x10]
call fcn.004046b1
pop edi
xor eax, eax
pop esi
leave
ret
Function at 0x40c6af
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebx + 0x44]
sub esp, 0x10
test al, 1
je 0x40c6c7
shr eax, 6
test al, 1
je 0x40c7b2
mov eax, dword [ebx + 0x70]
and dword [ebp - 8], 0
mov dword [ebp - 0x10], eax
test eax, eax
jle 0x40c7b2
push esi
push edi
mov eax, dword [ebp - 8]
lea ecx, [ebx + 0x6c]
call fcn.0040dd5a
mov esi, eax
cmp byte [esi + 0x1c], 0
je 0x40c7a1
mov eax, dword [esi]
cmp eax, 1
je 0x40c723
cmp eax, 3
je 0x40c723
cmp eax, 7
je 0x40c723
cmp eax, 8
je 0x40c723
cmp eax, 0x64
jb 0x40c73e
mov eax, dword [ebx + 0x84]
cmp eax, 2
je 0x40c7a1
cmp eax, 5
jne 0x40c73e
jmp 0x40c7a1
mov eax, dword [ebx + 0x84]
cmp eax, 4
je 0x40c73e
cmp eax, 2
je 0x40c7a1
cmp eax, 1
je 0x40c7a1
test byte [esi + 8], 1
jne 0x40c7a1
mov eax, dword [esi + 4]
mov ecx, ebx
call fcn.0040d5b9
mov edi, eax
mov eax, dword [edi]
sub eax, 0x10
call fcn.00409baf
mov esi, dword [esi + 0x18]
push dword [esi - 0xc]
add eax, 0x10
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 4]
call fcn.00402383
lea esi, [ebp - 4]
call fcn.004020e5
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
mov eax, esi
lea edi, [ebp - 0xc]
call fcn.00409e3e
push eax
call fcn.0040a1e3
mov eax, dword [ebp - 0xc]
pop ecx
pop ecx
add eax, 0xfffffff0
call fcn.004046b1
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.004046b1
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jl 0x40c6db
pop edi
pop esi
leave
ret
Function at 0x40c7b4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
mov ebx, 0x400
push ebx
mov esi, eax
call fcn.0043029a
pop ecx
xor ecx, ecx
mov dword [ebp - 4], eax
cmp eax, ecx
jne 0x40c7e2
push ecx
call fcn.004302a5
pop ecx
push 3
jmp 0x40c982
xor eax, eax
and dword [ebp - 0x10], eax
and dword [ebp - 8], eax
lea edi, [ebp - 0x24]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0xc], ecx
stosd dword es:[edi], eax
sub dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
inc dword [ebp - 0xc]
add dword [ebp - 0x10], 0xa
cmp dword [ebp - 0xc], 1
cdq
mov edi, eax
mov ecx, edx
jle 0x40c814
mov eax, dword [ebp - 0x10]
cdq
add edi, eax
adc ecx, edx
mov eax, dword [esi + 0x78]
push 2
mov dword [ebp - 0x18], ecx
lea ecx, [ebp - 0x18]
push ecx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x40c83a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40c8b7
mov edi, dword [ebp - 4]
mov eax, dword [esi + 0x78]
push 0
lea ecx, [ebp - 0x14]
push ecx
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40c963
cmp dword [ebp - 0x14], ebx
jne 0x40c963
add edi, 0x3f6
jmp 0x40c87d
push 0xa
push str.ADVINSTSFX
push edi
call fcn.0043153a
add esp, 0xc
test eax, eax
je 0x40c8cf
dec edi
cmp edi, dword [ebp - 4]
jae 0x40c868
or eax, 0xffffffff
xor edi, edi
cmp eax, edi
jl 0x40c7f4
mov ecx, dword [ebp - 0x1c]
push edi
lea eax, [eax + ecx - 0x40]
mov ecx, dword [esi + 0x78]
lea edx, [ebp - 0x24]
push edx
push eax
push ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40c8d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esi + 0x54]
push eax
push 0x103
push esi
call fcn.0040d57c
push dword [ebp - 4]
jmp 0x40c97a
sub edi, dword [ebp - 4]
mov eax, edi
jmp 0x40c885
mov eax, dword [esi + 0x78]
push edi
lea ecx, [ebp - 0x14]
push ecx
push 0x4a
lea ecx, [esi + 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40c93d
cmp dword [ebp - 0x14], edi
je 0x40c93d
push 0xa
lea eax, [esi + 0x48]
push str.ADVINSTSFX
push eax
call fcn.0043153a
add esp, 0xc
test eax, eax
je 0x40c90f
push 5
jmp 0x40c955
cmp dword [esi + 0x14], 0x64
jne 0x40c90b
mov eax, dword [esi + 0x18]
mov edx, dword [ebp - 0x28]
push dword [ebp - 4]
xor ecx, ecx
sub edx, eax
mov eax, dword [ebp - 0x24]
sbb eax, ecx
mov dword [esi + 0x90], edx
mov dword [esi + 0x94], eax
call fcn.004302a5
pop ecx
xor eax, eax
jmp 0x40c983
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esi + 0x54]
push eax
push 0x103
push esi
call fcn.0040d57c
push 2
pop esi
push dword [ebp - 4]
call fcn.004302a5
pop ecx
mov eax, esi
jmp 0x40c983
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esi + 0x54]
push eax
push 0x103
push esi
call fcn.0040d57c
push edi
call fcn.004302a5
pop ecx
push 2
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40c988
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
xor ebx, ebx
push esi
cmp dword [edi + 0x10], ebx
jne 0x40c99e
xor eax, eax
jmp 0x40caf5
mov eax, dword [edi + 0x1c]
xor ecx, ecx
add eax, dword [edi + 0x90]
push ebx
adc ecx, dword [edi + 0x94]
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x14], ecx
mov ecx, dword [edi + 0x78]
push eax
push ecx
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40c9e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [edi + 0x54]
push eax
push 0x103
push edi
call fcn.0040d57c
push 2
pop eax
jmp 0x40caf5
mov ecx, 0x456f60
lea esi, [ebp - 0x20]
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
call fcn.00402131
mov byte [ebp - 0x1c], bl
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
cmp dword [edi + 0x10], ebx
jbe 0x40cadf
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [edi + 0x78]
push ebx
lea ecx, [ebp - 0xc]
push ecx
push 0x18
lea ecx, [ebp - 0x38]
push ecx
push eax
call esi
test eax, eax
je 0x40cac6
cmp dword [ebp - 0xc], ebx
je 0x40cac6
cmp dword [ebp - 4], ebx
je 0x40ca52
push dword [ebp - 4]
call fcn.004302a5
pop ecx
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 4]
inc eax
push ecx
call fcn.0040dbe3
test al, al
je 0x40cac1
mov eax, dword [edi + 0x78]
push ebx
lea ecx, [ebp - 0xc]
push ecx
mov ecx, dword [ebp - 0x24]
add ecx, ecx
push ecx
push dword [ebp - 4]
push eax
call esi
test eax, eax
je 0x40cac6
cmp dword [ebp - 0xc], ebx
je 0x40cac6
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 4]
xor eax, eax
mov word [edx + ecx*2], ax
lea eax, [ebp - 0x38]
lea ebx, [edi + 0x6c]
push eax
call fcn.0040dcbc
mov eax, dword [ebp - 8]
mov ecx, ebx
call fcn.0040dd5a
push dword [ebp - 4]
add eax, 0x18
push eax
call fcn.004045c0
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
xor ebx, ebx
cmp eax, dword [edi + 0x10]
jb 0x40ca1f
jmp 0x40cadf
push 3
pop ebx
jmp 0x40cadf
push 2
pop ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [edi + 0x54]
push eax
push 0x103
push edi
call fcn.0040d57c
push dword [ebp - 4]
call fcn.004302a5
mov eax, dword [ebp - 0x20]
pop ecx
add eax, 0xfffffff0
call fcn.004046b1
mov eax, ebx
pop esi
pop ebx
leave
ret