joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401ce0
Capabilities:
Check os version
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc4
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
xor eax, eax
mov ecx, 0x27
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x30]
push eax
xor ebx, ebx
mov dword [esp + 0x34], 0x9c
call esi
test eax, eax
jne 0x401d31
lea ecx, [esp + 0x30]
push ecx
mov dword [esp + 0x34], 0x94
call esi
test eax, eax
jne 0x401d31
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x34]
cmp eax, 6
jae 0x401d46
cmp eax, 5
jne 0x401d80
cmp dword [esp + 0x38], 2
jne 0x401d80
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push str.GetNativeSystemInfo
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x401d73
lea ecx, [esp + 0xc]
push ecx
call eax
cmp word [esp + 0xc], 9
jne 0x401d80
mov ebx, 1
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x402400
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
mov edx, dword [esp + 0x10]
push ebx
mov ebx, dword [esp + 0x24]
mov eax, dword [ebx]
lea ecx, [esp + 0x24]
push ecx
push 0x20019
push 0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x18], 0
mov dword [ebx], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4024c6
mov ecx, dword [ebx]
mov edx, dword [esp + 0x20]
push esi
mov esi, ecx
shr ecx, 2
push edi
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4024af
lea ecx, [esp + 0x10]
push ecx
push edx
lea edx, [esp + 0x14]
push edx
push 0
push eax
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x2c]
push ecx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x402496
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
add esp, 8
ret
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
pop edi
mov dword [edx], eax
pop esi
mov dword [ebx], ecx
xor eax, eax
pop ebx
add esp, 8
ret
mov edx, dword [esp + 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov eax, 0xfffffffd
pop ebx
add esp, 8
ret
or eax, 0xffffffff
pop ebx
add esp, 8
ret
Function at 0x4025e0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
push edi
or edi, 0xffffffff
test eax, eax
je 0x402723
push ebx
mov ebx, dword [esp + 0x14]
test ebx, ebx
je 0x40271d
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x40271d
push ebp
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea eax, [esi + 1]
push eax
call fcn.0040c292
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40270a
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x14]
push ecx
push esi
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402701
push ebx
push ebp
mov byte [esi + ebp], 0
call fcn.0040c630
add esp, 8
test eax, eax
je 0x402701
mov ecx, ebx
lea esi, [ecx + 1]
mov edi, edi
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x402680
sub ecx, esi
add eax, ecx
mov cl, byte [eax]
test cl, cl
je 0x4026a3
cmp cl, 0x20
je 0x40269b
cmp cl, 9
jne 0x4026a3
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x402691
cmp byte [eax], 0
mov ebx, eax
je 0x4026cd
lea ebx, [ebx]
mov cl, byte [eax]
cmp cl, 0xd
je 0x4026ca
cmp cl, 0xa
je 0x4026ca
test cl, cl
je 0x4026ca
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4026b0
jmp 0x4026cd
mov byte [eax], 0
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4026d2
mov esi, dword [esp + 0x20]
sub eax, edx
test esi, esi
je 0x4026ff
mov edi, dword [esp + 0x24]
dec edi
cmp eax, edi
jg 0x4026ee
mov edi, eax
push edi
push ebx
push esi
call fcn.0040c870
add esp, 0xc
mov byte [edi + esi], 0
jmp 0x402701
mov edi, eax
push ebp
call fcn.0040bef2
add esp, 4
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebp
pop ebx
mov eax, edi
pop edi
pop ecx
ret
pop ebx
mov eax, edi
pop edi
pop ecx
ret
mov eax, edi
pop edi
pop ecx
ret
Function at 0x404f60
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
test eax, eax
mov ecx, dword [esi]
push ebp
mov ebp, dword [esp + 0x18]
mov dword [esp + 8], 0
mov dword [esp + 0xc], ecx
mov dword [esi], 0
je 0x405011
test ebp, ebp
je 0x405011
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x405011
test ebx, ebx
je 0x405011
lea edx, [esp + 4]
push edx
push 0x20019
push 0
push eax
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404ff4
mov ecx, dword [esi]
push edi
mov edx, ecx
shr ecx, 2
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 8]
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x10]
push eax
push ebx
lea ecx, [esp + 0x14]
push ecx
push 0
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, eax
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x404ff9
mov eax, edi
pop edi
pop ebp
add esp, 0xc
ret
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
mov dword [edx], ecx
pop edi
mov dword [esi], eax
xor eax, eax
pop ebp
add esp, 0xc
ret
mov eax, 6
pop ebp
add esp, 0xc
ret
Function at 0x405240
Capabilities:
Get file version info

Disassembly:
sub esp, 0xc
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, eax
test esi, esi
je 0x405394
cmp byte [esi], 0
je 0x405394
test ebp, ebp
je 0x405394
mov ecx, dword [esp + 0x1c]
mov edx, ecx
push edi
shr ecx, 2
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x14]
push eax
push esi
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
mov dword [esp + 0xc], eax
ja 0x40529a
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0xc
ret
push ebx
push eax
call fcn.0040c292
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4052b7
pop ebx
pop edi
pop esi
mov eax, 2
pop ebp
add esp, 0xc
ret
mov ecx, dword [esp + 0x10]
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
push ebx
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x14]
push eax
push 0
push esi
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x4052f5
push ebx
call fcn.0040bef2
add esp, 4
pop ebx
pop edi
pop esi
mov eax, 3
pop ebp
add esp, 0xc
ret
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x18]
push edx
push str.VarFileInfoTranslation
push ebx
call sub.VERSION.dll_VerQueryValueA
mov ecx, dword [esp + 0x10]
test ecx, ecx
jbe 0x40537e
test eax, eax
je 0x40537e
mov eax, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov cx, word [eax + 2]
mov ax, word [eax]
push 0x41856c
mov esi, ebp
push ecx
push ebx
call fcn.00405020
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x405362
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x24]
xor ecx, ecx
mov cx, word [eax + 2]
mov ax, word [eax]
push edx
push 0x418560
push ecx
push ebx
call fcn.00405020
add esp, 0x10
mov edi, eax
push ebx
call fcn.0040bef2
add esp, 4
xor eax, eax
test edi, edi
setne al
pop ebx
pop edi
pop esi
pop ebp
dec eax
and eax, 0xfffffffe
add esp, 0xc
ret
push ebx
call fcn.0040bef2
add esp, 4
pop ebx
pop edi
pop esi
mov eax, 4
pop ebp
add esp, 0xc
ret
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0xc
ret
Function at 0x4053a0
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb0
push esi
push edi
xor eax, eax
mov ecx, 0x25
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x24], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x405439
mov eax, dword [esp + 0x30]
mov edi, 2
cmp eax, edi
jne 0x405439
lea ecx, [esp + 0xc]
push ecx
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40544f
lea edx, [esp + 0x14]
push edx
push str.SeShutdownPrivilege
push 0
mov dword [esp + 0x1c], 1
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov ecx, dword [esp + 0xc]
push 0
push 0
push 0
lea eax, [esp + 0x1c]
push eax
push 0
push ecx
mov dword [esp + 0x34], edi
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call esi
test eax, eax
jne 0x40545d
push 0
push 6
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
je 0x40545b
call esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x405990
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x74
push ebx
push ebp
push edi
xor eax, eax
mov ebp, dword [esp + 0x90]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
xor ebx, ebx
mov ecx, 0x11
lea edi, [esp + 0x3c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0x3c], eax
lea edx, [esp + 0x40]
push edx
mov edx, dword [esp + 0x90]
push ebx
push ebx
mov eax, 0xfffff830
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
push ebx
mov eax, 0xc
push ebx
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0xa0]
lea ecx, [esp + 0x3c]
push ecx
push edx
push eax
mov dword [esp + 0x54], ebx
mov dword [esp + 0x64], 0x44
mov dword [esp + 0x90], 5
mov word [esp + 0x94], 7
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], 1
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x405a43
pop edi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x74
ret
mov ecx, dword [esp + 0x30]
push esi
xor esi, esi
push ecx
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x90], ebx
je 0x405ab0
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [esp + 0x10], 0x103
lea esp, [esp]
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x405ac5
cmp dword [esp + 0x10], 0x103
jne 0x405aac
push 0x1f4
call edi
inc esi
cmp ebp, ebx
jle 0x405aa2
lea ecx, [ebp + ebp]
cmp ecx, esi
jl 0x405adf
cmp dword [esp + 0x10], 0x103
je 0x405a70
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x74
ret
mov edx, dword [esp + 0x30]
push edx
mov esi, 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x74
ret
mov edx, dword [esp + 0x30]
push edx
mov esi, 2
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x74
ret
Function at 0x408980
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x24
push esi
xor esi, esi
push edi
push str.advapi32.dll
mov dword [esp + 0x1c], esi
mov byte [esp + 0x28], 0
mov byte [esp + 0x29], 0
mov byte [esp + 0x2a], 0
mov byte [esp + 0x2b], 0
mov byte [esp + 0x2c], 0
mov byte [esp + 0x2d], 5
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, esi
je 0x408b05
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebx
push ebp
push str.AllocateAndInitializeSid
push edi
call esi
push 0x41a2a4
push edi
mov ebp, eax
call esi
push str.GetTokenInformation
push edi
mov dword [esp + 0x2c], eax
call esi
push str.EqualSid
push edi
mov ebx, eax
call esi
push str.FreeSid
push edi
mov dword [esp + 0x24], eax
call esi
test ebp, ebp
mov dword [esp + 0x28], eax
je 0x408af2
mov esi, dword [esp + 0x24]
test esi, esi
je 0x408af2
test ebx, ebx
je 0x408af2
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x408af2
test eax, eax
je 0x408af2
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea ecx, [esp + 0x54]
push ecx
call ebp
lea edx, [esp + 0x14]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
push 0
push 0
push 2
push ecx
call ebx
mov edx, dword [esp + 0x10]
push edx
call fcn.0040c292
mov esi, eax
add esp, 4
test esi, esi
je 0x408ade
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
push ecx
push esi
push 2
push edx
call ebx
mov eax, dword [esi]
xor ebx, ebx
test eax, eax
jbe 0x408ad5
lea ebp, [esi + 4]
nop
mov eax, dword [ebp]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call dword [esp + 0x24]
test eax, eax
jne 0x408acd
mov eax, dword [esi]
inc ebx
add ebp, 8
cmp ebx, eax
jb 0x408ab0
jmp 0x408ad5
mov dword [esp + 0x20], 1
push esi
call fcn.0040bef2
add esp, 4
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
push eax
call dword [esp + 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x20]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x24
ret
pop edi
mov eax, esi
pop esi
add esp, 0x24
ret

Function at 0x408c30
Capabilities:
Set registry value

Disassembly:
sub esp, 8
mov edx, dword [esp + 0x10]
lea eax, [esp + 4]
push eax
mov eax, dword [esp + 0x10]
lea ecx, [esp + 4]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push edx
push eax
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x408ca3
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push esi
push ecx
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0xc]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
neg eax
sbb eax, eax
and eax, 0xfffffffe
pop esi
add esp, 8
ret
or eax, 0xffffffff
add esp, 8
ret
Function at 0x409230
Capabilities:
Enumerate network shares

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x190c
call fcn.0040d0b0
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x18], ebx
mov ecx, 0x63f
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x10]
push eax
push ecx
push 2
push ebx
push 2
mov dword [esp + 0x24], ebx
call sub.MPR.dll_WNetOpenEnumA
test eax, eax
je 0x40927e
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x14]
push ecx
push edx
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x24], 0x1900
call sub.MPR.dll_WNetEnumResourceA
mov esi, eax
cmp esi, ebx
jne 0x409374
mov ebx, dword [ebp + 0x10]
mov eax, dword [esp + 0xc]
xor edi, edi
test eax, eax
jbe 0x409341
lea esi, [esp + 0x24]
mov ecx, dword [esi - 4]
test ecx, ecx
je 0x4092de
cmp ecx, 1
jbe 0x4092d7
cmp ecx, 3
jbe 0x4092de
mov edx, 1
jmp 0x4092e0
xor edx, edx
mov eax, dword [esi]
and eax, 2
je 0x409304
test edx, edx
je 0x409304
mov eax, dword [ebp + 0xc]
push ebx
push eax
lea ecx, [esi - 0xc]
push ecx
call fcn.00409230
mov al, byte [ebx]
add esp, 0xc
test al, al
jne 0x409341
jmp 0x409321
test eax, eax
je 0x409321
cmp ecx, 2
jne 0x409321
mov edx, dword [ebp + 0xc]
mov eax, dword [esi + 8]
push edx
push eax
call fcn.0040c70e
add esp, 8
test eax, eax
je 0x40932f
mov eax, dword [esp + 0xc]
inc edi
add esi, 0x20
cmp edi, eax
jb 0x4092c6
jmp 0x409341
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x14]
mov edx, ebx
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x409337
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x14]
push ecx
push edx
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x24], 0x1900
call sub.MPR.dll_WNetEnumResourceA
mov esi, eax
test esi, esi
je 0x4092b4
cmp esi, 0x103
jne 0x40937e
xor esi, esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40938c
push eax
call sub.MPR.dll_WNetCloseEnum
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40b770
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x40
push ebx
mov ebx, dword [esp + 0x48]
push edi
xor eax, eax
test ebx, ebx
mov byte [esp + 8], 0
mov ecx, 0xf
lea edi, [esp + 9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
je 0x40b8c5
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40b8cb
push esi
lea esi, [ebx + 0x135]
mov ecx, 0x41
mov edi, esi
rep stosd dword es:[edi], eax
push 0x104
push esi
stosb byte es:[edi], al
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push str.TEMP
call edi
test eax, eax
jle 0x40b803
cmp eax, 0x104
jae 0x40b803
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40b7d6
sub eax, edx
cmp byte [eax + ebx + 0x134], 0x5c
je 0x40b850
mov edi, esi
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40b7f0
mov ax, word [0x41775c]
mov word [edi], ax
jmp 0x40b850
push 0x104
push esi
push 0x419a74
call edi
test eax, eax
jle 0x40b84a
cmp eax, 0x104
jae 0x40b84a
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40b820
sub eax, edx
cmp byte [eax + ebx + 0x134], 0x5c
je 0x40b850
mov edi, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40b836
mov cx, word [0x41775c]
mov word [edi], cx
jmp 0x40b850
mov dword [esi], 0x5c3a43
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40b855
sub eax, edx
mov edx, 0x104
sub edx, eax
push edx
push str.KASetup.log
push esi
call fcn.0040ce80
push 0x41b174
push esi
call fcn.0040c618
mov esi, eax
add esp, 0x14
test esi, esi
je 0x40b8c4
lea eax, [esp + 0x50]
push eax
call fcn.0040dd0b
lea ecx, [esp + 0x54]
push ecx
call fcn.0040db8b
push eax
push str._Y__m__d__H:_M:_S
lea edx, [esp + 0x1c]
push 0x40
push edx
call fcn.0040db70
lea eax, [esp + 0x24]
push eax
push str.Installation_start_time:__s_n
push esi
call fcn.0040d292
push esi
call fcn.0040c2f0
add esp, 0x28
pop esi
pop edi
pop ebx
add esp, 0x40
ret
push 0x105
push eax
add ebx, 0x135
push ebx
call fcn.0040c870
add esp, 0xc
pop edi
pop ebx
add esp, 0x40
ret

Function at 0x40cb18
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
jne 0x40cb35
call fcn.0040c9cd
mov dword [eax], 0x16
xor eax, eax
jmp 0x40cb9f
push esi
push 0x8c
push 1
call fcn.0040d1d7
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x40cb8a
push esi
call fcn.00410cb0
mov eax, dword [ebp + 0x14]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
pop ecx
mov dword [esi + 0x4c], edi
jne 0x40cb68
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x40ca83
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x40cb9e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.0040bef2
test ebx, ebx
pop ecx
je 0x40cb9c
push ebx
call fcn.0040c9df
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x40dd8d
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x41bae8
call fcn.0040ec74
mov edi, 0x94
mov eax, edi
call fcn.0040d0b0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x420604], ecx
mov eax, dword [esi + 4]
mov dword [0x420610], eax
mov edx, dword [esi + 8]
mov dword [0x420614], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x420608], esi
cmp ecx, 2
je 0x40dded
or esi, 0x8000
mov dword [0x420608], esi
shl eax, 8
add eax, edx
mov dword [0x42060c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40de28
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40de28
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40de40
cmp eax, 0x20b
je 0x40de2d
mov dword [ebp - 0x1c], esi
jmp 0x40de54
cmp dword [ecx + 0x84], 0xe
jbe 0x40de28
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40de4e
cmp dword [ecx + 0x74], 0xe
jbe 0x40de28
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040df7c
pop ecx
test eax, eax
jne 0x40de68
push 0x1c
call fcn.0040dd69
pop ecx
call fcn.00410eaa
test eax, eax
jne 0x40de79
push 0x10
call fcn.0040dd69
pop ecx
call fcn.0041366c
mov dword [ebp - 4], esi
call fcn.0040fc39
test eax, eax
jge 0x40de92
push 0x1b
call fcn.0040dd44
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x421d08], eax
call fcn.0041354a
mov dword [0x42047c], eax
call fcn.004134a8
test eax, eax
jge 0x40deb8
push 8
call fcn.0040dd44
pop ecx
call fcn.00413275
test eax, eax
jge 0x40dec9
push 9
call fcn.0040dd44
pop ecx
push 1
call fcn.00411e7b
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40dedf
push eax
call fcn.0040dd44
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00413218
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40df00
movzx eax, word [ebp - 0x40]
jmp 0x40df03
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00405fd0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40df21
push edi
call fcn.00411fa8
call fcn.00411fca
jmp 0x40df53
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040ecaf
ret