joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4224ad
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
cmp dword [0x47e540], ebx
push edi
mov edi, dword [eax + 0x34]
jle 0x4224ed
mov esi, 0x47e534
push ebx
mov ecx, esi
call fcn.0041e860
cmp eax, edi
je 0x4224e2
inc ebx
inc ebx
cmp ebx, dword [0x47e540]
jl 0x4224ca
jmp 0x4224ed
inc ebx
mov ecx, esi
push ebx
call fcn.0041e860
mov edi, eax
xor esi, esi
cmp dword [0x47e52c], esi
jle 0x42258e
push esi
mov ecx, 0x47e520
call fcn.0041e860
cmp dword [eax], edi
je 0x422515
inc esi
cmp esi, dword [0x47e52c]
jl 0x4224fb
jmp 0x42258e
add eax, 4
xor esi, esi
cmp eax, esi
je 0x42258e
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
mov ecx, eax
call fcn.0041cd1e
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x42258e
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0xc
mov dword [ebp + 8], eax
call fcn.00424dd9
cmp eax, esi
pop ecx
je 0x422565
mov ecx, eax
call fcn.0041bdc5
mov ebx, eax
jmp 0x422567
xor ebx, ebx
push dword [ebp + 8]
mov ecx, ebx
call fcn.0041c65c
cmp eax, esi
jne 0x422597
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, esi
je 0x42258e
mov ecx, ebx
call fcn.0041befb
push ebx
call fcn.00424dce
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
lea ecx, [ebp - 4]
push esi
push ecx
mov dword [ebp - 4], esi
push dword [ebp + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], esi
je 0x42257c
mov eax, dword [ebp + 8]
cmp dword [ebp - 4], eax
jne 0x42257c
mov eax, ebx
jmp 0x422590

Function at 0x4229a8
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push esi
xor esi, esi
cmp dword [0x47e58c], esi
push edi
mov edi, 0x104
jbe 0x422a35
lea eax, [ebp - 4]
mov ecx, 0x47e58c
push eax
push 0x20019
push esi
call fcn.0041cd1e
push eax
push dword [0x47e588]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x422a35
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
lea eax, [ebp - 0x10c]
push eax
push esi
push esi
push str.Uninstaller
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x422a2c
lea eax, [ebp - 0x10c]
push eax
call fcn.0040df52
test al, al
pop ecx
je 0x422a2c
lea eax, [ebp - 0x10c]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x422a7e
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.00424500
add esp, 0xc
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call edi
cmp byte [eax + esi - 1], 0x5c
je 0x422a62
push esi
call edi
mov byte [eax + esi], 0x5c
mov ecx, 0x47e35c
call fcn.0041cd1e
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push eax
push esi
call edi
push str._Uninstaller.exe
push esi
call edi
pop edi
mov al, 1
pop esi
leave
ret 4
Function at 0x422cbd
Capabilities:
Copy file
Delete directory
Delete file
Get file size
Set current directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
push ebx
push esi
push edi
mov esi, ecx
push 0x42dbd8
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test byte [0x47e18c], 0x40
jne 0x422e4a
test byte [0x47e192], 2
jne 0x422e4a
xor ebx, ebx
cmp byte [esi + 0x90], bl
je 0x422d2d
lea eax, [ebp - 0x11c]
mov ecx, esi
push eax
call fcn.00422a86
lea eax, [ebp - 0x11c]
mov ecx, 0x47dfb8
push eax
push 1
call fcn.004155d2
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x422dee
push ebx
push 0x80
push 3
push ebx
push 1
push 0xc0000000
mov ecx, esi
call fcn.0041cd1e
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
push ebx
push edi
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp edi, 0xffffffff
mov dword [ebp - 8], eax
je 0x422e41
cmp eax, ebx
je 0x422e41
lea ecx, [ebp - 0x18]
mov byte [esi + 0x92], 1
call fcn.0041bdc5
lea eax, [ebp - 0x18]
mov ecx, esi
push eax
call fcn.004221b8
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0xc]
push ebx
push eax
lea ecx, [ebp - 0x18]
push dword [ebp - 0x18]
call fcn.0041cd1e
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
call edi
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 8]
push 4
push eax
push dword [ebp - 4]
call edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.0041cd1e
push eax
push 1
mov ecx, 0x47dfb8
call fcn.004155d2
mov ecx, esi
call fcn.0041cd1e
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [ebp - 0x18]
call fcn.0041befb
cmp dword [0x47e688], ebx
jbe 0x422e39
lea eax, [ebp - 0x11c]
mov ecx, esi
push eax
call fcn.004229a8
lea eax, [ebp - 0x11c]
mov esi, 0x47e688
push ebx
push eax
mov ecx, esi
call fcn.0041cd1e
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ecx, esi
call fcn.0041cd1e
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x42e0c8
mov ecx, esi
call fcn.0041bf12
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x422e39
xor ebx, ebx
push 1
cmp byte [esi + 0x90], bl
jne 0x422e3b
pop edi
push ebx
push dword [esi + 0x20]
call fcn.0040df1f
pop ecx
pop ecx
cmp eax, ebx
je 0x422e7d
push eax
call fcn.0040d85f
mov eax, edi
inc edi
push eax
push dword [esi + 0x20]
call fcn.0040df1f
add esp, 0xc
jmp 0x422e62
push 1
pop edi
push ebx
push dword [esi + 0x38]
call fcn.0040df1f
pop ecx
cmp eax, ebx
pop ecx
je 0x422e39
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov eax, edi
inc edi
push eax
jmp 0x422e81
Function at 0x422e9c
Capabilities:
Copy file
Delete file
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
test byte [0x47e192], 2
push esi
mov esi, ecx
mov dword [ebp - 4], esi
je 0x422ec4
test byte [0x47e18c], 0x40
jne 0x422ec4
mov al, 1
jmp 0x423001
lea eax, [ebp - 0x11c]
mov ecx, esi
push eax
call fcn.00422a86
lea eax, [ebp - 0x11c]
push eax
call fcn.0040df52
test al, al
pop ecx
je 0x422ef3
lea eax, [ebp - 0x11c]
mov ecx, esi
push eax
call fcn.00421f81
jmp 0x422efc
test byte [0x47e18c], 0x40
je 0x422f08
mov ecx, esi
call fcn.00423006
jmp 0x423001
push ebx
push edi
lea ecx, [ebp - 0x18]
call fcn.0041bdc5
lea eax, [ebp - 0x18]
mov ecx, esi
push eax
call fcn.004221b8
xor ebx, ebx
lea eax, [ebp - 0x11c]
push ebx
push eax
mov ecx, esi
call fcn.0041cd1e
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ecx, esi
call fcn.0041cd1e
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push eax
call esi
push ebx
push 0x80
push 3
push ebx
push 1
lea eax, [ebp - 0x11c]
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp edi, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x422fcc
cmp eax, ebx
je 0x422fcc
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 8]
push ebx
push eax
lea ecx, [ebp - 0x18]
push dword [ebp - 0x18]
call fcn.0041cd1e
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push edi
call esi
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0xc]
push 4
push eax
push edi
call esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x11c]
push eax
mov byte [ecx + 0x90], 1
call fcn.00421f81
mov bl, 1
jmp 0x422ff5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x11c]
push eax
call esi
push ebx
mov ecx, 0x47ef30
call fcn.0041cd1e
push eax
mov ecx, 0x47dfb8
push dword [ebp + 8]
call fcn.0041b2a8
lea ecx, [ebp - 0x18]
call fcn.0041befb
mov al, bl
pop edi
pop ebx
pop esi
leave
ret 4
Function at 0x426a55
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x42dee8
cmp edx, dword [eax]
je 0x426a77
add eax, 8
inc ecx
cmp eax, 0x42df78
jl 0x426a68
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x42dee8]
jne 0x426ba5
mov eax, dword [0x47f380]
cmp eax, 1
je 0x426b7f
test eax, eax
jne 0x426aa8
cmp dword [0x42dc34], 1
je 0x426b7f
cmp edx, 0xfc
je 0x426ba5
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x426adf
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00425080
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00424970
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x426b22
lea eax, [ebp - 0x1a4]
push eax
call fcn.00424970
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x428b04
push edi
call fcn.004274e0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00425080
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00425090
lea eax, [ebp - 0xa0]
push 0x428ae4
push eax
call fcn.00425090
push dword [esi + 0x42deec]
lea eax, [ebp - 0xa0]
push eax
call fcn.00425090
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00427450
add esp, 0x2c
pop edi
jmp 0x426ba5
lea eax, [ebp + 8]
lea esi, [esi + 0x42deec]
push 0
push eax
push dword [esi]
call fcn.00424970
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
Function at 0x4014c6
Capabilities:
Enumerate files on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x278
mov eax, dword [ebp + 8]
mov byte [ebp - 9], al
call fcn.0040923a
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x417035
lea eax, [ebp - 0x118]
mov dword [esp], eax
call sub.msvcrt.dll_sprintf
lea eax, [ebp - 0x258]
mov dword [esp + 4], eax
lea eax, [ebp - 0x118]
mov dword [esp], eax
call sub.KERNEL32.DLL_FindFirstFileA
sub esp, 8
mov dword [ebp - 0x25c], eax
cmp dword [ebp - 0x25c], 0
je 0x4015c0
cmp byte [ebp - 0x22c], 0x2e
jne 0x401533
jmp 0x40159c
lea eax, [ebp - 0x258]
add eax, 0x2c
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x41703a
lea eax, [ebp - 0x118]
mov dword [esp], eax
call sub.msvcrt.dll_sprintf
lea eax, [ebp - 0x118]
mov dword [esp], eax
call sub.KERNEL32.DLL_GetFileAttributesA
sub esp, 4
shr eax, 4
and eax, 1
test al, al
je 0x40159c
cmp byte [ebp - 9], 0
je 0x40158e
lea eax, [ebp - 0x118]
mov dword [esp], eax
call fcn.0040937e
jmp 0x40159c
lea eax, [ebp - 0x118]
mov dword [esp], eax
call fcn.004012f2
lea eax, [ebp - 0x258]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x25c]
mov dword [esp], eax
call sub.KERNEL32.DLL_FindNextFileA
sub esp, 8
test eax, eax
je 0x4015c0
jmp 0x401528
leave
ret

Function at 0x401702
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00412630
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x401771
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sub.USER32.dll_GetWindowTextLengthA
sub esp, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [esp], eax
call fcn.00412910
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sub.USER32.dll_GetWindowTextA
sub esp, 0xc
mov edx, eax
mov eax, dword [ebp - 0xc]
mov byte [edx + eax], 0
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
jmp 0x401778
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
leave
ret
Function at 0x4026e6
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [ebp + 0x10]
mov byte [ebp - 9], al
mov dword [esp + 4], 0x4172b0
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40271a
mov dword [ebp - 0x30], 0
jmp 0x40283a
mov dword [ebp - 0x14], 0xbec0100f
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 4
lea eax, [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
cmp eax, 1
je 0x402754
mov dword [esp], str.ERROR:_could_not_write_magic_n
call sub.msvcrt.dll_printf
cmp byte [ebp - 9], 0
jne 0x402794
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00412788
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004024a0
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00405d44
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.0040597e
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp + 8]
add eax, 0x28
mov dword [esp], eax
call fcn.004128ac
cmp eax, dword [ebp - 0x2c]
jbe 0x402828
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00412788
mov dword [esp + 8], str.addr
mov dword [esp + 4], str.type
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00405bd6
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
add eax, 0x28
mov dword [esp], eax
call fcn.00412604
mov eax, dword [eax]
mov dword [esp + 8], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004021c8
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00405d44
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.0040597e
lea eax, [ebp - 0x2c]
inc dword [eax]
jmp 0x40279b
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [ebp - 0x30], 1
mov eax, dword [ebp - 0x30]
leave
ret
Function at 0x4028fe
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [ebp + 0x10]
mov byte [ebp - 9], al
mov dword [esp + 4], 0x4172e4
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x402a60
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 4
lea eax, [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp dword [ebp - 0x14], 0xbec0100f
jne 0x402a60
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.00412940
test eax, eax
jne 0x402a4c
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.00412950
test eax, eax
jne 0x402a4c
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00412788
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00405ef8
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x4029bc
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.0040597e
jmp 0x402a4c
mov dword [esp + 0xc], 0x10
lea eax, [ebp - 0x48]
mov dword [esp + 8], eax
mov dword [esp + 4], str.type
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00405c06
test al, al
je 0x402a3c
lea eax, [ebp - 0x48]
mov dword [esp + 4], str.addr
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x402a0d
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00402446
jmp 0x402a3c
cmp byte [ebp - 9], 0
jne 0x402a3c
lea eax, [ebp - 0x48]
mov dword [esp + 4], str.window
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x402a3c
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040260c
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.0040597e
jmp 0x402960
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00402cc8
mov dword [ebp - 0x4c], 1
jmp 0x402a67
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp - 0x4c]
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 8]
add eax, 0x20
mov dword [esp], eax
call sub.KERNEL32.DLL_GetFileAttributesA
sub esp, 4
cmp eax, 0xffffffff
jne 0x4044cf
mov dword [ebp - 4], 0
jmp 0x4044e0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00404328
movzx eax, al
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
leave
ret
Function at 0x4044e6
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x248
mov eax, dword [ebp + 8]
cmp byte [eax + 0x58], 0
jne 0x4046ab
mov dword [esp + 8], 0x30
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040423e
lea eax, [ebp - 0x38]
mov dword [esp], eax
call sub.KERNEL32.DLL_DeleteFileA
sub esp, 4
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], 0x417348
call sub.msvcrt.dll_printf
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.00406942
movzx eax, byte [0x417354]
mov byte [ebp - 0x198], al
lea edx, [ebp - 0x197]
mov eax, 0x103
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], edx
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x198]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.00406790
mov dword [ebp - 0x19c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x50]
cmp eax, dword [ebp - 0x19c]
je 0x404671
cmp dword [ebp - 0x19c], 0xffffffff
je 0x404616
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x417458
mov dword [esp + 4], pe_nt_image_headers32
lea eax, [ebp - 0x228]
mov dword [esp], eax
call fcn.00411800
cmp dword [ebp + 0x10], 0
je 0x404616
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
add edx, 0xc
lea eax, [ebp - 0x228]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
mov eax, dword [edx]
call eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x50]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x19c]
mov dword [esp + 4], eax
mov dword [esp], str.file_truncated__d__expected_d_n
call sub.msvcrt.dll_printf
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll_fflush
lea eax, [ebp - 0x198]
mov dword [esp], eax
call sub.KERNEL32.DLL_DeleteFileA
sub esp, 4
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.004069ba
mov dword [ebp - 0x22c], 0
jmp 0x4046c0
mov eax, dword [ebp + 8]
add eax, 0x20
mov dword [esp], eax
call sub.KERNEL32.DLL_DeleteFileA
sub esp, 4
mov eax, dword [ebp + 8]
add eax, 0x20
mov dword [esp + 4], eax
lea eax, [ebp - 0x198]
mov dword [esp], eax
call sub.KERNEL32.DLL_MoveFileA
sub esp, 8
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.004069ba
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004042c2
mov dword [ebp - 0x22c], 1
mov eax, dword [ebp - 0x22c]
leave
ret
Function at 0x404a02
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov eax, dword [ebp + 8]
cmp dword [eax + 0x200c], 0
je 0x404a34
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x200c]
add eax, 0x40
mov dword [esp], eax
call fcn.00409308
mov dword [esp], eax
call sub.KERNEL32.DLL_SetCurrentDirectoryA
sub esp, 4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x200c]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x404a62
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 8]
mov dword [esp], eax
call fcn.004044aa
mov byte [ebx + 0x58], al
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x5c]
mov dword [ebp - 8], eax
jmp 0x404a40
mov ebx, dword [ebp - 4]
leave
ret

Function at 0x404a68
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
cmp dword [eax + 0x200c], 0
je 0x404a99
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x200c]
add eax, 0x40
mov dword [esp], eax
call fcn.00409308
mov dword [esp], eax
call sub.KERNEL32.DLL_SetCurrentDirectoryA
sub esp, 4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x200c]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x404ae4
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0041277c
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 4]
mov dword [esp], eax
call fcn.004044e6
test al, al
jne 0x404ad9
mov dword [ebp - 8], 0
jmp 0x404aeb
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
mov dword [ebp - 4], eax
jmp 0x404aa5
mov dword [ebp - 8], 1
mov eax, dword [ebp - 8]
leave
ret
Function at 0x404af0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [ebp + 8]
cmp dword [eax + 0x200c], 0
je 0x404b24
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x200c]
add eax, 0x40
mov dword [esp], eax
call fcn.00409308
mov dword [esp], eax
call sub.KERNEL32.DLL_SetCurrentDirectoryA
sub esp, 4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x200c]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x404c22
mov eax, dword [ebp - 0xc]
add eax, 0x20
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.._s
mov dword [esp + 4], 0x50
lea eax, [ebp - 0x68]
mov dword [esp], eax
call sub.msvcrt.dll__snprintf
lea eax, [ebp - 0x68]
mov dword [esp + 4], eax
mov dword [esp], str.linking__s_n
call sub.msvcrt.dll_printf
mov dword [esp + 8], 8
mov dword [esp + 4], 0
lea eax, [ebp - 0x68]
mov dword [esp], eax
call sub.KERNEL32.DLL_LoadLibraryExA
sub esp, 0xc
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
je 0x404bf8
lea eax, [ebp - 0x68]
mov dword [esp + 4], eax
mov dword [esp], str.lib__s_loaded_n
call sub.msvcrt.dll_printf
mov dword [esp + 4], str.runEx
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sub.KERNEL32.DLL_GetProcAddress
sub esp, 8
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
jne 0x404be4
mov dword [esp + 4], 0x4174e8
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sub.KERNEL32.DLL_GetProcAddress
sub esp, 8
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
je 0x404c14
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x70]
mov dword [edx + 0x2014], eax
jmp 0x404c14
call sub.KERNEL32.DLL_GetLastError
mov dword [esp + 8], eax
lea eax, [ebp - 0x68]
mov dword [esp + 4], eax
mov dword [esp], str.lib__s_not_loaded_error_ld_n
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x5c]
mov dword [ebp - 0xc], eax
jmp 0x404b30
leave
ret