joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403d19
Capabilities:
Delete directory

Disassembly:
push ebp
push ebx
xor eax, eax
push eax
mov ebx, dword [0x41350c]
cmp ebx, 1
jne 0x403dd6
push dword [0x41356c]
call fcn.0040984b
mov ebx, eax
and ebx, ebx
jle 0x403d7d
push dword [0x41356c]
call fcn.00409855
push dword [0x41356c]
call fcn.0040986a
or eax, eax
je 0x403d7d
mov ebp, dword [0x413570]
push dword [ebp + 8]
call fcn.0040dbb0
mov ebx, eax
cmp ebx, dword [ebp + 0xc]
jne 0x403d7b
mov ebp, dword [0x413570]
push dword [ebp + 8]
call fcn.0040c53c
jmp 0x403d49
push dword [0x413574]
call fcn.0040984b
mov dword [esp], eax
mov ebx, dword [esp]
and ebx, ebx
jle 0x403dd6
push 5
push 0
push 1
push dword [0x413574]
call fcn.00407a00
push dword [0x413574]
call fcn.00409855
push dword [0x413574]
call fcn.0040986a
or eax, eax
je 0x403dd6
mov ebp, dword [0x413578]
push dword [ebp + 0xc]
call sub.KERNEL32.dll_RemoveDirectoryA
jmp 0x403db7
mov eax, 1
jmp 0x403ddf
add esp, 4
pop ebx
pop ebp
ret

Function at 0x403de5
Capabilities:
Accept command line arguments
Delete directory

Disassembly:
push ebp
push ebx
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push dword [0x4134e4]
push 1
call fcn.0040c930
and eax, eax
je 0x403f8a
push dword [0x4134f8]
push 1
call fcn.0040cb90
push dword [0x413a50]
push dword [0x413a50]
push dword [0x413a50]
push dword [0x413a50]
push dword [0x413a50]
push dword [0x413a50]
call sub.KERNEL32.dll_GetCommandLineA
push eax
call fcn.0040c280
inc dword [0x413a50]
mov edx, dword [0x412324]
add dword [esp], edx
call sub.SHLWAPI.DLL_PathGetArgsA
pop dword [0x413a50]
push eax
call fcn.0040c280
inc dword [0x413a50]
push dword [0x413528]
mov edx, dword [0x412324]
add dword [esp + 4], edx
call fcn.004085cd
pop dword [0x413a50]
push dword [0x4134e0]
push 1
call fcn.0040cb90
mov ebx, dword [0x413470]
cmp ebx, 1
jne 0x403f7e
push dword [0x413a50]
push dword [0x413a50]
mov ebp, 0x412129
mov ebx, ebp
mov ebp, 0x41207c
sub ebx, ebp
push ebx
mov ebp, 0x41207c
push ebp
call fcn.0040c210
lea eax, [esp + 4]
push eax
call fcn.0040f040
push dword [esp]
call fcn.004052c0
mov dword [esp + 4], eax
push dword [esp + 4]
call fcn.0040c1d0
mov dword [esp + 8], eax
push dword [esp + 4]
call fcn.0040c1d0
mov dword [esp + 0xc], eax
push dword [esp]
push dword [esp + 0xc]
call fcn.0040c3f0
mov dword [esp + 0x10], 0
mov eax, dword [esp + 4]
cmp eax, dword [esp + 0x10]
jl 0x403f43
mov ebx, dword [esp + 8]
add ebx, dword [esp + 0x10]
push ebx
pop eax
call fcn.0040c1f0
mov ebx, eax
imul ebx, ebx, 0xffffffff
push ebx
mov ebx, dword [esp + 0x10]
add ebx, dword [esp + 0x14]
push ebx
pop eax
call fcn.0040c200
inc dword [esp + 0x10]
jno 0x403f0f
push dword [0x413a50]
push dword [0x413a50]
push dword [0x413a50]
push dword [esp + 0x18]
call fcn.0040c280
inc dword [0x413a50]
push 1
mov edx, dword [0x412324]
add dword [esp + 4], edx
call fcn.0040cb90
pop dword [0x413a50]
push 1
call fcn.0040c710
jmp 0x403fc5
push dword [0x4134e4]
call fcn.0040c53c
call fcn.00403d19
push 0x10
push dword [0x4134ec]
push dword [0x413548]
call fcn.004080d0
push dword [0x413544]
call sub.KERNEL32.dll_RemoveDirectoryA
push 1
jmp 0x4017ab
xor eax, eax
push dword [esp]
call fcn.0040f0f0
add esp, 0x14
pop ebx
pop ebp
ret
Function at 0x40831d
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
xor ebx, ebx
push esi
push edi
cmp dword [esp + 0x10], ebx
je 0x40836c
push dword [esp + 0x10]
push 0x40829b
call dword [sym.imp.USER32.DLL_EnumWindows]
mov esi, dword [0x413584]
cmp esi, ebx
je 0x4083c0
mov edi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
jne 0x408364
cmp byte [esi + 0x10], bl
je 0x408364
push 3
push ebx
push ebx
push ebx
push ebx
push 0xfffffffffffffffe
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
mov esi, edi
cmp edi, ebx
jne 0x408341
jmp 0x4083c0
mov esi, dword [0x413584]
cmp esi, ebx
je 0x4083c0
push ebp
mov ebp, dword [esi]
lea edi, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [edi], eax
jne 0x4083b9
cmp byte [esi + 0x11], bl
je 0x408396
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_EnableWindow]
cmp byte [esi + 0x10], bl
je 0x4083ac
push 3
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
push edi
push 0x413584
call fcn.0040ec6d
pop ecx
pop ecx
mov esi, ebp
cmp ebp, ebx
jne 0x408377
pop ebp
pop edi
pop esi
pop ebx
ret 4
Function at 0x4086fe
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
or dword [ebp - 4], 0xffffffff
push esi
push edi
mov edi, eax
mov eax, dword [ebp + 0x10]
xor esi, esi
test eax, eax
je 0x40872f
cmp byte [eax], 0
je 0x40872f
push eax
call fcn.0040fba0
push eax
push edi
mov dword [ebp + 0x10], eax
call fcn.00408ce6
pop ecx
pop ecx
mov esi, eax
jmp 0x408741
cmp dword [edi + 8], esi
je 0x408831
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 4]
mov esi, dword [ecx + eax*4]
test esi, esi
je 0x408831
cmp dword [ebp + 0x14], 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
je 0x40876a
push dword [esi]
push 0
push dword [0x413454]
call ebx
mov dword [ebp + 8], eax
mov eax, dword [esi]
mov dword [ebp + 0xc], eax
cmp dword [ebp + 8], 0
je 0x408830
mov eax, dword [ebp + 0xc]
cdq
cmp edx, dword [esi + 4]
jl 0x408830
jg 0x40878b
cmp eax, dword [esi]
jb 0x408830
push 0
push 0
push dword [esi + 0x10]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi + 8]
cmp eax, dword [esi]
jne 0x4087d0
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 4]
jne 0x4087d0
push 0
lea eax, [ebp - 8]
push eax
push dword [esi]
push dword [ebp + 8]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 8]
mov eax, ecx
cdq
cmp dword [esi], eax
jne 0x408830
cmp dword [esi + 4], edx
jne 0x408830
mov dword [ebp - 4], ecx
jmp 0x408830
push dword [esi + 8]
push 0
push dword [0x413454]
call ebx
mov ebx, eax
test ebx, ebx
je 0x408830
push 0
lea eax, [ebp - 8]
push eax
push dword [esi + 8]
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 8]
cdq
cmp dword [esi + 8], eax
jne 0x408821
cmp dword [esi + 0xc], edx
jne 0x408821
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call fcn.00408e4a
cdq
add esp, 0xc
cmp eax, dword [esi]
jne 0x408821
cmp edx, dword [esi + 4]
jne 0x408821
mov eax, dword [esi]
mov dword [ebp - 4], eax
push ebx
push 0
push dword [0x413454]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop ebx
mov eax, dword [ebp + 0x14]
xor edi, edi
cmp eax, edi
je 0x408864
cmp dword [ebp - 4], 0xffffffff
jne 0x40885a
cmp dword [ebp + 8], edi
je 0x408855
push dword [ebp + 8]
push edi
push dword [0x413454]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], edi
jmp 0x408864
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ecx
mov ecx, dword [esi]
mov dword [eax], ecx
mov eax, dword [ebp + 0x10]
cmp eax, edi
pop edi
pop esi
je 0x408878
cmp byte [eax], 0
je 0x408878
push eax
call fcn.0040fc50
mov eax, dword [ebp - 4]
leave
ret
Function at 0x40892e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
and dword [ebp - 8], 0
push ebx
push esi
push edi
push dword [ebp + 0x14]
call fcn.0040fba0
mov esi, dword [ebp + 0x10]
lea ebx, [esi + 0x18]
push ebx
push 0
push dword [0x413454]
mov dword [ebp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp + 0x10], edi
test edi, edi
je 0x408a1c
push 0
push 5
push ebx
push edi
push esi
push dword [ebp + 0xc]
call fcn.00408eb2
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x408989
cmp ebx, esi
jge 0x408989
mov dword [ebp + 0xc], edi
jmp 0x408991
mov eax, dword [ebp + 0xc]
mov ebx, esi
mov dword [ebp + 0xc], eax
push dword [ebp + 0x14]
call sub.MSVCRT.dll_strlen
mov edi, dword [ebp + 8]
mov word [ebp - 0xc], ax
mov eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
cdq
mov dword [ebp - 0x1c], eax
pop ecx
mov dword [ebp - 0x18], edx
mov eax, ebx
cdq
push 0
mov dword [ebp - 0x14], eax
lea eax, [ebp - 4]
push eax
push 0x12
lea eax, [ebp - 0x1c]
push eax
push dword [edi]
mov dword [ebp - 0x10], edx
call esi
cmp dword [ebp - 4], 0x12
jne 0x408a04
push 0
lea eax, [ebp - 4]
push eax
movsx eax, word [ebp - 0xc]
push eax
push dword [ebp + 0x14]
push dword [edi]
call esi
movsx eax, word [ebp - 0xc]
cmp eax, dword [ebp - 4]
jne 0x408a04
push 0
lea eax, [ebp - 4]
push eax
push ebx
push dword [ebp + 0xc]
push dword [edi]
call esi
cmp ebx, dword [ebp - 4]
jne 0x408a04
mov dword [ebp - 8], 1
push edi
call fcn.00408b3e
pop ecx
push dword [ebp + 0x10]
push 0
push dword [0x413454]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp + 0x14]
call fcn.0040fc50
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x408b83
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 8], 0x40
cmp dword [esi + 4], ebx
jne 0x408ce2
push edi
push 0x100
push ebx
push dword [0x413454]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push ebx
push ebx
push 4
pop edi
push edi
push dword [esi]
mov dword [esi + 4], eax
mov dword [esi + 0xc], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp + 8], edi
cmp dword [esi + 0x14], 0x706c7a31
push ebx
lea eax, [ebp - 4]
push eax
jne 0x408c12
push 0x18
lea eax, [ebp - 0x34]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], 0x18
jne 0x408ce1
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
mov ax, word [ebp - 0x24]
mov word [ebp - 0xc], ax
jmp 0x408c2a
push 0x12
lea eax, [ebp - 0x1c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], 0x12
jne 0x408ce1
mov eax, dword [ebp - 8]
cmp dword [esi + 0xc], eax
jl 0x408c50
add eax, 0x40
mov dword [ebp - 8], eax
shl eax, 2
push eax
push dword [esi + 4]
push 8
push dword [0x413454]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [esi + 4], eax
movsx eax, word [ebp - 0xc]
add eax, 0x19
push eax
push ebx
push dword [0x413454]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov eax, dword [ebp - 0x1c]
mov dword [edi], eax
mov eax, dword [ebp - 0x18]
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + 0xc], eax
push ebx
lea eax, [ebp - 4]
push eax
movsx eax, word [ebp - 0xc]
push eax
lea eax, [edi + 0x14]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movsx eax, word [ebp - 0xc]
mov ecx, dword [ebp + 8]
mov byte [eax + edi + 0x14], bl
cmp dword [esi + 0x14], 0x706c7a31
movsx eax, word [ebp - 0xc]
jne 0x408cb2
lea eax, [ecx + eax + 0x18]
jmp 0x408cb9
lea eax, [ecx + eax + 0x12]
mov dword [ebp + 8], eax
mov dword [edi + 0x10], eax
add eax, dword [ebp - 0x14]
mov ecx, dword [esi + 4]
push 1
mov dword [ebp + 8], eax
mov eax, dword [esi + 0xc]
mov dword [ecx + eax*4], edi
inc dword [esi + 0xc]
push ebx
push dword [ebp - 0x14]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x408bca
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a284
Capabilities:
Get graphical window text

Disassembly:
push edi
push dword [esp + 8]
push dword [0x413b00]
call fcn.0040e59a
mov edi, eax
test edi, edi
je 0x40a2e6
mov eax, dword [edi + 4]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x40a2ad
push dword [esp + 0xc]
push edi
call eax
jmp 0x40a2e6
push ebx
push esi
push dword [edi]
call dword [sym.imp.USER32.DLL_GetWindowTextLengthA]
push dword [esp + 0x14]
mov esi, eax
push esi
call fcn.0040f2c0
mov ebx, eax
lea eax, [esi + 1]
push eax
push ebx
mov byte [ebx], 0
push dword [edi]
call dword [sym.imp.USER32.DLL_GetWindowTextA]
push ebx
call sub.MSVCRT.dll_strlen
pop ecx
sub esi, eax
push esi
call fcn.0040f3e0
pop esi
pop ebx
pop edi
ret 8

Function at 0x40a60f
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x130
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [ebp - 0x1c]
push eax
mov ebx, 0xc8
mov dword [ebp - 0x1c], 0x94
call edi
test eax, eax
je 0x40a6f8
mov eax, dword [ebp - 0xc]
dec eax
je 0x40a6db
dec eax
jne 0x40a6f8
lea eax, [ebp - 0xb8]
push eax
xor esi, esi
mov dword [ebp - 0xb8], 0x9c
call edi
test eax, eax
je 0x40a66e
cmp byte [ebp - 0x1e], 1
jne 0x40a66e
inc esi
mov eax, dword [ebp - 0x18]
sub eax, 3
je 0x40a6d7
dec eax
je 0x40a6d3
dec eax
je 0x40a6b1
dec eax
jne 0x40a6f8
mov eax, dword [ebp - 0x14]
sub eax, 0
je 0x40a6a5
dec eax
je 0x40a699
dec eax
jne 0x40a6f8
neg esi
sbb esi, esi
and esi, 0xfffffffb
lea ebx, [esi + 0x5f]
jmp 0x40a6f8
neg esi
sbb esi, esi
and esi, 0xfffffffb
lea ebx, [esi + 0x55]
jmp 0x40a6f8
neg esi
sbb esi, esi
and esi, 0xfffffffb
lea ebx, [esi + 0x4b]
jmp 0x40a6f8
mov eax, dword [ebp - 0x14]
sub eax, 0
je 0x40a6cf
dec eax
je 0x40a6cb
dec eax
jne 0x40a6f8
neg esi
sbb esi, esi
and esi, 0xfffffffb
lea ebx, [esi + 0x41]
jmp 0x40a6f8
push 0x3c
jmp 0x40a6f7
push 0x32
jmp 0x40a6f7
push 0x14
jmp 0x40a6f7
push 5
jmp 0x40a6f7
cmp dword [ebp - 0x14], 0
je 0x40a6f5
cmp dword [ebp - 0x14], 0xa
je 0x40a6f1
cmp dword [ebp - 0x14], 0x5a
jne 0x40a6f8
push 0x28
jmp 0x40a6f7
push 0x1e
jmp 0x40a6f7
push 0xa
pop ebx
pop edi
pop esi
mov eax, ebx
pop ebx
add ebp, 0x78
leave
ret
Function at 0x40b661
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0xc
push ebx
push esi
push edi
call dword [sym.imp.USER32.DLL_GetFocus]
mov esi, dword [sym.imp.USER32.DLL_GetKeyState]
mov edi, eax
mov bl, pe_nt_image_headers32
test edi, edi
je 0x40b6dd
push 9
call esi
test bl, al
je 0x40b6dd
push 0x11
call esi
test bl, al
jne 0x40b6dd
push 0x10
call esi
test bl, al
jne 0x40b6dd
push 0x12
call esi
test bl, al
jne 0x40b6dd
push 5
lea eax, [esp + 0x14]
push eax
push edi
call dword [sym.imp.USER32.DLL_GetClassNameA]
push 4
lea eax, [esp + 0x14]
push str.Rich
push eax
call sub.MSVCRT.dll_strncmp
add esp, 0xc
test eax, eax
jne 0x40b6dd
push eax
push eax
push 0x44e
push edi
call dword [sym.imp.USER32.DLL_SendMessageA]
test eax, 0x800
jne 0x40b6dd
xor eax, eax
jmp 0x40b75f
push ebp
mov ebp, dword [esp + 0x20]
test ebp, ebp
je 0x40b706
push 0x11
call esi
test bl, al
jne 0x40b6fe
push 0x10
call esi
test bl, al
jne 0x40b6fe
push 0x12
call esi
test bl, al
je 0x40b706
push 1
push ebp
call fcn.0040b61a
mov esi, dword [sym.imp.USER32.DLL_GetPropA]
test edi, edi
je 0x40b71c
push str.PB_Hotkey
push edi
call esi
test eax, eax
jne 0x40b75c
push str.PB_WindowID
push ebp
call esi
mov esi, eax
test esi, esi
je 0x40b75c
lea eax, [esp + 0x10]
push eax
push ebp
call dword [sym.imp.USER32.DLL_GetWindowThreadProcessId]
test eax, eax
je 0x40b75c
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x10], eax
jne 0x40b75c
dec esi
push esi
push dword [0x413b08]
call fcn.0040e59a
test eax, eax
je 0x40b75c
mov eax, dword [eax + 8]
jmp 0x40b75e
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret 4

Function at 0x40b821
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x94
push edi
push str.msimg32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
xor edi, edi
mov dword [0x4139dc], eax
cmp eax, edi
je 0x40b854
push str.AlphaBlend
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4139e0], eax
lea eax, [ebp - 0x1c]
push eax
mov dword [0x4139d8], 1
mov dword [ebp - 0x1c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x40b892
cmp dword [ebp - 0xc], 1
je 0x40b8a3
cmp dword [ebp - 0xc], 2
jne 0x40b892
cmp dword [ebp - 0x18], 5
jb 0x40b8a3
jne 0x40b892
cmp dword [ebp - 0x14], edi
jne 0x40b892
mov dword [0x4139d8], edi
cmp dword [0x4139d8], edi
je 0x40b8a9
call fcn.0040b768
test eax, eax
jne 0x40b8a9
mov dword [0x4139d8], edi
pop edi
add ebp, 0x78
leave
ret

Function at 0x40c437
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
cmp dword [ebp + 8], 0
je 0x40c4a7
push 0x104
push dword [ebp + 8]
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll_strncpy
lea eax, [ebp - 0x108]
push eax
mov byte [ebp - 4], 0
call sub.MSVCRT.dll_strlen
add esp, 0x10
lea eax, [ebp + eax - 0x108]
jmp 0x40c489
mov dl, byte [eax - 1]
cmp dl, 0x20
je 0x40c488
cmp dl, 0x5c
je 0x40c488
cmp dl, 0x2f
jne 0x40c493
dec eax
lea ecx, [ebp - 0x108]
cmp eax, ecx
ja 0x40c476
mov byte [eax], 0
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x40c4a9
xor eax, eax
leave
ret 4
Function at 0x40c50e
Capabilities:
Delete file
Set file attributes

Disassembly:
cmp dword [esp + 4], 0
je 0x40c537
test byte [esp + 8], 2
je 0x40c52b
push pe_nt_image_headers32
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x40c539
xor eax, eax
ret 8

Function at 0x40c6d0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
xor eax, eax
mov dword [esp + 4], eax
cmp dword [esi + 0x14], eax
jne 0x40c705
mov ecx, dword [esi + 8]
sub ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push eax
lea eax, [esp + 8]
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esi + 8]
mov eax, dword [esp + 4]
mov dword [esi + 0xc], ecx
pop esi
pop ecx
ret 4

Function at 0x40cab0
Capabilities:
Write file on windows

Disassembly:
push ecx
push edi
mov edi, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 4], eax
test edi, edi
je 0x40cb09
push esi
mov esi, dword [esp + 0x18]
test esi, esi
je 0x40cb08
mov eax, dword [esp + 0x10]
mov ecx, dword [0x413ba8]
push eax
push ecx
call fcn.0040e59a
test eax, eax
je 0x40cb04
cmp dword [eax + 4], 0
je 0x40caf2
push esi
push edi
push eax
call fcn.0040cc70
pop esi
pop edi
pop ecx
ret 0xc
mov eax, dword [eax]
push 0
lea edx, [esp + 0xc]
push edx
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop esi
pop edi
pop ecx
ret 0xc

Function at 0x40cb10
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 4], eax
test esi, esi
je 0x40cb57
cmp byte [esi], al
je 0x40cb57
mov eax, dword [esp + 0xc]
mov ecx, dword [0x413ba8]
push eax
push ecx
call fcn.0040e59a
test eax, eax
je 0x40cb85
cmp dword [eax + 4], 0
mov ecx, esi
push edi
lea edi, [ecx + 1]
je 0x40cb60
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40cb45
sub ecx, edi
push ecx
push esi
push eax
call fcn.0040cc70
pop edi
pop esi
pop ecx
ret 8
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40cb60
mov eax, dword [eax]
push 0
lea edx, [esp + 0xc]
push edx
sub ecx, edi
push ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 8
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 8
Function at 0x40cb90
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
mov eax, dword [esp + 0xc]
mov ecx, dword [0x413ba8]
push esi
push eax
push ecx
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
call fcn.0040e59a
mov esi, eax
test esi, esi
je 0x40cc57
mov ecx, dword [esp + 0x14]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
test ecx, ecx
je 0x40cc0f
cmp byte [ecx], 0
je 0x40cc0f
cmp dword [esi + 4], 0
mov eax, ecx
push edi
lea edi, [eax + 1]
je 0x40cbf7
nop
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40cbe0
sub eax, edi
push eax
push ecx
push esi
call fcn.0040cc70
mov dword [esp + 0xc], eax
jmp 0x40cc0e
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40cbf7
push 0
lea edx, [esp + 0x10]
push edx
sub eax, edi
push eax
mov eax, dword [esi]
push ecx
push eax
call ebp
pop edi
cmp dword [esi + 4], 0
je 0x40cc32
push 2
push 0x411504
push esi
call fcn.0040cc70
mov ecx, eax
mov eax, dword [esp + 8]
pop ebp
add eax, ecx
pop esi
add esp, 8
ret 8
mov edx, dword [esi]
push 0
lea ecx, [esp + 0x10]
push ecx
push 2
push 0x411504
push edx
call ebp
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 8]
pop ebp
add eax, ecx
pop esi
add esp, 8
ret 8
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 8

Function at 0x40cc70
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
cmp dword [esi + 0x14], 1
push edi
mov dword [esp + 8], 0
jne 0x40cca5
mov eax, dword [esi + 0xc]
mov ecx, dword [esi]
push 1
push 0
neg eax
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], edx
mov ecx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
cmp ecx, edi
jle 0x40cd1a
mov eax, dword [esi + 8]
add eax, dword [esi + 4]
sub eax, ecx
mov ecx, edi
dec ecx
je 0x40cd07
dec ecx
je 0x40ccf2
sub ecx, 2
je 0x40ccdf
mov ecx, dword [esp + 0x14]
push edi
push ecx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov ecx, dword [edx]
mov dword [eax], ecx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cx, word [edx]
mov word [eax], cx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cl, byte [edx]
mov byte [eax], cl
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
push esi
call fcn.0040c6d0
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x40cd47
mov eax, dword [esp + 0x14]
mov ecx, dword [esi]
push 0
lea edx, [esp + 0xc]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0xc]
mov edx, dword [esp + 0x14]
push edi
push edx
add ecx, eax
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc