joyce8/EMBER2024-capa huggingface dataset:
Function at 0x300095f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov eax, ecx
mov dword [ebp - 0x10], eax
push esi
push edi
test eax, eax
je 0x300096aa
cmp eax, 0x1000
jae 0x300096aa
mov edx, dword [0x3026c318]
test edx, edx
je 0x300096aa
mov ecx, dword [edx + 0x3c]
xor edi, edi
mov eax, dword [ecx + edx + 0xc8]
mov ebx, dword [eax + edx + 0x50]
mov eax, dword [ecx + edx + 0x78]
mov ecx, dword [eax + edx + 0x20]
add eax, edx
add ecx, edx
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], ecx
mov esi, dword [eax + 0x1c]
add esi, edx
mov dword [ebp - 0xc], esi
mov esi, dword [eax + 0x24]
add esi, edx
mov dword [ebp - 8], esi
cmp dword [ebx], edi
je 0x300096aa
xor esi, esi
cmp dword [eax + 0x14], esi
jbe 0x300096a2
lea esp, [esp]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
movzx eax, word [eax + esi*2]
mov eax, dword [ecx + eax*4]
mov ecx, dword [ebp - 4]
cmp eax, dword [ebx]
jne 0x30009699
mov eax, dword [ecx + esi*4]
add eax, edx
cmp dword [ebp - 0x10], edi
je 0x300096ac
push 2
push 0x301f4c34
push eax
call fcn.301688f0
mov edx, dword [0x3026c318]
add esp, 0xc
test eax, eax
jne 0x30009699
inc edi
mov eax, dword [ebp - 0x14]
inc esi
cmp esi, dword [eax + 0x14]
jb 0x30009660
add ebx, 5
cmp dword [ebx], 0
jne 0x30009655
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x30009a30
Capabilities:
Print debug messages

Disassembly:
cmp dword [0x30271148], 0
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
jne 0x30009af9
push 0x104
mov esi, 0x30272580
push 0
push esi
call fcn.30160f00
add esp, 0xc
mov edx, 0x104
push edi
push ecx
push ebx
push 0xffffffffffffffff
mov ecx, esi
call fcn.300099e0
mov al, byte [0x30272580]
add esp, 0x10
test al, al
je 0x30009a89
cmp al, 0xa
jl 0x30009a7e
cmp al, 0x7e
jle 0x30009a81
mov byte [esi], 0x3f
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x30009a76
cmp dword [0x3026f250], 0
je 0x30009aa1
push 0x30272580
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebx
ret
push 0x104
push 0
push 0x30272220
call fcn.30160f00
add esp, 0xc
push 0x30272580
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.DEBUG:_u:__s
push 0xffffffffffffffff
push 0x104
push 0x30272220
call fcn.30009a10
mov ecx, 0x30272220
add esp, 0x18
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x30009ae2
sub ecx, edx
push ecx
push 0x30272220
call fcn.3004de10
add esp, 8
pop edi
pop esi
pop ebx
ret
Function at 0x30009b20
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
mov esi, eax
lea eax, [ebp - 4]
push eax
push 0x400
push esi
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0x104
push 0
push 0x30272580
call fcn.30160f00
add esp, 0xc
lea eax, [ebp + 0xc]
mov edx, 0x104
push eax
push ecx
push dword [ebp + 8]
mov ecx, 0x30272580
push 0xffffffffffffffff
call fcn.300099e0
push 0x104
push 0
push 0x30272460
call fcn.30160f00
add esp, 0x1c
push dword [ebp - 4]
push 0x30272580
push esi
push esi
push str.Error__u__0x_x_____s:__s
push 0xffffffffffffffff
push 0x104
push 0x30272460
call fcn.30009a10
add esp, 0x20
cmp dword [0x3026f250], 0
je 0x30009bc7
push 0x30272460
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop esi
mov esp, ebp
pop ebp
ret
push 0x104
push 0
push 0x30272220
call fcn.30160f00
add esp, 0xc
push 0x30272460
push str.DEBUG:_s
push 0xffffffffffffffff
push 0x104
push 0x30272220
call fcn.30009a10
mov ecx, 0x30272220
add esp, 0x14
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x30009c01
sub ecx, edx
push ecx
push 0x30272220
call fcn.3004de10
add esp, 8
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x30009fa0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x3021ae88]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [0x30271144]
push esi
push edi
cmp eax, 1
jg 0x3000a1c2
cmp dword [0x30271a64], 0
jne 0x3000a1c2
test eax, eax
je 0x30009fec
mov ecx, dword [ebp + 8]
lea edx, [ebp + 0xc]
call fcn.30009a30
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.3015dd6d
mov esp, ebp
pop ebp
ret
mov ecx, str.debugger
call fcn.30003370
push 1
push 0x104
mov edi, eax
call fcn.30168968
mov esi, eax
add esp, 8
test esi, esi
jne 0x3000a02a
push str.DebuggerOutput:_failed_to_allocate_memory_for_file_name_string
call fcn.30009b20
add esp, 4
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.3015dd6d
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str._u.log
push 0x104
push esi
call fcn.30001ff0
add esp, 0x10
push esi
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push esi
call fcn.30168264
add esp, 4
cmp dword [0x302727a4], 0
jne 0x3000a13b
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x302727a4], eax
push edi
cmp eax, 0xffffffff
jne 0x3000a0a3
push str.DebuggerOutput:_Unable_to_open_debugger_logfile__s
call fcn.30009b20
add esp, 8
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.3015dd6d
mov esp, ebp
pop ebp
ret
push str.DebuggerOutput:_Debugger_logfile__s._n
call fcn.30009b00
lea eax, [ebp - 0x54]
push eax
call fcn.30168973
add esp, 0xc
push 0x104
push 0
push 0x302726a0
call fcn.30160f00
add esp, 0xc
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x4c]
push 0x40
push eax
call fcn.301689db
add esp, 0xc
lea eax, [ebp - 0x4c]
push eax
push str.CAPE_Sandbox___Debugger_log:__s
push 0xffffffffffffffff
push 0x104
push 0x302726a0
call fcn.30009a10
mov ecx, 0x302726a0
add esp, 0x14
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x3000a104
push 0
push 0x30271480
sub ecx, edx
push ecx
push 0x302726a0
push dword [0x302727a4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [ebp + 8]
cmp byte [esi], 0xa
jne 0x3000a13e
mov edi, edi
inc esi
mov dword [ebp + 8], esi
cmp byte [esi], 0xa
je 0x3000a130
jmp 0x3000a13e
mov esi, dword [ebp + 8]
push 0x104
push 0
push 0x302726a0
call fcn.30160f00
add esp, 0xc
lea eax, [ebp + 0xc]
mov edx, 0x104
push eax
push ecx
push esi
push 0xffffffffffffffff
mov ecx, 0x302726a0
call fcn.300099e0
mov al, byte [0x302726a0]
add esp, 0x10
mov ecx, 0x302726a0
test al, al
je 0x3000a193
lea ebx, [ebx]
cmp al, 0xa
jl 0x3000a188
cmp al, 0x7e
jle 0x3000a18b
mov byte [ecx], 0x3f
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x3000a180
mov ecx, 0x302726a0
lea edx, [ecx + 1]
jmp 0x3000a1a0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x3000a1a0
push 0
push 0x30271480
sub ecx, edx
push ecx
push 0x302726a0
push dword [0x302727a4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 8]
pop edi
xor ecx, ebp
pop esi
call fcn.3015dd6d
mov esp, ebp
pop ebp
ret
Function at 0x3000a1e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 8]
call fcn.30009fa0
add esp, 4
mov ecx, str.CAPE
call fcn.30003370
push 1
push 0x104
mov dword [0x302727ac], eax
call fcn.30168968
mov esi, eax
add esp, 8
test esi, esi
jne 0x3000a223
push str.StringsOutput:_failed_to_allocate_memory_for_file_name_string
call fcn.30009b20
add esp, 4
pop esi
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str._u.txt
push 0x104
push esi
call fcn.30001ff0
add esp, 0x10
push esi
push dword [0x302727ac]
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push esi
call fcn.30168264
add esp, 4
cmp dword [0x302727a8], 0
jne 0x3000a2a7
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push dword [0x302727ac]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x302727a8], eax
push dword [0x302727ac]
cmp eax, 0xffffffff
jne 0x3000a29a
push str.StringsOutput:_Unable_to_open_strings_output_file__s
call fcn.30009b20
add esp, 8
pop esi
pop ebp
ret
push str.StringsOutput:_Output_file__s._n
call fcn.30009b00
add esp, 8
push 0x104
push 0
push 0x30272340
call fcn.30160f00
add esp, 0xc
lea eax, [ebp + 0xc]
mov edx, 0x104
push eax
push ecx
push dword [ebp + 8]
mov ecx, 0x30272340
push 0xffffffffffffffff
call fcn.300099e0
mov al, byte [0x30272340]
add esp, 0x10
mov ecx, 0x30272340
test al, al
je 0x3000a2f8
cmp al, 0xa
jl 0x3000a2ed
cmp al, 0x7e
jle 0x3000a2f0
mov byte [ecx], 0x3f
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x3000a2e5
mov edx, 0x30272340
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x3000a300
sub edx, esi
lea eax, [edx + 1]
cmp eax, 0x104
jae 0x3000a316
mov byte [ecx], 0xa
mov ecx, 0x30272340
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x3000a320
push 0
push 0x30271480
sub ecx, edx
push ecx
push 0x30272340
push dword [0x302727a8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
pop ebp
ret
Function at 0x3000b3c0
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov edx, dword [0x3024453c]
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
push ecx
mov ecx, dword [0x30244538]
call fcn.3000b5c0
mov eax, dword [0x30244538]
add esp, 4
mov dword [0x3024453c], eax
call fcn.30012710
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call esi
mov dword [0x302412f0], eax
call esi
mov edx, 0x30244538
mov ecx, eax
call fcn.30015590
mov ecx, dword [0x3024453c]
mov eax, 0x77975b9
sub ecx, dword [0x30244538]
xor esi, esi
imul ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov dword [ebp - 4], ecx
je 0x3000b596
mov ecx, dword [0x30244538]
mov eax, dword [ebp - 4]
add ecx, 0x104
mov edx, dword [ecx]
cmp edi, edx
jb 0x3000b458
mov eax, dword [ecx + 4]
add eax, edx
cmp edi, eax
mov eax, dword [ebp - 4]
jae 0x3000b458
lea ebx, [esi + 1]
inc esi
add ecx, 0x224
cmp esi, eax
jb 0x3000b443
test ebx, ebx
je 0x3000b596
test edi, edi
je 0x3000b596
cmp dword [0x302728a4], 0
jne 0x3000b4a6
push 0x302728a0
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp dword [0x302728a4], 0
jne 0x3000b4a6
push str.GetAllocationBase:_Failed_to_obtain_system_page_size._n
call fcn.30009b20
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x1c
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x3000b596
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x3000b596
push 0x50
call fcn.3015e35d
push esi
mov ecx, eax
call fcn.30012920
mov esi, eax
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x3000b584
call fcn.30003f40
cmp eax, 1
jne 0x3000b584
push ecx
mov ecx, esi
call fcn.30012ba0
test al, al
je 0x3000b584
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x3000b527
call fcn.30003f40
cmp eax, 1
jne 0x3000b527
mov eax, dword [esi + 0x24]
mov ecx, 0x10b
cmp word [eax + 0x18], cx
jne 0x3000b527
mov eax, dword [eax + 0x78]
add eax, dword [esi + 0x14]
jmp 0x3000b557
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x3000b554
call fcn.30003f40
cmp eax, 1
jne 0x3000b554
mov eax, dword [esi + 0x24]
mov ecx, 0x20b
cmp word [eax + 0x18], cx
jne 0x3000b554
mov eax, dword [esi + 0x28]
mov eax, dword [eax + 0x88]
add eax, dword [esi + 0x14]
jmp 0x3000b557
mov eax, dword [ebp - 4]
test eax, eax
je 0x3000b584
mov eax, dword [eax + 0xc]
test eax, eax
je 0x3000b584
mov edi, dword [esi + 0x14]
add edi, eax
je 0x3000b584
mov ecx, esi
call fcn.30012a40
push 0x50
push esi
call fcn.3015e131
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.30012a40
push 0x50
push esi
call fcn.3015e131
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x3000bee0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov esi, dword [ebx + 0x108]
cmp esi, 0x7d0
jb 0x3000beff
mov esi, 0x7d0
push esi
call fcn.3015e392
mov ecx, dword [ebx + 0x104]
add esp, 4
mov edi, eax
mov edx, esi
mov dword [ebp - 0x10], edi
push edi
call fcn.300153f0
add esp, 4
test al, al
je 0x3000c074
test edi, edi
je 0x3000c07f
mov esi, dword [edi + 0x3c]
add esi, edi
cmp dword [esi], 0x4550
je 0x3000bf45
push str.___IMAGE_NT_SIGNATURE_doesnt_match.
jmp 0x3000c06c
cmp dword [esi + 0x78], 0
je 0x3000c067
mov edi, dword [esi + 0x7c]
test edi, edi
je 0x3000c067
cmp edi, 0x30
jae 0x3000bf64
mov edi, 0x8c
push edi
call fcn.3015e392
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x3000c074
mov ecx, dword [ebp + 8]
mov edx, edi
push ebx
mov ecx, dword [ecx + 0x104]
add ecx, dword [esi + 0x78]
call fcn.300153f0
add esp, 4
test al, al
je 0x3000c05f
mov eax, dword [ebx + 0x1c]
mov edi, ebx
sub edi, dword [esi + 0x78]
mov ecx, dword [ebx + 0x24]
add eax, edi
add ecx, edi
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x20]
add eax, edi
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], eax
test ecx, ecx
je 0x3000c01c
xor esi, esi
cmp dword [ebx + 0x18], esi
jbe 0x3000c05f
mov eax, dword [eax + esi*4]
add eax, edi
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x3000bff0
test dl, dl
je 0x3000bfec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x3000bff0
add eax, 2
add ecx, 2
test dl, dl
jne 0x3000bfd0
xor eax, eax
jmp 0x3000bff5
sbb eax, eax
or eax, 1
test eax, eax
je 0x3000c00d
mov eax, dword [ebp - 8]
inc esi
mov ecx, dword [ebp + 0xc]
cmp esi, dword [ebx + 0x18]
jb 0x3000bfc5
push ebx
call fcn.3015e38d
jmp 0x3000c071
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
movzx eax, word [eax + esi*2]
mov edx, dword [ecx + eax*4]
jmp 0x3000c04a
mov ecx, dword [ebx + 0x14]
xor edx, edx
test ecx, ecx
je 0x3000c05f
mov esi, dword [ebx + 0x10]
movzx edi, word [ebp + 0x10]
lea esp, [esp]
lea eax, [esi + edx]
cmp edi, eax
je 0x3000c044
inc edx
cmp edx, ecx
jb 0x3000c030
push ebx
call fcn.3015e38d
jmp 0x3000c071
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + edx*4]
mov eax, dword [ebp + 0x18]
mov dword [eax], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x104]
mov eax, dword [ebp + 0x14]
add ecx, edx
mov dword [eax], ecx
push ebx
call fcn.3015e38d
jmp 0x3000c071
push str.___No_export_table.
call fcn.30009b00
add esp, 4
push dword [ebp - 0x10]
call fcn.3015e38d
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
Function at 0x30012710
Capabilities:
Link many functions at runtime

Disassembly:
cmp dword [0x302386c4], 0
jne 0x300127ed
push edi
push 0x301f5844
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
je 0x300127ec
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NtCreateThreadEx
push edi
call esi
push str.NtDuplicateObject
push edi
call esi
push str.NtOpenProcess
push edi
call esi
push str.NtOpenThread
push edi
call esi
push str.NtQueryObject
push edi
call esi
push str.NtQueryInformationFile
push edi
call esi
push str.NtQueryInformationProcess
push edi
call esi
push str.NtQueryInformationThread
push edi
call esi
push str.NtQuerySystemInformation
push edi
call esi
push str.NtQueryVirtualMemory
push edi
call esi
push str.NtResumeProcess
push edi
mov dword [0x302386c8], eax
call esi
push str.NtResumeThread
push edi
call esi
push str.NtSetInformationThread
push edi
call esi
push str.NtSuspendProcess
push edi
call esi
push str.NtTerminateProcess
push edi
call esi
push str.NtOpenSymbolicLinkObject
push edi
call esi
push str.NtQuerySymbolicLinkObject
push edi
mov dword [0x302386cc], eax
call esi
push str.RtlNtStatusToDosError
push edi
mov dword [0x302386d0], eax
call esi
push str.NtClose
push edi
mov dword [0x302386c4], eax
call esi
mov dword [0x302386d4], eax
pop esi
pop edi
ret
Function at 0x30012c60
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
push 0x400
mov esi, ecx
mov dword [ebp - 8], 0
xor bl, bl
call fcn.3015e392
mov dword [esi + 0x38], eax
add esp, 4
mov eax, dword [esi + 0x3c]
cmp eax, 0xffffffff
jne 0x30012cb9
mov eax, dword [esi + 0x10]
test eax, eax
je 0x30012d95
push 0
push 0
push 3
push 0
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x3c], eax
cmp eax, 0xffffffff
je 0x30012d9c
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], ecx
test eax, eax
je 0x30012cd9
lea ecx, [ebp - 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x30012cd9
mov ecx, dword [ebp - 0x14]
jmp 0x30012cdb
xor ecx, ecx
push 0
lea eax, [ebp - 8]
mov dword [esi + 0x44], ecx
push eax
push 0x400
push dword [esi + 0x38]
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x30012d86
push 0x400
push dword [esi + 0x38]
mov ecx, esi
mov bl, 1
call fcn.300131a0
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x30012d86
call fcn.30003f40
cmp eax, 1
jne 0x30012d86
push ecx
mov ecx, esi
call fcn.300133a0
mov edi, eax
cmp edi, 0x400
jbe 0x30012d86
mov eax, dword [esi + 0x44]
test eax, eax
je 0x30012d3e
cmp eax, edi
jae 0x30012d3e
mov edi, eax
push dword [esi + 0x38]
call fcn.3015e38d
add esp, 4
push edi
call fcn.3015e392
add esp, 4
mov dword [esi + 0x38], eax
push 0
push 0
push 0
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 8]
push eax
push edi
push dword [esi + 0x38]
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x30012d86
push edi
push dword [esi + 0x38]
mov ecx, esi
call fcn.300131a0
mov eax, dword [esi + 0x3c]
cmp eax, 0xffffffff
je 0x30012d9c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x3c], 0xffffffff
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x300131a0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [ebp + 8]
mov esi, ecx
mov dword [edi + 0x18], ecx
mov dword [edi + 0x24], 0
mov dword [edi + 0x28], 0
mov dword [edi + 0x20], 0
mov dword [edi + 0x1c], 0
mov eax, dword [ecx + 0x3c]
test eax, eax
jle 0x30013206
cmp eax, dword [ebp + 0xc]
jge 0x30013206
add eax, ecx
mov dword [edi + 0x24], eax
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [edi + 0x28], eax
mov eax, dword [ecx + 0x3c]
cmp eax, 0x40
jb 0x300131fc
add eax, 0xffffffc0
mov dword [edi + 0x20], eax
lea eax, [ecx + 0x40]
mov dword [edi + 0x1c], eax
jmp 0x30013206
mov dword [ecx + 0x3c], 0x40
mov esi, dword [edi + 0x18]
cmp dword [esi + 0x3c], 0
lea eax, [esi + 0x3c]
mov edx, 0x14c
mov dword [ebp + 8], 0x8664
jne 0x3001325c
lea ebx, [edi + 0x3dc]
xor edx, edx
cmp eax, ebx
jae 0x3001324b
mov esi, 0x14c
lea esp, [esp]
movzx ecx, word [eax]
cmp cx, si
je 0x3001323e
cmp cx, word [ebp + 8]
jne 0x30013241
lea edx, [eax - 4]
add eax, 4
cmp eax, ebx
jb 0x30013230
mov esi, dword [edi + 0x18]
test edx, edx
je 0x30013257
sub edx, esi
mov dword [esi + 0x3c], edx
mov esi, dword [edi + 0x18]
mov edx, 0x14c
cmp dword [esi + 0x3c], 0
mov ecx, esi
jne 0x3001330b
lea eax, [esi + 0x3c4]
xor ebx, ebx
cmp esi, eax
jae 0x3001330b
movzx eax, word [esi]
cmp ax, dx
je 0x30013286
cmp ax, word [ebp + 8]
jne 0x30013294
lea eax, [ecx + 4]
cmp esi, eax
jb 0x30013294
test ebx, ebx
jne 0x30013294
lea ebx, [esi - 4]
add esi, 4
test ebx, ebx
je 0x300132fa
cmp ebx, ecx
jne 0x300132fa
push dword [edi + 0x38]
call fcn.3015e38d
add esp, 4
push 0x400
call fcn.3015e392
add esp, 4
mov dword [edi + 0x38], eax
push 0x400
push 0
push eax
call fcn.30160f00
mov eax, dword [edi + 0x38]
add esp, 0xc
mov ecx, dword [edi + 0x14]
add eax, 0x40
mov edx, 0x3c0
push eax
call fcn.30015310
add esp, 4
mov edx, 0x14c
test al, al
je 0x300132fa
mov eax, dword [edi + 0x38]
mov dword [edi + 0x18], eax
lea ebx, [eax + 0x40]
mov dword [eax + 0x3c], 0x40
mov ecx, dword [edi + 0x18]
lea eax, [ecx + 0x3c4]
cmp esi, eax
jb 0x30013278
mov eax, dword [ecx + 0x3c]
mov esi, ecx
test eax, eax
je 0x3001334c
mov edx, 0x5a4d
cmp word [ecx], dx
je 0x3001334c
lea edx, [eax + ecx]
mov esi, 0x10b
movzx eax, word [edx + 0x18]
cmp ax, si
je 0x3001333b
mov ebx, 0x20b
mov esi, ecx
cmp ax, bx
jne 0x3001334c
mov eax, 0x5a4d
mov word [ecx], ax
mov dword [edx], 0x4550
mov esi, dword [edi + 0x18]
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x30013396
lea edx, [eax + esi]
mov dword [edi + 0x24], edx
mov eax, dword [esi + 0x3c]
add eax, esi
mov dword [edi + 0x28], eax
movzx eax, word [edx + 6]
lea ecx, [eax + eax*4]
movzx eax, word [edx + 0x14]
lea ecx, [eax + ecx*8]
mov eax, dword [esi + 0x3c]
add eax, 0x18
add eax, ecx
cmp eax, 0x400
jae 0x30013396
mov edx, 0x400
lea ecx, [esi + eax]
sub edx, eax
mov dword [edi + 0x4c], ecx
mov dword [edi + 0x48], edx
call fcn.30003a40
mov dword [edi + 0x48], eax
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8
Function at 0x30013ca0
Capabilities:
Clear file content
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov edi, ecx
mov byte [ebp - 1], 1
mov eax, 0x4ec4ec4f
mov edx, dword [edi + 4]
mov esi, dword [edi]
sub edx, esi
mov ebx, dword [edi + 0x24]
imul edx
movzx ecx, word [ebx + 6]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jne 0x30013e56
imul eax, ecx, 0x34
mov eax, dword [eax + esi - 0x20]
cmp eax, dword [ebx + 0x3c]
jae 0x30013cfc
push eax
push ecx
push str.PE_Parser:_Error___image_seems_incomplete:___d_sections__PointerToRawData:_0x_x____dump_failed._n
call fcn.30009b00
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, str.CAPE
call fcn.30003370
mov esi, eax
push str.CapeOutput.bin
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi + 0x3c], eax
cmp eax, 0xffffffff
je 0x30013e56
mov ecx, dword [edi + 0x24]
push dword [edi + 0x14]
movzx ecx, word [ecx + 6]
imul edx, ecx, 0x34
mov ecx, dword [edi]
mov esi, dword [edx + ecx - 0x24]
add esi, dword [edx + ecx - 0x20]
xor edx, edx
push esi
mov ecx, eax
call fcn.30015530
add esp, 8
mov bl, al
neg bl
sbb bl, bl
push dword [edi + 0x3c]
and bl, byte [ebp - 1]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [edi + 0x3c]
mov dword [edi + 0xc], esi
cmp eax, 0xffffffff
je 0x30013d88
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x3c], 0xffffffff
mov ecx, str.CAPE
call fcn.30003370
mov esi, eax
push str.CapeOutput.bin
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
mov edi, dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
push 0
push 0x302386d8
push 0x104
push esi
call edi
test eax, eax
je 0x30013e49
call fcn.300034b0
mov esi, eax
push esi
push 0x302386d8
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x30013e10
push 0x104
push 0
push 0x302386d8
call fcn.30160f00
add esp, 0xc
push 0
push 0x302386d8
push 0x104
push esi
call edi
test eax, eax
je 0x30013e49
mov ecx, 0x302386d8
call fcn.30009c20
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push str.saveCompletePeToDisk:_There_was_a_problem_renaming_the_file
call fcn.30009b20
add esp, 4
push 0x302386d8
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x30013e56
push 0x302386d8
push str.saveCompletePeToDisk:_There_was_a_problem_deleting_the_file:__s
call fcn.30009b20
add esp, 8
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push str.saveCompletePeToDisk:_There_was_a_problem_obtaining_the_full_file_path
call fcn.30009b20
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4