joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404140
Capabilities:
Check if file exists
Delete file
Get disk size
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x433368]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x4343ea], 1
push esi
mov esi, dword [ebp + 8]
mov byte [ebp - 0x20e], 0
mov byte [ebp - 0x20d], 0
jne 0x404198
push esi
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404198
and eax, 0xffffffdc
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
test al, al
jne 0x404198
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405d02
mov esp, ebp
pop ebp
ret
cmp dword [0x4330e4], 0xffffffff
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_CreateFileW]
jne 0x40420e
movzx eax, word [esi]
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push str..A:
mov word [0x4330d4], ax
call edi
mov dword [0x4330e4], eax
movzx eax, word [esi]
mov word [0x4330dc], ax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x218]
push eax
push 0x4330dc
call dword [sym.imp.KERNEL32.DLL_GetDiskFreeSpaceW]
mov eax, dword [ebp - 0x218]
imul eax, dword [ebp - 0x214]
mov dword [0x434408], eax
push 0
push 0
push 3
push 0
push 0
push 0x80000000
push esi
call edi
mov edi, eax
cmp edi, 0xffffffff
jne 0x40425f
cmp byte [0x4343e4], 0
jne 0x40424d
push esi
push str._nError_opening__s_for_compressed_file_scan:
call fcn.004064e2
add esp, 8
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call fcn.004034f0
add esp, 4
pop edi
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405d02
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x20d]
push eax
lea eax, [ebp - 0x20e]
push eax
push edi
push dword [0x434408]
push dword [0x4330e4]
call fcn.00403bb0
add esp, 0x14
test al, al
jne 0x40429f
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop edi
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405d02
mov esp, ebp
pop ebp
ret
push ebx
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov bl, byte [ebp - 0x20e]
test bl, bl
je 0x40436e
lea eax, [ebp - 0x20c]
push eax
push esi
call fcn.00403350
add esp, 8
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x40433c
cmp byte [0x4343e4], al
jne 0x4042fb
push esi
push str._nError_deleting__s:
call fcn.004064e2
add esp, 8
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call fcn.004034f0
add esp, 4
push esi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
test eax, eax
jne 0x404329
cmp byte [0x4343e4], al
jne 0x404329
lea eax, [ebp - 0x20c]
push eax
push str._nError_renaming_file_back_to_original_name._File_is_left_as__s_n
call fcn.004064e2
add esp, 8
pop ebx
pop edi
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405d02
mov esp, ebp
pop ebp
ret
cmp byte [ebp - 0x20d], 0
mov eax, 1
movzx ecx, byte [0x4343e9]
cmove ecx, eax
cmp byte [0x4343e4], 0
mov byte [0x4343e9], cl
jne 0x40436e
push str.deleted._n
call fcn.004064e2
add esp, 4
mov ecx, dword [ebp - 4]
mov al, bl
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.00405d02
mov esp, ebp
pop ebp
ret
Function at 0x4151b4
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x433368]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.DLL_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0040a935
mov dword [ebp - 0x14], eax
cmp dword [0x435278], esi
jne 0x4152a7
push 0x800
push esi
push 0x42ebe0
call dword [sym.imp.KERNEL32.DLL_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x415234
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x57
jne 0x415387
push esi
push esi
push 0x42ebe0
call dword [sym.imp.KERNEL32.DLL_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x415387
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
test eax, eax
je 0x415387
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x435278], eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x43527c], eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x435280], eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push eax
call ebx
mov dword [0x435288], eax
test eax, eax
je 0x4152a4
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push eax
call ebx
mov dword [0x435284], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_IsDebuggerPresent]
test eax, eax
je 0x4152cc
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4152bf
push eax
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x4152e1
push 4
pop eax
jmp 0x415389
cmp dword [ebp - 0x14], esi
je 0x4152e1
push dword [0x435278]
call dword [sym.imp.KERNEL32.DLL_DecodePointer]
push 3
jmp 0x4152c6
mov eax, dword [0x435284]
mov ebx, dword [sym.imp.KERNEL32.DLL_DecodePointer]
cmp eax, edi
je 0x41533f
cmp dword [0x435288], edi
je 0x41533f
push eax
call ebx
push dword [0x435288]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x41533f
test eax, eax
je 0x41533f
call ecx
test eax, eax
je 0x415334
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x415334
test byte [ebp - 8], 1
jne 0x41533f
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x41536f
mov eax, dword [0x43527c]
cmp eax, edi
je 0x41536c
push eax
call ebx
test eax, eax
je 0x41536c
call eax
mov esi, eax
test esi, esi
je 0x41536c
mov eax, dword [0x435280]
cmp eax, edi
je 0x41536c
push eax
call ebx
test eax, eax
je 0x41536c
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x435278]
call ebx
test eax, eax
je 0x415387
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x415389
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405d02
mov esp, ebp
pop ebp
ret
Function at 0x401224
Capabilities:
Read .ini file

Disassembly:
push ecx
push 8
push dword [esp + 0xc]
push 0x40d028
push 0x40d01c
call dword [sym.imp.kernel32.dll_GetPrivateProfileStructA]
ret 8

Function at 0x402945
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
pushal
call 0x402954
pop dword [ebp - 0x30]
mov eax, 0xb3be1a06
sub eax, 0xb37df0b2
sub dword [ebp - 0x30], eax
push 0x40
push 0x1000
push 0x39d0f
push 0
mov eax, 0xc45d9196
sub eax, 0xc41d110e
add eax, dword [ebp - 0x30]
call dword [eax]
mov ecx, 0x8634dcb5
add ecx, 0x79cb7777
mov ebx, eax
mov edi, 0x40f000
add edi, dword [ebp - 0x30]
mov edx, 0x1ef85eaa
sub edx, 0xc3195c21
add dword [ebp - 8], 0x4435dff8
mov esi, dword [edi]
xor dword [ebp - 0x10], esi
xor esi, edx
sub dword [ebp - 0x2c], 0xcc46f82d
mov dword [ebx], esi
xor dword [ebp - 0xc], 0xf4c96eb6
add ebx, 0x2780db5f
sub ebx, 0x2780db5b
add edi, 4
loop 0x4029ad
add eax, 0x51f10064
sub eax, 0x51efbce1
mov ebx, eax
add eax, 0x1ed9d060
sub eax, 0x1ed9d05b
mov ecx, 0x8ce9763b
add ecx, 0x735689c5
add ecx, dword [ebp - 0x30]
call ebx
leave
ret
Function at 0x258010a7
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
pushal
call 0x258010b6
pop dword [ebp - 0x20]
mov eax, 0x2a35bab4
sub eax, 0x4b5a9fe
sub dword [ebp - 0x20], eax
mov dword [ebp - 0x30], 0xcf2773f5
add dword [ebp - 0x30], 0x7f2ad156
mov dword [ebp - 0x2c], 0xa0c95e48
sub dword [ebp - 0x2c], 0x6e961203
mov dword [ebp - 0x28], 0x7b4649e8
add dword [ebp - 0x28], 0xd105fa46
mov dword [ebp - 0x24], 0xfc74e6b2
sub dword [ebp - 0x24], 0xfc74e6b2
lea eax, [ebp - 0x30]
push eax
mov eax, 0xccb4ffed
sub eax, 0xa7332fa9
add eax, dword [ebp - 0x20]
call dword [eax]
mov dword [ebp - 0x30], 0x5c8f4846
add dword [ebp - 0x30], 0x17e32110
mov dword [ebp - 0x2c], 0xf8e79b7
add dword [ebp - 0x2c], 0x31dde7be
mov dword [ebp - 0x28], 0x7adba79e
add dword [ebp - 0x28], 0xe893c4ce
mov dword [ebp - 0x24], 0xf31eab88
add dword [ebp - 0x24], 0xce15478
lea ebx, [ebp - 0x30]
push ebx
push eax
mov eax, sym.imp.kernel32.dll_GetProcAddress
add eax, dword [ebp - 0x20]
call dword [eax]
push 0x40
push 0x1000
push 0x3d097
push 0
call eax
mov ecx, 0xaaa3ce0b
add ecx, 0x555c7bda
xor edi, edi
add edi, eax
mov ebx, 0xc9c265bc
sub ebx, 0xa43fcfbc
add ebx, dword [ebp - 0x20]
mov esi, 0x729f3668
xor dword [ebp - 0xc], 0xca63258f
mov edx, dword [ebx]
xor dword [ebp - 4], edi
add edx, esi
add dword [ebp - 0x14], edx
mov dword [edi], edx
sub dword [ebp - 0x14], ecx
add edi, 0x23ec0b4e
add edi, 0xdc13f4b6
add ebx, 4
loop 0x258011cf
add eax, 0x11a67
mov ebx, eax
add eax, 0xbd59a5e3
sub eax, 0xbd59a5de
mov ecx, 0x25800000
add ecx, dword [ebp - 0x20]
call ebx
leave
ret
Function at 0x401000
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push 0x64
push 0x4406b0
push 0x67
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
call fcn.004047fa
mov dword [ebp - 4], eax
push 0x64
push 0x44064c
push 0xbb
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
jne 0x401054
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
mov edx, dword [0x440510]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 4]
push eax
call dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401144
add esp, 4
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004011c4
add esp, 8
test eax, eax
jne 0x40107b
xor eax, eax
jmp 0x40113e
push 0x6d
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
mov dword [ebp - 0x30], eax
push 0
push 0
push 0
lea edx, [ebp - 0x2c]
push edx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x4010d7
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.USER32.dll_TranslateAcceleratorA]
test eax, eax
jne 0x4010cf
push 0
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0
push 0xa
push 0xa
push 0
call dword [sym.imp.USER32.dll_DrawIcon]
push 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_HideCaret]
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x2c]
push edx
push 0
push 0
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.GDI32.dll_GetCharWidth32A]
push 1
push 0
push 1
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.GDI32.dll_TextOutA]
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov edx, dword [ebp - 0x10]
cmp edx, dword [ebp + 8]
jbe 0x401131
mov dword [ebp - 8], 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_ShowCaret]
mov eax, dword [ebp - 0x24]
mov esp, ebp
pop ebp
ret 0x10

Function at 0x40142f
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
cmp dword [ebp + 8], 0xb0
jae 0x4014cd
mov eax, dword [ebp + 8]
mov dword [ebp - 0x118], eax
mov ecx, dword [ebp - 0x118]
add ecx, 1
mov dword [ebp - 0x118], ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x118]
push eax
call fcn.0040142f
add esp, 8
mov eax, dword [ebp + 8]
xor edx, edx
mov ecx, 3
div ecx
test edx, edx
jne 0x401489
mov byte [ebp - 0x114], 0
jmp 0x4014cb
mov eax, dword [ebp + 8]
xor edx, edx
mov ecx, 4
div ecx
test edx, edx
jne 0x4014ad
lea edx, [ebp - 0x104]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
jmp 0x4014cb
mov eax, dword [ebp + 8]
xor edx, edx
mov ecx, 0xd
div ecx
test edx, edx
jne 0x4014cb
mov byte [ebp - 0x112], 0x4d
mov byte [ebp - 0x111], 0
jmp 0x4014d6
mov edx, dword [ebp + 0xc]
mov dword [edx], 1
mov eax, dword [ebp + 8]
mov esp, ebp
pop ebp
ret
Function at 0x401a16
Capabilities:
Check for time delay via gettickcount
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov dword [ebp - 0x10], 0x64
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [0x43b3e4]
mov dword [ecx + 0xa0], edx
mov eax, dword [ebp - 4]
mov ecx, dword [0x43fb40]
mov dword [eax + 0x98], ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edx, dword [ebp - 4]
mov dword [edx + 0xb8], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0xb8], 0
je 0x401a8e
mov ecx, dword [ebp - 0x10]
add ecx, 0x7c
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 4]
mov dword [edx + 0x18c], 0x43b3ec
mov eax, dword [ebp - 4]
mov ecx, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [eax + 0x1a0], ecx
jmp 0x401b5a
mov edx, dword [str.appcommand.ini]
mov dword [ebp - 0x2c], edx
mov eax, dword [0x43fb90]
mov dword [ebp - 0x28], eax
mov ecx, dword [0x43fb94]
mov dword [ebp - 0x24], ecx
mov dx, word [0x43fb98]
mov word [ebp - 0x20], dx
mov al, byte [0x43fb9a]
mov byte [ebp - 0x1e], al
push 0
push 0
push 4
push 0
push 0
push 2
lea ecx, [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x401b2e
push 0x80
call fcn.0042b245
add esp, 4
mov dword [ebp - 0x30], eax
mov edx, dword [ebp - 0x30]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
je 0x401b2e
push 0
lea eax, [ebp - 0x10]
push eax
push 4
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x10], 4
jne 0x401b2e
push 0
lea eax, [ebp - 0x10]
push eax
push 4
mov ecx, dword [ebp - 4]
add ecx, 0x6b0
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
push 0
push 0x43fb9c
push 5
push 0
call dword [sym.imp.KERNEL32.dll_UpdateResourceA]
mov dword [ebp - 0x18], eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0xb8]
mov dword [ecx + 0xa4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [0x43b3e8]
mov dword [ecx + 0x9c], edx
push 0x2bc
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 4]
mov ecx, dword [0x43fb3c]
mov dword [eax + 0x94], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 4]
mov dword [edx + 0x170], 0x42f030
mov eax, dword [ebp - 4]
push eax
call fcn.004049be
xor eax, eax
mov esp, ebp
pop ebp
ret 8
Function at 0x4046d8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x14]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 4], eax
push 0
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x18]
xor eax, eax
mov ax, word [edx + 8]
push eax
push 0
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x18]
push edx
call dword [sym.imp.GDI32.dll_GetDIBits]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x2c], eax
mov word [ebp - 0x28], 0x4d42
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x20]
lea edx, [edx + ecx*4 + 0xe]
mov eax, dword [ebp - 0x18]
add edx, dword [eax + 0x14]
mov dword [ebp - 0x26], edx
mov word [ebp - 0x22], 0
mov word [ebp - 0x20], 0
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x20]
lea edx, [edx + ecx*4 + 0xe]
mov dword [ebp - 0x1e], edx
push 0
lea eax, [ebp - 0xc]
push eax
push 0xe
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x20]
lea eax, [edx*4 + 0x28]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x14]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
push 0
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4047f6
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4047f6
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov esp, ebp
pop ebp
ret
Function at 0x4047fa
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x478
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], 0
push 1
push 0xd
call fcn.00401c3f
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 4], 0
jne 0x40486a
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0x10], eax
push 0xa
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push eax
push 8
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push eax
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 4], 0
je 0x40487d
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 4], 0
je 0x404895
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.USER32.dll_IsWindowVisible]
mov eax, dword [ebp - 8]
jmp 0x4049ba
mov dword [ebp - 0x470], 0
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push str.o23ne.doc
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x470], eax
cmp dword [ebp - 0x470], 0xffffffff
jne 0x4048d2
xor eax, eax
jmp 0x4049ba
push 0
push 0x80
push 4
push 0
push 1
push 4
push str.two.txt
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x4048fc
xor eax, eax
jmp 0x4049ba
push 0
lea eax, [ebp - 0x478]
push eax
push 0x448
lea ecx, [ebp - 0x468]
push ecx
mov edx, dword [ebp - 0x470]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404991
push 2
push 0
push 0
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x474], eax
push 0
mov ecx, dword [ebp - 0x478]
push ecx
push 0
mov edx, dword [ebp - 0x474]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_LockFile]
push 0
lea ecx, [ebp - 0x46c]
push ecx
mov edx, dword [ebp - 0x478]
push edx
lea eax, [ebp - 0x468]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
mov edx, dword [ebp - 0x478]
push edx
push 0
mov eax, dword [ebp - 0x474]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_UnlockFile]
cmp dword [ebp - 0x478], 0x448
je 0x4048fc
mov edx, dword [ebp - 0x470]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x42bf49
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x440170
cmp edx, dword [eax]
je 0x42bf6b
add eax, 8
inc ecx
cmp eax, 0x440200
jl 0x42bf5c
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x440170]
jne 0x42c099
mov eax, dword [0x440720]
cmp eax, 1
je 0x42c073
test eax, eax
jne 0x42bf9c
cmp dword [0x4400c4], 1
je 0x42c073
cmp edx, 0xfc
je 0x42c099
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x42bfd3
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0042cd30
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.0042ae30
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x42c016
lea eax, [ebp - 0x1a4]
push eax
call fcn.0042ae30
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x42e4c0
push edi
call fcn.0042ceb0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0042cd30
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0042cd40
lea eax, [ebp - 0xa0]
push 0x42e4a0
push eax
call fcn.0042cd40
push dword [esi + 0x440174]
lea eax, [ebp - 0xa0]
push eax
call fcn.0042cd40
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0042ce20
add esp, 0x2c
pop edi
jmp 0x42c099
lea eax, [ebp + 8]
lea esi, [esi + 0x440174]
push 0
push eax
push dword [esi]
call fcn.0042ae30
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret