joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403f50
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0x364
mov cx, word [0x40ac50]
mov eax, dword [str..inf]
mov edx, dword [str.mdmlcnt.inf]
mov word [esp + 4], cx
mov ecx, dword [0x40ac48]
push ebx
mov dword [esp + 4], eax
mov eax, dword [0x40ac44]
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [esp + 0x24], ecx
push edi
mov dword [esp + 0x20], edx
mov edx, dword [str.mdmlt]
mov dword [esp + 0x24], eax
mov ax, word [0x40ac3c]
lea ecx, [esp + 0x130]
push 0x40d7d0
push ecx
mov dword [esp + 0x20], edx
mov word [esp + 0x24], ax
call esi
mov ebx, dword [esp + 0x378]
lea edx, [esp + 0x130]
push ebx
push edx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [esp + 0x130]
push 0x40aa58
push eax
call edi
lea ecx, [esp + 0x10]
lea edx, [esp + 0x130]
push ecx
push edx
call edi
lea eax, [esp + 0x234]
lea ecx, [esp + 0x130]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x4040c5
lea edx, [esp + 0x20]
lea eax, [esp + 0x260]
push edx
push eax
call fcn.00407bd0
add esp, 8
test eax, eax
je 0x4040ae
lea ecx, [esp + 0x18]
lea edx, [esp + 0x260]
push ecx
push edx
call fcn.00405a30
add esp, 8
test eax, eax
jne 0x4040ae
lea eax, [esp + 0x2c]
push 0x40d7d0
push eax
call esi
lea ecx, [esp + 0x2c]
push ebx
push ecx
call esi
lea edx, [esp + 0x2c]
push 0x40aa58
push edx
call edi
lea eax, [esp + 0x260]
lea ecx, [esp + 0x2c]
push eax
push ecx
call edi
lea edx, [esp + 0x2c]
push 1
push edx
call fcn.004040e0
add esp, 8
lea eax, [esp + 0x2c]
push 2
push eax
call fcn.004040e0
add esp, 8
lea ecx, [esp + 0x2c]
push 3
push ecx
call fcn.004040e0
add esp, 8
lea edx, [esp + 0x2c]
push 4
push edx
call fcn.004040e0
add esp, 8
lea eax, [esp + 0x234]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40400d
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x364
ret
Function at 0x4040e0
Capabilities:
Delete file
Read .ini file
Set file attributes

Disassembly:
sub esp, 0x140
push ebp
mov al, byte [0x40d7d0]
push esi
mov esi, dword [esp + 0x14c]
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push edi
push esi
lea ecx, [esp + 0x14]
push 0x38
lea edx, [esp + 0x17]
push ecx
push edx
push str.Class
push str.Version
mov byte [esp + 0x27], al
mov byte [esp + 0x28], 0
call ebp
lea eax, [esp + 0x10]
push str.Modem
push eax
call fcn.00407bd0
add esp, 8
test eax, eax
je 0x40414d
lea ecx, [esp + 0x10]
push str.WDM_MODEM
push ecx
call fcn.00407bd0
add esp, 8
test eax, eax
jne 0x404238
mov edi, dword [esp + 0x154]
mov byte [esp + 0x10], 0
cmp edi, 1
jne 0x404172
push esi
lea edx, [esp + 0x14]
push 0x38
lea eax, [esp + 0x17]
push edx
push eax
push 0x40abec
jmp 0x404193
cmp edi, 2
je 0x404181
cmp edi, 3
je 0x404181
cmp edi, 4
jne 0x40419a
push esi
lea ecx, [esp + 0x14]
push 0x38
lea edx, [esp + 0x17]
push ecx
push edx
push str.ModemProvider
push str.Strings
call ebp
mov eax, dword [0x40a030]
lea ecx, [esp + 0x10]
push eax
push ecx
call fcn.00407bd0
add esp, 8
test eax, eax
je 0x404244
mov edx, dword [str.LUCENT]
lea eax, [esp + 0x10]
push edx
push eax
call fcn.00407bd0
add esp, 8
test eax, eax
je 0x404244
mov ecx, dword [str.AGERE]
lea edx, [esp + 0x10]
push ecx
push edx
call fcn.00407bd0
add esp, 8
test eax, eax
je 0x404244
mov eax, dword [str.COMPAQ]
lea ecx, [esp + 0x10]
push eax
push ecx
call fcn.00407bd0
add esp, 8
test eax, eax
je 0x404244
mov edx, dword [str.TOSHIBA]
lea eax, [esp + 0x10]
push edx
push eax
call fcn.00407bd0
add esp, 8
test eax, eax
jne 0x404219
cmp edi, 3
je 0x404244
mov eax, dword [0x40d7c8]
test eax, eax
je 0x404238
lea ecx, [esp + 0x10]
push 0x40dfe0
push ecx
call fcn.00407bd0
add esp, 8
test eax, eax
je 0x404244
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x140
ret
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 0xfffffffe
lea edx, [esp + 0x48]
push eax
push esi
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [esp + 0x48]
push 0x40ac54
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push pe_nt_image_headers32
push esi
call edi
lea ecx, [esp + 0x48]
push pe_nt_image_headers32
push ecx
call edi
push esi
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
call esi
lea edx, [esp + 0x48]
push edx
call esi
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x140
ret
Function at 0x4042b0
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x260
mov ecx, dword [0x40ab70]
mov eax, dword [str.NTMPDriver]
mov dword [esp + 0x1c], ecx
mov ecx, dword [str.ltmdm]
push ebp
push esi
push edi
mov dword [esp + 0x18], ecx
mov ecx, 0xc
mov esi, str.SystemCurrentControlSetServicesClassWDM_MODEM
lea edi, [esp + 0x38]
mov dx, word [0x40ab74]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x24], eax
mov al, byte [0x40ab76]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov byte [esp + 0x2e], al
lea eax, [esp + 0x10]
lea ecx, [esp + 0x38]
push eax
push 0x20019
mov word [esp + 0x34], dx
mov dx, word [0x40acc4]
push 0
push ecx
push 0x80000002
mov word [esp + 0x30], dx
movsw word es:[edi], word [esi]
call ebp
test eax, eax
jne 0x40442f
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor esi, esi
lea edx, [esp + 0x34]
lea ecx, [esp + 0x18]
push edx
push 0
push 0
push 0
lea edx, [esp + 0x100]
mov eax, esi
push ecx
push edx
push eax
mov eax, dword [esp + 0x30]
push eax
mov dword [esp + 0x44], 0x100
mov dword [esp + 0x38], pe_nt_image_headers32
inc esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x404423
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x70]
push ecx
push edx
call ebx
lea eax, [esp + 0x70]
push 0x40aa58
push eax
call edi
lea ecx, [esp + 0xf0]
lea edx, [esp + 0x70]
push ecx
push edx
call edi
lea eax, [esp + 0x10]
lea ecx, [esp + 0x70]
push eax
push 0x20019
push 0
push ecx
push 0x80000002
call ebp
test eax, eax
jne 0x40433e
lea edx, [esp + 0x24]
lea eax, [esp + 0x170]
push edx
mov edx, dword [esp + 0x14]
push eax
push 0
lea ecx, [esp + 0x34]
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404413
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x170]
push eax
push ecx
call fcn.00405a30
add esp, 8
test eax, eax
je 0x404413
lea edx, [esp + 0x70]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
dec esi
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40433e
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x260
ret

Function at 0x404440
Capabilities:
Set registry value

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x404494
mov ecx, dword [str.SoftwareMicrosoftWindowsCurrentVersionSetup]
lea eax, [esp + 8]
push eax
push 0xf003f
push 0
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404494
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [esp + 8]
inc eax
push eax
push esi
push 1
push 0
push str.SourcePath
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
ret
Function at 0x404b20
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x260
mov ecx, dword [0x40af64]
push ebp
mov dword [esp + 0x18], ecx
mov cl, byte [0x40af70]
push esi
mov eax, dword [str.matchingdeviceid]
mov edx, dword [0x40af68]
push edi
mov byte [esp + 0x2c], cl
mov ecx, 0xc
mov esi, str.SystemCurrentControlSetServicesClassWDM_MODEM
lea edi, [esp + 0x38]
rep movsd dword es:[edi], dword [esi]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [esp + 0x1c], eax
mov eax, dword [0x40af6c]
mov dword [esp + 0x24], edx
lea edx, [esp + 0x10]
mov dword [esp + 0x28], eax
push edx
push 0x20019
lea eax, [esp + 0x40]
push 0
push eax
push 0x80000002
movsw word es:[edi], word [esi]
call ebp
test eax, eax
jne 0x404ca8
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor esi, esi
lea ecx, [esp + 0x34]
lea edx, [esp + 0x18]
push ecx
push 0
push 0
push 0
lea ecx, [esp + 0x100]
mov eax, esi
push edx
mov edx, dword [esp + 0x28]
push ecx
push eax
push edx
mov dword [esp + 0x3c], 0x100
mov dword [esp + 0x38], pe_nt_image_headers32
inc esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x404c9c
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x70]
push eax
push ecx
call ebx
lea edx, [esp + 0x70]
push 0x40aa58
push edx
call edi
lea eax, [esp + 0xf0]
lea ecx, [esp + 0x70]
push eax
push ecx
call edi
lea edx, [esp + 0x10]
lea eax, [esp + 0x70]
push edx
push 0x20019
push 0
push eax
push 0x80000002
call ebp
test eax, eax
jne 0x404ba0
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x170]
push ecx
mov ecx, dword [esp + 0x14]
push edx
push eax
push eax
lea eax, [esp + 0x30]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404c8c
lea edx, [esp + 0x170]
push str.11C1
push edx
call fcn.00405a30
add esp, 8
test eax, eax
jne 0x404c7b
lea eax, [esp + 0x170]
push str.11c1
push eax
call fcn.00405a30
add esp, 8
test eax, eax
je 0x404c8c
lea ecx, [esp + 0x70]
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
dec esi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x404ba0
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x260
ret
Function at 0x404ff0
Capabilities:
Delete directory
Delete registry key
Delete registry value
Persist via run registry key

Disassembly:
sub esp, 0x138
mov ecx, 0xb
push ebx
push esi
push edi
mov esi, str.SOFTWAREMicrosoftWindowsCurrentVersionRun
lea edi, [esp + 0x10]
mov ebx, dword [sym.imp.USER32.dll_FindWindowA]
rep movsd dword es:[edi], dword [esi]
push str.TrayIconHandler
push 0
movsw word es:[edi], word [esi]
call ebx
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
test eax, eax
je 0x40503a
push 0
push 0
push 0x10
push eax
call esi
push 0x3e8
call edi
push str.LTMOH
push 0
call ebx
test eax, eax
je 0x405057
push 0
push 0
push 0x10
push eax
call esi
push 0x3e8
call edi
push str.Dell_Modem_On_Hold
push 0
call ebx
test eax, eax
je 0x405074
push 0
push 0
push 0x10
push eax
call esi
push 0x3e8
call edi
call fcn.004051b0
mov edi, 0x40e6c0
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x40]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.ltmoh.log
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x44]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ltmoh
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x44]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004037a0
add esp, 8
lea ecx, [esp + 0x40]
push str.ltmoh.exe
push ecx
call fcn.004037a0
add esp, 8
lea edx, [esp + 0x40]
push str.mohapi.dll
push edx
call fcn.004037a0
add esp, 8
lea eax, [esp + 0x40]
push str.ltmoh.ini
push eax
call fcn.004037a0
add esp, 8
lea ecx, [esp + 0x40]
push str.mfc42.dll
push ecx
call fcn.004037a0
add esp, 8
lea edx, [esp + 0x40]
push str.mohhelp.chm
push edx
call fcn.004037a0
add esp, 8
lea eax, [esp + 0x40]
push 0x40b0c8
push eax
call fcn.004037a0
add esp, 8
lea ecx, [esp + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
lea edx, [esp + 0xc]
lea eax, [esp + 0x10]
push edx
push 0xf003f
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405186
mov ecx, dword [esp + 0xc]
push str.LtMoh
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstallLTMOH
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
call fcn.00405250
pop edi
pop esi
pop ebx
add esp, 0x138
ret
Function at 0x4051b0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
lea eax, [esp + 4]
push eax
push 0xf003f
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4051fb
mov edx, dword [esp + 4]
lea ecx, [esp]
push ecx
push 0x40e6c0
push eax
push eax
push str.ProgramFilesDir
push edx
mov dword [esp + 0x18], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
add esp, 8
ret
mov al, byte [0x40e120]
mov cl, byte [0x40e121]
push edi
mov byte [0x40e6c0], al
mov byte [0x40e6c1], cl
mov edi, str.PROGRA1
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push esi
mov esi, edi
mov edx, ecx
mov edi, 0x40e6c0
or ecx, 0xffffffff
mov byte [0x40e6c2], 0
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]
pop esi
pop edi
add esp, 8
ret

Function at 0x405250
Capabilities:
Delete directory
Delete file
Delete registry key
Print debug messages
Query or enumerate registry value
Set file attributes

Disassembly:
sub esp, 0x130
mov eax, dword [str.LinkName]
push esi
push edi
mov ecx, 5
mov esi, str.SOFTWARELucentMOH
lea edi, [esp + 0x20]
mov dl, byte [0x40b1a0]
mov dword [esp + 0x14], eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x40b19c]
lea eax, [esp + 0xc]
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x20]
push eax
push ecx
push 0x80000002
mov byte [esp + 0x28], dl
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40533e
lea edx, [esp + 8]
lea eax, [esp + 0x34]
push edx
lea ecx, [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x20]
push 0
push edx
push eax
mov dword [esp + 0x28], 1
mov dword [esp + 0x20], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405333
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x34]
push pe_nt_image_headers32
push ecx
call esi
lea edx, [esp + 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 8]
test eax, eax
jle 0x405333
mov cl, byte [esp + eax + 0x34]
mov byte [esp + eax + 0x34], 0
cmp cl, 0x5c
je 0x405311
dec eax
test eax, eax
jg 0x4052fc
jmp 0x405333
lea eax, [esp + 0x34]
push pe_nt_image_headers32
push eax
call esi
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea edx, [esp + 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x20]
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
pop edi
pop esi
add esp, 0x130
ret
Function at 0x405460
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push esi
push edi
test ebx, ebx
je 0x4054d1
push ebx
call fcn.00405590
add esp, 4
test eax, eax
jne 0x40549f
mov dword [0x40d7e8], 0xf
mov dword [0x40d7e4], 0xd
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x14]
add bl, 0x40
push 0x104
push edx
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], 0x3a
mov byte [esp + 0x1e], 0x2e
mov byte [esp + 0x1f], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x4054e1
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x405577
inc eax
cmp eax, 0x104
ja 0x405577
mov edx, dword [esp + 0x120]
mov ecx, dword [esp + 0x124]
test edx, edx
jne 0x405530
cmp eax, ecx
jg 0x40550d
mov eax, ecx
push eax
call fcn.00405b70
mov edx, eax
add esp, 4
test edx, edx
jne 0x40554a
mov dword [0x40d7e4], 0xc
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, ecx
jle 0x40554a
mov dword [0x40d7e4], 0x22
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
mov eax, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10c
ret

Function at 0x405590
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x40559e
mov eax, 1
ret
add al, 0x40
mov byte [esp + 5], 0x3a
mov byte [esp + 4], al
lea eax, [esp + 4]
push eax
mov byte [esp + 0xa], 0x5c
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x4055cd
cmp eax, 1
je 0x4055cd
mov eax, 1
ret
xor eax, eax
ret

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

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4055f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00405f30
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x405616
test byte [esp + 8], 2
je 0x405616
mov dword [0x40d7e4], 0xd
mov dword [0x40d7e8], 5
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x405c20
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x407688
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x40d7fc], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x40d7f8], ecx
shl ecx, 8
add ecx, edx
mov dword [0x40d7f4], ecx
shr eax, 0x10
mov dword [0x40d7f0], eax
call fcn.00406260
test eax, eax
jne 0x405c8a
push 0x1c
call fcn.00405dc0
add esp, 4
mov dword [ebp - 4], 0
call fcn.00407390
call fcn.00407380
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40f254], eax
call fcn.00406f50
mov dword [0x40d7d8], eax
test eax, eax
je 0x405cbd
mov eax, dword [0x40f254]
test eax, eax
jne 0x405cc7
push 0xffffffffffffffff
call fcn.00405e20
add esp, 4
call fcn.00406ca0
call fcn.00406bb0
call fcn.00405df0
mov esi, dword [0x40f254]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x405da6
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x405d0e
test al, al
je 0x405d0e
and eax, 0xff
push eax
call fcn.00406b50
add esp, 4
test eax, eax
je 0x405ce8
inc esi
mov dword [ebp - 0x64], esi
jmp 0x405ce8
cmp byte [esi], 0x22
jne 0x405d17
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x405d27
cmp al, 0x20
ja 0x405d27
inc esi
mov dword [ebp - 0x64], esi
jmp 0x405d17
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x405d48
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x405d4d
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.00405e20
jmp 0x405d8b
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x405d17
inc esi
mov dword [ebp - 0x64], esi
jmp 0x405da6

Function at 0x405e60
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x40d82c]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x405e7f
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x40d828], 1
mov byte [0x40d824], bl
jne 0x405ed9
mov ecx, dword [0x40f24c]
test ecx, ecx
je 0x405ec7
mov esi, dword [0x40f248]
sub esi, 4
cmp esi, ecx
jb 0x405ec7
mov eax, dword [esi]
test eax, eax
je 0x405ec0
call eax
mov ecx, dword [0x40f24c]
sub esi, 4
cmp esi, ecx
jae 0x405eb2
push 0x40a014
push 0x40a010
call fcn.00405f10
add esp, 8
push 0x40a01c
push 0x40a018
call fcn.00405f10
add esp, 8
test ebx, ebx
jne 0x405f00
push ebp
mov dword [0x40d82c], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x406f50
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x40d970]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x406f92
call edi
mov esi, eax
test esi, esi
je 0x406f7c
mov eax, 1
jmp 0x406f8d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40709f
mov eax, 2
mov dword [0x40d970], eax
cmp eax, 1
jne 0x407032
test esi, esi
jne 0x406fab
call edi
mov esi, eax
test esi, esi
je 0x40709f
cmp word [esi], 0
mov eax, esi
je 0x406fc5
add eax, 2
cmp word [eax], 0
jne 0x406fb3
add eax, 2
cmp word [eax], 0
jne 0x406fb3
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x407024
push edi
call fcn.00405b70
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x407024
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x407016
push ebx
call fcn.00405fa0
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x40709f
test ebx, ebx
jne 0x407043
call ebp
mov ebx, eax
test ebx, ebx
je 0x40709f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40705b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40704b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40704b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00405b70
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40707d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret