joyce8/EMBER2024-capa huggingface dataset:
Function at 0x3000a7b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov ecx, str.CAPE
call fcn.30003500
push 1
push 0x104
mov dword [0x3026e5ac], eax
call fcn.30164988
mov esi, eax
add esp, 8
test esi, esi
jne 0x3000a7e8
push str.StringsOutput:_failed_to_allocate_memory_for_file_name_string
call fcn.3000a0f0
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 [0x3026e5ac]
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push esi
call fcn.30164124
add esp, 4
cmp dword [0x3026e5a8], 0
jne 0x3000a86c
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push dword [0x3026e5ac]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x3026e5a8], eax
push dword [0x3026e5ac]
cmp eax, 0xffffffff
jne 0x3000a85f
push str.StringsOutput:_Unable_to_open_strings_output_file__s
call fcn.3000a0f0
add esp, 8
pop esi
pop ebp
ret
push str.StringsOutput:_Output_file__s._n
call fcn.3000a0d0
add esp, 8
push 0x104
push 0
push 0x3026e140
call fcn.3015cdc0
add esp, 0xc
lea eax, [ebp + 0xc]
mov edx, 0x104
push eax
push ecx
push dword [ebp + 8]
mov ecx, 0x3026e140
push 0xffffffffffffffff
call fcn.30009fb0
mov al, byte [0x3026e140]
add esp, 0x10
mov esi, 0x3026e140
test al, al
je 0x3000a8c3
lea ebx, [ebx]
cmp al, 0xa
jl 0x3000a8b8
cmp al, 0x7e
jle 0x3000a8bb
mov byte [esi], 0x3f
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x3000a8b0
push 0x3026e140
call fcn.3000a570
mov ecx, 0x3026e140
add esp, 4
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x3000a8d8
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x3000a8ee
mov byte [esi], 0xa
mov ecx, 0x3026e140
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x3000a8f6
push 0
push 0x3026d8dc
sub ecx, edx
push ecx
push 0x3026e140
push dword [0x3026e5a8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
pop ebp
ret
Function at 0x3000c4b0
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 0x3000c4cf
mov esi, 0x7d0
push esi
call fcn.3015a252
mov ecx, dword [ebx + 0x104]
add esp, 4
mov edi, eax
mov edx, esi
mov dword [ebp - 0x10], edi
push edi
call fcn.300159c0
add esp, 4
test al, al
je 0x3000c644
test edi, edi
je 0x3000c64f
mov esi, dword [edi + 0x3c]
add esi, edi
cmp dword [esi], 0x4550
je 0x3000c515
push str.___IMAGE_NT_SIGNATURE_doesnt_match.
jmp 0x3000c63c
cmp dword [esi + 0x78], 0
je 0x3000c637
mov edi, dword [esi + 0x7c]
test edi, edi
je 0x3000c637
cmp edi, 0x30
jae 0x3000c534
mov edi, 0x8c
push edi
call fcn.3015a252
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x3000c644
mov ecx, dword [ebp + 8]
mov edx, edi
push ebx
mov ecx, dword [ecx + 0x104]
add ecx, dword [esi + 0x78]
call fcn.300159c0
add esp, 4
test al, al
je 0x3000c62f
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 0x3000c5ec
xor esi, esi
cmp dword [ebx + 0x18], esi
jbe 0x3000c62f
mov eax, dword [eax + esi*4]
add eax, edi
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x3000c5c0
test dl, dl
je 0x3000c5bc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x3000c5c0
add eax, 2
add ecx, 2
test dl, dl
jne 0x3000c5a0
xor eax, eax
jmp 0x3000c5c5
sbb eax, eax
or eax, 1
test eax, eax
je 0x3000c5dd
mov eax, dword [ebp - 8]
inc esi
mov ecx, dword [ebp + 0xc]
cmp esi, dword [ebx + 0x18]
jb 0x3000c595
push ebx
call fcn.3015a24d
jmp 0x3000c641
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
movzx eax, word [eax + esi*2]
mov edx, dword [ecx + eax*4]
jmp 0x3000c61a
mov ecx, dword [ebx + 0x14]
xor edx, edx
test ecx, ecx
je 0x3000c62f
mov esi, dword [ebx + 0x10]
movzx edi, word [ebp + 0x10]
lea esp, [esp]
lea eax, [esi + edx]
cmp edi, eax
je 0x3000c614
inc edx
cmp edx, ecx
jb 0x3000c600
push ebx
call fcn.3015a24d
jmp 0x3000c641
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.3015a24d
jmp 0x3000c641
push str.___No_export_table.
call fcn.3000a0d0
add esp, 4
push dword [ebp - 0x10]
call fcn.3015a24d
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
Function at 0x30012ce0
Capabilities:
Link many functions at runtime

Disassembly:
cmp dword [0x30233b24], 0
jne 0x30012dbd
push edi
push 0x301f17a4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
je 0x30012dbc
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 [0x30233b28], 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 [0x30233b2c], eax
call esi
push str.RtlNtStatusToDosError
push edi
mov dword [0x30233b30], eax
call esi
push str.NtClose
push edi
mov dword [0x30233b24], eax
call esi
mov dword [0x30233b34], eax
pop esi
pop edi
ret
Function at 0x30013230
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.3015a252
mov dword [esi + 0x38], eax
add esp, 4
mov eax, dword [esi + 0x3c]
cmp eax, 0xffffffff
jne 0x30013289
mov eax, dword [esi + 0x10]
test eax, eax
je 0x30013365
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 0x3001336c
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], ecx
test eax, eax
je 0x300132a9
lea ecx, [ebp - 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x300132a9
mov ecx, dword [ebp - 0x14]
jmp 0x300132ab
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 0x30013356
push 0x400
push dword [esi + 0x38]
mov ecx, esi
mov bl, 1
call fcn.30013770
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x30013356
call fcn.300042b0
cmp eax, 1
jne 0x30013356
push ecx
mov ecx, esi
call fcn.30013970
mov edi, eax
cmp edi, 0x400
jbe 0x30013356
mov eax, dword [esi + 0x44]
test eax, eax
je 0x3001330e
cmp eax, edi
jae 0x3001330e
mov edi, eax
push dword [esi + 0x38]
call fcn.3015a24d
add esp, 4
push edi
call fcn.3015a252
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 0x30013356
push edi
push dword [esi + 0x38]
mov ecx, esi
call fcn.30013770
mov eax, dword [esi + 0x3c]
cmp eax, 0xffffffff
je 0x3001336c
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 0x30013770
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 0x300137d6
cmp eax, dword [ebp + 0xc]
jge 0x300137d6
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 0x300137cc
add eax, 0xffffffc0
mov dword [edi + 0x20], eax
lea eax, [ecx + 0x40]
mov dword [edi + 0x1c], eax
jmp 0x300137d6
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 0x3001382c
lea ebx, [edi + 0x3dc]
xor edx, edx
cmp eax, ebx
jae 0x3001381b
mov esi, 0x14c
lea esp, [esp]
movzx ecx, word [eax]
cmp cx, si
je 0x3001380e
cmp cx, word [ebp + 8]
jne 0x30013811
lea edx, [eax - 4]
add eax, 4
cmp eax, ebx
jb 0x30013800
mov esi, dword [edi + 0x18]
test edx, edx
je 0x30013827
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 0x300138db
lea eax, [esi + 0x3c4]
xor ebx, ebx
cmp esi, eax
jae 0x300138db
movzx eax, word [esi]
cmp ax, dx
je 0x30013856
cmp ax, word [ebp + 8]
jne 0x30013864
lea eax, [ecx + 4]
cmp esi, eax
jb 0x30013864
test ebx, ebx
jne 0x30013864
lea ebx, [esi - 4]
add esi, 4
test ebx, ebx
je 0x300138ca
cmp ebx, ecx
jne 0x300138ca
push dword [edi + 0x38]
call fcn.3015a24d
add esp, 4
push 0x400
call fcn.3015a252
add esp, 4
mov dword [edi + 0x38], eax
push 0x400
push 0
push eax
call fcn.3015cdc0
mov eax, dword [edi + 0x38]
add esp, 0xc
mov ecx, dword [edi + 0x14]
add eax, 0x40
mov edx, 0x3c0
push eax
call fcn.300158e0
add esp, 4
mov edx, 0x14c
test al, al
je 0x300138ca
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 0x30013848
mov eax, dword [ecx + 0x3c]
mov esi, ecx
test eax, eax
je 0x3001391c
mov edx, 0x5a4d
cmp word [ecx], dx
je 0x3001391c
lea edx, [eax + ecx]
mov esi, 0x10b
movzx eax, word [edx + 0x18]
cmp ax, si
je 0x3001390b
mov ebx, 0x20b
mov esi, ecx
cmp ax, bx
jne 0x3001391c
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 0x30013966
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 0x30013966
mov edx, 0x400
lea ecx, [esi + eax]
sub edx, eax
mov dword [edi + 0x4c], ecx
mov dword [edi + 0x48], edx
call fcn.30003cb0
mov dword [edi + 0x48], eax
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8
Function at 0x30014270
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 0x30014426
imul eax, ecx, 0x34
mov eax, dword [eax + esi - 0x20]
cmp eax, dword [ebx + 0x3c]
jae 0x300142cc
push eax
push ecx
push str.PE_Parser:_Error___image_seems_incomplete:___d_sections__PointerToRawData:_0x_x____dump_failed._n
call fcn.3000a0d0
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.30003500
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 0x30014426
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.30015b00
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 0x30014358
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x3c], 0xffffffff
mov ecx, str.CAPE
call fcn.30003500
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 0x30233b38
push 0x104
push esi
call edi
test eax, eax
je 0x30014419
call fcn.30003640
mov esi, eax
push esi
push 0x30233b38
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x300143e0
push 0x104
push 0
push 0x30233b38
call fcn.3015cdc0
add esp, 0xc
push 0
push 0x30233b38
push 0x104
push esi
call edi
test eax, eax
je 0x30014419
mov ecx, 0x30233b38
call fcn.3000a1f0
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.3000a0f0
add esp, 4
push 0x30233b38
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x30014426
push 0x30233b38
push str.saveCompletePeToDisk:_There_was_a_problem_deleting_the_file:__s
call fcn.3000a0f0
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.3000a0f0
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x30014a30
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, ecx
push edi
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x30014a65
call fcn.300042b0
cmp eax, 1
jne 0x30014a65
mov ecx, dword [esi + 0x24]
mov edx, 0x10b
movzx eax, word [ecx + 0x18]
cmp ax, dx
jne 0x30014a68
mov edx, dword [ecx + 0x38]
mov eax, dword [ecx + 0x3c]
jmp 0x30014a71
mov ecx, dword [esi + 0x24]
mov eax, dword [esi + 0x28]
mov edx, dword [eax + 0x38]
mov eax, dword [eax + 0x3c]
mov edi, dword [esi + 4]
sub edi, dword [esi]
mov dword [ebp - 4], eax
movzx eax, word [ecx + 6]
mov ecx, dword [esi]
mov dword [ebp - 0x18], eax
mov eax, 0x4ec4ec4f
mov dword [ebp - 8], edx
imul edi
push 0x30014a10
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [esi + 4]
push eax
call fcn.30015110
mov eax, dword [esi + 0x24]
add esp, 8
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x14], 0
movzx ecx, word [eax + 0x14]
lea eax, [edx + edx*4]
lea ecx, [ecx + eax*8]
mov eax, dword [esi + 0x18]
mov eax, dword [eax + 0x3c]
add eax, 0x98
add eax, ecx
mov dword [ebp - 0x10], eax
test edx, edx
je 0x30014b47
mov ecx, dword [esi]
xor eax, eax
mov dword [ebp - 0xc], ecx
lea esp, [esp]
imul ebx, eax, 0x34
xor edx, edx
mov ecx, dword [ebx + ecx + 0xc]
dec ecx
add ecx, dword [ebp - 8]
mov eax, ecx
div dword [ebp - 8]
mov eax, dword [ebp - 0xc]
sub ecx, edx
xor edx, edx
mov dword [ebx + eax + 0xc], ecx
mov ecx, dword [ebp - 0x10]
dec ecx
add ecx, dword [ebp - 4]
mov eax, ecx
div dword [ebp - 4]
mov eax, dword [esi]
sub ecx, edx
xor edx, edx
mov dword [ebx + eax + 0x14], ecx
mov edi, dword [esi]
mov ecx, dword [ebp - 4]
dec ecx
add ecx, dword [edi + ebx + 0x2c]
mov eax, ecx
div dword [ebp - 4]
sub ecx, edx
mov dword [edi + ebx + 0x10], ecx
mov ecx, dword [esi]
mov dword [ebp - 0xc], ecx
mov eax, dword [ebx + ecx + 0x14]
add eax, dword [ebx + ecx + 0x10]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
movzx eax, ax
cmp eax, dword [ebp - 0x18]
jb 0x30014ae0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x30014c40
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
mov esi, ecx
mov byte [ebp - 1], 0
push edi
cmp dword [esi + 0x10], 0
je 0x30014dae
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x30014dae
call fcn.300042b0
cmp eax, 1
jne 0x30014dae
xor edi, edi
push edi
push edi
push 3
push edi
push eax
push closesocket
push dword [esi + 0x10]
mov dword [ebp - 0x1c], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x30014cdf
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
test ebx, ebx
je 0x30014ccf
lea eax, [ebp - 0x10]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x30014cbb
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1c], edi
call ebx
jmp 0x30014ce5
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1c], eax
call ebx
jmp 0x30014ce5
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0x1c], eax
call ebx
jmp 0x30014ce5
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.300139e0
cmp edi, eax
jbe 0x30014dae
mov edi, dword [esi + 0x3c]
cmp edi, 0xffffffff
jne 0x30014d27
mov eax, dword [esi + 0x10]
test eax, eax
je 0x30014d9d
push 0
push 0
push 3
push 0
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [esi + 0x3c], edi
cmp edi, 0xffffffff
je 0x30014da4
mov ecx, esi
call fcn.300139e0
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
test edi, edi
je 0x30014d51
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x30014d51
mov ecx, dword [ebp - 0x20]
jmp 0x30014d53
xor ecx, ecx
mov edi, dword [ebp - 0xc]
sub ecx, edi
push ecx
mov dword [esi + 0x30], ecx
call fcn.3015a252
add esp, 4
mov dword [esi + 0x2c], eax
push 0
push 0
push edi
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x14]
push eax
push dword [esi + 0x30]
push dword [esi + 0x2c]
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x30014d92
mov byte [ebp - 1], 1
mov ecx, dword [esi + 0x3c]
cmp ecx, 0xffffffff
je 0x30014da4
push ecx
call ebx
mov dword [esi + 0x3c], 0xffffffff
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x3001da60
Capabilities:
64-bit execution via heavens gate

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x10]
lea edx, [ebp + 0x14]
sub esp, 0x40
push ebx
push esi
push edi
test ecx, ecx
jle 0x3001da88
mov eax, dword [ebp + 0x14]
lea edx, [ebp + 0x1c]
dec ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp + 0x10], ecx
mov dword [ebp - 0xc], eax
jmp 0x3001da96
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
test ecx, ecx
jle 0x3001daaf
dec ecx
add edx, 8
mov dword [ebp + 0x10], ecx
mov eax, dword [edx - 8]
mov dword [ebp - 0x18], eax
mov eax, dword [edx - 4]
mov dword [ebp - 0x14], eax
jmp 0x3001dabd
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
test ecx, ecx
jle 0x3001dad6
dec ecx
add edx, 8
mov dword [ebp + 0x10], ecx
mov eax, dword [edx - 8]
mov dword [ebp - 0x20], eax
mov eax, dword [edx - 4]
mov dword [ebp - 0x1c], eax
jmp 0x3001dae4
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
test ecx, ecx
jle 0x3001dafd
dec ecx
add edx, 8
mov dword [ebp + 0x10], ecx
mov eax, dword [edx - 8]
mov dword [ebp - 0x28], eax
mov eax, dword [edx - 4]
mov dword [ebp - 0x24], eax
jmp 0x3001db0b
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov eax, edx
mov dword [ebp - 0x30], 0
cdq
mov dword [ebp - 0x40], eax
mov eax, ecx
mov dword [ebp - 0x3c], edx
cdq
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov word [ebp - 8], fs
mov eax, 0x2b
mov fs, ax
mov dword [ebp - 4], esp
and esp, 0xfffffff0
push 0x33
call fcn.3001db52

Function at 0x3001dbe0
Capabilities:
64-bit execution via heavens gate

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
push 0x33
call 0x3001dbf1
add dword [esp], 5
retf
Function at 0x30047e10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x30215e88]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x6c], eax
push ebx
mov ebx, edx
test ecx, ecx
je 0x30048013
test ebx, ebx
je 0x30048013
test eax, eax
je 0x30048013
push esi
mov esi, dword [ecx + 0x10]
test esi, esi
je 0x30048012
cmp dword [esi + 4], 0x73736c35
jne 0x30048012
push edi
push 0x60
lea eax, [ebp - 0x67]
push 0
push eax
call fcn.3015cdc0
add esp, 0xc
lea edx, [ebp - 0x68]
add esi, 0x1c
mov edi, 0x30
movzx ecx, byte [esi]
lea esi, [esi + 1]
mov eax, ecx
and ecx, 0xf
shr eax, 4
movzx eax, byte [eax + 0x301ea438]
mov byte [edx], al
movzx eax, byte [ecx + 0x301ea438]
mov byte [edx + 1], al
add edx, 2
sub edi, 1
jne 0x30047e76
mov byte [edx], 0
lea ecx, [ebp - 0x68]
mov eax, 0x301f224e
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x30047ed0
test dl, dl
je 0x30047ecc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x30047ed0
add eax, 2
add ecx, 2
test dl, dl
jne 0x30047eb0
xor eax, eax
jmp 0x30047ed5
sbb eax, eax
or eax, 1
test eax, eax
je 0x30048011
mov ecx, ebx
mov eax, 0x301f224e
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x30047f04
test dl, dl
je 0x30047f00
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x30047f04
add eax, 2
add ecx, 2
test dl, dl
jne 0x30047ee4
xor eax, eax
jmp 0x30047f09
sbb eax, eax
or eax, 1
test eax, eax
je 0x30048011
mov edi, dword [ebp - 0x6c]
mov eax, 0x301f224e
mov ecx, edi
jmp 0x30047f20
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x30047f40
test dl, dl
je 0x30047f3c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x30047f40
add eax, 2
add ecx, 2
test dl, dl
jne 0x30047f20
xor eax, eax
jmp 0x30047f45
sbb eax, eax
or eax, 1
test eax, eax
je 0x30048011
mov ecx, str.tlsdump
mov dword [ebp - 0x6c], 0
call fcn.30003500
mov esi, eax
push str.tlsdump.log
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
cmp dword [0x302406a8], 0
jne 0x30047f8d
push esi
push str.TLS_1.2_secrets_logged_to:__s
mov dword [0x302406a8], 1
call fcn.3000a0d0
add esp, 8
mov eax, dword [0x30269760]
test eax, eax
jne 0x30047fb2
push eax
push 0x80
push 4
push eax
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x30269760], eax
cmp eax, 0xffffffff
je 0x30048011
push 0x1000
push 0
push 0x30268760
call fcn.3015cdc0
lea eax, [ebp - 0x68]
push eax
push edi
push ebx
push str.client_random:__s__server_random:__s__master_secret:__s_n
push 0xffffffffffffffff
push 0x1000
push 0x30268760
call fcn.30009fe0
mov ecx, 0x30268760
add esp, 0x28
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x30047ff0
push 0
lea eax, [ebp - 0x6c]
sub ecx, edx
push eax
push ecx
push 0x30268760
push dword [0x30269760]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.30159c2d
mov esp, ebp
pop ebp
ret