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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4051a0
cmp edx, dword [eax]
je 0x401fe7
add eax, 8
inc ecx
cmp eax, 0x405230
jl 0x401fd8
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4051a0]
jne 0x402115
mov eax, dword [0x405558]
cmp eax, 1
je 0x4020ef
test eax, eax
jne 0x402018
cmp dword [0x4050f4], 1
je 0x4020ef
cmp edx, 0xfc
je 0x402115
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40204f
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00401290
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00401210
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x402092
lea eax, [ebp - 0x1a4]
push eax
call fcn.00401210
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x404390
push edi
call fcn.004031f0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00401290
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004012a0
lea eax, [ebp - 0xa0]
push 0x404370
push eax
call fcn.004012a0
push dword [esi + 0x4051a4]
lea eax, [ebp - 0xa0]
push eax
call fcn.004012a0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040315e
add esp, 0x2c
pop edi
jmp 0x402115
lea eax, [ebp + 8]
lea esi, [esi + 0x4051a4]
push 0
push eax
push dword [esi]
call fcn.00401210
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 0x401a64
Capabilities:
Parse pe header

Disassembly:
push 0xc
push 0x401f28
call fcn.00401d28
xor ecx, ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x401ac4
cmp eax, 0xffffffff
je 0x401ac4
mov dword [ebp - 4], ecx
mov edx, 0x5a4d
cmp word [eax], dx
jne 0x401abd
mov edx, dword [eax + 0x3c]
test edx, edx
js 0x401abd
cmp edx, 0x10000000
jae 0x401abd
add eax, edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [eax]
sub ecx, 0x4550
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
jmp 0x401aba
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 0xfffffffe
mov eax, ecx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x401b30
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x401b6e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x401b66
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x401b70
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x401b56
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x401c40
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x401c71
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x401c71
mov ecx, 0x10b
cmp word [eax + 0x18], cx
jne 0x401c71
mov eax, 1
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401390
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x401ec8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
mov esi, ecx
mov dword [esp + 4], esi
mov dword [esi], 0x402468
mov cl, byte [esi + 0x4c]
lea eax, [esi + 0x4c]
test cl, cl
mov dword [esp + 0x10], 0
je 0x4013cc
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov al, byte [esi + 0x40]
test al, al
je 0x4013dd
push 0
push 0
call dword [sym.imp.USER32.dll_ChangeDisplaySettingsA]
lea ecx, [esi + 0x150]
call fcn.00401bbe
mov ecx, esi
mov dword [esp + 0x10], 0xffffffff
call fcn.00401bbe
mov ecx, dword [esp + 8]
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x4015c0
Capabilities:
Extract resource via kernel32 functions
Get common file path

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x401ee8
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push esi
push edi
mov ebx, ecx
call sub.MFC42.DLL_AfxGetModuleState
mov esi, dword [eax + 0xc]
push str.SHOCKWAVE
push 0x84
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x401610
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401630
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esp + 0x14]
mov dword [esp + 0x10], eax
push ecx
push 4
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
add ebx, 0x4c
push ebx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edi, str.game.dcr
or ecx, 0xffffffff
xor eax, eax
push 0x1001
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CFile::CFile
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
push ebp
mov dword [esp + 0x38], 0
call sub.MFC42.DLL_CFile::Write
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CFile::Close
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], 0xffffffff
call fcn.00401be8
mov ecx, dword [esp + 0x28]
pop ebp
pop edi
pop esi
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret
Function at 0x4016fe
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 + 8]
call fcn.004087d2
push dword [ebp + 0xc]
lea edi, [esi + 0xc]
mov ecx, edi
call fcn.004014ed
push 0x5c
mov ecx, edi
call fcn.004015ed
xor edi, edi
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0x401460
push edi
push edi
mov dword [0x41a5b8], esi
mov dword [0x41a5c0], edi
call dword [sym.imp.KERNEL32.DLL_CreateThread]
cmp dword [0x41a5e8], 2
mov dword [0x41a5bc], eax
je 0x40175b
call fcn.00407969
push 0xffffffffffffffff
push dword [0x41a5bc]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov eax, dword [0x41a5c0]
cmp eax, edi
mov dword [0x41a654], edi
je 0x4017ab
cmp eax, 1
je 0x40179f
cmp eax, 2
je 0x40179b
cmp eax, 3
je 0x401797
cmp eax, 0x67
jle 0x401791
cmp eax, 0x6a
jle 0x401800
push eax
push 0x14
push edi
jmp 0x4017f8
push 0x12
jmp 0x4017a1
push 0x13
jmp 0x4017a1
push 0x11
push edi
call fcn.0040783d
pop ecx
pop ecx
jmp 0x401800
cmp dword [0x41a658], edi
jne 0x401800
lea eax, [ebp + 8]
push eax
push dword [0x41a5bc]
call dword [sym.imp.KERNEL32.DLL_GetExitCodeThread]
test eax, eax
mov ecx, dword [ebp + 8]
je 0x4017d2
cmp ecx, edi
jne 0x4017d2
xor eax, eax
jmp 0x401805
mov eax, 0x80070000
mov edx, ecx
and edx, eax
cmp edx, eax
je 0x4017e4
push ecx
push 0x21
jmp 0x401794
and ecx, 0xffff
push ecx
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push dword [ebp + 8]
push 0x22
push 1
call fcn.0040783d
add esp, 0xc
mov eax, 0x80004005
pop edi
pop esi
leave
ret 8

Function at 0x401b80
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 0x401bc1
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, 0xb7
cmp eax, esi
je 0x401ba3
push eax
jmp 0x401bb7
push dword [esp + 8]
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401bc1
test al, 0x10
jne 0x401bc1
push esi
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
pop esi
ret
xor eax, eax
inc eax
pop esi
ret
Function at 0x401fa8
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
push ebx
push esi
push edi
push 0x40
lea eax, [ebp - 0x68]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetClassNameA]
test eax, eax
je 0x402128
push str.STATIC
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpiA]
test eax, eax
jne 0x402128
push 0xfffffffffffffff0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowLongW]
test al, 0xe
je 0x402128
push str.IMAGES
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetMenu]
mov edi, dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
movzx eax, ax
push eax
xor esi, esi
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
mov ebx, eax
cmp ebx, esi
je 0x402128
push ebx
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.DLL_LoadResource]
cmp eax, esi
je 0x402128
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
cmp eax, esi
mov dword [ebp - 0x10], eax
je 0x402128
push ebx
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
mov ebx, eax
cmp ebx, 0x10
jb 0x402128
push ebx
push 0x40
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
push ebx
push dword [ebp - 0x10]
mov edi, eax
push edi
call sub.msvcrt.dll_memcpy
add esp, 0xc
push esi
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [ebp - 8]
push eax
push esi
push edi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jne 0x402121
cmp dword [ebp - 8], esi
je 0x402121
lea eax, [ebp - 0xc]
push eax
push 0x4168b8
push esi
push esi
push dword [ebp - 8]
call dword [sym.imp.OLEAUT32.dll_OleCreatePictureIndirect]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push edi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov eax, dword [ebp - 0xc]
cmp eax, esi
je 0x402128
lea edx, [ebp - 4]
push edx
mov dword [ebp - 4], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
cmp dword [ebp - 4], esi
je 0x402113
push dword [ebp - 4]
call fcn.00401e7d
pop ecx
lea ecx, [ebp - 0x28]
push ecx
push 0x18
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.GDI32.dll_GetObjectW]
push 6
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push esi
push esi
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowPos]
push dword [ebp - 4]
push esi
push 0x172
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
xor eax, eax
inc eax
jmp 0x40212a
push edi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4026cb
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x412e71
call fcn.00412810
sub esp, 0xc
lea ecx, [ebp - 0x18]
call fcn.004015d5
and dword [ebp - 4], 0
cmp dword [ebp - 0x10], 1
jg 0x4026f4
push 1
lea ecx, [ebp - 0x18]
call fcn.004013bd
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 - 0x18]
push eax
call esi
test eax, eax
jne 0x40271c
push dword [ebp - 0x18]
or dword [ebp - 4], 0xffffffff
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x40274f
push ebx
mov ebx, dword [edi]
inc eax
push eax
push eax
lea ecx, [ebp - 0x18]
call fcn.0040212f
push eax
push ebx
call esi
lea ecx, [ebp - 0x18]
call fcn.004023a4
lea eax, [ebp - 0x18]
push eax
mov ecx, edi
call fcn.00401526
push dword [ebp - 0x18]
or dword [ebp - 4], 0xffffffff
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret

Function at 0x402b17
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
mov eax, 0x412ef2
call fcn.00412810
sub esp, 0x25c
push ebx
push esi
push edi
push dword [ebp + 8]
lea ecx, [ebp - 0x18]
call fcn.0040236b
and dword [ebp - 4], 0
push 0x4153b4
lea ecx, [ebp - 0x18]
call fcn.004023bc
lea eax, [ebp - 0x268]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_FindFirstFileW]
mov esi, dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
mov edi, eax
cmp edi, 0xffffffff
je 0x402bfe
mov ebx, dword [sym.imp.KERNEL32.DLL_lstrcmpW]
push dword [ebp + 8]
lea ecx, [ebp - 0x18]
call fcn.004014ed
push 0x5c
lea ecx, [ebp - 0x18]
call fcn.004015ed
lea eax, [ebp - 0x23c]
push eax
lea ecx, [ebp - 0x18]
call fcn.004023bc
test byte [ebp - 0x268], 0x10
je 0x402bc9
push 0x4153b0
lea eax, [ebp - 0x23c]
push eax
call ebx
test eax, eax
je 0x402be1
push 0x4153a8
lea eax, [ebp - 0x23c]
push eax
call ebx
test eax, eax
je 0x402be1
push dword [ebp - 0x18]
call fcn.00402b17
pop ecx
jmp 0x402bdd
push 0
push dword [ebp - 0x18]
call esi
test eax, eax
je 0x402c1b
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
je 0x402c1b
lea eax, [ebp - 0x268]
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_FindNextFileW]
test eax, eax
jne 0x402b6d
push edi
call dword [sym.imp.KERNEL32.DLL_FindClose]
push 0
push dword [ebp + 8]
call esi
test eax, eax
je 0x402c1b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_RemoveDirectoryW]
test eax, eax
je 0x402c1b
xor esi, esi
inc esi
jmp 0x402c1d
xor esi, esi
push dword [ebp - 0x18]
or dword [ebp - 4], 0xffffffff
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x402c3b
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
cmp dword [0x41a660], 0
je 0x402c48
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 0x402c5e
xor eax, eax
inc eax
pop esi
ret
test al, 0x10
jne 0x402c7c
push 0
push esi
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
test eax, eax
je 0x402c78
push esi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
pop esi
ret
xor eax, eax
pop esi
ret
push esi
call fcn.00402b17
pop ecx
pop esi
ret

Function at 0x402ee8
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x412f5a
call fcn.00412810
sub esp, 0x18
and dword [ebp - 0x14], 0
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
push edi
xor ebx, ebx
inc ebx
push ebx
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 0xc]
call esi
lea ecx, [ebp - 0x24]
mov edi, eax
call fcn.004015d5
lea eax, [edi + 2]
push eax
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], eax
call fcn.0040212f
inc edi
push edi
push dword [ebp - 0x10]
lea ecx, [ebp - 0x24]
call fcn.0040212f
push eax
push dword [ebp + 0xc]
call esi
lea ecx, [ebp - 0x24]
call fcn.004023a4
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
call fcn.004014bb
push dword [ebp - 0x24]
mov dword [ebp - 0x14], ebx
mov byte [ebp - 4], 0
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
mov eax, dword [ebp + 8]
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x40303f
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 0x40305c
xor eax, eax
jmp 0x4030b5
test al, 0x10
je 0x40306d
push 0x10
call dword [sym.imp.KERNEL32.DLL_SetLastError]
or eax, 0xffffffff
jmp 0x4030b5
mov eax, dword [0x41a5ec]
test eax, eax
je 0x4030a9
cmp eax, 2
jne 0x4030b2
lea eax, [ebp - 0x250]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_FindFirstFileW]
cmp eax, 0xffffffff
je 0x4030a9
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
jge 0x4030b2
push esi
call fcn.00403012
pop ecx
jmp 0x4030b5
xor eax, eax
inc eax
pop esi
leave
ret
Function at 0x40339d
Capabilities:
Get file attributes

Disassembly:
mov eax, 0x412fb2
call fcn.00412810
sub esp, 0x18
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov ebx, eax
push edi
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x10], ebx
call fcn.0040236b
xor esi, esi
cmp dword [ebp - 0x1c], esi
mov dword [ebp - 4], esi
jg 0x4033d8
push esi
lea ecx, [ebp - 0x24]
call fcn.004013bd
mov ax, word [edi + ebx*2 - 2]
cmp ax, 0x5c
mov edi, dword [ebp - 0x24]
je 0x4033ec
cmp ax, 0x2f
jne 0x4033f5
mov word [edi + ebx*2 - 2], si
dec ebx
mov dword [ebp - 0x10], ebx
mov esi, ebx
jmp 0x40341b
mov ax, word [edi + esi*2]
cmp ax, 0x2f
je 0x40340e
cmp ax, 0x5c
je 0x40340e
dec esi
test esi, esi
jg 0x4033f9
test esi, esi
je 0x4034b5
and word [edi + esi*2], 0
push edi
call fcn.00401b80
test eax, eax
pop ecx
je 0x40340a
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemTimeAsFileTime]
push edi
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
test al, 0x10
jne 0x40344f
lea eax, [ebp - 0x18]
push eax
push edi
call fcn.0040303f
test eax, eax
pop ecx
pop ecx
jne 0x4034e9
push edi
call fcn.00401b80
test eax, eax
pop ecx
je 0x4034b2
cmp esi, ebx
jge 0x4034d7
mov eax, dword [ebp - 0x10]
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 edx, edx
add esp, 0xc
cmp word [ebx], dx
je 0x403480
inc esi
lea eax, [edi + esi*2]
jmp 0x403497
mov cx, word [eax]
cmp cx, 0x5c
je 0x40349c
cmp cx, 0x2f
je 0x40349c
inc esi
inc eax
inc eax
cmp word [eax], dx
jne 0x403485
push edi
mov word [edi + esi*2], dx
call fcn.00401b80
test eax, eax
pop ecx
je 0x4034b2
cmp esi, dword [ebp - 0x10]
jl 0x40345e
jmp 0x4034d7
push edi
jmp 0x4034dd
cmp ebx, 2
mov ecx, dword [ebp + 8]
jne 0x4034dc
mov ax, word [ecx]
or ax, 0x20
cmp ax, 0x61
jb 0x4034dc
cmp ax, 0x7a
ja 0x4034dc
cmp word [ecx + 2], 0x3a
jne 0x4034dc
xor esi, esi
inc esi
jmp 0x4034eb
push ecx
push 0xc
push 1
call fcn.0040783d
add esp, 0xc
xor esi, esi
or dword [ebp - 4], 0xffffffff
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x403c9d
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
xor esi, esi
xor edi, edi
cmp dword [0x41a010], esi
je 0x403cc7
mov eax, 0x41a010
mov ecx, eax
mov ecx, dword [ecx]
cmp ecx, dword [ebp + 8]
je 0x403cc7
add eax, 0x10
inc edi
cmp dword [eax], esi
mov ecx, eax
jne 0x403cb6
shl edi, 4
mov eax, dword [edi + 0x41a01c]
cmp eax, esi
jne 0x403d88
cmp dword [0x41a248], 0xffffffff
jne 0x403cec
call dword [sym.imp.KERNEL32.DLL_GetUserDefaultLCID]
mov dword [0x41a248], eax
cmp word [0x41a244], 0xffff
jne 0x403d03
call dword [sym.imp.KERNEL32.DLL_GetUserDefaultUILanguage]
mov word [0x41a244], ax
mov ax, word [0x41a240]
cmp ax, 0xffff
jne 0x403d1a
call fcn.00401d96
mov word [0x41a240], ax
mov ecx, dword [edi + 0x41a018]
cmp ecx, esi
push ebx
mov ebx, dword [edi + 0x41a014]
mov dword [ebp - 4], esi
je 0x403d54
mov edx, 0x419
cmp dword [0x41a248], edx
je 0x403d49
cmp word [0x41a244], dx
je 0x403d49
cmp ax, dx
jne 0x403d54
mov ebx, ecx
call dword [sym.imp.KERNEL32.DLL_GetACP]
mov dword [ebp - 4], eax
push ebx
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi + 4]
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
lea ecx, [esi + 1]
push ecx
push eax
push esi
push ebx
push 0
push dword [ebp - 4]
mov dword [edi + 0x41a01c], eax
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
mov eax, dword [edi + 0x41a01c]
pop ebx
pop edi
pop esi
leave
ret

Function at 0x4042d7
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
mov eax, 0x413130
call fcn.00412810
sub esp, 0x10
push ebx
push esi
xor ebx, ebx
push edi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x10], ebx
call fcn.004015d5
xor esi, esi
inc esi
cmp dword [ebp - 0x14], 2
mov dword [ebp - 4], esi
jg 0x40430a
push 2
lea ecx, [ebp - 0x1c]
call fcn.004013bd
mov edi, dword [ebp - 0x1c]
push edi
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_GetTempPathW]
call esi
xor ecx, ecx
cmp eax, ebx
mov word [edi], bx
mov dword [ebp - 0x18], ecx
jbe 0x40433e
lea edi, [eax + 1]
push edi
lea ecx, [ebp - 0x1c]
call fcn.0040212f
push eax
push edi
call esi
lea ecx, [ebp - 0x1c]
call fcn.004023a4
mov ecx, dword [ebp - 0x18]
lea edi, [ecx + 0xf]
lea esi, [ecx + ecx]
push edi
lea ecx, [ebp - 0x1c]
call fcn.0040212f
push ebx
push dword [ebp + 0xc]
add eax, esi
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 0x1c]
call fcn.004023a4
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40437c
inc ebx
cmp ebx, 0xfff
jl 0x404344
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x1c]
push eax
call fcn.004014bb
push dword [ebp - 0x1c]
mov dword [ebp - 0x10], 1
mov byte [ebp - 4], 0
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
mov eax, dword [ebp + 8]
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x4043ae
Capabilities:
Set environment variable

Disassembly:
mov eax, 0x413142
call fcn.00412810
sub esp, 0xc
push esi
xor esi, esi
cmp dword [0x41a648], esi
jle 0x404412
mov eax, dword [0x41a64c]
mov eax, dword [eax + esi*4]
add eax, 0xc
push eax
lea ecx, [ebp - 0x18]
call fcn.004014bb
and dword [ebp - 4], 0
lea eax, [ebp - 0x18]
push eax
call fcn.00403e0b
mov eax, dword [0x41a64c]
mov eax, dword [eax + esi*4]
mov eax, dword [eax]
pop ecx
push dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableW]
push dword [ebp - 0x18]
or dword [ebp - 4], 0xffffffff
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
inc esi
cmp esi, dword [0x41a648]
pop ecx
jl 0x4043c6
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret
Function at 0x404d45
Capabilities:
Get common file path

Disassembly:
mov eax, 0x413247
call fcn.00412810
sub esp, 0x2a4
push ebx
push esi
push edi
push 3
call fcn.00403c9d
push 2
mov dword [0x41a5e4], eax
call fcn.00403c9d
push 5
mov dword [0x41a5e0], eax
call fcn.00403c9d
push 0x15
mov dword [0x41a5dc], eax
call fcn.00403c9d
push 0x16
mov dword [0x41a5d8], eax
call fcn.00403c9d
push 0x17
mov dword [0x41a5d4], eax
call fcn.00403c9d
xor edi, edi
add esp, 0x18
mov dword [0x41a5d0], eax
mov dword [0x41a5c8], edi
mov dword [0x41a5cc], edi
xor ebx, ebx
mov esi, 0x41a640
push edi
push ebx
lea eax, [ebp - 0x2b0]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x404e60
push ebx
lea eax, [ebp - 0xa4]
push str.7zSfxFolder_02d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 0x24]
call fcn.0040231b
lea eax, [ebp - 0xa4]
push eax
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], edi
call fcn.004014ed
lea eax, [ebp - 0x2b0]
push eax
lea ecx, [ebp - 0x18]
call fcn.004014ed
lea eax, [ebp - 0x24]
push eax
mov ecx, esi
call fcn.00402f74
cmp dword [edi + 0x41a280], ebx
jne 0x404e4a
push dword [edi + 0x41a284]
lea ecx, [ebp - 0x24]
call fcn.004014ed
lea eax, [ebp - 0x2b0]
push eax
lea ecx, [ebp - 0x18]
call fcn.004014ed
lea eax, [ebp - 0x24]
push eax
mov ecx, esi
call fcn.00402f74
add edi, 8
cmp edi, 0x28
jb 0x404e1a
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00401c8e
xor edi, edi
inc ebx
cmp ebx, 0x40
jl 0x404db8
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret