joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401000
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 4], 0
cmp dword [ebp + 8], 0x20
jbe 0x401039
mov eax, 0xfffffffc
jmp 0x4011b7
lea eax, [ebp - 0x28]
push eax
call fcn.00401258
add esp, 4
test eax, eax
jne 0x401053
mov eax, 0xfffffffd
jmp 0x4011b7
lea ecx, [ebp - 0x2c]
push ecx
push 0x2001f
push 0
mov edx, dword [ebp - 0x28]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x401082
mov dword [ebp - 0x2c], 0
jmp 0x4011b5
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 8]
push ecx
push 0
push 0x2001f
push 0
push 0
push 0
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x4010ba
mov dword [ebp - 8], 0
jmp 0x4011b3
lea ecx, [ebp - 0x3c]
push ecx
lea edx, [ebp - 0x30]
push edx
push 0
push 0x2001f
push 0
push 0
push 0
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x4010f2
mov dword [ebp - 0x30], 0
jmp 0x4011b1
lea edx, [ebp - 0x3c]
push edx
lea eax, [ebp - 4]
push eax
push 0
push 0x2001f
push 0
push 0
push 0
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x40112a
mov dword [ebp - 4], 0
jmp 0x4011af
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x34], 4
mov ecx, dword [ebp - 0x34]
push ecx
lea edx, [ebp - 0xc]
push edx
push 4
push 0
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 4], 0
je 0x401164
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x30], 0
je 0x401174
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], 0
je 0x401184
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x2c], 0
je 0x401194
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x28]
push eax
call fcn.004011bb
add esp, 4
cmp dword [ebp - 0x38], 0
je 0x4011ab
or eax, 0xffffffff
jmp 0x4011b7
xor eax, eax
jmp 0x4011b7
jmp 0x401154
jmp 0x401154
jmp 0x401154
jmp 0x401154
mov esp, ebp
pop ebp
ret
Function at 0x401902
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 1
mov dword [ebp - 8], 0
mov dword [ebp - 0x38], 4
lea eax, [ebp - 0x24]
push eax
call fcn.00401258
add esp, 4
test eax, eax
jne 0x401950
xor eax, eax
jmp 0x401a8b
lea ecx, [ebp - 0x34]
push ecx
push 0x2001f
push 0
mov edx, dword [ebp - 0x24]
push edx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x40197f
mov dword [ebp - 0x34], 0
jmp 0x401a89
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 4]
push ecx
push 0
push 0x2001f
push 0
push 0
push 0
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x4019b7
mov dword [ebp - 4], 0
jmp 0x401a87
lea ecx, [ebp - 0x40]
push ecx
lea edx, [ebp - 0x30]
push edx
push 0
push 0x2001f
push 0
push 0
push 0
push 0x419050
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x4019f0
mov dword [ebp - 0x30], 0
jmp 0x401a85
lea ecx, [ebp - 0x38]
push ecx
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x28]
push eax
push 0
push 0x41905c
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 8], 1
jne 0x401a1f
mov dword [ebp - 0x2c], 0
jmp 0x401a44
mov dword [ebp - 8], 1
mov edx, dword [ebp - 0x38]
push edx
lea eax, [ebp - 8]
push eax
push 4
push 0
push 0x41906c
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x30], 0
je 0x401a54
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 4], 0
je 0x401a64
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x34], 0
je 0x401a74
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [ebp - 0x24]
push edx
call fcn.004011bb
add esp, 4
mov eax, dword [ebp - 0x2c]
jmp 0x401a8b
jmp 0x401a44
jmp 0x401a44
jmp 0x401a44
mov esp, ebp
pop ebp
ret
Function at 0x401a8f
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x30], 4
lea eax, [ebp - 0x24]
push eax
call fcn.00401258
add esp, 4
test eax, eax
jne 0x401acd
jmp 0x401bda
lea ecx, [ebp - 0x2c]
push ecx
push 0x2001f
push 0
mov edx, dword [ebp - 0x24]
push edx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x401afc
mov dword [ebp - 0x2c], 0
jmp 0x401bd8
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 4]
push ecx
push 0
push 0x2001f
push 0
push 0
push 0
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x401b34
mov dword [ebp - 4], 0
jmp 0x401bd6
lea ecx, [ebp - 0x38]
push ecx
lea edx, [ebp - 0x28]
push edx
push 0
push 0x2001f
push 0
push 0
push 0
push str.Adobe_Gamma
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x401b6a
mov dword [ebp - 0x28], 0
jmp 0x401bd4
mov dword [ebp - 0x30], 4
mov dword [ebp - 8], 0
mov ecx, dword [ebp - 0x30]
push ecx
lea edx, [ebp - 8]
push edx
push 4
push 0
push str.GammaCrashed
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x28], 0
je 0x401ba6
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 4], 0
je 0x401bb6
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x2c], 0
je 0x401bc6
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x24]
push ecx
call fcn.004011bb
add esp, 4
jmp 0x401bda
jmp 0x401b96
jmp 0x401b96
jmp 0x401b96
mov esp, ebp
pop ebp
ret
Function at 0x40211c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov byte [ebp - 0xc], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
push 0x419118
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x402196
push str.GetColorDirectoryA
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40218c
mov edx, dword [ebp + 0x10]
sub edx, 2
mov dword [ebp - 0x14], edx
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 4]
push ecx
push 0
call dword [ebp - 0x10]
test eax, eax
je 0x40218c
push 0x419138
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov byte [ebp - 0xc], 1
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0xc]
and ecx, 0xff
test ecx, ecx
jne 0x402237
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov edx, dword [ebp + 0x10]
sub edx, 0x15
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4021dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
or eax, 0xffffffff
jmp 0x402239
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
movsx eax, byte [edx - 1]
cmp eax, 0x5c
jne 0x4021fb
mov ecx, dword [ebp - 4]
sub ecx, 1
mov dword [ebp - 4], ecx
push 0x32
lea edx, [ebp - 0x50]
push edx
push 0xcab
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
jne 0x402223
push str.Color_
lea ecx, [ebp - 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [ebp - 4]
mov byte [edx], 0
lea eax, [ebp - 0x50]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x407270
Capabilities:
Terminate process

Disassembly:
cmp dword [0x41cec0], 1
jne 0x40727e
call fcn.0040a580
mov eax, dword [esp + 4]
push eax
call fcn.0040a5c0
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x409390
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.00409450
mov eax, dword [0x41cf88]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x4093b4
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 [0x41cf84], 1
mov byte [0x41cf80], bl
jne 0x40940e
mov ecx, dword [0x41e5ec]
test ecx, ecx
je 0x4093fc
mov esi, dword [0x41e5e8]
sub esi, 4
cmp esi, ecx
jb 0x4093fc
mov eax, dword [esi]
test eax, eax
je 0x4093f5
call eax
mov ecx, dword [0x41e5ec]
sub esi, 4
cmp esi, ecx
jae 0x4093e7
push 0x419024
push 0x41901c
call fcn.00409470
add esp, 8
push 0x419030
push 0x419028
call fcn.00409470
add esp, 8
test ebx, ebx
je 0x40942d
call fcn.00409460
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x41cf88], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x409ae0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x41d098]
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 0x409b22
call edi
mov esi, eax
test esi, esi
je 0x409b0c
mov eax, 1
jmp 0x409b1d
call ebp
mov ebx, eax
test ebx, ebx
je 0x409c2f
mov eax, 2
mov dword [0x41d098], eax
cmp eax, 1
jne 0x409bc2
test esi, esi
jne 0x409b3b
call edi
mov esi, eax
test esi, esi
je 0x409c2f
cmp word [esi], 0
mov eax, esi
je 0x409b55
add eax, 2
cmp word [eax], 0
jne 0x409b43
add eax, 2
cmp word [eax], 0
jne 0x409b43
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 0x409bb4
push edi
call fcn.0040e6b0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x409bb4
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 0x409ba6
push ebx
call fcn.00408650
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 0x409c2f
test ebx, ebx
jne 0x409bd3
call ebp
mov ebx, eax
test ebx, ebx
je 0x409c2f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x409beb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409bdb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409bdb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.0040e6b0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x409c0d
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
Function at 0x40a360
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.004084a0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x4197bc], eax
je 0x40a3b8
push 0x74
push 1
call fcn.0040fdf0
mov esi, eax
add esp, 8
test esi, esi
je 0x40a3b8
mov eax, dword [0x4197bc]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40a3b8
push esi
call fcn.0040a3c0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x40a3e0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x4197bc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x40a44e
push 0x74
push 1
call fcn.0040fdf0
mov esi, eax
add esp, 8
test esi, esi
je 0x40a444
mov ecx, dword [0x4197bc]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40a444
push esi
call fcn.0040a3c0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.00407240
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
Function at 0x40a5c0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x4197c8
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x40a5e4
add eax, 8
inc ebp
cmp eax, 0x419858
jb 0x40a5d5
cmp ecx, dword [ebp*8 + 0x4197c8]
jne 0x40a78b
mov eax, dword [0x41cec0]
cmp eax, 1
je 0x40a74d
test eax, eax
jne 0x40a610
cmp dword [0x419384], 1
je 0x40a74d
cmp ecx, 0xfc
je 0x40a78b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40a64b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x40a694
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x4168ac
add ebx, ecx
push ebx
call fcn.00408320
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
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 edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41688c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
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 edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x4197cc]
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 + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.0040fea0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x41e4e0]
test eax, eax
je 0x40a75e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x40a768
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x4197cc]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x40b4f0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x40b51c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x430]
mov eax, ecx
sar eax, 5
lea edi, [eax*4 + 0x41e4e0]
mov eax, ecx
and eax, 0x1f
mov dword [esp + 0x24], edi
mov edx, dword [edi]
lea esi, [eax + eax*8]
shl esi, 2
mov dword [esp + 0x14], esi
test byte [esi + edx + 4], 0x20
je 0x40b557
push 2
push ebp
push ecx
call fcn.00408aa0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40b6b9
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x40b601
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40b5b2
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x40b59f
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x40b582
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b6aa
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x40b5fd
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x40b57e
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40b699
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40b655
cmp eax, 5
jne 0x40b63e
call fcn.00408a00
mov dword [eax], 9
call fcn.00408a10
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00408980
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x40b675
cmp byte [ebp], 0x1a
jne 0x40b675
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.00408a00
mov dword [eax], 0x1c
call fcn.00408a10
mov dword [eax], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40b5fd
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b6ea
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x40b601
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40b601
Function at 0x412400
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.00413630
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
push esi
push edi
xor ebp, ebp
push 1
push ebp
push ebx
call fcn.00408aa0
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x412540
push 2
push ebp
push ebx
call fcn.00408aa0
add esp, 0xc
cmp eax, 0xffffffff
je 0x412540
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x4124e1
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.004135c0
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x412486
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.0040b4f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4124a2
sub esi, eax
test esi, esi
jle 0x4124ba
jmp 0x412477
call fcn.00408a10
cmp dword [eax], 5
jne 0x4124b7
call fcn.00408a00
mov dword [eax], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.004135c0
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.00408aa0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x412527
push 0
push ecx
push ebx
call fcn.00408aa0
add esp, 0xc
push ebx
call fcn.0040f310
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ebp, eax
neg ebp
sbb ebp, ebp
neg ebp
dec ebp
cmp ebp, 0xffffffff
jne 0x412527
call fcn.00408a00
mov dword [eax], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.00408a10
mov dword [eax], esi
push 0
push edi
push ebx
call fcn.00408aa0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1004
ret
Function at 0x414c60
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x414e1e
push 0x3d
push edi
call fcn.004154a0
mov esi, eax
add esp, 8
test esi, esi
je 0x414e1e
cmp edi, esi
je 0x414e1e
mov dl, byte [esi + 1]
mov ecx, dword [0x41cf6c]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x41cf68]
cmp eax, ecx
jne 0x414cb7
push eax
call fcn.00414ef0
add esp, 4
mov dword [0x41cf68], eax
test eax, eax
jne 0x414d32
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x414cde
mov eax, dword [0x41cf70]
test eax, eax
je 0x414cde
call fcn.00413540
test eax, eax
je 0x414d2d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x414cea
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.0040e6b0
add esp, 4
mov dword [0x41cf68], eax
test eax, eax
je 0x414e1e
mov dword [eax], 0
mov eax, dword [0x41cf70]
test eax, eax
jne 0x414d2d
push 4
call fcn.0040e6b0
add esp, 4
mov dword [0x41cf70], eax
test eax, eax
je 0x414e1e
mov dword [eax], 0
mov eax, dword [0x41cf68]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.00414e70
mov esi, eax
add esp, 8
test esi, esi
jl 0x414e2f
cmp dword [ebx], 0
je 0x414e2f
test ebp, ebp
je 0x414e27
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.00408650
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x414d89
mov eax, edi
mov edx, dword [eax + 4]
add eax, 4
mov dword [edi], edx
inc esi
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
jne 0x414d78
lea eax, [esi*4]
push eax
push ebx
call fcn.004152f0
add esp, 8
test eax, eax
je 0x414da3
mov dword [0x41cf68], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x414e16
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.0040e6b0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x414e16
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x10]
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
neg ebp
rep movsb byte es:[edi], byte [esi]
sbb ebp, ebp
mov byte [ebx + eax], 0
lea eax, [ebx + eax + 1]
not ebp
and ebp, eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call fcn.00408650
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [ebx + esi*4], edi
jmp 0x414da7
test ebp, ebp
jne 0x414e16
test esi, esi
jge 0x414e39
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.004152f0
add esp, 8
test eax, eax
je 0x414e1e
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x41cf68], eax
jmp 0x414da7