joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4035a0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push 0xffffffffffffffff
push 0x407969
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
mov al, byte [esp + 0x34]
push ebx
push ebp
push esi
push edi
mov byte [esp + 0x14], al
mov edi, str.1141151159810310911411310410697111121104118113109117113121110101107105113114109102121119
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebp, ecx
lea ecx, [esp + 0x18]
push ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x40361c
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov edx, ecx
mov esi, str.1141151159810310911411310410697111121104118113109117113121110101107105113114109102121119
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov eax, dword [0x40b068]
mov ecx, dword [0x40b090]
sub eax, ecx
push ebx
lea ecx, [esp + 0x28]
push ebx
push ecx
mov dword [esp + 0x48], ebx
mov dword [0x40b060], eax
call fcn.004017e0
mov eax, dword [esp + 0x34]
add esp, 0xc
cmp eax, ebx
je 0x403666
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40365d
cmp al, 0xff
je 0x40365d
dec al
mov byte [ecx], al
jmp 0x403666
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [esp + 0x44]
mov dl, byte [esp + 0x14]
mov byte [esi], dl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea edx, [esp + 0x14]
mov ecx, dword [eax]
push ecx
push ebx
push edx
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
je 0x4036b9
mov al, byte [ecx - 1]
cmp al, bl
je 0x4036af
cmp al, 0xff
je 0x4036af
dec al
mov byte [ecx - 1], al
jmp 0x4036b9
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x34]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x30
ret
Function at 0x4036d0
Capabilities:
Delete file
Get common file path

Disassembly:
sub esp, 0x114
push ebx
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], 0
rep stosd dword es:[edi], eax
mov ecx, dword [0x40b094]
mov edx, dword [0x40b08c]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [0x40b06c]
push 0x44034000
add eax, ecx
push 0x3805
mov dword [0x40b07c], eax
mov eax, dword [0x40b084]
add eax, edx
mov dword [0x40b064], eax
call fcn.00402820
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
add esp, 8
fstp st(0)
push 0
call ebx
lea ecx, [esp + 0x20]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edx, dword [0x40b058]
mov esi, dword [0x40b090]
mov eax, dword [0x40b094]
and edx, esi
mov edi, dword [esp + 0x128]
mov dword [0x40b0a4], edx
mov edx, dword [0x40b0a0]
or ecx, 0xffffffff
sub eax, edx
lea ebp, [esp + 0x20]
mov dword [0x40b064], eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edi, ebp
mov ebp, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x40b05c]
imul ecx, edx
lea edx, [esp + 0x24]
mov dword [0x40b08c], ecx
push edx
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
test eax, eax
jne 0x40382e
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40382e
push 0xb7
call ebx
mov ecx, dword [0x40b0a0]
mov edx, dword [0x40b084]
and ecx, edx
push 0x4433c000
push 0x759b
mov dword [0x40b060], ecx
call fcn.00402820
add esp, 8
fstp st(0)
push 0
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_PostThreadMessageA]
mov edx, dword [0x40b058]
mov eax, dword [0x40b064]
pop edi
add edx, eax
pop esi
pop ebp
mov dword [0x40b0a8], edx
or eax, 0xffffffff
pop ebx
add esp, 0x114
ret
push 0
push 0x4000080
push 1
push 0
push 0
lea ecx, [esp + 0x34]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4038c8
push 0xb7
call ebx
mov edx, dword [0x40b058]
mov eax, dword [0x40b054]
sub edx, eax
push 0
lea eax, [esp + 0x14]
push 0
push eax
mov dword [0x40b070], edx
call fcn.004017e0
mov eax, dword [esp + 0x20]
add esp, 0xc
test eax, eax
je 0x4038a2
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x403899
cmp al, 0xff
je 0x403899
dec al
mov byte [ecx], al
jmp 0x4038a2
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x40b09c]
mov eax, dword [0x40b0a4]
sub ecx, eax
mov dword [0x40b06c], ecx
call fcn.00402110
fstp st(0)
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
Function at 0x404850
Capabilities:
Inspect load icon resource

Disassembly:
push 0xffffffffffffffff
push 0x407acf
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
mov eax, dword [esp + 0x24]
push ebx
push ebp
push esi
push edi
mov ebx, ecx
push eax
push 0x66
mov dword [esp + 0x18], ebx
call sub.MFC42.DLL_CDialog::CDialog
lea edi, [ebx + 0x60]
xor esi, esi
mov ecx, edi
mov dword [esp + 0x2c], esi
call sub.MFC42.DLL_CWnd::CWnd
mov dword [edi], 0x408898
lea edi, [ebx + 0xa0]
mov byte [esp + 0x2c], 1
mov ecx, edi
call sub.MFC42.DLL_CWnd::CWnd
mov dword [edi], 0x4087d8
lea ecx, [ebx + 0xe4]
mov byte [esp + 0x2c], 2
call sub.MFC42.DLL_CImageList::CImageList
mov byte [esp + 0x2c], 3
mov dword [ebx], 0x408700
call sub.MFC42.DLL_AfxGetModuleState
push 0x80
push 0xe
push 0x80
call sub.MFC42.DLL_AfxFindResourceHandle
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
mov dword [ebx + 0xe0], eax
mov eax, dword [0x40bbd0]
mov edx, dword [0x40bbb0]
mov ecx, eax
and ecx, edx
mov edx, dword [0x40bbac]
sub esp, 0x10
and edx, eax
mov dword [esp + 0x44], esp
mov al, byte [esp + 0x44]
mov ebp, esp
mov dword [0x40bbcc], ecx
mov dword [0x40bbe0], edx
mov edi, str.9710810610710911811510510612110111911411910198100
mov byte [ebp], al
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp + 4], esi
mov dword [ebp + 8], esi
mov dword [ebp + 0xc], esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov edi, ecx
mov ecx, ebp
push edi
mov dword [esp + 0x4c], edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x40496f
mov ecx, edi
mov edi, dword [ebp + 4]
mov edx, ecx
mov esi, str.9710810610710911811510510612110111911411910198100
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
xor esi, esi
lea ecx, [esp + 0x24]
push 0x43840000
push ecx
call fcn.004049f0
mov eax, dword [esp + 0x30]
add esp, 0x18
cmp eax, esi
je 0x4049a6
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x40499d
cmp al, 0xff
je 0x40499d
dec al
mov byte [ecx], al
jmp 0x4049a6
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call sub.MFC42.DLL_CWnd::FromHandle
mov ecx, dword [0x40c770]
mov edx, dword [ecx]
call dword [edx + 8]
mov eax, dword [0x40bbe0]
mov ecx, dword [0x40bbcc]
sub eax, ecx
mov ecx, dword [esp + 0x24]
pop edi
mov dword [0x40bba4], eax
pop esi
mov eax, ebx
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 4
Function at 0x4052c0
Capabilities:
Accept command line arguments

Disassembly:
push 0xffffffffffffffff
push 0x407b49
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
mov al, byte [esp + 0x24]
push ebx
push ebp
push esi
push edi
mov byte [esp + 0x14], al
mov edi, str.102113113117115
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebp, ecx
lea ecx, [esp + 0x18]
push ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x40533c
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov edx, ecx
mov esi, str.102113113117115
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov byte [eax + ebp], bl
mov ecx, dword [0x40bbf4]
push 0x439a8000
imul ecx, dword [0x40bbd4]
push 0xd71f
push 0x44404000
mov dword [esp + 0x38], ebx
mov dword [0x40bbc0], ecx
call fcn.004047b0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edx, dword [0x40bbbc]
imul edx, dword [0x40bbb8]
mov dword [0x40bbb8], edx
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, dword [esp + 0x34]
mov al, byte [esp + 0x14]
mov byte [esi], al
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea eax, [esp + 0x14]
mov edx, dword [ecx]
mov ecx, esi
push edx
push ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
je 0x4053d7
mov al, byte [ecx - 1]
cmp al, bl
je 0x4053cd
cmp al, 0xff
je 0x4053cd
dec al
mov byte [ecx - 1], al
jmp 0x4053d7
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x24]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret
Function at 0x4018f2
Capabilities:
Hash data with crc32

Disassembly:
push esi
push 8
xor eax, eax
add ecx, ecx
pop esi
sar ecx, 1
mov edx, eax
xor edx, ecx
shr eax, 1
test dl, 1
je 0x40190c
xor eax, 0xedb88320
dec esi
test esi, esi
jg 0x4018fa
pop esi
ret

Function at 0x40192f
Capabilities:
Encode data using xor

Disassembly:
cmp dword [esp + 8], 0
mov eax, dword [0x4199ac]
je 0x40195f
mov ecx, dword [esp + 4]
push esi
movzx edx, byte [ecx]
dec dword [esp + 0xc]
movzx esi, al
xor edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x4195a8]
inc ecx
cmp dword [esp + 0xc], 0
jne 0x401940
pop esi
mov dword [0x4199ac], eax
ret

Function at 0x401c51
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
cmp dword [ebp + 8], 0
push esi
mov esi, str.sfxhead.c
jne 0x401c6f
push 0xc61
push esi
call fcn.0040256a
pop ecx
pop ecx
cmp dword [ebp + 0xc], 0
jg 0x401c82
push 0xc62
push esi
call fcn.0040256a
pop ecx
pop ecx
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.00401379
add esp, 0xc
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
push dword [0x41a9f0]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
pop esi
jge 0x401cae
xor al, al
leave
ret
push dword [ebp - 4]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00401b6e
add esp, 0xc
lea eax, [ebp - 8]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov eax, dword [ebp - 8]
test eax, eax
je 0x401ce2
push dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov al, 1
leave
ret

Function at 0x40214c
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
push 0x44
xor esi, esi
lea eax, [ebp - 0x54]
push esi
push eax
call fcn.00401379
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push dword [ebp + 8]
mov dword [ebp - 0x54], 0x44
push esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], 1
mov word [ebp - 0x24], 0xa
mov word [ebp - 0x22], si
mov dword [ebp - 0x20], esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
neg eax
sbb eax, eax
and eax, dword [ebp - 0x10]
pop esi
leave
ret
Function at 0x40bad2
Capabilities:
Inspect section memory permissions

Disassembly:
add dword [eax], eax
add byte [ebx + 0x458304c7], al
adc byte [ebx + ebp*8], al
rol byte [ebx - 0x74eb43bb], 0xbd
js 0x40bae5
invalid
invalid
Function at 0x40d4f0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
jmp 0x40d4f7
and dword [ebp - 0x37c], 0
push dword [ebp - 0x3a0]
call dword [ebp - 0x704]
mov dword [ebp - 0x3a4], eax
cmp dword [ebp - 0x3a4], 0
je 0x40d53e
lea eax, [ebp - 0x714]
push eax
call fcn.0040b4b8
pop ecx
push eax
push dword [ebp - 0x3a4]
push dword [ebp + 0x14]
call fcn.0040b46d
add esp, 0xc
mov dword [ebp - 0x37c], eax
cmp dword [ebp - 0x37c], 0
je 0x40d549
jmp 0x40d54e
jmp 0x40ce4a
invalid
invalid
invalid

Function at 0x40ea4f
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x418d70]
je 0x40ea6a
inc edi
cmp edi, 0x17
jb 0x40ea5b
cmp edi, 0x17
jae 0x40ebea
push ebp
push 3
call fcn.00412560
cmp eax, 1
pop ecx
je 0x40ebb6
push 3
call fcn.00412560
test eax, eax
pop ecx
jne 0x40ea9e
cmp dword [0x418460], 1
je 0x40ebb6
cmp ebx, 0xfc
je 0x40ebe9
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x424fe8
push ebp
call fcn.00409539
add esp, 0xc
test eax, eax
je 0x40ead4
push esi
push esi
push esi
push esi
push esi
call fcn.0040abb9
add esp, 0x14
push 0x104
mov esi, 0x425001
push esi
push 0
mov byte [0x425105], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40eb18
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00409539
add esp, 0xc
test eax, eax
je 0x40eb18
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0040abb9
add esp, 0x14
push esi
call fcn.00409910
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40eb5d
push esi
call fcn.00409910
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x4252fc
push 0x414cc4
sub ecx, eax
push ecx
push eax
call fcn.00409f77
add esp, 0x14
test eax, eax
je 0x40eb5d
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0040abb9
add esp, 0x14
jmp 0x40eb5f
xor esi, esi
push 0x414cc0
push ebx
push ebp
call fcn.004093fb
add esp, 0xc
test eax, eax
je 0x40eb7f
push esi
push esi
push esi
push esi
push esi
call fcn.0040abb9
add esp, 0x14
push dword [edi*8 + 0x418d74]
push ebx
push ebp
call fcn.004093fb
add esp, 0xc
test eax, eax
je 0x40eba1
push esi
push esi
push esi
push esi
push esi
call fcn.0040abb9
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004123a3
add esp, 0xc
jmp 0x40ebe9
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x40ebe9
cmp ebp, 0xffffffff
je 0x40ebe9
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x418d74]
push dword [esi]
call fcn.00409910
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x10001bf3
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x91bc
call fcn.100087a0
push ebx
push esi
push edi
push 8
pop esi
push esi
lea eax, [esp + 0x14]
push 0x10009170
push eax
call dword [sym.imp.MSVCRT.dll_memcpy]
add esp, 0xc
lea eax, [esp + 0x1b8]
call fcn.10007396
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1b8]
call fcn.10007333
mov eax, dword [ebp + 0xc]
mov ecx, eax
and ecx, 7
mov ebx, esi
je 0x10001c47
sub ebx, ecx
lea edi, [ebx + eax]
lea eax, [edi + 0x1a]
push eax
push esi
push dword [0x1000c058]
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x10001c6c
xor al, al
jmp 0x10001cfc
mov eax, 0xf18b
sub eax, edi
mov word [esi], ax
xor eax, eax
mov cl, byte [eax + 0x10009158]
xor cl, byte [esp + eax + 0x18]
inc eax
mov byte [esi + eax + 1], cl
cmp eax, 0x18
jl 0x10001c78
push dword [ebp + 0xc]
lea eax, [esi + 0x1a]
push dword [ebp + 8]
push eax
call dword [sym.imp.MSVCRT.dll_memcpy]
add esp, 0xc
test ebx, ebx
je 0x10001caf
lea eax, [esi + edi + 0x19]
mov ecx, ebx
mov byte [eax], bl
dec eax
dec ecx
jne 0x10001ca9
lea eax, [esp + 0x18]
lea edx, [esp + 0x30]
call fcn.10007d54
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x34]
lea ecx, [esi + 0x1a]
push eax
mov edx, ecx
mov eax, edi
call fcn.10007c53
pop ecx
pop ecx
test eax, eax
je 0x10001cec
push esi
push 0
push dword [0x1000c058]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x10001c65
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0xc]
mov dword [eax], esi
mov eax, dword [ebp + 0x14]
mov dword [eax], ecx
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10001d03
Capabilities:
Get common file path
Get file size
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
xor esi, esi
push esi
push esi
push dword [0x1000c058]
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
jne 0x10001d31
call fcn.10001bb8
test al, al
jne 0x10001d31
or eax, 0xffffffff
jmp 0x10001ea8
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_strlen]
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
pop ecx
mov ebx, 0x400
push ebx
push 8
push dword [0x1000c058]
call edi
mov dword [ebp - 4], eax
cmp eax, esi
je 0x10001d29
push ebx
push 8
push dword [0x1000c058]
call edi
mov edi, eax
cmp edi, esi
je 0x10001d29
push ebx
push edi
push str.TEMP
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x10001d29
push dword [ebp - 4]
lea eax, [ebp - 0x10]
push 0x38d9
push eax
push edi
mov dword [ebp - 0x10], 0x46447e
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
push 0x80
push 4
push esi
push esi
mov ebx, 0xc0000000
push ebx
push dword [ebp - 4]
call edi
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jne 0x10001dcc
push dword [ebp - 4]
push esi
push dword [0x1000c058]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x10001d29
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x100000
jbe 0x10001e05
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x10001d29
push esi
push 0x80
push 2
push esi
push esi
push ebx
push dword [ebp - 4]
call edi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x10001e08
jmp 0x10001db7
mov ebx, dword [ebp - 8]
push dword [ebp - 4]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
push dword [0x1000c058]
call edi
push 2
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
mov dword [ebp - 0xc], esi
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
call dword [sym.imp.MSVCRT.dll_strlen]
pop ecx
push eax
push dword [ebp + 8]
call fcn.10001bf3
add esp, 0x10
test al, al
jne 0x10001e5c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10001d29
push esi
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10001e85
cmp dword [ebp - 4], esi
je 0x10001e50
push dword [ebp - 4]
push esi
push dword [0x1000c058]
call edi
jmp 0x10001e50
cmp dword [ebp - 4], esi
je 0x10001e96
push dword [ebp - 4]
push esi
push dword [0x1000c058]
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x10001d29
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x100023fd
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
mov dword [ebp - 0x10], 2
xor edi, edi
jmp 0x1000243d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
jne 0x10002550
push 0x4e20
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
je 0x10002550
push edi
push edi
push 3
push edi
push edi
push 0xc0000000
push dword [ebx + 4]
call esi
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x10002416
push edi
push edi
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
je 0x10002547
push edi
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x14], edi
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10002547
mov esi, 0x200
push esi
push 8
push dword [ebx]
mov dword [ebp - 8], edi
mov dword [ebp + 0xc], esi
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp + 8], eax
cmp eax, edi
je 0x10002547
push edi
lea ecx, [ebp - 8]
push ecx
push esi
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
jmp 0x10002504
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x10002526
add dword [ebp + 0xc], esi
push dword [ebp + 0xc]
push dword [ebp + 8]
push 8
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [ebp + 8], eax
cmp eax, edi
je 0x1000251d
add eax, dword [ebp - 0xc]
push edi
lea ecx, [ebp - 8]
push ecx
push esi
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 8]
add dword [ebp - 0xc], ecx
cmp eax, edi
je 0x100024c4
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
push dword [ebp - 4]
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x10002552
push str._HeapFree__NULL_n
push 0x72
jmp 0x10002540
cmp dword [ebp + 8], edi
je 0x10002539
push dword [ebp + 8]
push edi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x10002547
push str._HeapFree__NULL_n
push 0x79
call fcn.10002038
pop ecx
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop esi
leave
ret 0xc