joyce8/EMBER2024-capa huggingface dataset:
Function at 0x67c129d0
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x144]
test eax, eax
je 0x67c12a08
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
leave
ret
Function at 0x67c183d0
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 8]
test byte [0x67c213b0], 8
jne 0x67c184d0
lea eax, [ebx + 0xb0]
mov dword [ebp - 0x1c], eax
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebx + 0xc8]
sub esp, 4
test eax, eax
je 0x67c18420
mov edx, dword [eax + 0x18]
test edx, edx
je 0x67c184b0
test byte [0x67c213b0], 4
jne 0x67c18500
mov esi, dword fs:[0x18]
mov dword [esp + 8], eax
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov eax, dword [ebx + 0x80]
mov dword [ebx + 0xc8], 0
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov eax, dword [ebx + 0x7c]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0x7c], 0
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
xor eax, eax
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [eax + 0x14]
test ecx, ecx
je 0x67c18420
test byte [0x67c213b0], 4
je 0x67c18420
jmp 0x67c18500
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0x67c32f74
mov dword [esp + 8], str.DSOUND_PrimaryDestroy
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 3
call fcn.67c16440
jmp 0x67c183e9
mov eax, dword [eax + 0x14]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.Destroying_primary_buffer_while_references_held___lu__lu__n
mov dword [esp + 0x14], eax
mov dword [esp + 8], str.DSOUND_PrimaryDestroy
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 2
call fcn.67c16440
mov eax, dword [ebx + 0xc8]
jmp 0x67c18420
Function at 0x67c18540
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov esi, dword [ebp + 8]
cmp word [esi], 1
je 0x67c18610
movzx eax, word [esi + 0x10]
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
add eax, 0x12
mov dword [esp + 8], eax
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x67c1865f
movzx eax, word [esi + 0x10]
mov dword [esp + 4], esi
mov dword [esp], ebx
add eax, 0x12
mov dword [esp + 8], eax
call sub.ucrtbase.dll_memcpy
movzx eax, word [ebx]
cmp ax, 1
je 0x67c185ec
cmp ax, 0xfffe
je 0x67c185c0
lea esp, [ebp - 8]
mov eax, ebx
pop ebx
pop esi
pop ebp
ret
mov ecx, dword [0x67c29614]
cmp dword [ebx + 0x18], ecx
jne 0x67c185b1
mov ecx, dword [0x67c29618]
cmp dword [ebx + 0x1c], ecx
jne 0x67c185b1
mov ecx, dword [0x67c2961c]
cmp dword [ebx + 0x20], ecx
jne 0x67c185b1
mov ecx, dword [0x67c29620]
cmp dword [ebx + 0x24], ecx
jne 0x67c185b1
movzx eax, word [ebx + 2]
movzx edx, word [ebx + 0xe]
imul eax, edx
sar eax, 3
mov word [ebx + 0xc], ax
lea esp, [ebp - 8]
mov eax, ebx
pop ebx
pop esi
pop ebp
ret
mov dword [esp + 8], 0x12
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x67c1865f
mov eax, dword [esi]
mov dword [ebx], eax
mov eax, dword [esi + 4]
mov dword [ebx + 4], eax
mov eax, dword [esi + 8]
mov dword [ebx + 8], eax
mov eax, dword [esi + 0xc]
mov dword [ebx + 0xc], eax
xor eax, eax
mov word [ebx + 0x10], ax
jmp 0x67c185a2
xor ebx, ebx
jmp 0x67c185b1
Function at 0x67c19d00
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
mov ebx, edx
sub esp, 0x3c
mov edi, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [eax + 0x1c]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
call edi
sub esp, 0x20
mov dword [ebp - 0x1c], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi + 0x18]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
call edi
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
mov eax, dword [esi]
sub esp, 0x20
mov ecx, dword fs:[0x18]
mov dword [ebx], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x28], ecx
mov dword [ebx + 4], eax
mov eax, dword [esi + 8]
mov dword [ebx + 8], eax
mov eax, dword [esi + 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [esi + 0x10]
mov dword [ebx + 0x10], eax
mov eax, dword [esi + 0x14]
mov dword [ebx + 0x14], eax
mov eax, dword [esi + 0x24]
mov dword [esp + 8], edx
mov edx, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x20], 0x67c213c0
mov dword [esp + 4], 0
mov eax, dword [ecx + 0x30]
mov dword [ebp - 0x24], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edx
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov dword [ebx + 0x1c], eax
mov eax, dword [ebp - 0x20]
sub esp, 0xc
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edx
mov edx, dword [ebx + 0x1c]
mov dword [ebx + 0x18], eax
sub esp, 0xc
test eax, eax
je 0x67c19ed0
test edx, edx
je 0x67c19ed0
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi + 0x1c]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
call edi
mov eax, dword [ebp - 0x20]
sub esp, 0x20
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi + 0x18]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
call edi
mov eax, 1
sub esp, 0x20
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], edx
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], 0
mov edi, dword fs:[0x18]
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebx + 0x18]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov dword [ebx + 0x18], 0
xor eax, eax
mov dword [ebx + 0x1c], 0
sub esp, 0xc
jmp 0x67c19ebe
Function at 0x67c1fa70
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
mov ebx, edx
sub esp, 0x22c
mov eax, dword [0x67c450e0]
test eax, eax
je 0x67c1fb28
mov dword [esp], ebx
call eax
mov dword [ebx + 8], eax
sub esp, 4
test eax, eax
jns 0x67c1fab0
mov eax, dword [ebx]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [ebp - 0x220]
mov dword [esp + 8], 0x104
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
mov eax, dword [ebx]
sub esp, 0xc
mov edx, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], str.MODULE
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0xc
mov dword [esp + 8], 0x104
mov dword [esp + 4], edi
mov dword [esp], str.SystemRoot
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
mov eax, dword [ebx]
sub esp, 0xc
mov edx, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], str.SystemRoot
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0xc
jmp 0x67c1fa9c
mov dword [esp], str.atl100.dll
call dword [sym.imp.kernel32.dll_LoadLibraryW]
sub esp, 4
test eax, eax
je 0x67c1fb5d
mov dword [esp + 4], 0x67c3d4ac
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [0x67c450e0], eax
sub esp, 8
test eax, eax
jne 0x67c1fa8d
mov dword [ebx + 8], 0x80004002
xor eax, eax
jmp 0x67c1fa9e
Function at 0x403340
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
mov eax, str.Unknown_error
je 0x403350
mov eax, esi
push 0
push str.SQLAnywhere_Fatal_Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
test esi, esi
je 0x40336d
push esi
call fcn.004071a6
add esp, 4
push 1
call fcn.0040783e
pop esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x404cd0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xd0
push ebx
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push esi
push edi
mov ebx, 0x416118
jmp 0x404cf0
mov ecx, 0xa
mov esi, str.SoftwareSybaseAdaptive_Server_Anywhere
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404d06
mov ax, word [0x411204]
mov word [edi], ax
mov eax, dword [esp + 0xe4]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404d20
lea edi, [esp + 0x18]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x404d30
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebx]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x24]
push edx
push eax
call ebp
test eax, eax
jne 0x404daa
mov edx, dword [esp + 0xec]
lea ecx, [esp + 0xf0]
push ecx
mov ecx, dword [esp + 0xec]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x404daa
mov ecx, dword [esp + 0xf4]
cmp dword [esp + 0x14], ecx
je 0x404dc6
add ebx, 4
cmp ebx, 0x416120
jl 0x404cf0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd0
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xd0
ret

Function at 0x406d4a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4168f0]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
je 0x406dc5
push ebx
call fcn.00406d13
test eax, eax
pop ecx
jne 0x406d97
call fcn.004086a3
mov dword [eax], 0xf
call fcn.0040869a
mov dword [eax], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop ebx
call fcn.0040b859
leave
ret
and byte [ebp + 0xb], 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10c]
push eax
push 0x104
lea eax, [ebp + 8]
add bl, 0x40
push eax
mov byte [ebp + 8], bl
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x2e
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x406dd7
lea eax, [ebp - 0x10c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x406d87
inc eax
cmp eax, 0x104
ja 0x406d87
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x406e0f
cmp eax, dword [ebp + 0x10]
jg 0x406df2
mov eax, dword [ebp + 0x10]
push eax
call fcn.004065fe
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x406e24
call fcn.0040869a
mov dword [eax], 0xc
jmp 0x406d87
cmp eax, dword [ebp + 0x10]
jle 0x406e24
call fcn.0040869a
mov dword [eax], 0x22
jmp 0x406d87
lea eax, [ebp - 0x10c]
push eax
push ecx
call fcn.0040b730
pop ecx
pop ecx
jmp 0x406d89
Function at 0x40776b
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 8
call fcn.00408dda
xor esi, esi
inc esi
cmp dword [0x417924], esi
pop ecx
jne 0x407793
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x417920], esi
mov byte [0x41791c], al
jne 0x4077f9
mov ecx, dword [0x4180ec]
test ecx, ecx
je 0x4077da
mov eax, dword [0x4180e8]
sub eax, 4
cmp eax, ecx
jmp 0x4077d3
mov eax, dword [eax]
test eax, eax
je 0x4077c5
call eax
mov eax, dword [0x4180e8]
sub eax, 4
cmp eax, dword [0x4180ec]
mov dword [0x4180e8], eax
jae 0x4077bd
mov eax, 0x415028
mov esi, 0x415030
cmp eax, esi
mov edi, eax
jae 0x4077f9
mov eax, dword [edi]
test eax, eax
je 0x4077f2
call eax
add edi, 4
cmp edi, esi
jb 0x4077ea
mov eax, 0x415034
mov esi, 0x415038
cmp eax, esi
mov edi, eax
jae 0x407818
mov eax, dword [edi]
test eax, eax
je 0x407811
call eax
add edi, 4
cmp edi, esi
jb 0x407809
cmp dword [ebp + 0x10], 0
pop edi
pop esi
je 0x407829
push 8
call fcn.00408d46
jmp 0x40783b
push dword [ebp + 8]
mov dword [0x417924], 1
call fcn.004076c4
pop ecx
pop ebp
ret

Function at 0x40787e
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40789e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004086ac
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x4078c1
test byte [esp + 8], 2
je 0x4078c1
call fcn.0040869a
mov dword [eax], 0xd
call fcn.004086a3
mov dword [eax], 5
jmp 0x40789a
xor eax, eax
ret
Function at 0x4081d2
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x408398
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x417fc0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x408398
test cl, 0x48
je 0x408238
mov al, byte [eax + 5]
cmp al, 0xa
je 0x408238
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40828a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x408272
call fcn.0040869a
mov dword [eax], 9
call fcn.004086a3
mov dword [eax], esi
jmp 0x408282
cmp eax, 0x6d
je 0x408398
push eax
call fcn.004086ac
pop ecx
or eax, 0xffffffff
jmp 0x40839a
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x408393
test edx, edx
je 0x4082ad
cmp byte [ebx], 0xa
jne 0x4082ad
or al, 4
jmp 0x4082af
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x40838d
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40837d
cmp al, 0xd
je 0x4082e3
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40836f
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x4082fd
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x4082f8
add dword [ebp + 0x10], 2
jmp 0x408351
mov dword [ebp + 0x10], eax
jmp 0x40836b
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x408325
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40836b
cmp dword [ebp - 0xc], 0
je 0x40836b
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x408346
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x408351
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40836e
cmp ebx, dword [ebp + 0xc]
jne 0x408356
cmp byte [ebp - 1], 0xa
jne 0x408356
mov byte [ebx], 0xa
jmp 0x40836e
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040c91a
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40836f
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x4082c7
jmp 0x40838d
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x40838d
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x40839a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40844a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x4168f0]
xor eax, dword [ebp + 4]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
jne 0x408473
xor eax, eax
jmp 0x4085e1
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x417fc0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x4084a6
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.004079e2
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x408578
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x4085b3
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x420]
mov dword [ebp - 0xc], edi
cmp ecx, dword [ebp + 0x10]
jae 0x408501
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4084f2
inc dword [ebp - 0x18]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0xc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x400
jl 0x4084d5
mov edi, eax
lea eax, [ebp - 0x420]
sub edi, eax
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x408541
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x40854a
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x4084c6
jmp 0x40854c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x4085dc
cmp dword [ebp - 8], edi
je 0x4085b3
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x4085a5
call fcn.0040869a
mov dword [eax], 9
call fcn.004086a3
mov dword [eax], esi
jmp 0x4085ae
push edi
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40859a
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x40854c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x40854c
push dword [ebp - 8]
call fcn.004086ac
pop ecx
or eax, 0xffffffff
jmp 0x4085df
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4085c8
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x4085c8
xor eax, eax
jmp 0x4085df
call fcn.0040869a
mov dword [eax], 0x1c
call fcn.004086a3
mov dword [eax], edi
jmp 0x4085ae
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.0040b859
leave
ret
Function at 0x409a00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4168f0]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4166b0]
je 0x409a2d
inc eax
cmp eax, 0x12
jb 0x409a1e
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4166b0]
jne 0x409b61
mov eax, dword [0x4178d8]
cmp eax, 1
je 0x409b3c
cmp eax, edx
jne 0x409a5d
cmp dword [0x416174], 1
je 0x409b3c
cmp ecx, 0xfc
je 0x409b61
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x409a96
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.0040b730
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.0040aaf0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x409ad8
lea eax, [ebp - 0x10c]
push eax
call fcn.0040aaf0
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x413378
push edi
call fcn.004074c0
add esp, 0x10
push edi
call fcn.0040aaf0
push dword [esi + 0x4166b4]
mov ebx, eax
call fcn.0040aaf0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040a490
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040b730
push edi
push ebx
call fcn.0040b740
push 0x413358
push ebx
call fcn.0040b740
push dword [esi + 0x4166b4]
push ebx
call fcn.0040b740
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040d1b0
add esp, 0x2c
jmp 0x409b61
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x4166b4]
push dword [esi]
call fcn.0040aaf0
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 - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.0040b859
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40c7df
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.0040a490
mov eax, dword [0x4168f0]
xor eax, dword [ebp + 4]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.0040c91a
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x40c909
push 2
push esi
push dword [ebp + 8]
call fcn.0040c91a
add esp, 0xc
cmp eax, ebx
je 0x40c909
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x40c8ac
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x100c]
push esi
push eax
call fcn.004099a0
push 0x8000
push dword [ebp + 8]
call fcn.0040df78
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp edi, ebx
mov eax, ebx
jge 0x40c865
mov eax, edi
push eax
lea eax, [ebp - 0x100c]
push eax
push dword [ebp + 8]
call fcn.0040844a
add esp, 0xc
cmp eax, 0xffffffff
je 0x40c885
sub edi, eax
test edi, edi
jg 0x40c85d
jmp 0x40c89d
call fcn.004086a3
cmp dword [eax], 5
jne 0x40c89a
call fcn.0040869a
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0040df78
pop ecx
pop ecx
jmp 0x40c8f4
jge 0x40c8f4
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040c91a
push dword [ebp + 8]
call fcn.00407faf
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x40c8f4
call fcn.0040869a
mov dword [eax], 0xd
call fcn.004086a3
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.0040c91a
add esp, 0xc
mov eax, esi
pop edi
jmp 0x40c90b
mov eax, ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.0040b859
leave
ret