joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1012ec9
Capabilities:
Enumerate gui resources

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x10255b8]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp word [eax], 0
je 0x1012f37
push eax
lea eax, [ebp - 0x20c]
push eax
call sub.MFC42u.DLL_AfxFullPath
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomW]
test ax, ax
mov dword [ebp - 0x210], eax
je 0x1012f37
lea eax, [ebp - 0x210]
push eax
push 0x10127f9
call dword [sym.imp.USER32.dll_EnumWindows]
cmp word [ebp - 0x210], 0
jne 0x1012f2b
xor eax, eax
inc eax
jmp 0x1012f39
push dword [ebp - 0x210]
call dword [sym.imp.KERNEL32.dll_DeleteAtom]
xor eax, eax
mov ecx, dword [ebp - 4]
call fcn.0101874a
leave
ret 4
Function at 0x10145bb
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
xor esi, esi
cmp dword [ebp + 8], esi
mov dword [ebp - 4], esi
jne 0x10145d0
xor eax, eax
jmp 0x101462e
push edi
push esi
push 0x80
push 3
push esi
push 3
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x10145f5
xor eax, eax
jmp 0x101462d
push esi
lea eax, [ebp - 4]
push eax
push 2
lea eax, [ebp + 0xa]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1014624
cmp dword [ebp - 4], 2
jne 0x1014624
cmp word [ebp + 0xa], 0xfeff
je 0x1014621
cmp word [ebp + 0xa], 0xfffe
jne 0x1014624
xor esi, esi
inc esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
leave
ret 4
Function at 0x101709b
Capabilities:
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x10255b8]
push ebx
push esi
mov esi, dword [sym.imp.SHELL32.dll_DragQueryFileW]
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
push ebx
push 0xffffffffffffffff
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x214], ecx
call esi
mov ecx, dword [ebp - 0x214]
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x220]
push eax
call fcn.01008c46
cmp dword [ebp - 0x218], ebx
jbe 0x1017144
push 0x104
lea eax, [ebp - 0x210]
push eax
push ebx
push edi
call esi
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0x10
je 0x101713b
mov eax, dword [ebp - 0x21c]
mov ecx, dword [ebp - 0x214]
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x220]
push eax
call fcn.01008c88
mov ecx, dword [ebp - 0x214]
lea eax, [ebp - 0x210]
push eax
call fcn.0101ca80
inc ebx
cmp ebx, dword [ebp - 0x218]
jb 0x10170e9
mov ecx, dword [ebp - 0x214]
lea eax, [ebp - 0x220]
push eax
call fcn.01008c88
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor eax, eax
pop ebx
call fcn.0101874a
leave
ret 4

Function at 0x1017f41
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push esi
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
xor esi, esi
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
mov dword [edi], esi
call dword [sym.imp.ole32.dll_StringFromCLSID]
cmp eax, esi
mov dword [ebp - 0xc], eax
jl 0x1017fc2
lea eax, [ebp - 4]
push eax
push 0x20019
push esi
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1017f8b
mov dword [ebp - 0xc], 1
jmp 0x1017fc2
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0xc]
push eax
push esi
push str.Compatibility_Flags
push dword [ebp - 4]
mov dword [ebp - 0x10], 4
mov dword [ebp + 0xc], esi
mov dword [ebp + 8], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1017fc2
cmp dword [ebp + 0xc], 4
jne 0x1017fc2
mov eax, dword [ebp + 8]
mov dword [edi], eax
cmp dword [ebp - 4], esi
je 0x1017fd0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], esi
pop esi
je 0x1017fdf
push dword [ebp - 8]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0xc]
leave
ret 8
Function at 0x1017feb
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push esi
xor esi, esi
cmp eax, esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], 4
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
je 0x1018061
cmp word [eax], si
je 0x1018061
lea ecx, [ebp - 4]
push ecx
push 0x20019
push esi
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1018061
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push esi
push 0x1006dec
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1018058
cmp dword [ebp - 8], 4
jne 0x1018058
cmp dword [ebp - 0xc], 1
jne 0x1018058
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
leave
ret 4
Function at 0x101a8c5
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x70
push 0x1006ea0
call fcn.0101ad50
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x101a900
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x101a900
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x101a918
cmp eax, 0x20b
je 0x101a905
mov dword [ebp - 0x1c], edi
jmp 0x101a92c
cmp dword [ecx + 0x84], 0xe
jbe 0x101a900
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x101a926
cmp dword [ecx + 0x74], 0xe
jbe 0x101a900
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], edi
push 2
pop ebx
push ebx
call dword [sym.imp.msvcrt.dll___set_app_type]
pop ecx
or dword [0x1025ffc], 0xffffffff
or dword [0x1026000], 0xffffffff
call dword [sym.imp.msvcrt.dll___p__fmode]
mov ecx, dword [0x1025fe0]
mov dword [eax], ecx
call dword [sym.imp.msvcrt.dll___p__commode]
mov ecx, dword [0x1025fdc]
mov dword [eax], ecx
mov eax, dword [sym.imp.msvcrt.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x1025ff8], eax
call fcn.0101ad48
cmp dword [0x10255c0], edi
jne 0x101a989
push fcn.0101ad48
call dword [sym.imp.msvcrt.dll___setusermatherr]
pop ecx
call fcn.0101ad31
push 0x1024058
push 0x1024054
call sub.msvcrt.dll__initterm
mov eax, dword [0x1025fd8]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push dword [0x1025fd4]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.msvcrt.dll___wgetmainargs]
mov dword [ebp - 0x38], eax
push 0x1024050
push section..data
call sub.msvcrt.dll__initterm
add esp, 0x24
mov eax, dword [sym.imp.msvcrt.dll__wcmdln]
mov esi, dword [eax]
cmp esi, edi
jne 0x101a9ef
or dword [ebp - 4], 0xffffffff
mov eax, 0xff
jmp 0x101aaa9
mov dword [ebp - 0x20], esi
cmp word [esi], 0x22
jne 0x101aa3d
add esi, ebx
mov dword [ebp - 0x20], esi
mov ax, word [esi]
cmp ax, di
je 0x101aa0b
cmp ax, 0x22
jne 0x101a9f8
cmp word [esi], 0x22
jne 0x101aa16
add esi, ebx
mov dword [ebp - 0x20], esi
mov ax, word [esi]
cmp ax, di
je 0x101aa24
cmp ax, 0x20
jbe 0x101aa11
mov dword [ebp - 0x54], edi
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
test byte [ebp - 0x54], 1
je 0x101aa4a
movzx eax, word [ebp - 0x50]
jmp 0x101aa4d
cmp word [esi], 0x20
jbe 0x101aa16
add esi, ebx
mov dword [ebp - 0x20], esi
jmp 0x101aa3d
push 0xa
pop eax
push eax
push esi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call fcn.0101aef7
mov esi, eax
mov dword [ebp - 0x3c], esi
cmp dword [ebp - 0x1c], edi
jne 0x101aa6e
push esi
call dword [sym.imp.msvcrt.dll_exit]
call dword [sym.imp.msvcrt.dll__cexit]
jmp 0x101aaa3
or dword [ebp - 4], 0xffffffff
mov eax, esi
call fcn.0101ad8b
ret
Function at 0x101addd
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push 0x1006ee8
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x101ae35
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0x1004d40
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x101ae28
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x101ae37
xor eax, eax
pop esi
leave
ret 4
Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..rdata
nop
nop
nop
nop
nop
push 4
nop
nop
nop
pop edi
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x433072
nop
mov ebx, 0x40de38
nop
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
push eax
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
nop
xchg ecx, eax
pop eax
nop
nop
nop
nop
nop
mov esi, 0x1e0a00e1
nop
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x433060
nop
nop
mov eax, section..data
nop
nop
cmp eax, 0
nop
nop
nop
nop
je 0x4330d2
nop
nop
mov ebx, 0x4304d8
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x2310acf
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
loop 0x4330c0
nop
nop
nop
nop
nop
popal
nop
jmp 0x431219
Function at 0x484cf5
Capabilities:
Encode data using xor

Disassembly:
mov edi, 0x484a08
add ecx, 0x1fd47eb6
add esi, 0xdf7034ff
dec esi
call fcn.00484d32
dec esi
xor dword [ebx], edi
mov esi, esi
inc ecx
mov ecx, 0x59a2e340
add ebx, 2
and esi, ecx
add ecx, 1
cmp ebx, eax
jl fcn.00484cf5
add esi, ecx
ret
Function at 0x402260
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
sub esp, 0x400
push eax
push ecx
push edx
lea eax, [esp + 0xc]
push str.Assertion_Failed__n_nExpression:__s_nFile:__s_nLine:__d_n_nAn_assertion_failure_indicates_a_serious_failure_in_an_napplication._You_should_contact_the_author_immediately_nwith_the_information_shown_above._n_n_The_application_will_now_close_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea ecx, [esp]
push 0x42010
push str.Assertion_Failure
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x4022b0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [0x40dfc8]
sub esp, 0x10
test eax, eax
je 0x4022c5
mov eax, 1
add esp, 0x10
ret
push ebx
push ebp
push esi
push edi
mov ecx, 0x3fd
xor eax, eax
mov edi, 0x40cfd4
mov ebx, 0x83a561e3
rep stosd dword es:[edi], eax
mov ecx, 1
mov eax, 0x3fd
mov edi, 0xc857a40e
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], 0x28ba93cc
mov dword [esp + 0x14], eax
xor esi, esi
test eax, eax
jbe 0x402364
xor ebp, ebp
shl ecx, 7
mov dword [esp + 0x1c], ecx
push ebx
mov edx, edi
mov ecx, esi
call fcn.004023c0
mov eax, esi
xor edx, edx
mov ecx, 0x3fd
div ecx
mov ecx, esi
and ecx, 0xf
mov edx, dword [edx*4 + 0x40cfd4]
mov eax, edx
add edx, 0x1d1d1d1e
shr eax, cl
mov ecx, ebx
and ecx, 0x54545454
sub ecx, eax
add edi, ecx
mov ecx, dword [esp + 0x1c]
mov eax, edi
and eax, 0xbcbcbcbc
add eax, ebp
add ebp, ecx
xor eax, edx
mov edx, dword [esp + 0x10]
sub ebx, eax
mov eax, dword [esp + 0x14]
add esi, edx
cmp esi, eax
jb 0x40230a
mov ecx, edx
mov edx, ecx
add eax, 0x7fa
xor edx, 0xbabababa
add ecx, 2
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
lea edx, [edx + ebx*8]
xor edx, 0x8dc9de86
sub edi, edx
mov edx, dword [esp + 0x18]
mov esi, edi
sub esi, edx
add edx, 0x51752798
xor esi, 0xfe434b6b
mov dword [esp + 0x18], edx
add ebx, esi
cmp eax, 0x23e5
jb 0x4022fb
pop edi
mov eax, 1
pop esi
pop ebp
mov dword [0x40dfc8], eax
pop ebx
add esp, 0x10
ret
Function at 0x4025f0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0xc6c
test eax, eax
jne 0x40260f
push 0x54
push str.C:My_ProgramsCCommonQInjectDLL.cpp
push str.hTargetProcess
call fcn.00402260
push ebx
mov ebx, dword [esp + 0xc78]
push ebp
push esi
test ebx, ebx
push edi
jne 0x40262f
push 0x55
push str.C:My_ProgramsCCommonQInjectDLL.cpp
push str.hTargetThread
call fcn.00402260
mov eax, dword [esp + 0xc88]
test eax, eax
jne 0x40264b
push 0x56
push str.C:My_ProgramsCCommonQInjectDLL.cpp
push str.lpDLLFileName
call fcn.00402260
mov eax, dword [esp + 0xc8c]
test eax, eax
jne 0x402667
push 0x57
push str.C:My_ProgramsCCommonQInjectDLL.cpp
push str.dwPatcherRVA
call fcn.00402260
mov esi, dword [esp + 0xc94]
test esi, esi
je 0x40268e
mov eax, dword [esp + 0xc90]
test eax, eax
jne 0x40268e
push 0x59
push str.C:My_ProgramsCCommonQInjectDLL.cpp
push str.lpPatcherData
call fcn.00402260
cmp esi, 0x800
ja 0x402824
mov ecx, 0xb3
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
mov ecx, 0x266
lea edi, [esp + 0x2e4]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x10003
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov ebp, dword [esp + 0xdc]
push str.kernel32
mov ecx, dword [esp + 0xd4]
sub ebp, 0x99c
mov dword [esp + 0xe0], ebp
add ebp, 4
mov dword [esp + 0x14], ecx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
push str.LoadLibraryA
push edi
call ebx
push str.GetProcAddress
push edi
mov dword [esp + 0x2ec], eax
call ebx
push str.ExitProcess
push edi
mov dword [esp + 0x2f0], eax
call ebx
mov ecx, esi
mov esi, dword [esp + 0xc90]
mov edx, dword [esp + 0xc8c]
mov dword [esp + 0x2ec], eax
mov eax, ecx
lea edi, [esp + 0x2f8]
shr ecx, 2
mov dword [esp + 0x2f0], edx
mov edx, dword [esp + 0xc88]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x103
and ecx, 3
lea eax, [esp + 0xafc]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0xc98]
lea ebx, [ebp + 0x918]
push edx
push eax
mov dword [esp + 0x300], ecx
mov dword [esp + 0xdc], ebx
call fcn.00404d90
mov edx, dword [esp + 0xe8]
mov ecx, 0x20
mov esi, 0x4025b0
lea edi, [esp + 0xc08]
add esp, 0xc
mov byte [esp + 0xbfb], 0
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0xc80]
mov edi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
lea ecx, [esp + 0x14]
push 4
push ecx
push edx
push esi
call edi
test eax, eax
je 0x402824
push 0
lea eax, [esp + 0x2e8]
push 0x998
push eax
push ebp
push esi
call edi
test eax, eax
je 0x402824
lea ecx, [esp + 0x14]
push ecx
push 0x40
push 0x80
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x402824
mov eax, dword [esp + 0xc84]
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
neg eax
pop edi
pop esi
sbb eax, eax
pop ebp
neg eax
pop ebx
add esp, 0xc6c
ret 0x18
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc6c
ret 0x18
Function at 0x402e40
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40a280
push 0x404ff4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xac
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov ebx, dword [ebp + 8]
xor edi, edi
cmp ebx, edi
jne 0x402e86
push 0x29a
push str.C:My_ProgramsCCommonQInjectDLL.cpp
push str.pfnOldFunction
call fcn.00402260
cmp dword [ebp + 0xc], edi
jne 0x402e9f
push 0x29b
push str.C:My_ProgramsCCommonQInjectDLL.cpp
push str.pfnNewFunction
call fcn.00402260
mov ecx, ebx
call fcn.00402840
test eax, eax
jne 0x403014
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], edi
push 0x40
call fcn.00404e99
add esp, 4
mov esi, eax
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x1c], esi
cmp esi, edi
jne 0x402ed6
mov dword [ebp - 4], 0xffffffff
jmp 0x403014
mov ecx, 0x10
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
lea edx, [esi + 0x11]
mov ecx, 0xb
mov eax, 0xcccccccc
mov edi, edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [esi], ebx
mov eax, dword [ebp + 0xc]
mov dword [esi + 4], eax
lea edi, [esi + 8]
mov dword [edi], edx
push edx
mov edx, eax
mov ecx, ebx
call fcn.00402980
mov dword [ebp - 0x34], eax
mov eax, edi
mov dword [ebp - 0x4c], eax
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], esi
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x5c]
push edx
mov ecx, 0x40e1e8
call fcn.004035a0
mov ecx, eax
mov eax, dword [ecx]
mov dword [ebp - 0x54], eax
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x64], eax
mov byte [ebp - 0x60], cl
mov dword [ebp - 0x44], eax
mov edx, dword [ebp - 0x60]
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x30], ebx
lea eax, [esi + 0xc]
mov ecx, ebx
mov edx, dword [ecx]
mov dword [eax], edx
mov cl, byte [ecx + 4]
mov byte [eax + 4], cl
sub esi, ebx
add esi, 0xc
mov dword [ebp - 0x20], esi
lea edx, [ebp - 0x38]
push edx
push 0x40
push 5
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x402fb3
mov byte [ebx], 0xe9
mov dword [ebx + 1], esi
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
push 5
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [edi]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [ebp - 4], 0xffffffff
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x403014
lea esi, [ebx + 8]
push esi
mov ecx, 0x40e1e8
call fcn.00404720
mov edi, eax
push esi
mov ecx, 0x40e1e8
call fcn.004046f0
mov esi, eax
mov dword [ebp - 0xac], esi
cmp esi, edi
je 0x402ffb
lea ecx, [ebp - 0xac]
call fcn.00404750
cmp dword [ebp - 0xac], edi
jne 0x402fe8
push edi
push esi
lea edx, [ebp - 0x7c]
push edx
mov ecx, 0x40e1e8
call fcn.004036b0
push ebx
call fcn.00404e8e
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4048a0
Capabilities:
Delete file

Disassembly:
push esi
push 0x40e208
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x40e220]
test esi, esi
je 0x4048d7
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edi
mov edi, dword [esi]
lea eax, [esi + 4]
push eax
call ebx
push esi
call fcn.004054d2
add esp, 4
mov esi, edi
test edi, edi
jne 0x4048be
pop edi
pop ebx
push 0x40e208
mov dword [0x40e224], 0
mov dword [0x40e220], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
pop esi
ret

Function at 0x404b30
Capabilities:
Clear file content
Delete file
Write file on windows

Disassembly:
mov edx, dword [esp + 0xc]
lea eax, [esp + 0xc]
push 0
lea ecx, [esp + 0xc]
push eax
mov eax, dword [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x10]
push edx
push eax
push ecx
call fcn.00404a70
test eax, eax
jne 0x404b57
ret 0x10
push ebx
push esi
mov ebx, dword [esp + 0x18]
push edi
xor edi, edi
push edi
push edi
push 2
push edi
push edi
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x404bbe
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
push edi
push edx
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404bac
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
cmp edx, eax
jne 0x404bac
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov edi, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x404bbe
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, edi
pop edi
pop esi
pop ebx
ret 0x10

Function at 0x404bd0
Capabilities:
Delete file
Get common file path

Disassembly:
sub esp, 0x210
push esi
push edi
mov edi, dword [esp + 0x21c]
test edi, edi
jne 0x404bf7
push 0x2e5
push str.C:My_ProgramsCCommonQResource.cpp
push str.hEFSFile
call fcn.00402260
mov esi, dword [esp + 0x228]
test esi, esi
jne 0x404c16
push 0x2e6
push str.C:My_ProgramsCCommonQResource.cpp
push str.lpszOutFileName
call fcn.00402260
lea eax, [esp + 0x110]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x404c82
lea ecx, [esp + 8]
lea edx, [esp + 0x110]
push ecx
push 0
push str.Embedded
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x404c82
mov ecx, dword [esp + 0x224]
mov edx, dword [esp + 0x220]
lea eax, [esp + 8]
push eax
push ecx
push edx
push edi
call fcn.00404b30
test eax, eax
je 0x404c82
lea ecx, [esp + 8]
call fcn.004047b0
test eax, eax
jne 0x404c8f
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
xor eax, eax
pop esi
add esp, 0x210
ret 0x10
lea ecx, [esp + 8]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop edi
mov eax, 1
pop esi
add esp, 0x210
ret 0x10
Function at 0x408081
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x40ca20
cmp edx, dword [eax]
je 0x4080a3
add eax, 8
inc ecx
cmp eax, 0x40cab0
jl 0x408094
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x40ca20]
jne 0x4081d1
mov eax, dword [0x40e230]
cmp eax, 1
je 0x4081ab
test eax, eax
jne 0x4080d4
cmp dword [0x40c754], 1
je 0x4081ab
cmp edx, 0xfc
je 0x4081d1
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40810b
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00409490
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00408540
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40814e
lea eax, [ebp - 0x1a4]
push eax
call fcn.00408540
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x40a678
push edi
call fcn.00404d90
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00409490
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004094a0
lea eax, [ebp - 0xa0]
push 0x40a658
push eax
call fcn.004094a0
push dword [esi + 0x40ca24]
lea eax, [ebp - 0xa0]
push eax
call fcn.004094a0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00409580
add esp, 0x2c
pop edi
jmp 0x4081d1
lea eax, [ebp + 8]
lea esi, [esi + 0x40ca24]
push 0
push eax
push dword [esi]
call fcn.00408540
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