joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4058e0
Capabilities:
Shutdown system

Disassembly:
sub esp, 0xac
mov eax, dword [0x415070]
mov dword [esp + 0xa8], eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 4], 0
mov dword [esp + 0x18], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x24], 2
jne 0x40598b
lea ecx, [esp]
push ecx
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x405940
xor eax, eax
mov ecx, dword [esp + 0xa8]
call fcn.0040851d
add esp, 0xac
ret
lea edx, [esp + 8]
push edx
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x40592b
mov ecx, dword [esp]
push 0
push 0
push 0
lea eax, [esp + 0x10]
push eax
push 0
push ecx
mov dword [esp + 0x1c], 1
mov dword [esp + 0x28], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x40592b
mov edx, dword [esp]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
mov ecx, dword [esp + 0xa8]
neg eax
sbb eax, eax
neg eax
call fcn.0040851d
add esp, 0xac
ret

Function at 0x4059c0
Capabilities:
Create process on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x378
mov eax, dword [0x415070]
mov dword [esp + 0x374], eax
mov al, byte [0x411dd6]
push esi
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push edi
mov byte [esp + 0x60], al
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x61]
rep stosd dword es:[edi], eax
push str.oa4514.exe
stosw word es:[edi], ax
lea ecx, [esp + 0x274]
push str.Launching__s
push ecx
stosb byte es:[edi], al
call esi
xor eax, eax
mov ecx, 0x11
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
mov eax, dword [0x417094]
add esp, 0xc
test eax, eax
mov dword [esp + 0x18], 0x44
mov dword [esp + 0x44], 0x40
je 0x405a48
push str.__q__m
lea edx, [esp + 0x64]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [0x4170a0]
test eax, eax
je 0x405a61
push 0x41284c
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x60]
push ecx
push str.oa4514.exe
push str.SUPPORT
push 0x415720
lea edx, [esp + 0x178]
push str.__s_s_s__s
push edx
call esi
add esp, 0x18
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 0
push 0
push 0x20
push 1
push 0
push 0
lea edx, [esp + 0x188]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x405ac8
mov eax, 1
mov ecx, dword [esp + 0x37c]
call fcn.0040851d
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str.oa4514.exe
lea eax, [esp + 0x274]
push str.Failed_to_launch__s
push eax
call esi
mov ecx, dword [esp + 0x388]
add esp, 0xc
xor eax, eax
call fcn.0040851d
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x405f40
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x114
mov eax, dword [0x415070]
mov dword [esp + 0x110], eax
lea eax, [esp + 0xc]
push eax
call fcn.00402970
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [esp + 0xc]
push ecx
push 1
lea edx, [esp + 8]
push edx
mov dword [esp + 0xc], 0xc
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
mov dword [0x415048], eax
je 0x405fbf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x405fbf
mov eax, 1
mov ecx, dword [esp + 0x110]
call fcn.0040851d
add esp, 0x114
ret
mov ecx, dword [esp + 0x110]
xor eax, eax
call fcn.0040851d
add esp, 0x114
ret

Function at 0x406030
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0x144
mov eax, dword [0x415070]
push ebx
push ebp
mov ebp, dword [esp + 0x150]
push esi
mov dword [esp + 0x14c], eax
lea eax, [esp + 0xc]
push eax
push ebp
xor esi, esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40609e
push edi
mov edi, dword [sym.imp.USER32.dll_CharNextA]
lea ecx, [esp + 0x3c]
push 0x28
push ecx
call fcn.00403000
add esp, 8
test eax, eax
je 0x40608d
push eax
call edi
push eax
call fcn.00403070
add esp, 4
cmp esi, eax
jae 0x40608d
mov esi, eax
lea edx, [esp + 0x10]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x406068
pop edi
push 0x28
push ebp
call fcn.00403000
add esp, 8
test eax, eax
je 0x4060be
inc esi
push esi
push str.__04i_.txt
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ecx, dword [esp + 0x14c]
pop esi
pop ebp
mov eax, 1
pop ebx
call fcn.0040851d
add esp, 0x144
ret
Function at 0x4060e0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
sub esp, 0x24c
mov eax, dword [0x415070]
mov ecx, dword [esp + 0x258]
mov dword [esp + 0x248], eax
mov eax, dword [esp + 0x250]
push edi
mov edi, dword [esp + 0x258]
push eax
lea eax, [esp + 0x14c]
push eax
mov dword [esp + 0xc], ecx
mov byte [ecx], 0
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x148]
push ecx
call fcn.004025d0
add esp, 4
test eax, eax
jne 0x406148
xor eax, eax
pop edi
mov ecx, dword [esp + 0x248]
call fcn.0040851d
add esp, 0x24c
ret
lea edx, [esp + 0x148]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x406188
push 0
lea eax, [esp + 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40618c
mov eax, 1
pop edi
mov ecx, dword [esp + 0x248]
call fcn.0040851d
add esp, 0x24c
ret
test al, 0x10
je 0x406132
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
lea ecx, [esp + 0x154]
push ecx
call ebp
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
mov esi, eax
test esi, esi
jbe 0x4061cd
cmp esi, 0x103
jae 0x4061cd
cmp byte [esp + esi + 0x153], 0x5c
je 0x4061cd
push 0x412614
lea edx, [esp + 0x158]
push edx
call ebx
inc esi
cmp esi, 0x101
jae 0x40627b
push 0x4128e8
lea eax, [esp + 0x158]
push eax
call ebx
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x158]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x40627b
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
mov byte [esp + esi + 0x158], 0
call fcn.004025d0
add esp, 4
test eax, eax
je 0x40627b
push edi
call ebp
add eax, esi
cmp eax, 0x104
jae 0x40627b
push edi
lea eax, [esp + 0x158]
push eax
call ebx
lea ecx, [esp + 0x154]
push 0x104
push ecx
call fcn.00406030
add esp, 8
test eax, eax
je 0x40627b
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x154]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop esi
pop ebp
pop ebx
mov eax, 1
pop edi
mov ecx, dword [esp + 0x248]
call fcn.0040851d
add esp, 0x24c
ret
mov ecx, dword [esp + 0x258]
pop esi
pop ebp
pop ebx
xor eax, eax
pop edi
call fcn.0040851d
add esp, 0x24c
ret
Function at 0x4064f0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0xc4
mov eax, dword [0x415070]
mov dword [esp + 0xc0], eax
mov eax, dword [0x4170cc]
test eax, eax
push esi
jne 0x406713
push edi
xor eax, eax
mov ecx, 0x11
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x64]
push eax
mov dword [esp + 0x24], 0x44
mov dword [esp + 0x50], 0x40
call fcn.004034f0
mov al, byte [esp + 0x68]
add esp, 4
cmp al, 0x22
pop edi
je 0x406587
lea ecx, [esp + 0x60]
push 0x20
push ecx
call fcn.00402f80
add esp, 8
test eax, eax
je 0x406587
lea edx, [esp + 0x60]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
push esi
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x69]
push ecx
call fcn.00409170
add esp, 0xc
inc esi
mov byte [esp + 0x60], 0x22
mov byte [esp + esi + 0x60], 0x22
mov byte [esp + esi + 0x61], 0
push str.__q__r:n
lea edx, [esp + 0x64]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [0x416b64]
test eax, eax
je 0x4065a7
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0
push 0
push 0x20
push 0
push 0
push 0
lea edx, [esp + 0x80]
push edx
push 0
mov dword [0x416b64], 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x40661c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], eax
lea eax, [esp + 0x60]
push eax
call fcn.004034f0
mov edx, dword [esp + 8]
lea ecx, [esp + 0x64]
push ecx
push edx
push 0xb
call fcn.00404680
add esp, 0x10
mov eax, 0xffffff32
pop esi
mov ecx, dword [esp + 0xc0]
call fcn.0040851d
add esp, 0xc4
ret
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [0x417094]
test eax, eax
jne 0x406641
mov ecx, dword [esp + 0xc]
push ecx
call fcn.004062a0
add esp, 4
jmp 0x40664e
mov edx, dword [esp + 0xc]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0xc]
lea eax, [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edx, dword [esp + 0xc]
push edx
call esi
mov eax, dword [esp + 4]
test eax, eax
je 0x406699
cmp eax, 0xbc2
je 0x406699
push 0x20
push 0
call fcn.00402d30
add esp, 8
mov eax, 0xffffff32
pop esi
mov ecx, dword [esp + 0xc0]
call fcn.0040851d
add esp, 0xc4
ret
lea eax, [esp + 8]
push eax
push 0
mov dword [esp + 0x10], 0
call fcn.00403630
add esp, 8
test eax, eax
je 0x4066bc
mov eax, dword [esp + 8]
test eax, eax
je 0x406713
mov eax, dword [0x4170a0]
test eax, eax
jne 0x4066fa
mov eax, dword [0x417094]
test eax, eax
jne 0x4066fa
push 1
push 0x22
push 0
call fcn.00402e10
add esp, 0xc
cmp eax, 6
je 0x4066fa
mov eax, 0x642
pop esi
mov ecx, dword [esp + 0xc0]
call fcn.0040851d
add esp, 0xc4
ret
mov eax, 0xbc2
pop esi
mov ecx, dword [esp + 0xc0]
call fcn.0040851d
add esp, 0xc4
ret
mov ecx, dword [esp + 0xc4]
xor eax, eax
pop esi
call fcn.0040851d
add esp, 0xc4
ret
Function at 0x406790
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x214
mov eax, dword [0x415070]
mov ecx, dword [0x416b60]
mov dword [esp + 0x210], eax
mov eax, 4
cmp ecx, eax
mov dword [esp], 0
mov dword [esp + 4], eax
jne 0x40683a
lea eax, [esp + 0x10c]
push eax
lea ecx, [esp + 0xc]
push ecx
call fcn.004030f0
add esp, 8
test eax, eax
je 0x40683a
call fcn.00404530
test eax, eax
jne 0x40683a
lea edx, [esp]
push edx
push 1
push eax
lea eax, [esp + 0x14]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406814
lea ecx, [esp + 4]
push ecx
push eax
push eax
push eax
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x11c]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp]
test eax, eax
je 0x406822
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
mov ecx, dword [esp + 0x210]
call fcn.0040851d
add esp, 0x214
ret
mov ecx, dword [esp + 0x210]
xor eax, eax
call fcn.0040851d
add esp, 0x214
ret
Function at 0x406c70
Capabilities:
Check if file exists
Copy file
Delete registry value
Get file attributes
Set registry value

Disassembly:
sub esp, 0x110
mov eax, dword [0x415070]
mov dword [esp + 0x10c], eax
mov eax, dword [esp + 0x114]
push ebx
mov ebx, dword [esp + 0x11c]
push ebp
mov dword [esp + 0xc], eax
mov eax, dword [0x416b60]
push esi
test eax, eax
push edi
mov eax, str.SoftwareMicrosoftWindows_NTCurrentVersionFonts
jne 0x406cab
mov eax, str.SoftwareMicrosoftWindowsCurrentVersionFonts
lea ecx, [esp + 0x10]
push ecx
push 2
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x406cc8
xor edi, edi
jmp 0x406ccc
mov edi, dword [esp + 0x10]
push 0x5c
push ebx
mov dword [esp + 0x18], 0
call fcn.00403000
lea edx, [esp + 0x20]
push edx
mov esi, eax
call fcn.00404080
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatA]
add esp, 0xc
test esi, esi
jne 0x406d03
push 0x412614
lea eax, [esp + 0x1c]
push eax
call ebp
mov esi, ebx
push esi
lea ecx, [esp + 0x1c]
push ecx
call ebp
mov eax, dword [esp + 0x12c]
test eax, eax
jne 0x406d26
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x406da3
cmp byte [esi], 0x5c
jne 0x406d2c
inc esi
push esi
call dword [sym.imp.GDI32.dll_RemoveFontResourceA]
push 0
lea eax, [esp + 0x1c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x406d8d
push esi
call dword [sym.imp.GDI32.dll_AddFontResourceA]
test eax, eax
je 0x406d8d
test edi, edi
mov ebp, 1
je 0x406d7a
mov ebx, dword [esp + 0x14]
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push esi
push ebp
push 0
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 0
push 0
push 0x1d
push 0xffff
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x406da7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x14]
push ecx
push eax
push 0x1e
call fcn.00404680
add esp, 0xc
mov ebp, dword [esp + 0x10]
test edi, edi
je 0x406db2
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x11c]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
call fcn.0040851d
add esp, 0x110
ret
Function at 0x406dd0
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x744
mov eax, dword [0x415070]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x754]
mov dword [esp + 0x74c], eax
lea eax, [esp + 0x30]
push edi
xor ebx, ebx
push eax
mov dword [esp + 0x1c], ebx
xor ebp, ebp
call fcn.00402690
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
add esp, 4
lea ecx, [esp + 0x34]
push ecx
push 0x104
lea edx, [esp + 0x140]
push edx
push 0x411dd6
push str.Font
push esi
mov byte [esp + 0x358], bl
mov byte [esp + 0x254], bl
mov byte [esp + 0x150], bl
call edi
lea eax, [esp + 0x34]
push eax
push 0x104
lea ecx, [esp + 0x244]
push ecx
push 0x411dd6
push str.FontAlt
push esi
call edi
lea edx, [esp + 0x34]
push edx
push 0x104
lea eax, [esp + 0x348]
push eax
push 0x411dd6
push str.FontAlt2
push esi
call edi
lea ecx, [esp + 0x34]
push ecx
push 0x14
lea edx, [esp + 0x28]
push edx
push 0x411dd6
push str.Force
push esi
call edi
mov al, byte [esp + 0x20]
cmp al, 0x59
je 0x406ea3
cmp al, 0x79
mov dword [esp + 0x10], ebx
jne 0x406eab
mov dword [esp + 0x10], 1
cmp byte [esp + 0x138], bl
jne 0x406eca
cmp byte [esp + 0x23c], bl
jne 0x406eca
cmp byte [esp + 0x340], bl
je 0x407042
lea eax, [esp + 0x34]
push eax
push 0x104
lea ecx, [esp + 0x654]
push ecx
push 0x411dd6
push str.Path
push esi
call edi
test eax, eax
je 0x407042
lea edx, [esp + 0x34]
push edx
push 0x104
lea eax, [esp + 0x550]
push eax
push 0x411dd6
push str.Version
push esi
call edi
test eax, eax
je 0x407042
lea ecx, [esp + 0x548]
push ecx
call fcn.00403f90
add esp, 4
push 0x415720
lea edx, [esp + 0x448]
push edx
mov edi, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x412614
lea eax, [esp + 0x448]
push eax
call esi
lea ecx, [esp + 0x64c]
push ecx
lea edx, [esp + 0x448]
push edx
call esi
cmp byte [esp + 0x340], bl
mov byte [esp + 0x34], bl
je 0x406f94
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x344]
push ecx
call fcn.004040f0
mov ebp, eax
add esp, 8
cmp ebp, ebx
jne 0x406fe2
cmp byte [esp + 0x23c], bl
je 0x406fba
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x240]
push eax
call fcn.004040f0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x406fe6
jmp 0x406fbe
mov esi, dword [esp + 0x18]
cmp byte [esp + 0x138], bl
je 0x40700d
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x13c]
push edx
call fcn.004040f0
add esp, 8
test eax, eax
je 0x40700d
jmp 0x406fe6
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x10], ebx
je 0x407042
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.00406be0
add esp, 0xc
test eax, eax
je 0x40700d
cmp dword [esp + 0x14], edi
jae 0x407042
cmp ebp, ebx
je 0x40701a
lea eax, [esp + 0x340]
jmp 0x40702c
cmp esi, ebx
lea eax, [esp + 0x23c]
jne 0x40702c
lea eax, [esp + 0x138]
mov ecx, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x448]
push edx
push eax
call fcn.00406c70
add esp, 0xc
mov ecx, dword [esp + 0x750]
pop edi
pop esi
pop ebp
pop ebx
call fcn.0040851d
add esp, 0x744
ret
Function at 0x407120
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x310
mov eax, dword [0x415070]
mov dword [esp + 0x30c], eax
mov eax, dword [0x4170b8]
test eax, eax
push esi
mov esi, dword [esp + 0x318]
jne 0x4071da
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push esi
push 0x104
push 0x416c70
push 0x411dd6
push str.Type
push str.Logging
call edi
push esi
push 0x104
lea eax, [esp + 0x218]
push eax
push str._TEMP_
push str.Path
push str.Logging
call edi
push esi
push 0x104
lea ecx, [esp + 0x114]
push ecx
push str.SetupLog__.txt
push str.Template
push str.Logging
call edi
lea edx, [esp + 8]
push edx
lea eax, [esp + 0x110]
push eax
lea ecx, [esp + 0x218]
push ecx
call fcn.004060e0
add esp, 0xc
test eax, eax
pop edi
je 0x4071f3
lea edx, [esp + 4]
push edx
push 0x416b68
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, 1
pop esi
mov ecx, dword [esp + 0x30c]
call fcn.0040851d
add esp, 0x310
ret
mov al, byte [esp + 4]
test al, al
je 0x407204
lea eax, [esp + 4]
push eax
push 0x1c
jmp 0x407207
push esi
push 0x23
push 0
call fcn.00402e80
mov ecx, dword [esp + 0x31c]
add esp, 0xc
xor eax, eax
pop esi
call fcn.0040851d
add esp, 0x310
ret

Function at 0x407230
Capabilities:
Get file attributes
Read .ini file

Disassembly:
sub esp, 0x108
mov eax, dword [0x415070]
push ebx
push ebp
mov ebp, dword [esp + 0x114]
push edi
push 0x415c28
mov dword [esp + 0x114], eax
call fcn.004025d0
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 4
test eax, eax
je 0x4072a1
push 0x5c
push 0x415c28
call fcn.00402f80
add esp, 8
test eax, eax
jne 0x4072a1
push 0x415c28
push 0x415720
lea eax, [esp + 0x14]
push str._s_s
push eax
call edi
add esp, 0x10
lea ecx, [esp + 0xc]
push ecx
push 0x415c28
call ebx
push 0x415c28
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push 0x415c28
call fcn.00407120
add esp, 4
test eax, eax
je 0x4073c5
call fcn.004047d0
test eax, eax
jne 0x407387
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0x415c28
push 0x104
push 0x416548
push 0x411dd6
push 0x412970
push 0x412970
call esi
test eax, eax
jne 0x40731d
push 0x415c28
push 0x104
push 0x416548
push 0x411dd6
push str.database
push str.setup
call esi
test eax, eax
je 0x407386
push 0x416548
call fcn.004025d0
add esp, 4
test eax, eax
je 0x40736f
cmp byte [0x416548], 0x5c
je 0x40736f
push 0x3a
push 0x416548
call fcn.00402f80
add esp, 8
test eax, eax
jne 0x40736f
push 0x416548
push 0x415720
lea edx, [esp + 0x18]
push str._s_s
push edx
call edi
add esp, 0x10
lea eax, [esp + 0x10]
push eax
push 0x416548
call ebx
push 0x416548
call fcn.00405fe0
add esp, 4
mov dword [0x41707c], 1
pop esi
push 0x415c28
call fcn.00404fa0
add esp, 4
test eax, eax
je 0x4073c5
push ebp
push 0x415c28
call fcn.00405070
add esp, 8
test eax, eax
je 0x4073c5
pop edi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x104]
call fcn.0040851d
add esp, 0x108
ret
mov ecx, dword [esp + 0x110]
pop edi
pop ebp
xor eax, eax
pop ebx
call fcn.0040851d
add esp, 0x108
ret
Function at 0x407ba0
Capabilities:
Create thread
Read .ini file

Disassembly:
sub esp, 0x21c
mov eax, dword [0x415070]
push ebx
push esi
mov esi, dword [esp + 0x22c]
push edi
xor ebx, ebx
mov dword [esp + 0x224], eax
lea eax, [esp + 0x18]
push eax
push ebx
push ebx
push 0x4033b0
push ebx
push ebx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, dword [esp + 0x22c]
cmp edi, ebx
mov dword [0x415044], eax
jne 0x407d09
cmp dword [0x41708c], ebx
jne 0x407d23
lea ecx, [esp + 0x120]
push ecx
call fcn.00406860
add esp, 4
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x407d09
lea edx, [esp + 0x1c]
push ebp
push edx
mov esi, 0x400
call fcn.00402690
mov ebx, dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
add esp, 4
lea esp, [esp]
push esi
push 0x40
call ebx
mov edi, eax
lea eax, [esp + 0x20]
push eax
push esi
push edi
push str.ProductFeatures
call ebp
lea ecx, [esi - 2]
cmp eax, ecx
jb 0x407c6f
push edi
add esi, esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
cmp esi, 0x8000
jbe 0x407c40
push str.MsiQueryFeatureStateA
mov esi, edi
call fcn.00405590
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
pop ebp
test esi, esi
je 0x407cd7
mov al, byte [esi]
test al, al
je 0x407cd7
cmp al, 0x3b
je 0x407cbd
push 0x3d
push esi
call fcn.00402f80
add esp, 8
inc eax
test ebx, ebx
mov esi, eax
je 0x407cbd
push esi
lea edx, [esp + 0x124]
push edx
call ebx
cmp eax, 4
jne 0x407cbd
mov dword [esp + 0xc], 1
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407cc2
sub eax, edx
lea esi, [esi + eax + 1]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x407c85
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x407cfe
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x218]
call fcn.0040851d
add esp, 0x21c
ret
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x22c]
mov eax, dword [0x41708c]
test eax, eax
jne 0x407d23
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407d23
call fcn.00402c70
test eax, eax
je 0x407ce6
push esi
push edi
call fcn.004074f0
mov ecx, dword [esp + 0x22c]
add esp, 8
pop edi
pop esi
pop ebx
call fcn.0040851d
add esp, 0x21c
ret
Function at 0x4094e6
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x412a28
call fcn.00409f90
mov edi, 0x94
mov eax, edi
call fcn.00408760
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 [0x417144], ecx
mov eax, dword [esi + 4]
mov dword [0x417150], eax
mov edx, dword [esi + 8]
mov dword [0x417154], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x417148], esi
cmp ecx, 2
je 0x409546
or esi, 0x8000
mov dword [0x417148], esi
shl eax, 8
add eax, edx
mov dword [0x41714c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x409581
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x409581
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x409599
cmp eax, 0x20b
je 0x409586
mov dword [ebp - 0x1c], esi
jmp 0x4095ad
cmp dword [ecx + 0x84], 0xe
jbe 0x409581
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4095a7
cmp dword [ecx + 0x74], 0xe
jbe 0x409581
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040d12a
pop ecx
test eax, eax
jne 0x4095d9
cmp dword [0x4170e4], 1
jne 0x4095c6
call fcn.0040ca58
push 0x1c
call fcn.0040c8df
push 0xff
call fcn.0040c6aa
pop ecx
pop ecx
call fcn.0040d079
mov dword [ebp - 4], esi
call fcn.0040af72
test eax, eax
jge 0x4095f2
push 0x1b
call fcn.004094bc
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4186e4], eax
call fcn.0040cf52
mov dword [0x4170dc], eax
call fcn.0040ceab
test eax, eax
jge 0x409618
push 8
call fcn.004094bc
pop ecx
call fcn.0040cc6e
test eax, eax
jge 0x409629
push 9
call fcn.004094bc
pop ecx
push 1
call fcn.0040c6df
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40963f
push eax
call fcn.004094bc
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040cc0c
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x409660
movzx eax, word [ebp - 0x40]
jmp 0x409663
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00407d50
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x409681
push edi
call fcn.0040c814
call fcn.0040c840
jmp 0x4096b3
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00409fcb
ret