joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403e80
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x411438
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0xc]
call fcn.00401ec0
mov eax, dword [esi + 0x70]
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 0
call fcn.004028f0
push 0x412348
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x20]
mov bl, 1
push edx
mov byte [esp + 0x30], bl
call fcn.004029d0
mov ecx, dword [esp + 0x30]
push ecx
push eax
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0x30], 2
call fcn.004029d0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x28], 3
call fcn.00402090
lea ecx, [esp + 0x14]
mov byte [esp + 0x24], 2
call fcn.00401e60
lea ecx, [esp + 0x18]
mov byte [esp + 0x24], bl
call fcn.00401e60
mov edi, dword [esp + 0x2c]
xor esi, esi
push esi
push esi
lea eax, [esp + 0x38]
push eax
mov ecx, edi
call fcn.00403280
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], 4
call fcn.00402090
lea ecx, [esp + 0x30]
mov byte [esp + 0x24], bl
call fcn.00401e60
lea ecx, [esp + 0xc]
call fcn.00401cf0
test eax, eax
jne 0x403fb4
lea ecx, [esp + 0x10]
call fcn.00401d00
push eax
lea ecx, [esp + 0x10]
call fcn.00401d10
test eax, eax
je 0x403fa3
push 0
inc esi
push esi
lea ecx, [esp + 0x38]
push ecx
mov ecx, edi
call fcn.00403280
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], 4
call fcn.00402090
lea ecx, [esp + 0x30]
mov byte [esp + 0x24], bl
call fcn.00401e60
lea ecx, [esp + 0xc]
call fcn.00401cf0
test eax, eax
je 0x403f51
jmp 0x403fb4
lea ecx, [esp + 0x10]
call fcn.00401d00
push eax
mov ecx, edi
call fcn.00403690
lea ecx, [esp + 0x10]
mov byte [esp + 0x24], 0
call fcn.00401e60
lea ecx, [esp + 0xc]
mov dword [esp + 0x24], 0xffffffff
call fcn.00401e60
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret 8

Function at 0x4054f0
Capabilities:
Check mutex on windows

Disassembly:
push edi
push str.EPSON_StatusMonitor3_Environment_Check
push 1
push 0
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [edi + 0xb4], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40551b
xor eax, eax
pop edi
ret 8
push ebp
mov ebp, dword [esp + 0xc]
test ebp, ebp
push esi
je 0x4055bb
mov eax, ebp
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405530
sub eax, edx
lea esi, [eax + 1]
push esi
call fcn.00409235
add esp, 4
test eax, eax
mov dword [edi + 0x70], eax
je 0x4055bb
cmp esi, 0x7fffffff
ja 0x405560
push ebp
push esi
push eax
call fcn.00401a40
test eax, eax
je 0x405566
mov eax, dword [edi + 0x70]
push eax
jmp 0x4055ac
mov ebp, dword [esp + 0x14]
test ebp, ebp
je 0x4055a8
mov eax, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405573
sub eax, edx
lea esi, [eax + 1]
push esi
call fcn.00409235
add esp, 4
test eax, eax
mov dword [edi + 0x74], eax
je 0x4055a8
push ebp
push esi
push eax
call fcn.00401ab0
test eax, eax
jne 0x4055a8
mov ecx, edi
call fcn.00402fe0
pop esi
pop ebp
pop edi
ret 8
mov ecx, dword [edi + 0x70]
push ecx
call fcn.00409230
add esp, 4
mov dword [edi + 0x70], 0
pop esi
pop ebp
xor eax, eax
pop edi
ret 8
Function at 0x406290
Capabilities:
Query or enumerate registry key

Disassembly:
push 0xffffffffffffffff
push 0x411781
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebp
mov ebp, ecx
mov dword [esp + 8], 0
mov eax, dword [ebp + 8]
test eax, eax
push esi
jne 0x4062e0
mov esi, dword [esp + 0x30]
push 0x412218
mov ecx, esi
call fcn.004028f0
mov eax, esi
pop esi
pop ebp
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret 0xc
push edi
push 0x412218
lea ecx, [esp + 0x10]
call fcn.004028f0
push 0x100
mov dword [esp + 0x30], 1
call fcn.00408a6f
push 0x100
mov esi, eax
call fcn.00408a6f
add esp, 8
test esi, esi
mov edi, eax
je 0x406389
test edi, edi
je 0x406389
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [ebp + 4]
push edi
push 0
lea edx, [esp + 0x28]
push edx
push esi
push eax
push ecx
mov dword [esp + 0x38], 0x100
mov dword [esp + 0x34], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x406368
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x40635e
push edi
call fcn.00402110
push esi
lea ecx, [esp + 0x10]
call fcn.00402110
push esi
call fcn.00408a6a
push edi
call fcn.00408a6a
mov esi, dword [esp + 0x3c]
add esp, 8
lea edx, [esp + 0xc]
push edx
mov ecx, esi
call fcn.00402890
jmp 0x406399
mov esi, dword [esp + 0x34]
push 0x412218
mov ecx, esi
call fcn.004028f0
lea ecx, [esp + 0xc]
mov byte [esp + 0x2c], 0
mov dword [esp + 0x10], 1
call fcn.00401e60
mov ecx, dword [esp + 0x24]
pop edi
mov eax, esi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x24
ret 0xc

Function at 0x4063d0
Capabilities:
Set registry value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x411798
push eax
mov dword fs:[0], esp
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 8]
test eax, eax
jne 0x406405
xor eax, eax
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xc
ret 8
mov esi, dword [esp + 0x1c]
push esi
lea ecx, [esp + 0x20]
call fcn.004028f0
mov ecx, eax
mov dword [esp + 0x10], 0
call fcn.00401ce0
mov ecx, dword [edi + 4]
inc eax
push eax
mov eax, dword [esp + 0x1c]
push esi
push 1
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
neg esi
sbb esi, esi
lea ecx, [esp + 0x1c]
inc esi
mov dword [esp + 0x10], 0xffffffff
call fcn.00401e60
mov ecx, dword [esp + 8]
pop edi
mov eax, esi
mov dword fs:[0], ecx
pop esi
add esp, 0xc
ret 8

Function at 0x406470
Capabilities:
Set registry value

Disassembly:
mov eax, dword [ecx + 8]
test eax, eax
jne 0x40647c
xor eax, eax
ret 8
mov edx, dword [esp + 4]
push 4
lea eax, [esp + 0xc]
push eax
mov eax, dword [ecx + 4]
push 4
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
neg eax
sbb eax, eax
inc eax
ret 8
Function at 0x4064e0
Capabilities:
Delete registry key

Disassembly:
push 0xffffffffffffffff
push 0x4117c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, dword [ecx + 8]
test eax, eax
mov dword [esp + 4], ecx
jne 0x406516
xor eax, eax
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret 4
mov eax, dword [ecx + 4]
push esi
mov esi, dword [ecx + 0xc]
test esi, esi
mov dword [esp + 0xc], 0x412718
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
jne 0x40653e
mov esi, 0x20019
push ebx
push ebp
mov ebp, dword [esp + 0x34]
lea ecx, [esp + 0x18]
push ecx
push esi
push 0
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
neg eax
sbb eax, eax
inc eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], esi
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], 0
call fcn.00401ec0
push 0
push 0
lea edx, [esp + 0x14]
mov bl, 1
push edx
lea ecx, [esp + 0x20]
mov byte [esp + 0x38], bl
call fcn.00406290
push eax
lea ecx, [esp + 0x38]
mov byte [esp + 0x30], 2
call fcn.00402090
push 0x412218
lea eax, [esp + 0x38]
push eax
call fcn.00401e00
lea ecx, [esp + 0xc]
mov esi, eax
mov byte [esp + 0x2c], bl
call fcn.00401e60
test esi, esi
je 0x40661e
jmp 0x4065c0
lea ecx, [esp + 0x34]
call fcn.00401d00
push eax
lea ecx, [esp + 0x18]
call fcn.004064e0
test eax, eax
je 0x40666b
push 0
push 0
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x20]
call fcn.00406290
push eax
lea ecx, [esp + 0x38]
mov byte [esp + 0x30], 2
call fcn.00402090
push 0x412218
lea edx, [esp + 0x38]
push edx
call fcn.00401e00
lea ecx, [esp + 0xc]
mov esi, eax
mov byte [esp + 0x2c], bl
call fcn.00401e60
test esi, esi
jne 0x4065c0
lea ecx, [esp + 0x34]
mov byte [esp + 0x2c], 0
call fcn.00401e60
mov eax, dword [esp + 0x18]
test eax, eax
mov dword [esp + 0x14], 0x412718
je 0x406643
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 4]
push ebp
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
neg eax
pop ebp
sbb eax, eax
pop ebx
inc eax
pop esi
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret 4
lea ecx, [esp + 0x34]
mov byte [esp + 0x2c], 0
call fcn.00401e60
mov eax, dword [esp + 0x18]
test eax, eax
mov dword [esp + 0x14], 0x412718
je 0x406690
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x24]
pop ebp
pop ebx
xor eax, eax
pop esi
mov dword fs:[0], ecx
add esp, 0x24
ret 4
Function at 0x407677
Capabilities:
Get common file path
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [0x4150b4]
xor edx, edx
push esi
mov esi, dword [ebp + 8]
cmp esi, edx
mov dword [ebp - 4], eax
mov dword [ebp - 0x10c], edx
mov dword [ebp - 0x110], edx
jne 0x4076a8
push 0xd
pop eax
jmp 0x4077c3
test byte [esi + 4], 1
push ebx
push edi
je 0x407778
cmp dword [esi + 0x18], edx
je 0x407778
push 0x41
pop ecx
xor eax, eax
push 1
lea edi, [ebp - 0x108]
rep stosd dword es:[edi], eax
push 0x23
lea eax, [ebp - 0x108]
push eax
push edx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
jne 0x4076ef
mov dword [ebp - 0x10c], 0x10b
jmp 0x407778
push str.EPSONPRINTEREPAUDF01.AUD
push 0x104
lea eax, [ebp - 0x108]
push eax
call fcn.00407200
test eax, eax
je 0x407715
mov dword [ebp - 0x10c], 0xd
jmp 0x407778
xor edi, edi
push edi
push 2
push 2
push edi
push edi
push 0x40000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x407749
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10c], 0x3f5
jmp 0x407778
mov eax, dword [esi + 8]
cmp eax, edi
je 0x407771
push edi
lea ecx, [ebp - 0x110]
push ecx
push eax
push dword [esi + 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x407771
mov dword [ebp - 0x10c], 0x3f5
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x1c]
cmp dword [eax], 0
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
jne 0x4077ae
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x18], 0
je 0x4077b3
push dword [esi + 0x1c]
push 0
call ebx
push eax
call edi
jmp 0x4077b3
mov eax, dword [esi + 0x1c]
dec dword [eax]
push esi
push 0
call ebx
push eax
call edi
mov eax, dword [ebp - 0x10c]
pop edi
pop ebx
mov ecx, dword [ebp - 4]
pop esi
call fcn.00409941
leave
ret 4
Function at 0x407f96
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
xor edi, edi
cmp eax, edi
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], edi
je 0x408040
mov ecx, dword [ebp + 0x10]
cmp ecx, edi
je 0x408040
cmp eax, 0x80000000
mov dword [ecx], edi
je 0x408040
cmp eax, 0x80000005
je 0x408040
cmp eax, 0x80000001
je 0x408040
cmp eax, 0x80000003
je 0x408040
cmp eax, 0x80000002
jne 0x408040
cmp dword [ebp + 8], edi
jne 0x407ff7
cmp dword [ebp + 0x18], edi
jne 0x408040
mov dword [ebp - 0x10], 2
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
call fcn.00407a5f
cmp eax, edi
mov dword [ebp + 0xc], eax
je 0x408040
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x20
push 8
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
cmp ebx, edi
jne 0x40804a
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp + 0xc]
call esi
push 0xd
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x14
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
mov dword [ebx], eax
mov eax, dword [ebp - 8]
mov dword [ebx + 8], eax
add eax, 4
shr eax, 0xc
shl eax, 0xc
add eax, 0xffc
push eax
push 8
mov dword [ebx + 0x14], edi
mov dword [ebx + 0x10], edi
mov dword [ebx + 0xc], eax
mov dword [ebx + 4], ecx
mov dword [ebx + 0x1c], edi
mov dword [ebx + 0x18], edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, edi
jne 0x4080b0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x408040
mov dword [ebx + 0x1c], eax
add eax, 4
cmp dword [ebp - 8], edi
mov dword [ebx + 0x18], eax
je 0x4080db
push edi
lea ecx, [ebp - 0x14]
push ecx
push dword [ebp - 8]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4080db
mov dword [ebp - 0xc], 0xd
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xc], edi
jne 0x4080fe
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 8]
call fcn.00407d02
cmp eax, edi
mov dword [ebp - 0xc], eax
je 0x408131
mov eax, dword [ebx + 0x1c]
cmp dword [eax], edi
jne 0x408124
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebx + 0x1c]
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor ebx, ebx
mov eax, dword [ebp + 0x10]
mov dword [eax], ebx
mov eax, dword [ebp - 0xc]
jmp 0x408043
Function at 0x40973b
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x412910
call fcn.0040b900
mov edi, 0x94
mov eax, edi
call fcn.0040d2a0
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 [0x415f24], ecx
mov eax, dword [esi + 4]
mov dword [0x415f30], eax
mov edx, dword [esi + 8]
mov dword [0x415f34], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x415f28], esi
cmp ecx, 2
je 0x40979b
or esi, 0x8000
mov dword [0x415f28], esi
shl eax, 8
add eax, edx
mov dword [0x415f2c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4097d6
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4097d6
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4097ee
cmp eax, 0x20b
je 0x4097db
mov dword [ebp - 0x1c], esi
jmp 0x409802
cmp dword [ecx + 0x84], 0xe
jbe 0x4097d6
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4097fc
cmp dword [ecx + 0x74], 0xe
jbe 0x4097d6
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040d24c
pop ecx
test eax, eax
jne 0x409816
push 0x1c
call fcn.00409717
pop ecx
call fcn.0040a497
test eax, eax
jne 0x409827
push 0x10
call fcn.00409717
pop ecx
call fcn.0040d1aa
mov dword [ebp - 4], esi
call fcn.0040cfac
test eax, eax
jge 0x409840
push 0x1b
call fcn.004096f2
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4175e4], eax
call fcn.0040ce8a
mov dword [0x415d68], eax
call fcn.0040cde8
test eax, eax
jge 0x409866
push 8
call fcn.004096f2
pop ecx
call fcn.0040cbb5
test eax, eax
jge 0x409877
push 9
call fcn.004096f2
pop ecx
push 1
call fcn.0040c661
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40988d
push eax
call fcn.004096f2
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040cb58
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4098ae
movzx eax, word [ebp - 0x40]
jmp 0x4098b1
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004068d0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4098cf
push edi
call fcn.0040c78e
call fcn.0040c7b0
jmp 0x409901
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040b93b
ret
Function at 0x40c6cb
Capabilities:
Terminate process

Disassembly:
push 8
push 0x4131c0
call fcn.0040b900
push 8
call fcn.0040bee4
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x415f64], esi
jne 0x40c6ff
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x415f60], esi
mov al, byte [ebp + 0x10]
mov byte [0x415f5c], al
cmp dword [ebp + 0xc], edi
jne 0x40c749
cmp dword [0x4165c8], edi
je 0x40c739
mov eax, dword [0x4165c4]
sub eax, 4
mov dword [0x4165c4], eax
cmp eax, dword [0x4165c8]
jb 0x40c739
mov eax, dword [eax]
cmp eax, edi
je 0x40c71a
call eax
jmp 0x40c71a
push 0x415030
mov eax, 0x415028
call fcn.0040c649
pop ecx
push 0x41503c
mov eax, 0x415034
call fcn.0040c649
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40c77a
cmp dword [ebp + 0x10], edi
jne 0x40c788
mov dword [0x415f64], esi
push dword [ebp + 8]
call fcn.0040c607
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40c787
push 8
call fcn.0040be2f
pop ecx
ret
call fcn.0040b93b
ret

Function at 0x40c844
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4150b4]
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 + 0x4157a0]
je 0x40c879
inc eax
cmp eax, 0x13
jb 0x40c86a
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4157a0]
jne 0x40c99f
mov eax, dword [0x415d70]
cmp eax, 1
je 0x40c977
cmp eax, edx
jne 0x40c8a9
cmp dword [0x4150b0], 1
je 0x40c977
cmp ecx, 0xfc
je 0x40c99f
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 0x40c8df
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040ebf0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0040f1c0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40c913
mov eax, edi
push eax
call fcn.0040f1c0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4135c8
push edi
call fcn.0040ecf0
add esp, 0x10
push edi
call fcn.0040f1c0
push dword [esi + 0x4157a4]
mov ebx, eax
call fcn.0040f1c0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040d2a0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040ebf0
push edi
push ebx
call fcn.0040ec00
push 0x4135a8
push ebx
call fcn.0040ec00
push dword [esi + 0x4157a4]
push ebx
call fcn.0040ec00
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0041072b
add esp, 0x2c
jmp 0x40c99f
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4157a4]
push dword [esi]
call fcn.0040f1c0
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.00409941
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40e83b
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.0040d2a0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40e8d6
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x415f24]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x40e8d6
cmp eax, 1
je 0x40e8f7
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40e8d6
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40e8a3
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40e8d2
xor eax, eax
inc eax
jmp 0x40e916
cmp edi, eax
jae 0x40e8da
xor eax, eax
jmp 0x40e916
cmp eax, esi
jae 0x40e8e1
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x415f24]
jmp 0x40e8fa
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40f628
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x4150b4]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x40f659
xor eax, eax
jmp 0x40f7e2
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x4164c0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40f695
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00410ce7
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40f770
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40f7ae
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x40f6f9
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40f6ea
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x40f6ca
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40f739
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40f742
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40f6bb
jmp 0x40f744
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40f7dd
cmp dword [ebp - 0x6c], edi
je 0x40f7ae
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40f7a3
call fcn.0040a766
mov dword [eax], 9
call fcn.0040a76f
mov dword [eax], esi
jmp 0x40f7d8
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40f798
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40f744
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40f744
push dword [ebp - 0x6c]
call fcn.0040a778
pop ecx
jmp 0x40f7d8
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40f7c6
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40f7c6
xor eax, eax
jmp 0x40f7e0
call fcn.0040a766
mov dword [eax], 0x1c
call fcn.0040a76f
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40f7e0
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00409941
add ebp, 0x3a0
leave
ret