joyce8/EMBER2024-capa huggingface dataset:
Function at 0x411e41
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x432858
cmp edx, dword [eax]
je 0x411e63
add eax, 8
inc ecx
cmp eax, 0x4328e8
jl 0x411e54
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x432858]
jne 0x411f91
mov eax, dword [0x475180]
cmp eax, 1
je 0x411f6b
test eax, eax
jne 0x411e94
cmp dword [0x432164], 1
je 0x411f6b
cmp edx, 0xfc
je 0x411f91
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x411ecb
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004120d0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004121c0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x411f0e
lea eax, [ebp - 0x1a4]
push eax
call fcn.004121c0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x42a798
push edi
call fcn.00414240
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004120d0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004120e0
lea eax, [ebp - 0xa0]
push 0x42a778
push eax
call fcn.004120e0
push dword [esi + 0x43285c]
lea eax, [ebp - 0xa0]
push eax
call fcn.004120e0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.004143fd
add esp, 0x2c
pop edi
jmp 0x411f91
lea eax, [ebp + 8]
lea esi, [esi + 0x43285c]
push 0
push eax
push dword [esi]
call fcn.004121c0
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 0x4196c0
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
push 0xf00021
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [esi + 0xc]
sub eax, edx
push eax
mov eax, dword [esi + 8]
sub eax, ecx
push eax
push edx
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_PatBlt]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov ebx, eax
lea eax, [eax + 5]
add eax, 3
and eax, 0xfffffffc
call fcn.0040dc20
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x41978b
add ebx, 2
mov eax, dword [ebp - 4]
push ebx
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x41978b
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x41973e
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x419749
or bh, 8
and edi, 0x8000000
je 0x419764
mov eax, dword [0x4768fc]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
movzx eax, bx
push eax
push esi
push 0xffffffffffffffff
push ecx
push edx
call dword [sym.imp.USER32.dll_DrawTextA]
test edi, edi
je 0x41978b
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x419b60
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
mov edi, eax
test edi, edi
jne 0x419b8b
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
mov esi, eax
test esi, esi
jne 0x419baf
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x419bca
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
Function at 0x41b633
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
mov eax, ebx
push edi
mov edi, ecx
shr eax, 0x10
test ax, ax
mov dword [edi + 0x40], ebx
jne 0x41b655
cmp dword [edi + 0x3c], 0
jne 0x41b655
movzx eax, bx
mov dword [edi + 0x3c], eax
call fcn.00422f44
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
push esi
mov ecx, edi
push dword [esp + 0x18]
push eax
call fcn.0041b682
pop edi
pop esi
pop ebx
ret 8

Function at 0x41e1e5
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x41e227
call fcn.00422f44
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
cmp eax, edi
je 0x41e227
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
cmp eax, edi
jne 0x41e21e
xor eax, eax
jmp 0x41e22f
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0041e235
pop edi
pop esi
pop ebx
ret 4

Function at 0x4234fc
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x42352a
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
test eax, eax
je 0x423548
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00423462
jmp 0x423548
mov eax, dword [esi + 0x14]
test eax, eax
je 0x423548
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00423462
test edi, edi
mov eax, edi
jne 0x423532
pop edi
push ebx
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401373
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x40ac24], 0
push esi
jne 0x4013aa
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x401384
mov dword [ecx*4 + 0x40ac20], eax
inc ecx
cmp ecx, 0x100
jl 0x40137f
mov edx, dword [esp + 0x10]
test edx, edx
mov eax, dword [esp + 8]
not eax
jbe 0x4013db
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
mov esi, dword [esi*4 + 0x40ac20]
shr eax, 8
xor eax, esi
inc ecx
dec edx
jne 0x4013bd
pop edi
not eax
pop esi
ret 0xc
Function at 0x402f29
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
push edi
lea eax, [ebp - 4]
push eax
mov eax, dword [0x449410]
or eax, 8
push eax
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x402fbe
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x402f7b
cmp dword [ebp + 0x10], ebx
jne 0x402fb2
push ebx
lea eax, [ebp - 0x10c]
push eax
push dword [ebp - 4]
call fcn.00402f29
test eax, eax
jne 0x402f8d
push edi
lea eax, [ebp - 0x10c]
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x402f62
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
call fcn.004066e0
cmp eax, ebx
je 0x402fc5
push ebx
push dword [0x449410]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x402fbe
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp dword [0x449410], ebx
jne 0x402fbb
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x402fbb
jmp 0x402fbe
Function at 0x40340c
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
cmp eax, edi
jl 0x403439
mov ecx, dword [0x449380]
push edi
add eax, ecx
push edi
push eax
push dword [0x40a674]
mov dword [0x4218fc], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.00403537
cmp eax, edi
jl 0x403530
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp + 8]
push eax
push dword [0x40a674]
call ebx
test eax, eax
je 0x40352d
cmp dword [ebp - 4], esi
jne 0x40352d
push dword [ebp + 8]
add dword [0x4218fc], esi
call fcn.00403537
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x403530
cmp dword [ebp + 0x10], edi
jne 0x4034fc
cmp dword [ebp + 8], edi
jle 0x403528
mov esi, 0x41d8f8
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x4034ac
mov edi, dword [ebp + 8]
push 0
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [0x40a674]
call ebx
test eax, eax
je 0x40352d
cmp edi, dword [ebp - 4]
jne 0x40352d
push 0
lea eax, [ebp + 0x14]
push eax
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4034f8
cmp dword [ebp + 0x14], edi
jne 0x4034f8
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x4218fc], eax
cmp dword [ebp + 8], 0
jg 0x40349f
jmp 0x403528
push 0xfffffffffffffffe
jmp 0x40352f
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x403507
mov eax, dword [ebp + 0x14]
push edi
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x40a674]
call ebx
test eax, eax
je 0x40352d
mov eax, dword [ebp - 4]
add dword [0x4218fc], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x403530
push 0xfffffffffffffffd
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x403537
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [0x4218fc]
sub esi, dword [0x415868]
push edi
add esi, dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 0x1f4
xor ebx, ebx
cmp esi, ebx
mov dword [0x44936c], eax
jle 0x4036a1
push dword [0x42990c]
call fcn.004036e5
push ebx
push ebx
push dword [0x415868]
push dword [0x40a674]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x429908], esi
mov dword [0x4218f8], ebx
mov ebp, 0x4158f8
mov eax, dword [0x421900]
sub eax, dword [0x42990c]
mov edi, 0x4000
cmp eax, edi
jg 0x4035ac
mov edi, eax
push edi
mov esi, 0x41d8f8
push esi
call fcn.004036b3
test eax, eax
je 0x403693
add dword [0x42990c], edi
mov dword [0x415888], esi
mov dword [0x41588c], edi
cmp dword [0x449370], ebx
je 0x403603
cmp dword [0x449400], ebx
jne 0x403603
mov eax, dword [0x429908]
sub eax, dword [0x4218fc]
push ebx
sub eax, dword [esp + 0x1c]
add eax, dword [0x415868]
mov dword [0x4218f8], eax
call fcn.004030c7
pop ecx
mov ecx, 0x415870
mov dword [0x415890], ebp
mov dword [0x415894], 0x8000
call fcn.0040676c
test eax, eax
jl 0x40369c
mov esi, dword [0x415890]
sub esi, ebp
je 0x40365d
push ebx
lea eax, [esp + 0x14]
push eax
push esi
push ebp
push dword [0x40a674]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403698
cmp esi, dword [esp + 0x10]
jne 0x403698
add dword [0x415868], esi
cmp dword [0x41588c], ebx
jne 0x4035d2
jmp 0x403669
cmp dword [0x41588c], ebx
jne 0x40369c
cmp edi, ebx
je 0x40369c
mov eax, dword [0x4218fc]
mov ecx, eax
sub ecx, dword [0x415868]
add ecx, dword [esp + 0x18]
test ecx, ecx
jg 0x403596
push ebx
push ebx
push eax
push dword [0x40a674]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4036a1
or eax, 0xffffffff
jmp 0x4036ab
push 0xfffffffffffffffe
jmp 0x40369e
push 0xfffffffffffffffd
pop eax
jmp 0x4036ab
push 1
call fcn.004030c7
pop ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4
Function at 0x405a0f
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
push eax
push 0x440158
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push dword [ebp + 8]
mov dword [0x440158], 0x44
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x405a4a
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4
Function at 0x405ddc
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x43d958
push esi
call fcn.00406209
push esi
call fcn.00405d8f
mov edi, eax
test edi, edi
jne 0x405dfd
xor eax, eax
jmp 0x405e4f
push edi
call fcn.00406471
test byte [0x449378], 0x80
je 0x405e16
mov al, byte [edi]
test al, al
je 0x405df9
cmp al, 0x5c
je 0x405df9
sub edi, esi
jmp 0x405e2e
call fcn.004066b9
test eax, eax
je 0x405e28
test byte [eax], 0x10
je 0x405df9
push esi
call fcn.00405d42
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x405e1a
call fcn.00405cfb
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

Function at 0x405ec0
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405edd
and eax, 0xfffffffe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x405ee0
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
inc ecx
push 0
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc

Function at 0x405f0f
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp + 8], 0x61736e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
pop ecx
xor edx, edx
div ecx
push esi
push 0
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x405f53
test edi, edi
jne 0x405f1a
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x405f4d
Function at 0x405f57
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push 1
call fcn.004066e0
test eax, eax
mov esi, dword [esp + 0x18]
je 0x405f7b
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x4060b4
test esi, esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x4402e0], 0x4c554e
mov edi, 0x400
mov ebp, 0x4402e0
je 0x405fbf
push 1
push 0
push esi
call fcn.00405ee0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x4060ba
cmp eax, edi
jg 0x4060ba
push edi
mov esi, 0x43fd58
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x4060ba
cmp eax, edi
jg 0x4060ba
push esi
push ebp
push str._s_s_r_n
push 0x43f958
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ebx, eax
mov eax, dword [0x449370]
push dword [eax + 0x128]
push esi
call fcn.0040622b
push 4
push 0xc0000000
push esi
call fcn.00405ee0
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x4060b4
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x4060ad
push 0
lea eax, [esp + 0x1c]
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4060ad
cmp edi, dword [esp + 0x18]
jne 0x4060ad
push str._Rename__r_n
push esi
call fcn.00405e54
test eax, eax
jne 0x4060c1
push str._Rename__r_n
lea eax, [esi + edi]
push eax
call fcn.00406209
add edi, 0xa
mov eax, edi
push ebx
push 0x43f958
add eax, esi
push eax
call fcn.00405ea0
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x1c]
push eax
add edi, ebx
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [0x4493f0]
pop edi
pop esi
pop ebp
pop ebx
ret 8
push 0x40aaf8
add eax, 0xa
push eax
call fcn.00405e54
test eax, eax
je 0x406078
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x4060e8
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x4060dd
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x40607a
Function at 0x4060f0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0x14]
lea eax, [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
and eax, 0x100
or eax, 0x20019
push eax
push ebx
push dword [ebp + 0xc]
mov byte [esi], bl
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406161
lea eax, [ebp + 0xc]
push eax
push esi
lea eax, [ebp + 0x14]
push eax
push ebx
push dword [ebp + 0x10]
mov dword [ebp + 0xc], 0x2000
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x406150
cmp dword [ebp + 0x14], 1
je 0x406152
cmp dword [ebp + 0x14], 2
je 0x406152
mov byte [esi], bl
push dword [ebp + 0x18]
mov byte [esi + 0x1fff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x14
Function at 0x40650c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x406531
mov eax, dword [0x40a8c8]
cmp eax, 0xffffffff
je 0x406528
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x40a8c8], 0xffffffff
jmp 0x4065a4
cmp dword [0x440ae0], ebx
je 0x4065a4
cmp byte [0x4406e0], bl
je 0x406570
cmp dword [0x40a8c8], 0xffffffff
jne 0x406579
push 4
push 0x40000000
push 0x4406e0
call fcn.00405ee0
cmp eax, 0xffffffff
mov dword [0x40a8c8], eax
je 0x4065a4
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x40a8c8], 0xffffffff
je 0x4065a4
push esi
push 0x40ab10
mov esi, 0x444b00
push esi
call sub.KERNEL32.dll_lstrcatA
push ebx
lea eax, [ebp + 8]
push eax
push esi
call sub.KERNEL32.dll_lstrlenA
push eax
push esi
push dword [0x40a8c8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
pop ebx
pop ebp
ret 4
Function at 0x407250
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4008
call fcn.00407630
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x407422
xor eax, eax
mov edx, 0x7ff
mov byte [ebp - 0x2008], bl
mov ecx, edx
lea edi, [ebp - 0x2007]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x4008], bl
xor eax, eax
mov ecx, edx
lea edi, [ebp - 0x4007]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
push esi
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
inc eax
push eax
push 0x40
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
cmp edi, ebx
je 0x407410
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x407410
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 4]
jne 0x407410
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 4
push dword [ebp + 8]
jmp 0x4073ed
lea eax, [ebp - 0x2008]
push str.File:_wrote
push eax
call fcn.00407427
test eax, eax
pop ecx
pop ecx
jne 0x4073cb
lea eax, [ebp - 0x2008]
push str.File:_skipp
push eax
call fcn.00407427
test eax, eax
pop ecx
pop ecx
jne 0x4073cb
lea eax, [ebp - 0x2008]
push str.CreateShortCut:_out:
push eax
call fcn.00407427
test eax, eax
pop ecx
pop ecx
jne 0x4073cb
lea eax, [ebp - 0x2008]
push str.created_uninstaller:
push eax
call fcn.00407427
test eax, eax
pop ecx
pop ecx
jne 0x4073cb
lea eax, [ebp - 0x2008]
push str.Rename:
push eax
call fcn.00407427
pop ecx
test eax, eax
pop ecx
lea eax, [ebp - 0x2008]
je 0x40739d
push eax
call fcn.00407511
cmp eax, ebx
pop ecx
je 0x4073f2
lea ecx, [ebp - 0x4008]
push ecx
jmp 0x4073d8
push str.CreateDirectory:
push eax
call fcn.00407427
test eax, eax
pop ecx
pop ecx
je 0x4073f2
lea eax, [ebp - 0x4008]
push eax
lea eax, [ebp - 0x2008]
push eax
call fcn.00407497
test eax, eax
pop ecx
pop ecx
je 0x4073f2
push 1
jmp 0x4073e6
lea eax, [ebp - 0x4008]
push eax
lea eax, [ebp - 0x2008]
push eax
call fcn.00407497
test eax, eax
pop ecx
pop ecx
je 0x4073f2
push 4
lea eax, [ebp - 0x4008]
push eax
call fcn.00405ad4
lea eax, [ebp - 0x2008]
push eax
lea eax, [ebp - 4]
push eax
push edi
call fcn.00407551
add esp, 0xc
test eax, eax
jne 0x407308
jmp 0x40741b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
je 0x407422
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4016a7
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebx
push esi
mov esi, eax
push esi
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x4016e1
mov ebx, esi
jmp 0x4016d3
and eax, 0xff
cmp eax, 0x5c
jne 0x4016d2
mov byte [ebx], 0
push 0
push esi
call sub.KERNEL32.DLL_CreateDirectoryA
mov byte [ebx], 0x5c
inc ebx
mov al, byte [ebx]
test al, al
jne 0x4016ba
push 0
push esi
call sub.KERNEL32.DLL_CreateDirectoryA
pop esi
pop ebx
ret
Function at 0x401c4c
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xfffffffc
push ebx
push esi
mov dword [ebp - 4], ecx
mov ebx, eax
cmp dword [ebp + 8], 0
je 0x401c6c
mov eax, dword [ebp + 8]
mov byte [eax], 0
test ebx, ebx
je 0x401c75
cmp byte [ebx], 0
jne 0x401c79
xor eax, eax
jmp 0x401cf8
xor esi, esi
jmp 0x401cba
inc ebx
xor ecx, ecx
mov cl, al
cmp ecx, 0x3d
jne 0x401ca1
cmp dword [ebp - 4], 0
je 0x401ca1
test esi, esi
jne 0x401ca1
cmp dword [ebp + 8], 0
je 0x401c9d
mov eax, dword [ebp + 8]
mov byte [eax], 1
mov esi, edx
jmp 0x401cba
xor ecx, ecx
mov cl, al
cmp ecx, 0xd
je 0x401caf
cmp ecx, 0xa
jne 0x401cb7
cmp ecx, 0xd
jne 0x401cc0
inc ebx
jmp 0x401cc0
mov byte [edx], al
inc edx
mov al, byte [ebx]
test al, al
jne 0x401c7d
mov byte [edx], 0
cmp dword [ebp - 4], 0
je 0x401cf6
mov edx, dword [ebp - 4]
test esi, esi
mov byte [edx], 0
je 0x401cf6
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push esi
call sub.KERNEL32.DLL_ExpandEnvironmentStringsA
lea edx, [ebp - 0x1004]
mov eax, dword [ebp - 4]
call fcn.0040326c
mov byte [esi], 0
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4