joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402980
Capabilities:
Check for unmoving mouse cursor
Create process on windows

Disassembly:
push 0xffffffffffffffff
push 0x426e18
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push esi
push edi
mov esi, ecx
call fcn.00425611
mov eax, dword [eax + 0xc]
push 0x40004
push eax
push 0x3e9
call dword [sym.imp.WINMM.dll_PlaySoundA]
push str.NOTEPAD.EXE
lea ecx, [esp + 0xc]
call fcn.0041a9aa
mov dword [esp + 0x24], 0
mov dword [esp + 0xc], vtable.CMenu.0
mov dword [esp + 0x10], 0
mov eax, dword [esi + 0x64]
mov byte [esp + 0x24], 1
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*4]
movsx eax, word [esi + edx*4 + 0x6c]
lea ecx, [esi + edx*4 + 0x6c]
cmp eax, 9
ja case.0x4029fb.4
jmp dword [eax*4 + 0x402b90]
call dword [sym.imp.USER32.dll_CreatePopupMenu]
push eax
lea ecx, [esp + 0x10]
call fcn.0041b735
test eax, eax
je case.0x4029fb.4
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
mov edx, dword [esi + 0x4cc]
mov ecx, dword [esi + 0x4b0]
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.USER32.dll_AppendMenuA]
neg edx
sbb edx, edx
push 0x430340
and edx, 8
push ecx
push edx
push eax
call edi
mov edx, dword [esi + 0x4ec]
mov ecx, dword [esi + 0x4d0]
mov eax, dword [esp + 0x10]
push 0x430334
neg edx
sbb edx, edx
push ecx
and edx, 8
push edx
push eax
call edi
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push 0
push esi
push ecx
jmp 0x402af2
call dword [sym.imp.USER32.dll_CreatePopupMenu]
push eax
lea ecx, [esp + 0x10]
call fcn.0041b735
test eax, eax
je case.0x4029fb.4
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
mov edx, dword [esi + 0x54c]
mov ecx, dword [esi + 0x530]
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.USER32.dll_AppendMenuA]
neg edx
sbb edx, edx
push 0x430340
and edx, 8
push ecx
push edx
push eax
call edi
mov edx, dword [esi + 0x56c]
mov ecx, dword [esi + 0x550]
mov eax, dword [esp + 0x10]
push 0x430334
neg edx
sbb edx, edx
push ecx
and edx, 8
push edx
push eax
call edi
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push 0
push esi
push ecx
push edx
push 0
lea ecx, [esp + 0x20]
call fcn.0041813b
lea ecx, [esp + 0xc]
call fcn.0041b78c
jmp case.0x4029fb.4
push 1
call fcn.00402e90
jmp case.0x4029fb.4
mov ecx, esi
call fcn.00403110
jmp case.0x4029fb.4
add esi, 0x7f4
lea ecx, [esp + 8]
push esi
call fcn.0041ac25
push str.Readme.txt
lea ecx, [esp + 0xc]
call fcn.0041ac25
mov eax, dword [esp + 8]
push 5
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
jmp case.0x4029fb.4
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov dword [esp + 0xc], vtable.CMenu.0
lea ecx, [esp + 0xc]
mov byte [esp + 0x24], 2
call fcn.0041b78c
lea ecx, [esp + 8]
mov dword [esp + 0xc], vtable.CObject.0
mov dword [esp + 0x24], 0xffffffff
call fcn.0041a93c
mov ecx, dword [esp + 0x1c]
pop edi
mov dword fs:[0], ecx
pop esi
add esp, 0x20
ret
Function at 0x403060
Capabilities:
Get common file path

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x690]
lea edi, [esi + 0x690]
mov ecx, dword [eax + 4]
mov edx, dword [ecx + edi + 4]
cmp dword [edx + 0x4c], 0xffffffff
jne 0x4030aa
lea ebx, [esi + 0x590]
lea eax, [esi + 0x8f4]
push ebx
push 0
push 0x43020c
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov ecx, dword [0x42be20]
push ecx
push 2
push ebx
mov ecx, edi
call fcn.00414050
mov edx, dword [esp + 0x10]
add esi, 0x69c
push edx
mov ecx, esi
call fcn.00414540
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4030d9
push 0x403100
push 0xa
mov ecx, esi
call fcn.00414330
mov ecx, eax
call fcn.004030e0
pop edi
pop esi
pop ebx
ret 8
Function at 0x406110
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, dword [esp + 0x10]
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
inc eax
push edi
push eax
mov byte [ebp], 0
mov dword [esp + 0x20], 0
call fcn.0041686e
mov edx, dword [esp + 0x1c]
add esp, 4
lea ecx, [esp + 0x1c]
mov ebx, eax
mov eax, dword [esp + 0x14]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov esi, eax
test esi, esi
jne 0x4061be
mov esi, dword [esp + 0x20]
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x1c]
push ebx
push edx
push eax
mov eax, dword [esp + 0x34]
inc esi
push eax
push ecx
mov dword [esp + 0x30], 1
mov dword [esp + 0x38], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x1c]
mov esi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x4061be
cmp byte [ebx], 0
je 0x4061be
mov eax, dword [esp + 0x20]
mov edi, ebx
dec eax
or ecx, 0xffffffff
mov dword [esp + 0x20], eax
mov byte [ebx + eax], 0
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
call fcn.004168aa
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
ret 0x14

Function at 0x4061e0
Capabilities:
Set registry value

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
lea eax, [esp + 4]
push edi
mov edi, dword [esp + 0x10]
push eax
push esi
push edi
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x406232
lea ecx, [esp + 0x14]
lea edx, [esp + 8]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0x434db4
push 0
push esi
push edi
mov dword [esp + 0x38], 2
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x406262
mov edx, dword [esp + 0x18]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0xc]
push edx
push 1
push eax
mov eax, dword [esp + 0x2c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
pop ecx
ret 0x10

Function at 0x406270
Capabilities:
Set registry value

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
lea eax, [esp + 4]
push edi
mov edi, dword [esp + 0x10]
push eax
push esi
push edi
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x4062c2
lea ecx, [esp + 0x14]
lea edx, [esp + 8]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0x434db4
push 0
push esi
push edi
mov dword [esp + 0x38], 2
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4062eb
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x18]
push eax
mov eax, dword [esp + 0xc]
push ecx
push 4
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
pop ecx
ret 0x14
Function at 0x406440
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push edi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
lea eax, [esp + 4]
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x14]
push eax
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push edx
push 0
mov dword [esp + 0x3c], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov eax, dword [esp + 4]
test eax, eax
je 0x40648d
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
pop edi
add esp, 0x54
ret 4

Function at 0x4064d0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 8
push esi
mov esi, dword [esp + 0x14]
lea eax, [esp + 4]
push edi
mov edi, dword [esp + 0x14]
push eax
push esi
push edi
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x406528
lea ecx, [esp + 0x18]
lea edx, [esp + 8]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0x434db4
push 0
push esi
push edi
mov dword [esp + 0x3c], 2
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x406625
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0xc]
lea ecx, [esp + 0x18]
push eax
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x18]
push ecx
push edx
push 0
mov edi, 4
push esi
push eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x406568
inc dword [esp + 0x18]
jmp 0x406570
mov dword [esp + 0x18], 1
cmp dword [esp + 0x18], 1
ja 0x4065fd
push str.StdOle2
push esi
call fcn.00407c20
add esp, 8
test eax, eax
jne 0x4065f9
push str.MSVBVM50
push esi
call fcn.00407c20
add esp, 8
test eax, eax
jne 0x4065f9
push str.OleAut32
push esi
call fcn.00407c20
add esp, 8
test eax, eax
jne 0x4065f9
push str.OlePro32
push esi
call fcn.00407c20
add esp, 8
test eax, eax
jne 0x4065f9
push str.Atl.DLL
push esi
call fcn.00407c20
add esp, 8
test eax, eax
jne 0x4065f9
push str.MSVCRT
push esi
call fcn.00407c20
add esp, 8
test eax, eax
jne 0x4065f9
push str.MFC42
push esi
call fcn.00407c20
add esp, 8
test eax, eax
je 0x4065fd
inc dword [esp + 0x18]
mov edx, dword [esp + 8]
lea ecx, [esp + 0x18]
push edi
push ecx
push edi
push 0
push esi
push edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
add esp, 8
ret 0xc

Function at 0x4079f0
Capabilities:
Delete file

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x407a07
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x407a09
xor eax, eax
test eax, eax
je 0x407a1a
push eax
call fcn.00409ee0
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x407be0
Capabilities:
Move file

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x407bfc
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x407bfe
xor eax, eax
test eax, eax
je 0x407c0f
push eax
call fcn.00409ee0
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x407ee0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42b1e0
push 0x40b3b8
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 [0x436c68], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x436c64], ecx
shl ecx, 8
add ecx, edx
mov dword [0x436c60], ecx
shr eax, 0x10
mov dword [0x436c5c], eax
call fcn.0040d280
test eax, eax
jne 0x407f4a
push 0x1c
call fcn.00408090
add esp, 4
call fcn.0040a9e0
test eax, eax
jne 0x407f5d
push 0x10
call fcn.00408090
add esp, 4
mov dword [ebp - 4], 0
call fcn.0040d070
call fcn.00409890
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x43828c], eax
call fcn.0040cf10
mov dword [0x436c4c], eax
test eax, eax
je 0x407f90
mov eax, dword [0x43828c]
test eax, eax
jne 0x407f9a
push 0xffffffffffffffff
call fcn.00408d60
add esp, 4
call fcn.0040cc60
call fcn.0040cb70
call fcn.00408d30
mov esi, dword [0x43828c]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x408079
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x407fe1
test al, al
je 0x407fe1
and eax, 0xff
push eax
call fcn.0040cb10
add esp, 4
test eax, eax
je 0x407fbb
inc esi
mov dword [ebp - 0x64], esi
jmp 0x407fbb
cmp byte [esi], 0x22
jne 0x407fea
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x407ffa
cmp al, 0x20
ja 0x407ffa
inc esi
mov dword [ebp - 0x64], esi
jmp 0x407fea
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x40801b
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x408020
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.00408d60
jmp 0x40805e
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 0x407fea
inc esi
mov dword [ebp - 0x64], esi
jmp 0x408079
Function at 0x408da0
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.00408e60
mov eax, dword [0x436c98]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x408dc4
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 [0x436c94], 1
mov byte [0x436c90], bl
jne 0x408e1e
mov ecx, dword [0x438288]
test ecx, ecx
je 0x408e0c
mov esi, dword [0x438284]
sub esi, 4
cmp esi, ecx
jb 0x408e0c
mov eax, dword [esi]
test eax, eax
je 0x408e05
call eax
mov ecx, dword [0x438288]
sub esi, 4
cmp esi, ecx
jae 0x408df7
push 0x43008c
push 0x430084
call fcn.00408e80
add esp, 8
push 0x430098
push 0x430090
call fcn.00408e80
add esp, 8
test ebx, ebx
je 0x408e3d
call fcn.00408e70
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x436c98], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x40a9e0
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.0040c160
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x431790], eax
je 0x40aa38
push 0x74
push 1
call fcn.0040e1a0
mov esi, eax
add esp, 8
test esi, esi
je 0x40aa38
mov eax, dword [0x431790]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40aa38
push esi
call fcn.0040aa40
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 0x40aa60
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 [0x431790]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x40aace
push 0x74
push 1
call fcn.0040e1a0
mov esi, eax
add esp, 8
test esi, esi
je 0x40aac4
mov ecx, dword [0x431790]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40aac4
push esi
call fcn.0040aa40
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.00408090
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
Function at 0x40cf10
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x436f70]
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 0x40cf52
call edi
mov esi, eax
test esi, esi
je 0x40cf3c
mov eax, 1
jmp 0x40cf4d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40d05f
mov eax, 2
mov dword [0x436f70], eax
cmp eax, 1
jne 0x40cff2
test esi, esi
jne 0x40cf6b
call edi
mov esi, eax
test esi, esi
je 0x40d05f
cmp word [esi], 0
mov eax, esi
je 0x40cf85
add eax, 2
cmp word [eax], 0
jne 0x40cf73
add eax, 2
cmp word [eax], 0
jne 0x40cf73
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 0x40cfe4
push edi
call fcn.00408260
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40cfe4
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 0x40cfd6
push ebx
call fcn.00408330
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 0x40d05f
test ebx, ebx
jne 0x40d003
call ebp
mov ebx, eax
test ebx, ebx
je 0x40d05f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40d01b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40d00b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40d00b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00408260
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40d03d
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 0x40d300
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x431b48
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x40d324
add eax, 8
inc ebp
cmp eax, 0x431bd8
jb 0x40d315
cmp ecx, dword [ebp*8 + 0x431b48]
jne 0x40d4cb
mov eax, dword [0x436c54]
cmp eax, 1
je 0x40d48d
test eax, eax
jne 0x40d350
cmp dword [0x431444], 1
je 0x40d48d
cmp ecx, 0xfc
je 0x40d4cb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40d38b
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 0x40d3d4
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 0x42b740
add ebx, ecx
push ebx
call fcn.004108d0
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, 0x42b720
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 + 0x431b4c]
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.00410840
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x438180]
test eax, eax
je 0x40d49e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x40d4a8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x431b4c]
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 0x40faf0
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 0x40fb1c
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 + 0x438180]
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 0x40fb57
push 2
push ebp
push ecx
call fcn.0040f9f0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40fcb9
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x40fc01
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40fbb2
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x40fb9f
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 0x40fb82
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 0x40fcaa
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x40fbfd
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x40fb7e
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40fc99
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40fc55
cmp eax, 5
jne 0x40fc3e
call fcn.00409f60
mov dword [eax], 9
call fcn.00409f70
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00409ee0
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 0x40fc75
cmp byte [ebp], 0x1a
jne 0x40fc75
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.00409f60
mov dword [eax], 0x1c
call fcn.00409f70
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 0x40fbfd
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 0x40fcea
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x40fc01
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40fc01
Function at 0x412c90
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.00407d70
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
push esi
push edi
xor ebp, ebp
push 1
push ebp
push ebx
call fcn.0040f9f0
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x412dd0
push 2
push ebp
push ebx
call fcn.0040f9f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x412dd0
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x412d71
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.004138c0
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x412d16
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.0040faf0
add esp, 0xc
cmp eax, 0xffffffff
je 0x412d32
sub esi, eax
test esi, esi
jle 0x412d4a
jmp 0x412d07
call fcn.00409f70
cmp dword [eax], 5
jne 0x412d47
call fcn.00409f60
mov dword [eax], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.004138c0
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.0040f9f0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x412db7
push 0
push ecx
push ebx
call fcn.0040f9f0
add esp, 0xc
push ebx
call fcn.00410310
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 0x412db7
call fcn.00409f60
mov dword [eax], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.00409f70
mov dword [eax], esi
push 0
push edi
push ebx
call fcn.0040f9f0
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