joyce8/EMBER2024-capa huggingface dataset:
Function at 0x43aaaf
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x24], ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2c], eax
and dword [ebp - 0x28], 0
fild qword [ebp - 0x2c]
fdiv qword [0x4b92f8]
push ecx
push ecx
fstp qword [esp]
call fcn.00409d00
pop ecx
pop ecx
fmul qword [0x4b92f0]
call fcn.0044c106
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
cmp dword [ebp + 0x10], 0
jne 0x43aaf7
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
jmp 0x43ac4e
mov eax, dword [ebp + 0x10]
mov dword [ebp - 4], eax
and dword [ebp - 8], 0
and dword [ebp - 0xc], 0
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jae 0x43ac14
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jae 0x43ab2e
mov eax, dword [ebp + 8]
add eax, dword [ebp - 8]
movzx eax, byte [eax]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
jmp 0x43ab32
and dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jae 0x43ab55
mov eax, dword [ebp + 8]
add eax, dword [ebp - 8]
movzx eax, byte [eax]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
jmp 0x43ab59
and dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jae 0x43ab7c
mov eax, dword [ebp + 8]
add eax, dword [ebp - 8]
movzx eax, byte [eax]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
jmp 0x43ab80
and dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x18]
shl eax, 0x10
mov ecx, dword [ebp - 0x1c]
shl ecx, 8
add eax, dword [ebp - 0x10]
add ecx, eax
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x14]
shr eax, 0x12
and eax, 0x3f
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0xc]
mov al, byte [eax + 0x4c20c0]
mov byte [ecx], al
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x14]
shr eax, 0xc
and eax, 0x3f
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0xc]
mov al, byte [eax + 0x4c20c0]
mov byte [ecx], al
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x14]
shr eax, 6
and eax, 0x3f
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0xc]
mov al, byte [eax + 0x4c20c0]
mov byte [ecx], al
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x14]
and eax, 0x3f
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0xc]
mov al, byte [eax + 0x4c20c0]
mov byte [ecx], al
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
jmp 0x43ab05
and dword [ebp - 0x20], 0
jmp 0x43ac21
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
xor edx, edx
push 3
pop ecx
div ecx
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [eax + edx*4 + 4]
jge 0x43ac49
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
dec eax
sub eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
mov byte [ecx + eax], 0x3d
jmp 0x43ac1a
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
leave
ret 0x10
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x41e960]
sub esp, 0x904
push ebx
xor ebx, ebx
cmp eax, ebx
push esi
push edi
je 0x401036
cmp word [0x41e962], bx
je 0x401027
call eax
mov dword [0x41e960], eax
push eax
call fcn.0040247d
push eax
call fcn.00409522
pop ecx
jmp 0x4010a4
push 0x27
call fcn.0040247d
mov esi, dword [ebp + 8]
push dword [esi + 0xc]
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
push dword [esi]
push eax
lea eax, [ebp - 0x904]
push eax
call edi
add esp, 0x14
cmp dword [esi + 0x10], ebx
mov dword [ebp - 4], ebx
jbe 0x401098
lea ebx, [esi + 0x14]
push dword [ebx]
lea eax, [ebp - 0x104]
push str._t0x_p_n
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x904]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add ebx, 4
cmp eax, dword [esi + 0x10]
jb 0x401063
lea eax, [ebp - 0x904]
push eax
call fcn.00409522
pop ecx
call fcn.0040477e
push 0xa
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x401880
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push dword [ebp + 8]
mov esi, ecx
lea ecx, [esi + 0xc]
call fcn.004136b9
push dword [ebp + 0xc]
lea edi, [esi + 0x10]
mov ecx, edi
call fcn.00401403
push 0x5c
mov ecx, edi
call fcn.00401795
xor edi, edi
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0x40133c
push edi
push edi
mov dword [0x41e964], esi
mov dword [0x41e96c], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp dword [0x41e9c4], 2
mov dword [0x41e968], eax
je 0x4018dd
call fcn.00408caa
push 0xffffffffffffffff
push dword [0x41e968]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x41e96c]
cmp eax, edi
mov dword [0x41ea58], edi
je 0x40192c
cmp eax, 1
je 0x401920
cmp eax, 2
je 0x40191c
cmp eax, 3
je 0x401918
cmp eax, 0x67
jle 0x401913
cmp eax, 0x6b
jle 0x401990
push eax
push 0x14
jmp 0x401963
push 0x12
jmp 0x401922
push 0x13
jmp 0x401922
push 0x11
push edi
call fcn.00409606
pop ecx
pop ecx
jmp 0x401990
cmp dword [0x41ea60], edi
jne 0x401990
lea eax, [ebp + 8]
push eax
push dword [0x41e968]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
mov ecx, dword [ebp + 8]
je 0x401953
cmp ecx, edi
jne 0x401953
xor eax, eax
jmp 0x401995
mov eax, 0x80070000
mov edx, ecx
and edx, eax
cmp edx, eax
je 0x401966
push ecx
push 0x21
push edi
jmp 0x401988
and ecx, 0xffff
cmp ecx, 0xe
jne 0x40197a
cmp dword [0x41e9c8], 0xffffffff
je 0x401990
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp + 8]
push 0x22
push 1
call fcn.00409606
add esp, 0xc
mov eax, 0x80004005
pop edi
pop esi
leave
ret 8
Function at 0x401e6b
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push esi
push 0
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x401eac
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xb7
cmp eax, esi
je 0x401e96
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
ret
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401eac
test al, 0x10
jne 0x401eac
push esi
jmp 0x401e8c
xor eax, eax
inc eax
pop esi
ret

Function at 0x4020bf
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, dword [sym.imp.KERNEL32.dll_FindResourceExA]
mov ebx, eax
movzx eax, word [0x41e980]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
jne 0x402103
push 0x409
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
je 0x402129
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x402114
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esi], eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x402129
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
jmp 0x4021a3
cmp dword [0x41e990], 0
jne 0x4021a1
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.SetProcessPreferredUILanguages
mov ebx, str.kernel32
push ebx
mov dword [0x41e990], 1
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
push 0
mov dword [ebp - 4], eax
movzx eax, word [0x41e980]
push 0x409
push 0
push eax
lea eax, [ebp - 0x44]
push str._04X_c_04X_c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
cmp dword [ebp - 4], 0
jne 0x402196
push str.SetThreadPreferredUILanguages
push ebx
call esi
push eax
call edi
test eax, eax
mov dword [ebp - 4], eax
je 0x4021a1
push 0
lea eax, [ebp - 0x44]
push eax
push 4
call dword [ebp - 4]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40247d
Capabilities:
Get geographical location
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
push ebx
push esi
xor ebx, ebx
xor esi, esi
cmp dword [0x41e0b0], ebx
je 0x4024b0
mov eax, 0x41e0b0
mov ecx, dword [ebp + 8]
cmp dword [eax], ecx
je 0x4024b0
inc esi
mov eax, esi
shl eax, 4
lea eax, [eax + 0x41e0b0]
cmp dword [eax], ebx
jne 0x402499
shl esi, 4
cmp dword [esi + 0x41e0b0], ebx
jne 0x4024c5
mov eax, 0x41a584
jmp 0x402637
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x68]
push str.7zSfxString_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x68]
push eax
call ebx
mov dword [ebp - 4], eax
call edi
test eax, eax
jne 0x402575
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
add eax, 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov ecx, dword [ebp - 4]
inc ecx
push ecx
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x68]
push eax
call ebx
cmp eax, dword [ebp - 4]
ja 0x40256c
call edi
test eax, eax
jne 0x40256c
mov eax, dword [esi + 0x41e0bc]
test eax, eax
je 0x402561
mov edi, dword [ebp - 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40255e
push dword [esi + 0x41e0bc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov dword [esi + 0x41e0bc], edi
jmp 0x402574
push edi
jmp 0x40256f
mov eax, dword [ebp - 8]
mov dword [esi + 0x41e0bc], eax
jmp 0x402575
push dword [ebp - 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi + 0x41e0bc]
test eax, eax
jne 0x402636
mov ebx, dword [esi + 0x41e0b4]
lea edi, [esi + 0x41e0b8]
cmp dword [edi], eax
je 0x4025ab
call fcn.00402427
cmp eax, dword [0x41b410]
jne 0x4025ab
mov ebx, dword [edi]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
xor ecx, ecx
push 2
pop edx
lea eax, [edi + 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
cmp dword [0x41e084], 0xffffffff
pop ecx
mov dword [esi + 0x41e0bc], eax
jne 0x402616
and dword [0x41e084], 0
push 0x1f
lea eax, [ebp - 0xa8]
push eax
movzx eax, word [0x41e980]
push 0x1004
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jle 0x402616
lea eax, [ebp - 0xa8]
push eax
call dword [sym.imp.MSVCRT.dll__wtol]
pop ecx
mov dword [0x41e084], eax
lea eax, [edi + 1]
push eax
push dword [esi + 0x41e0bc]
push edi
push ebx
push 0
push dword [0x41e084]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esi + 0x41e0bc]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402744
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 0x10], bl
mov byte [ebp - 0xf], bl
mov byte [ebp - 0xe], bl
mov byte [ebp - 0xd], bl
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4027a1
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 8]
pop ebx
leave
ret

Function at 0x4029c5
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
cmp dword [ebp + 8], 0
jne 0x4029d5
xor eax, eax
leave
ret
test byte [0x41e9c8], 2
mov dword [ebp - 0x40], 0x40
jne 0x402a2a
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x402a2a
mov ecx, dword [ebp - 0x2c]
xor eax, eax
cmp ecx, eax
ja 0x402a2a
jb 0x402a06
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp + 8]
jae 0x402a2a
push 0x2b
call fcn.0040247d
push eax
call fcn.00409599
cmp eax, 1
pop ecx
pop ecx
je 0x402a23
or dword [0x41e9c8], 0xffffffff
jmp 0x4029d1
or dword [0x41e9c8], 2
xor eax, eax
inc eax
leave
ret

Function at 0x402e67
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea ecx, [ebp - 0xc]
call fcn.004014eb
cmp dword [ebp - 4], 1
jg 0x402e85
push 1
lea ecx, [ebp - 0xc]
call fcn.004011b7
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
push 1
push dword [ebp - 0xc]
push eax
call esi
test eax, eax
jne 0x402ea9
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x402ee0
push ebx
mov ebx, dword [edi]
inc eax
push eax
push eax
lea ecx, [ebp - 0xc]
call fcn.00402aa0
push eax
push ebx
call esi
mov esi, dword [ebp - 0xc]
push esi
call fcn.00401184
and word [esi + eax*2], 0
pop ecx
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
mov ecx, edi
call fcn.0040143c
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
pop ebx
pop edi
pop esi
leave
ret
Function at 0x4031dc
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push ebx
push esi
push edi
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.00402a67
push 0x41a68c
lea ecx, [ebp - 0xc]
call fcn.00402ab8
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 0x25c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4032b8
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.00401403
push 0x5c
lea ecx, [ebp - 0xc]
call fcn.00401795
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0xc]
call fcn.00402ab8
test byte [ebp - 0x25c], 0x10
mov edi, dword [ebp - 0xc]
je 0x403287
push 0x41a688
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40329b
push 0x41a680
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40329b
push edi
call fcn.004031dc
pop ecx
jmp 0x403297
push 0
push edi
call esi
test eax, eax
je 0x4032db
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4032db
lea eax, [ebp - 0x25c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x403222
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0
push dword [ebp + 8]
call esi
test eax, eax
je 0x4032db
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x4032db
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
inc eax
jmp 0x4032e3
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
pop ecx
pop edi
pop esi
pop ebx
leave
ret

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

Disassembly:
cmp dword [0x41ea6c], 0
je 0x4032f6
xor eax, eax
inc eax
ret
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40330c
xor eax, eax
inc eax
pop esi
ret
test al, 0x10
jne 0x40332a
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x403326
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop esi
ret
xor eax, eax
pop esi
ret
push esi
call fcn.004031dc
pop ecx
pop esi
ret

Function at 0x4033e0
Capabilities:
Get graphical window text

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
mov ecx, edi
call fcn.004014eb
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov esi, eax
test esi, esi
jle 0x40341e
lea eax, [esi + 1]
push eax
push eax
mov ecx, edi
call fcn.00402aa0
push eax
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov eax, dword [edi]
and word [eax + esi*2], 0
mov dword [edi + 4], esi
mov eax, edi
pop edi
pop esi
ret
Function at 0x403573
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 1
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
call edi
mov esi, dword [ebp + 8]
mov ecx, esi
mov ebx, eax
call fcn.004014eb
lea eax, [ebx + 2]
push eax
mov ecx, esi
mov dword [ebp + 8], eax
call fcn.00402aa0
inc ebx
push ebx
push dword [ebp + 8]
mov ecx, esi
call fcn.00402aa0
push eax
push dword [ebp + 0xc]
call edi
mov edi, dword [esi]
push edi
call fcn.00401184
and word [edi + eax*2], 0
pop ecx
mov dword [esi + 4], eax
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40369a
xor eax, eax
jmp 0x4036f3
test al, 0x10
je 0x4036ab
push 0x10
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
jmp 0x4036f3
mov eax, dword [0x41e9cc]
test eax, eax
jne 0x4036bd
push esi
call fcn.00403650
pop ecx
jmp 0x4036f3
cmp eax, 2
jne 0x4036f0
lea eax, [ebp - 0x250]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x4036b4
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp + 0xc]
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jl 0x4036b4
xor eax, eax
inc eax
pop esi
leave
ret
Function at 0x4039e7
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
lea ecx, [ebp - 0x18]
mov ebx, eax
mov dword [ebp - 4], eax
call fcn.00402a67
xor esi, esi
cmp dword [ebp - 0x10], esi
jg 0x403a18
push esi
lea ecx, [ebp - 0x18]
call fcn.004011b7
movzx eax, word [edi + ebx*2 - 2]
cmp ax, 0x5c
mov edi, dword [ebp - 0x18]
je 0x403a2c
cmp ax, 0x2f
jne 0x403a35
mov word [edi + ebx*2 - 2], si
dec ebx
mov dword [ebp - 4], ebx
mov esi, ebx
jmp 0x403a5b
movzx eax, word [edi + esi*2]
cmp ax, 0x2f
je 0x403a4e
cmp ax, 0x5c
je 0x403a4e
dec esi
test esi, esi
jg 0x403a39
test esi, esi
je 0x403b0a
and word [edi + esi*2], 0
push edi
call fcn.00401e6b
test eax, eax
pop ecx
je 0x403a4a
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
jne 0x403a92
lea eax, [ebp - 0xc]
push eax
push edi
call fcn.0040367d
test eax, eax
pop ecx
pop ecx
je 0x403a92
xor esi, esi
jmp 0x403b2f
push edi
call fcn.00401e6b
test eax, eax
pop ecx
jne 0x403aac
push edi
push 0xc
push 1
call fcn.00409606
add esp, 0xc
jmp 0x403a8b
cmp esi, ebx
jge 0x403afe
mov eax, dword [ebp - 4]
sub eax, esi
inc eax
push eax
mov eax, dword [ebp + 8]
lea eax, [eax + esi*2]
push eax
lea ebx, [edi + esi*2]
push ebx
call sub.MSVCRT.dll_memcpy
xor ecx, ecx
add esp, 0xc
cmp word [ebx], cx
je 0x403ae4
jmp 0x403ae3
movzx eax, word [edi + esi*2]
cmp ax, 0x5c
je 0x403aea
cmp ax, 0x2f
je 0x403aea
inc esi
cmp word [edi + esi*2], cx
jne 0x403ad3
push edi
mov word [edi + esi*2], cx
call fcn.00401e6b
test eax, eax
pop ecx
je 0x403a9d
cmp esi, dword [ebp - 4]
jl 0x403ab0
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
pop ecx
inc eax
jmp 0x403b4f
cmp ebx, 2
mov ecx, dword [ebp + 8]
jne 0x403b3a
mov ax, word [ecx]
or ax, 0x20
cmp ax, 0x61
jb 0x403b3a
cmp ax, 0x7a
ja 0x403b3a
cmp word [ecx + 2], 0x3a
jne 0x403b3a
xor esi, esi
inc esi
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov eax, esi
jmp 0x403b4f
push ecx
push 0xc
push 1
call fcn.00409606
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4048a3
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, esi
call fcn.004014eb
push 2
mov ecx, esi
call fcn.00402aa0
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
push eax
push 1
call edi
mov ecx, dword [esi]
and word [ecx], 0
and dword [esi + 4], 0
test eax, eax
jbe 0x4048f6
lea ebx, [eax + 1]
push ebx
mov ecx, esi
call fcn.00402aa0
push eax
push ebx
call edi
mov edi, dword [esi]
push edi
call fcn.00401184
and word [edi + eax*2], 0
pop ecx
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
and dword [ebp + 8], 0
lea ecx, [eax + 0xf]
mov dword [ebp - 4], ecx
lea ebx, [eax + eax]
push dword [ebp - 4]
mov ecx, esi
call fcn.00402aa0
push dword [ebp + 8]
add eax, ebx
push dword [ebp + 0xc]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov edi, dword [esi]
push edi
call fcn.00401184
and word [edi + eax*2], 0
add esp, 0x10
push dword [esi]
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40494b
inc dword [ebp + 8]
cmp dword [ebp + 8], 0xfff
jl 0x404906
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x404952
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
cmp dword [0x41e3e4], esi
jle 0x4049a6
mov eax, dword [0x41e3e8]
mov eax, dword [eax + esi*4]
add eax, 0xc
push eax
lea ecx, [ebp - 0xc]
call fcn.004013d1
lea eax, [ebp - 0xc]
push eax
call fcn.004044e2
mov eax, dword [0x41e3e8]
mov eax, dword [eax + esi*4]
pop ecx
push dword [ebp - 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
inc esi
cmp esi, dword [0x41e3e4]
pop ecx
jl 0x404963
pop esi
leave
ret
Function at 0x404d0b
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
push ebx
push esi
push edi
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.00418f40
call fcn.00402427
push 3
call fcn.0040247d
push 0x28
mov dword [0x41e9b8], eax
call fcn.0040247d
push 2
mov dword [0x41e9b4], eax
call fcn.0040247d
push 5
mov dword [0x41e9b0], eax
call fcn.0040247d
push 0x15
mov dword [0x41e9ac], eax
call fcn.0040247d
push 0x16
mov dword [0x41e9a8], eax
call fcn.0040247d
push 0x17
mov dword [0x41e9a4], eax
call fcn.0040247d
add esp, 0x1c
xor ebx, ebx
mov dword [0x41e9a0], eax
mov dword [0x41e998], ebx
mov dword [0x41e99c], ebx
mov edi, 0x41e3dc
xor esi, esi
push esi
push ebx
lea eax, [ebp - 0x2a4]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x404e3a
push ebx
lea eax, [ebp - 0x98]
push 0x41b7f0
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 0x18]
call fcn.004014eb
lea ecx, [ebp - 0xc]
call fcn.004014eb
lea eax, [ebp - 0x98]
push eax
lea ecx, [ebp - 0x18]
call fcn.00401403
lea eax, [ebp - 0x2a4]
push eax
lea ecx, [ebp - 0xc]
call fcn.00401403
lea eax, [ebp - 0x18]
push eax
mov ecx, edi
call fcn.004035cf
cmp dword [esi + 0x41e3b4], ebx
jne 0x404e2a
push dword [esi + 0x41e3b8]
lea ecx, [ebp - 0x18]
call fcn.00401403
lea eax, [ebp - 0x2a4]
push eax
lea ecx, [ebp - 0xc]
call fcn.00401403
lea eax, [ebp - 0x18]
push eax
mov ecx, edi
call fcn.004035cf
add esi, 8
cmp esi, 0x28
jb 0x404dfa
lea ecx, [ebp - 0x18]
call fcn.00402990
inc ebx
cmp ebx, 0x40
jl 0x404d91
pop edi
pop esi
pop ebx
leave
ret