joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40121a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x40c004]
xor eax, ebp
mov dword [ebp - 8], eax
mov ax, word [0x40a2e4]
mov word [ebp - 0x418], ax
push 0x206
push 0
lea eax, [ebp - 0x416]
push eax
call fcn.00404560
add esp, 0xc
mov ax, word [0x40a2e4]
mov word [ebp - 0x210], ax
push 0x206
push 0
lea eax, [ebp - 0x20e]
push eax
call fcn.00404560
add esp, 0xc
and dword [ebp - 0x420], 0
push 0x208
lea eax, [ebp - 0x418]
push eax
call fcn.00401b21
pop ecx
pop ecx
lea eax, [ebp - 0x210]
push eax
push 0x208
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x4012f0
push 0
push 0
lea eax, [ebp - 0x424]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push 0x40
push 0x40a2e8
push dword [ebp - 0x424]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [ebp - 0x424]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
inc eax
jmp 0x40147c
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
movzx eax, word [ebp + eax*2 - 0x212]
cmp eax, 0x5c
je 0x401320
push 0x40a2f8
push 0x104
lea eax, [ebp - 0x210]
push eax
call fcn.0040103e
call fcn.0040148a
mov dword [ebp - 0x420], eax
cmp dword [ebp - 0x420], 0
jne 0x40133c
xor eax, eax
inc eax
jmp 0x40147c
lea eax, [ebp - 0x210]
push eax
call fcn.004016f9
pop ecx
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40146d
and dword [ebp - 0x428], 0
mov eax, dword [ebp - 4]
mov dword [ebp - 0x42c], eax
cmp dword [ebp - 0x42c], 0xfffffffd
je 0x401439
cmp dword [ebp - 0x42c], 0xfffffffe
je 0x401399
cmp dword [ebp - 0x42c], 0xffffffff
je 0x40138a
jmp 0x401445
mov dword [ebp - 0x428], 0x40a2fc
jmp 0x40144f
push 0
push 0x200
lea eax, [ebp - 0x424]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push dword [ebp - 0x424]
call dword [sym.imp.KERNEL32.dll_LocalSize]
mov dword [ebp - 0x41c], eax
push str._r_npath:__
push dword [ebp - 0x41c]
push dword [ebp - 0x424]
call fcn.0040108a
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x41c]
push dword [ebp - 0x424]
call fcn.0040108a
push 0x40a32c
push dword [ebp - 0x41c]
push dword [ebp - 0x424]
call fcn.0040108a
push 0x40
push 0x40a2e8
push dword [ebp - 0x424]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [ebp - 0x424]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40144f
mov dword [ebp - 0x428], 0x40a330
jmp 0x40144f
mov dword [ebp - 0x428], 0x40a354
cmp dword [ebp - 0x428], 0
je 0x40146d
push 0
push 0x40a2e8
push dword [ebp - 0x428]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [ebp - 0x420]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00401d17
leave
ret 0x10
Function at 0x40148a
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push str.BSPDL_062
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4014aa
xor eax, eax
jmp 0x4014db
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4014d8
push 0
push 0x40a2e8
push 0x40a388
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4014db
mov eax, dword [ebp - 4]
leave
ret
Function at 0x4017e6
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
and dword [ebp - 0x30], 0
and dword [ebp - 0x38], 0
and dword [ebp - 0x28], 0
and dword [ebp - 0x24], 0
cmp dword [ebp + 8], 0
je 0x401808
cmp dword [ebp + 0xc], 0
jne 0x401812
mov eax, 0x40a410
jmp 0x4019e2
lea eax, [ebp - 0x2c]
push eax
push 0x20
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x401836
mov eax, 0x40a428
jmp 0x4019e2
mov eax, 0x4017e1
sub eax, 0x40179d
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x10]
jbe 0x401855
mov eax, 0x40a450
jmp 0x4019e2
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x10], eax
push str.BSPDL_062_MONITOR
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x38], eax
push str.BSPDL_062_MONITORQUIT
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x38], 0
je 0x40189c
cmp dword [ebp - 0x28], 0
je 0x40189c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4018ad
mov dword [ebp - 0x30], 0x40a4c4
jmp 0x4019b2
push 2
push 0
push 0
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 8]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x4018df
mov dword [ebp - 0x30], 0x40a4e4
jmp 0x4019b2
push 2
push 0
push 0
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 8]
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x401911
mov dword [ebp - 0x30], 0x40a510
jmp 0x4019b2
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x10]
push 0x40179d
push dword [ebp - 0x14]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x401938
mov dword [ebp - 0x30], 0x40a53c
jmp 0x4019b2
lea eax, [ebp - 0x3c]
push eax
push 4
push dword [ebp + 0xc]
push dword [ebp - 0x14]
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x401965
mov dword [ebp - 0x30], 0x40a55c
jmp 0x4019b2
push 2
push 0
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x401991
mov dword [ebp - 0x30], 0x40a57c
jmp 0x4019b2
lea eax, [ebp - 0x2c]
push eax
push 0x20
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x4019b2
mov dword [ebp - 0x30], 0x40a5a4
cmp dword [ebp - 0x38], 0
je 0x4019c1
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x28], 0
je 0x4019d0
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x24], 0
je 0x4019df
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x30]
leave
ret
Function at 0x401b21
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push str.SoftwareBishop_
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x401b4f
xor al, al
jmp 0x401ba1
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
push 0
push 0
push str.DataPath
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x401b70
xor al, al
jmp 0x401ba1
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp + 0xc], 0
jbe 0x401b9f
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
movzx eax, word [ecx + eax*2 - 2]
cmp eax, 0x5c
je 0x401b9f
push 0x40a2f8
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.0040108a
mov al, 1
leave
ret
Function at 0x401ba3
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
and dword [ebp - 0x3c], 0
push 0x38
push 0
lea eax, [ebp - 0x38]
push eax
call fcn.00404560
add esp, 0xc
mov dword [ebp - 0x3c], 0x3c
and dword [ebp - 0x34], 0
mov dword [ebp - 0x30], str.open
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x38], 0x440
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x401c01
cmp dword [ebp - 0x1c], 0x20
jg 0x401cc6
push 0
push 0x200
lea eax, [ebp - 0x40]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_LocalSize]
mov dword [ebp - 0x44], eax
push str._r_npath:__
push dword [ebp - 0x44]
push dword [ebp - 0x40]
call fcn.0040108a
cmp dword [ebp + 0xc], 0
je 0x401c4f
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x48], eax
jmp 0x401c56
mov dword [ebp - 0x48], str._current_dir_
push dword [ebp - 0x48]
push dword [ebp - 0x44]
push dword [ebp - 0x40]
call fcn.0040108a
push str.__r_nexe:__
push dword [ebp - 0x44]
push dword [ebp - 0x40]
call fcn.0040108a
cmp dword [ebp + 8], 0
je 0x401c82
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
jmp 0x401c89
mov dword [ebp - 0x4c], str._unknown_application_
push dword [ebp - 0x4c]
push dword [ebp - 0x44]
push dword [ebp - 0x40]
call fcn.0040108a
push 0x40a32c
push dword [ebp - 0x44]
push dword [ebp - 0x40]
call fcn.0040108a
push 0x40
push 0x40a6f8
push dword [ebp - 0x40]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
jmp 0x401d15
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 1
je 0x401cda
cmp dword [ebp - 0x50], 2
je 0x401ce7
jmp 0x401cf2
push 0xffffffffffffffff
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
jmp 0x401cf2
push 0xffffffffffffffff
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [ebp + 0x14], 0
je 0x401d02
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
jmp 0x401d13
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x401d13
xor al, al
jmp 0x401d15
mov al, 1
leave
ret

Function at 0x401d17
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40c004]
jne 0x401d21
repz ret
jmp fcn.00402092
Function at 0x405ee3
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00402c12
and dword [ebp - 4], 0
cmp dword [0x40d5d8], 0
mov ebx, eax
jne 0x405f94
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x406045
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x406045
push eax
call fcn.00402ba0
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x40d5d8], eax
call esi
push eax
call fcn.00402ba0
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x40d5dc], eax
call esi
push eax
call fcn.00402ba0
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x40d5e0], eax
call esi
push eax
call fcn.00402ba0
pop ecx
mov dword [0x40d5e8], eax
test eax, eax
je 0x405f94
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00402ba0
pop ecx
mov dword [0x40d5e4], eax
mov eax, dword [0x40d5e4]
cmp eax, ebx
je 0x405fec
cmp dword [0x40d5e8], ebx
je 0x405fec
push eax
call fcn.00402c1b
push dword [0x40d5e8]
mov esi, eax
call fcn.00402c1b
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x405fec
test edi, edi
je 0x405fec
call esi
test eax, eax
je 0x405fe3
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x405fe3
test byte [ebp - 0xc], 1
jne 0x405fec
or dword [ebp + 0x10], 0x200000
jmp 0x406025
mov eax, dword [0x40d5dc]
cmp eax, ebx
je 0x406025
push eax
call fcn.00402c1b
pop ecx
test eax, eax
je 0x406025
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x406025
mov eax, dword [0x40d5e0]
cmp eax, ebx
je 0x406025
push eax
call fcn.00402c1b
pop ecx
test eax, eax
je 0x406025
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x40d5d8]
call fcn.00402c1b
pop ecx
test eax, eax
je 0x406045
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x406047
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401662
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
mov eax, 0x404164
push esp
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
xor eax, eax
mov ax, word [esp + 2]
mov dword [0x404160], eax
xor eax, eax
mov edi, eax
mov dword [ebp - 0x4c], 0x30
mov eax, 3
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 8]
mov dword [0x404150], eax
mov eax, edi
mov dword [ebp - 0x44], 0x401573
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x24], str.pieta
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExW]
push edi
push dword [ebp - 0x38]
push edi
push edi
push 0x190
push 0x258
push 0xffffee08
push 0xffffee6c
push 0
push str.novice
push str.pieta
push edi
call dword [sym.imp.USER32.dll_CreateWindowExW]
push 0
push eax
mov dword [0x404158], eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x404158]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
push edi
push edi
push edi
lea edx, [ebp - 0x1c]
push edx
call esi
test eax, eax
je 0x40174c
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
push ebx
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageW]
lea eax, [ebp - 0x1c]
push eax
call edi
lea ecx, [ebp - 0x1c]
push ecx
call ebx
xor eax, eax
push eax
push eax
push eax
lea edx, [ebp - 0x1c]
push edx
call esi
test eax, eax
jne 0x401731
mov esp, ebp
pop ebp
ret 0x10

Function at 0x430004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
mov eax, section..text
mov ebx, 0x408e84
nop
mov ecx, 0x600548d2
nop
test eax, eax
nop
nop
nop
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
nop
nop
xor dword [eax], ecx
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
nop
jne 0x430024
nop
mov eax, section..data
nop
mov ebx, 0x42e1d0
nop
nop
mov ecx, 0x114a1d25
nop
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x430084
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
add eax, 4
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x43006c
nop
nop
nop
popal
nop
nop
nop
jmp 0x401219
Function at 0x401000
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
push esi
call fcn.004021df
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
pop ecx
xor ebx, ebx
push esi
call edi
cmp eax, 0xffffffff
je 0x401036
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call fcn.004021df
inc ebx
pop ecx
cmp ebx, 0xa
jl 0x401016
push esi
call edi
inc eax
pop edi
neg eax
sbb eax, eax
pop esi
inc eax
pop ebx
ret

Function at 0x401084
Capabilities:
Accept command line arguments
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push ebx
push str.E5C53971_D80E_4500_BE0D_761BF3CD8457
xor ebx, ebx
push 1
push ebx
mov dword [0x515fbc], eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x515fd4], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4010d5
push dword [0x515fd4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [0x515fd4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x2711
jmp 0x4011b4
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, 0x412060
lea edi, [ebp - 4]
movsw word es:[edi], word [esi]
lea ecx, [ebp - 4]
push ecx
push eax
movsb byte es:[edi], byte [esi]
call fcn.00401043
mov edi, eax
pop ecx
cmp edi, ebx
pop ecx
je 0x40118c
lea eax, [edi - 1]
mov ebx, str.SILENCE
mov dword [0x515fc0], eax
mov esi, str.CHECKSUM
push str.SILENT
call fcn.00407b80
push eax
push str.SILENT
push edi
call fcn.00407a3b
add esp, 0x10
test eax, eax
je 0x40116e
push ebx
call fcn.00407b80
push eax
push ebx
push edi
call fcn.00407a3b
add esp, 0x10
test eax, eax
je 0x40116e
push esi
call fcn.00407b80
push eax
push esi
push edi
call fcn.00407a3b
add esp, 0x10
test eax, eax
jne 0x401178
push esi
call fcn.00407b80
add eax, edi
push eax
call fcn.004079b0
pop ecx
mov dword [0x412040], eax
pop ecx
jmp 0x401178
mov dword [0x515fcc], 1
lea eax, [ebp - 4]
push eax
push edi
call fcn.00401043
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x401110
xor ebx, ebx
cmp dword [0x515fcc], ebx
pop edi
pop esi
push ebx
je 0x40119e
call fcn.0040147c
jmp 0x4011af
push 0x4011b9
push ebx
push 0x65
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
mov eax, dword [0x515fd8]
pop ebx
leave
ret 0x10
Function at 0x401c7d
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path
Get file attributes
Set file attributes

Disassembly:
push ebx
push esi
push edi
mov esi, 0x515eb8
mov edi, 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x401ca3
push edi
push str.C:Temp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push esi
call fcn.00401d45
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
xor ebx, ebx
test eax, eax
jne 0x401cc4
push esi
call fcn.00402330
pop ecx
push ebx
push esi
call edi
test eax, eax
je 0x401d27
push 0x5c
push esi
call fcn.00407cde
pop ecx
cmp eax, ebx
pop ecx
je 0x401cd9
cmp byte [eax + 1], bl
jne 0x401cd9
mov byte [eax], bl
push 0x104
push str.RavTmp
push esi
call fcn.00408234
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401d12
push esi
call fcn.004021df
pop ecx
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
call fcn.00402330
pop ecx
push ebx
push esi
call edi
push esi
call fcn.00401d45
test eax, eax
jne 0x401d3e
cmp dword [esp + 0x10], ebx
jne 0x401d3a
push 0x10
push 9
push ebx
call fcn.00402099
add esp, 0xc
xor eax, eax
jmp 0x401d41
push 1
pop eax
pop edi
pop esi
pop ebx
ret

Function at 0x401d45
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401d5d
test al, 0x10
je 0x401d5d
push 1
pop eax
jmp 0x401d5f
xor eax, eax
ret 4

Function at 0x401d62
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
push edi
push esi
push esi
push 2
push esi
push 1
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, dword [ebp + 8]
mov dword [ebp - 8], eax
cmp edi, 0xffffffff
je 0x401d99
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [ebp + 0x10], eax
jbe 0x401d9e
or eax, 0xffffffff
jmp 0x401e05
push ebx
push esi
push esi
mov dword [ebp - 4], esi
push dword [ebp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp + 0xc]
push esi
mov ebx, 0x100000
push eax
mov esi, 0x415eb4
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
call edi
test eax, eax
je 0x401df8
cmp dword [ebp + 0xc], 0
jbe 0x401df8
lea eax, [ebp - 0xc]
push 0
push eax
push dword [ebp + 0xc]
push esi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0xc]
push 0
add dword [ebp - 4], eax
lea eax, [ebp + 0xc]
push eax
push ebx
push esi
push dword [ebp + 8]
jmp 0x401dc6
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
pop ebx
pop edi
pop esi
leave
ret
Function at 0x401e09
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
xor edi, edi
push edi
push edi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 4]
push edi
push eax
push 0x100000
push 0x415eb4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401e55
cmp word [0x415eb4], 0x5a4d
jne 0x401e55
mov ecx, dword [0x415ef0]
cmp dword [ecx + 0x415eb4], 0x4550
je 0x401e5a
or eax, 0xffffffff
jmp 0x401e85
push esi
xor eax, eax
movzx esi, word [ecx + 0x415eba]
cmp esi, edi
jle 0x401e84
lea edx, [ecx + 0x415fbc]
mov ecx, dword [edx + 4]
add ecx, dword [edx]
cmp ecx, eax
jbe 0x401e79
mov eax, ecx
add edx, 0x28
inc edi
movsx ecx, di
cmp ecx, esi
jl 0x401e6e
pop esi
pop edi
leave
ret

Function at 0x401e88
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
push ebx
push esi
push 0x44
xor ebx, ebx
pop esi
lea eax, [ebp - 0x74]
push esi
push ebx
push eax
call fcn.00408350
add esp, 0xc
lea eax, [ebp - 0x74]
mov dword [ebp - 0x74], esi
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
cmp dword [0x515fc4], ebx
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x401ec8
push str.__AUTOPATCH
push dword [ebp + 8]
call esi
cmp dword [ebp + 0xc], ebx
je 0x401eec
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x401eec
push 0x412154
push dword [ebp + 8]
call esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x74]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x401f3d
cmp dword [ebp + 0x10], ebx
mov dword [ebp + 8], ebx
je 0x401f28
push 0xffffffffffffffff
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp + 8]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x10]
call esi
mov eax, dword [ebp + 8]
jmp 0x401f7d
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 7
mov edx, eax
pop ecx
xor eax, eax
lea edi, [ebp - 0x2f]
mov byte [ebp - 0x30], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push edx
lea eax, [ebp - 0x30]
push 0x412150
push eax
call fcn.004082f1
add esp, 0xc
lea eax, [ebp - 0x30]
push ebx
push dword [ebp + 8]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 0x2719
pop edi
pop esi
pop ebx
leave
ret