joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403590
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x218
push esi
push edi
xor eax, eax
mov byte [esp + 0x10], 0
mov ecx, 0x40
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x118], 0
mov ecx, 0x40
lea edi, [esp + 0x119]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
lea eax, [esp + 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x40372e
cmp eax, 0x104
ja 0x40372e
lea eax, [esp + 0x10]
lea edx, [esp + 0x118]
mov ecx, eax
xor edi, edi
mov esi, 0x104
sub edx, ecx
lea ebx, [ebx]
mov cl, byte [edx + eax]
test cl, cl
je 0x40361f
mov byte [eax], cl
inc eax
dec esi
jne 0x403610
jmp 0x403623
test esi, esi
jne 0x403629
dec eax
mov edi, 0x8007007a
test edi, edi
mov byte [eax], 0
jl 0x403649
mov ecx, 0x104
lea eax, [esp + 0x10]
lea esp, [esp]
cmp byte [eax], 0
je 0x403662
inc eax
dec ecx
jne 0x403640
push 0
push 0
push str._Info__Cant_obtain_msi.dll_path__assuming_upgrade_is_necessary
call fcn.00404e60
add esp, 0xc
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
test ecx, ecx
je 0x403649
mov eax, 0x104
sub eax, ecx
push str.MSI.DLL
mov edx, 0x104
sub edx, eax
push edx
lea eax, [esp + eax + 0x18]
push eax
call fcn.00401000
test eax, eax
jl 0x403649
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
jne 0x4036ae
push eax
push eax
push str._Info__Cant_load_msi.dll__assuming_upgrade_is_necessary
call fcn.00404e60
add esp, 0xc
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
call fcn.004043d0
add esp, 0xc
test eax, eax
je 0x4036e6
push 0
push 0
push str._Info__Cant_obtain_version_information__assuming_upgrade_is_necessary
call fcn.00404e60
add esp, 0xc
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xc]
mov eax, ecx
shr eax, 0x10
imul eax, eax, 0x64
movzx ecx, cx
add eax, ecx
mov ecx, dword [ebp + 8]
cmp eax, ecx
jae 0x403715
push ecx
push eax
push str._Info__Windows_Installer_upgrade_is_required.__System_Version___d__Minimum_Version___d._n
call fcn.00404df0
add esp, 0xc
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0
push 0
push str._Info__No_upgrade_is_necessary.__System_version_meets_minimum_requirements_n
call fcn.00404e60
add esp, 0xc
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0
push 0
push str._Info__Cant_obtain_system_directory__assuming_upgrade_is_necessary
call fcn.00404e60
add esp, 0xc
pop edi
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x403750
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x58
push ebx
mov ebx, dword [esp + 0x60]
push esi
push edi
push 0
push ebx
push str._Info__Running_update_package_from______s_n
call fcn.00404e60
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
add esp, 0xc
mov ecx, 0x11
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
push str.__norestart
mov dword [esp + 0x10], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 0x44
mov dword [esp + 0x50], 1
mov word [esp + 0x54], 5
call esi
push ebx
mov edi, eax
call esi
lea edi, [edi + eax + 3]
push edi
call fcn.00405ae8
mov esi, eax
add esp, 4
test esi, esi
jne 0x4037d8
mov dword [esp + 0xc], 0xe
jmp 0x40388e
cmp edi, 0x7fffffff
ja 0x40387d
push str.____
push edi
push esi
call fcn.00401000
test eax, eax
jl 0x40387d
push ebx
push edi
push esi
call fcn.00401100
test eax, eax
jl 0x40387d
push 0x40be00
push edi
push esi
call fcn.00401100
test eax, eax
jl 0x40387d
push str.__norestart
push edi
push esi
call fcn.00401100
test eax, eax
jl 0x40387d
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
push edx
push 0
push 0
push 0x4000000
push 0
push 0
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x403856
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0xc], eax
jmp 0x403885
mov eax, dword [esp + 0x10]
push eax
call fcn.004034f0
add esp, 4
test eax, eax
mov dword [esp + 0xc], eax
jne 0x403885
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0xc]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
jmp 0x403885
mov dword [esp + 0xc], 0x643
push esi
call fcn.00405af6
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x40389f
push eax
call esi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4038aa
push eax
call esi
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
add esp, 0x58
ret
Function at 0x4038c0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x58
push ebx
mov ebx, dword [esp + 0x60]
xor eax, eax
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [esp + 0x10], eax
push edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov ecx, 0x11
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
push ebx
mov dword [esp + 0x14], 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], 0x44
mov dword [esp + 0x54], 1
mov word [esp + 0x58], 5
call esi
mov ebp, dword [esp + 0x70]
push ebp
mov edi, eax
call esi
lea edi, [edi + eax + 9]
push edi
call fcn.00405ae8
mov esi, eax
add esp, 4
test esi, esi
jne 0x403939
mov dword [esp + 0x10], 0xe
jmp 0x403a13
cmp edi, 0x7fffffff
ja 0x403a02
push 0x40be04
push edi
push esi
call fcn.00401000
test eax, eax
jl 0x403a02
push ebx
push edi
push esi
call fcn.00401100
test eax, eax
jl 0x403a02
push 0x40be08
push edi
push esi
call fcn.00401100
test eax, eax
jl 0x403a02
push 0x40be0c
push edi
push esi
call fcn.00401100
test eax, eax
jl 0x403a02
push ebp
push edi
push esi
call fcn.00401160
test eax, eax
jl 0x403a02
push 0x40be14
push edi
push esi
call fcn.00401160
test eax, eax
jl 0x403a02
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x28]
push edx
push 0
push 0
push 0x4000000
push 0
push 0
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x4039db
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
jmp 0x403a0a
mov eax, dword [esp + 0x14]
push eax
call fcn.004034f0
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
jne 0x403a0a
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
jmp 0x403a0a
mov dword [esp + 0x10], 0x643
push esi
call fcn.00405af6
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x403a24
push eax
call esi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x403a2f
push eax
call esi
mov eax, dword [esp + 0x10]
push eax
push str._Info__Verification_of_Update_returned__d_n
call fcn.00404d80
mov eax, dword [esp + 0x18]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
Function at 0x403b00
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ecx
mov eax, dword [esp + 0x14]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push edi
xor ebx, ebx
push eax
mov dword [esp + 0x14], ebx
call esi
mov ecx, dword [esp + 0x28]
push ecx
mov edi, eax
call esi
lea ebp, [edi + eax + 2]
push ebp
call fcn.00405ae8
mov esi, eax
add esp, 4
cmp esi, ebx
jne 0x403b5b
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push edx
call fcn.00402c00
push eax
mov eax, dword [esp + 0x20]
push eax
call fcn.00404380
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0xe
pop ebx
pop ecx
ret
mov ecx, ebp
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x10]
push eax
push esi
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x403bb1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push esi
push 0x17
push edx
mov edi, eax
call fcn.00402c00
push eax
mov eax, dword [esp + 0x28]
push eax
call fcn.00404b90
add esp, 0x14
jmp 0x403cd0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x403bbc
mov byte [eax], 0
cmp ebp, 0x7fffffff
jbe 0x403bd0
mov eax, 0x80070057
and eax, 0xffff
jmp 0x403b8b
mov ecx, dword [esp + 0x28]
push ecx
push ebp
push esi
call fcn.00401100
test eax, eax
jge 0x403be7
and eax, 0xffff
jmp 0x403b8b
lea edi, [ebp + ebp]
push edi
call fcn.00405ae8
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x403c20
mov ecx, dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x20]
call fcn.00402c00
mov edx, dword [esp + 0x1c]
push eax
push edx
call fcn.00404380
add esp, 0xc
mov edi, 0xe
jmp 0x403cd0
lea eax, [esp + 0x10]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov ebp, eax
cmp ebp, edi
jbe 0x403c59
push ebx
call fcn.00405af6
push ebp
call fcn.00405ae8
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x403bfa
lea eax, [esp + 0x10]
push eax
push ebx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov ebp, eax
test ebp, ebp
jne 0x403c86
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x20]
push esi
push 0x17
push ecx
mov ecx, dword [esp + 0x28]
mov edi, eax
call fcn.00402c00
mov edx, dword [esp + 0x24]
push eax
push edx
call fcn.00404b90
add esp, 0x14
jmp 0x403cd0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, dword [esp + 0x1c]
cmp eax, 0xffffffff
mov eax, dword [esp + 0x20]
jne 0x403cb8
push ebx
push 0x1c
push eax
call fcn.00402c00
mov ecx, dword [esp + 0x24]
push eax
push ecx
call fcn.00404b90
add esp, 0x14
mov edi, 2
jmp 0x403cd0
mov edx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x1c]
push ebx
push ebx
push eax
push ecx
push edx
call fcn.00403a50
add esp, 0x18
mov edi, eax
push esi
call fcn.00405af6
add esp, 4
test ebx, ebx
je 0x403ce6
push ebx
call fcn.00405af6
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x404300
Capabilities:
Check mutex on windows

Disassembly:
push str.Global_MSISETUP_2956EBA1_9B5A_4679_8618_357136DA66CA
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
mov ecx, dword [esp + 4]
mov dword [ecx], eax
je 0x404329
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x404329
xor al, al
ret
mov al, 1
ret

Function at 0x4043d0
Capabilities:
Get file version info

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
or eax, 0xffffffff
push esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x18]
push eax
xor ebp, ebp
push ebx
mov dword [esp + 0x14], ebp
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
cmp esi, ebp
je 0x404499
push edi
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
jne 0x404446
mov ebp, 8
test edi, edi
je 0x404420
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40442f
mov ecx, dword [esp + 0x10]
mov dword [eax], ecx
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40443d
mov edx, dword [esp + 0x14]
mov dword [eax], edx
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x14
ret
mov ecx, dword [esp + 0x1c]
push edi
push esi
push ecx
push ebx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x40448c
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x14]
push eax
push 0x40bee0
push edi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x404415
mov eax, dword [esp + 0x20]
test eax, eax
je 0x404415
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
jmp 0x404415
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
jmp 0x404415
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
jmp 0x404421

Function at 0x404530
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9c
push edi
xor eax, eax
mov ecx, 0x25
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
push eax
mov dword [esp + 0xc], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0xc], 5
jae 0x40456b
xor al, al
pop edi
mov esp, ebp
pop ebp
ret
push 0
push 2
push 5
call fcn.004044b0
add esp, 0xc
test al, al
jne 0x4045a1
push 0
push 1
push 5
call fcn.004044b0
add esp, 0xc
test al, al
jne 0x4045a1
push 3
push 0
push 5
call fcn.004044b0
add esp, 0xc
test al, al
je 0x404564
mov al, 1
pop edi
mov esp, ebp
pop ebp
ret

Function at 0x404730
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x40
push edi
xor eax, eax
mov byte [esp + 4], al
mov dword [0x40e040], eax
mov ecx, 0xf
lea edi, [esp + 5]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
lea eax, [esp + 8]
push eax
push str._MSI_WEB_BOOTSTRAP_DEBUG
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
pop edi
je 0x404774
cmp byte [esp], 0x31
jne 0x404774
mov dword [0x40e040], 1
add esp, 0x40
ret
Function at 0x404d80
Capabilities:
Print debug messages

Disassembly:
cmp dword [0x40e040], 0xffffffff
jne 0x404d8e
call fcn.00404730
mov eax, dword [0x40e040]
test eax, eax
je 0x404de7
push ebx
mov ebx, dword [esp + 8]
test ebx, ebx
je 0x404de6
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
add esi, 0xd
push esi
call fcn.00405ae8
mov edi, eax
add esp, 4
test edi, edi
je 0x404de4
mov eax, dword [esp + 0x14]
push eax
push ebx
push esi
push edi
call fcn.004010d0
add esp, 0x10
test eax, eax
push edi
jge 0x404dde
call fcn.00405af6
add esp, 4
pop edi
pop esi
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebx
ret

Function at 0x404df0
Capabilities:
Print debug messages

Disassembly:
cmp dword [0x40e040], 0xffffffff
jne 0x404dfe
call fcn.00404730
mov eax, dword [0x40e040]
test eax, eax
je 0x404e5c
push ebx
mov ebx, dword [esp + 8]
test ebx, ebx
je 0x404e5b
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
add esi, 0x19
push esi
call fcn.00405ae8
mov edi, eax
add esp, 4
test edi, edi
je 0x404e59
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push eax
push ecx
push ebx
push esi
push edi
call fcn.004010d0
add esp, 0x14
test eax, eax
push edi
jge 0x404e53
call fcn.00405af6
add esp, 4
pop edi
pop esi
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebx
ret

Function at 0x404e60
Capabilities:
Print debug messages

Disassembly:
push ecx
cmp dword [0x40e040], 0xffffffff
jne 0x404e6f
call fcn.00404730
mov eax, dword [0x40e040]
test eax, eax
je 0x404ec6
mov eax, dword [esp + 8]
test eax, eax
je 0x404ec6
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
call edi
mov ebp, dword [esp + 0x18]
test ebp, ebp
mov dword [esp + 0xc], eax
je 0x404e9f
push ebp
call edi
mov esi, eax
jmp 0x404ea1
xor esi, esi
mov eax, dword [esp + 0x1c]
test eax, eax
push ebx
je 0x404eb1
push eax
call edi
mov ebx, eax
jmp 0x404eb3
xor ebx, ebx
test esi, esi
jne 0x404ec8
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop ebx
pop edi
pop esi
pop ebp
pop ecx
ret
mov edx, dword [esp + 0x10]
lea ecx, [ebx + esi]
lea edi, [ecx + edx + 1]
push edi
call fcn.00405ae8
mov esi, eax
add esp, 4
test esi, esi
je 0x404ec2
test ebx, ebx
jne 0x404f09
mov eax, dword [esp + 0x18]
push ebp
push eax
push edi
push esi
call fcn.004010d0
add esp, 0x10
test eax, eax
push esi
jge 0x404ebc
call fcn.00405af6
add esp, 4
pop ebx
pop edi
pop esi
pop ebp
pop ecx
ret
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
push ecx
push ebp
push edx
push edi
push esi
call fcn.004010d0
add esp, 0x14
jmp 0x404ef6
Function at 0x404f20
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
push esi
mov esi, dword [esp + 8]
push edi
mov edi, dword [esp + 0x14]
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x404fe7
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x404fe7
push ebx
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x404fb6
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push esi
push 0
push 0
call ebx
mov ecx, dword [esp + 0x24]
mov edi, eax
mov eax, dword [ecx]
cmp edi, eax
jbe 0x404f8d
mov dword [ecx], edi
pop ebp
pop ebx
pop edi
mov eax, 0xea
pop esi
ret
mov ebp, dword [esp + 0x20]
push 0
push 0
push eax
push ebp
push 0xffffffffffffffff
push esi
push 0
push 0
call ebx
test eax, eax
jne 0x404fae
pop ebp
pop ebx
pop edi
mov eax, 0x65b
pop esi
ret
mov ecx, dword [esp + 0x24]
mov dword [ecx], edi
jmp 0x404fcd
mov eax, dword [esp + 0x24]
cmp dword [eax], 1
mov dword [eax], 1
jb 0x404f83
mov ebp, dword [esp + 0x20]
mov byte [ebp], 0
mov edx, dword [esp + 0x1c]
push ebp
push edx
push str._Resource__lpName___s__lpBuf___s_n
call fcn.00404e60
add esp, 0xc
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
ret
push 0
push edi
push str._Resource__lpName___s_NOT_FOUND_n
call fcn.00404e60
add esp, 0xc
pop edi
mov eax, 0x716
pop esi
ret
Function at 0x405bbf
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x40c210
call fcn.0040815c
mov edi, 0x94
mov eax, edi
call fcn.00405b00
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 [0x40e70c], ecx
mov eax, dword [esi + 4]
mov dword [0x40e718], eax
mov edx, dword [esi + 8]
mov dword [0x40e71c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40e710], esi
cmp ecx, 2
je 0x405c1f
or esi, 0x8000
mov dword [0x40e710], esi
shl eax, 8
add eax, edx
mov dword [0x40e714], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x405c5a
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x405c5a
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x405c72
cmp eax, 0x20b
je 0x405c5f
mov dword [ebp - 0x1c], esi
jmp 0x405c86
cmp dword [ecx + 0x84], 0xe
jbe 0x405c5a
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x405c80
cmp dword [ecx + 0x74], 0xe
jbe 0x405c5a
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00406753
pop ecx
test eax, eax
jne 0x405cb2
cmp dword [0x40e6f0], 1
jne 0x405c9f
call fcn.0040792b
push 0x1c
call fcn.004077b4
push 0xff
call fcn.00407445
pop ecx
pop ecx
call fcn.004080d4
mov dword [ebp - 4], esi
call fcn.00407f29
test eax, eax
jge 0x405ccb
push 0x1b
call fcn.00405b9a
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40fca8], eax
call fcn.00407e07
mov dword [0x40e6e8], eax
call fcn.00407d65
test eax, eax
jge 0x405cf1
push 8
call fcn.00405b9a
pop ecx
call fcn.00407b32
test eax, eax
jge 0x405d02
push 9
call fcn.00405b9a
pop ecx
push 1
call fcn.00407475
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x405d18
push eax
call fcn.00405b9a
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00407ad5
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x405d39
movzx eax, word [ebp - 0x40]
jmp 0x405d3c
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401180
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x405d5a
push edi
call fcn.004075a0
call fcn.004075c2
jmp 0x405d8c
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00408197
ret
Function at 0x4074df
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40e74c], esi
push edi
jne 0x4074ff
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x40e748], esi
mov byte [0x40e744], al
jne 0x407565
mov ecx, dword [0x40ec68]
test ecx, ecx
je 0x407546
mov eax, dword [0x40ec64]
sub eax, 4
cmp eax, ecx
jmp 0x40753f
mov eax, dword [eax]
test eax, eax
je 0x407531
call eax
mov eax, dword [0x40ec64]
sub eax, 4
cmp eax, dword [0x40ec68]
mov dword [0x40ec64], eax
jae 0x407529
mov eax, 0x40e020
mov esi, 0x40e028
cmp eax, esi
mov edi, eax
jae 0x407565
mov eax, dword [edi]
test eax, eax
je 0x40755e
call eax
add edi, 4
cmp edi, esi
jb 0x407556
mov eax, 0x40e02c
mov esi, 0x40e030
cmp eax, esi
mov edi, eax
jae 0x407584
mov eax, dword [edi]
test eax, eax
je 0x40757d
call eax
add edi, 4
cmp edi, esi
jb 0x407575
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x40759e
push dword [ebp + 8]
mov dword [0x40e74c], 1
call fcn.00407445
pop ebp
ret

Function at 0x4077b4
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40e448]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x40e300]
je 0x4077e9
inc eax
cmp eax, 0x13
jb 0x4077da
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40e300]
jne 0x40790f
mov eax, dword [0x40e6f0]
cmp eax, 1
je 0x4078e7
cmp eax, edx
jne 0x407819
cmp dword [0x40e054], 1
je 0x4078e7
cmp ecx, 0xfc
je 0x40790f
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40784f
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00409400
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.004085a0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x407883
mov eax, edi
push eax
call fcn.004085a0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40cba0
push edi
call fcn.00405800
add esp, 0x10
push edi
call fcn.004085a0
push dword [esi + 0x40e304]
mov ebx, eax
call fcn.004085a0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00405b00
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00409400
push edi
push ebx
call fcn.00409410
push 0x40cb80
push ebx
call fcn.00409410
push dword [esi + 0x40e304]
push ebx
call fcn.00409410
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00409307
add esp, 0x2c
jmp 0x40790f
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40e304]
push dword [esi]
call fcn.004085a0
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]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.004086c2
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret