joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4157c0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x431c70
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x441230]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x70]
call fcn.00402cf0
push 0
lea eax, [ebp - 0x70]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.00411390
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x415844
push str.Unable_to_continue_
push 0x443ef0
call fcn.00401490
push str.Press__ENTER__to_end_the_application
push 0x443ef0
call fcn.00401490
push eax
call fcn.00402030
add esp, 0x14
mov ecx, 0x443e20
call fcn.00411140
jmp 0x415947
push str.Press__ENTER__to_end_the_application
push 0x443ef0
call fcn.00401490
push eax
call fcn.00402030
add esp, 0xc
lea eax, [ebp - 0x40]
lea ecx, [esi + 0x50]
push 0
push eax
call fcn.004146f0
push eax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push str.mvIMPACT_acquire_sample__Device
push eax
call fcn.00401900
add esp, 0xc
cmp dword [ebp - 0x2c], 0x10
jb 0x415891
push dword [ebp - 0x40]
call fcn.0041a51f
add esp, 4
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov dword [ebp - 0x50], esi
cmovae eax, dword [ebp - 0x28]
push eax
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x44], 0
call sub.mvDisplay.dll_Ordinal_60
push eax
mov dword [ebp - 0x4c], eax
call sub.mvDisplay.dll_Ordinal_62
push dword [ebp - 0x4c]
call sub.mvDisplay.dll_Ordinal_64
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x54]
mov byte [ebp - 4], 4
push eax
push 0
lea eax, [ebp - 0x50]
push eax
push 0x412120
push 0
push 0
call fcn.0041ad8e
add esp, 0x18
mov ecx, 0x443e20
mov esi, eax
call fcn.00411140
push 0xffffffffffffffff
push esi
mov byte [0x443cc0], 1
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x4c]
call sub.mvDisplay.dll_Ordinal_61
cmp byte [ebp - 0x44], 0
je 0x415924
lea eax, [ebp - 0x48]
push eax
call sub.mvDisplay.dll_Ordinal_14
cmp dword [ebp - 0x14], 0x10
jb 0x415935
push dword [ebp - 0x28]
call fcn.0041a51f
add esp, 4
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x70], vtable.mvIMPACT::acquire::DeviceManager.0
call fcn.0040f2e0
call sub.mvDeviceManager.dll_Ordinal_2
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x41596b
push eax
call fcn.0041a51f
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041b352
mov esp, ebp
pop ebp
ret
Function at 0x42b08f
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x441230]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0041f06c
mov dword [ebp - 0x14], eax
cmp dword [0x444eb4], esi
jne 0x42b182
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x42b10f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x42b262
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x42b262
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x42b262
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x444eb4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x444eb8], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x444ebc], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x444ec4], eax
test eax, eax
je 0x42b17f
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x444ec0], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x42b1a7
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x42b19a
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x42b1bc
push 4
pop eax
jmp 0x42b264
cmp dword [ebp - 0x14], esi
je 0x42b1bc
push dword [0x444eb4]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x42b1a1
mov eax, dword [0x444ec0]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x42b21a
cmp dword [0x444ec4], edi
je 0x42b21a
push eax
call ebx
push dword [0x444ec4]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x42b21a
test eax, eax
je 0x42b21a
call ecx
test eax, eax
je 0x42b20f
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x42b20f
test byte [ebp - 8], 1
jne 0x42b21a
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x42b24a
mov eax, dword [0x444eb8]
cmp eax, edi
je 0x42b247
push eax
call ebx
test eax, eax
je 0x42b247
call eax
mov esi, eax
test esi, esi
je 0x42b247
mov eax, dword [0x444ebc]
cmp eax, edi
je 0x42b247
push eax
call ebx
test eax, eax
je 0x42b247
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x444eb4]
call ebx
test eax, eax
je 0x42b262
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x42b264
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041b352
mov esp, ebp
pop ebp
ret
Function at 0x401fa0
Capabilities:
Check if file exists
Delete file
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x40d1d3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x15c
mov eax, dword [0x412060]
push ebx
lea ecx, [esp + 4]
mov dword [esp + 0x15c], eax
call fcn.00402ac0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x168], 0
call fcn.00402ac0
push 0x103
lea eax, [esp + 0x5c]
mov ebx, 1
push eax
mov byte [esp + 0x170], bl
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x402048
lea ecx, [esp + 0x10]
push ecx
call entry0
add esp, 4
mov ecx, eax
mov byte [esp + 0x168], 2
call fcn.00402860
push eax
mov ecx, 0x41288c
call fcn.00402860
push eax
push str._sINF_copy_cannot_be_deleted__error_getting_windows_directory:__s__n
push 0x41288c
call fcn.00402c90
add esp, 0x10
lea ecx, [esp + 0x10]
jmp 0x402201
mov edx, dword [esp + 0x170]
push 0x5c
push edx
call fcn.004056b0
add esp, 8
inc eax
push eax
lea ecx, [esp + 0x14]
call fcn.00402ae0
push str.INF_
lea ecx, [esp + 0x38]
mov byte [esp + 0x16c], 3
call fcn.00402ae0
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x16c], 4
call fcn.00402ae0
lea ecx, [esp + 0x34]
push ecx
push eax
lea edx, [esp + 0x54]
push edx
mov byte [esp + 0x174], 5
call fcn.00402b40
lea ecx, [esp + 0x1c]
push ecx
push eax
lea edx, [esp + 0x54]
push edx
mov byte [esp + 0x180], 6
call fcn.00402b40
add esp, 0x18
push eax
lea ecx, [esp + 8]
mov byte [esp + 0x16c], 7
call fcn.00402a30
lea ecx, [esp + 0x40]
mov byte [esp + 0x168], 6
call fcn.00402870
lea ecx, [esp + 0x4c]
mov byte [esp + 0x168], 5
call fcn.00402870
lea ecx, [esp + 0x28]
mov byte [esp + 0x168], 4
call fcn.00402870
lea ecx, [esp + 0x34]
mov byte [esp + 0x168], 3
call fcn.00402870
lea ecx, [esp + 0x10]
mov byte [esp + 0x168], bl
call fcn.00402870
lea ecx, [esp + 4]
call fcn.00402860
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x402170
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4021b9
lea ecx, [esp + 4]
call fcn.00402860
push eax
mov ecx, 0x41288c
call fcn.00402860
push eax
push str._sWarning:_INF_copy_for__s_not_found___not_deleted._n
push 0x41288c
call fcn.00402c90
add esp, 0x10
lea ecx, [esp + 0x1c]
mov byte [esp + 0x168], 0
call fcn.00402870
lea ecx, [esp + 4]
mov dword [esp + 0x168], 0xffffffff
call fcn.00402870
mov eax, ebx
mov ecx, dword [esp + 0x160]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x15c]
pop ebx
call fcn.0040568b
add esp, 0x168
ret
lea eax, [esp + 0x28]
push eax
call entry0
add esp, 4
mov ecx, eax
mov byte [esp + 0x168], 8
call fcn.00402860
push eax
lea ecx, [esp + 8]
call fcn.00402860
push eax
mov ecx, 0x41288c
call fcn.00402860
push eax
push str._sINF_copy_for__s_cannot_be_deleted:__s_n
push 0x41288c
call fcn.00402c90
add esp, 0x14
lea ecx, [esp + 0x28]
mov byte [esp + 0x168], bl
call fcn.00402870
lea ecx, [esp + 0x1c]
mov byte [esp + 0x168], 0
call fcn.00402870
lea ecx, [esp + 4]
mov dword [esp + 0x168], 0xffffffff
call fcn.00402870
xor eax, eax
jmp 0x402197
Function at 0x40737d
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x41392c], esi
push edi
jne 0x40739d
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 [0x413928], esi
mov byte [0x413924], al
jne 0x407403
mov ecx, dword [0x414d6c]
test ecx, ecx
je 0x4073e4
mov eax, dword [0x414d68]
sub eax, 4
cmp eax, ecx
jmp 0x4073dd
mov eax, dword [eax]
test eax, eax
je 0x4073cf
call eax
mov eax, dword [0x414d68]
sub eax, 4
cmp eax, dword [0x414d6c]
mov dword [0x414d68], eax
jae 0x4073c7
mov eax, 0x41202c
mov esi, 0x412034
cmp eax, esi
mov edi, eax
jae 0x407403
mov eax, dword [edi]
test eax, eax
je 0x4073fc
call eax
add edi, 4
cmp edi, esi
jb 0x4073f4
mov eax, 0x412038
mov esi, 0x412040
cmp eax, esi
mov edi, eax
jae 0x407422
mov eax, dword [edi]
test eax, eax
je 0x40741b
call eax
add edi, 4
cmp edi, esi
jb 0x407413
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x40743c
push dword [ebp + 8]
mov dword [0x41392c], 1
call fcn.004072e3
pop ebp
ret

Function at 0x4091d8
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x412060]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4121b0]
je 0x40920d
inc eax
cmp eax, 0x13
jb 0x4091fe
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4121b0]
jne 0x409333
mov eax, dword [0x4138bc]
cmp eax, 1
je 0x40930b
cmp eax, edx
jne 0x40923d
cmp dword [0x412074], 1
je 0x40930b
cmp ecx, 0xfc
je 0x409333
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x409273
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040a6c0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0040a8f0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4092a7
mov eax, edi
push eax
call fcn.0040a8f0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40ffd4
push edi
call fcn.0040a7c0
add esp, 0x10
push edi
call fcn.0040a8f0
push dword [esi + 0x4121b4]
mov ebx, eax
call fcn.0040a8f0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00409b80
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040a6c0
push edi
push ebx
call fcn.0040a6d0
push 0x40ffd0
push ebx
call fcn.0040a6d0
push dword [esi + 0x4121b4]
push ebx
call fcn.0040a6d0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040a5c5
add esp, 0x2c
jmp 0x409333
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4121b4]
push dword [esi]
call fcn.0040a8f0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.0040568b
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x409fec
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00409b80
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40a087
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x4138ec]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x40a087
cmp eax, 1
je 0x40a0a8
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40a087
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40a054
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40a083
xor eax, eax
inc eax
jmp 0x40a0c7
cmp edi, eax
jae 0x40a08b
xor eax, eax
jmp 0x40a0c7
cmp eax, esi
jae 0x40a092
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x4138ec]
jmp 0x40a0ab
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40a5c5
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x413a9c], ebx
push esi
push edi
jne 0x40a645
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40a680
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x410b84
push edi
call esi
test eax, eax
mov dword [0x413a9c], eax
je 0x40a680
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x413aa0], eax
call esi
cmp dword [0x4138ec], 2
mov dword [0x413aa4], eax
jne 0x40a645
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x413aac], eax
je 0x40a645
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x413aa8], eax
mov eax, dword [0x413aa8]
test eax, eax
je 0x40a68a
call eax
test eax, eax
je 0x40a671
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x413aac]
test eax, eax
je 0x40a671
test byte [ebp - 8], 1
jne 0x40a68a
cmp dword [0x4138f8], 4
jb 0x40a684
or byte [ebp + 0x12], 0x20
jmp 0x40a6a9
xor eax, eax
jmp 0x40a6b9
or byte [ebp + 0x12], 4
jmp 0x40a6a9
mov eax, dword [0x413aa0]
test eax, eax
je 0x40a6a9
call eax
mov ebx, eax
test ebx, ebx
je 0x40a6a9
mov eax, dword [0x413aa4]
test eax, eax
je 0x40a6a9
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x413a9c]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a97b
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x40a9a9
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x40a9b0
cmp ebx, dword [eax + 4]
jae 0x40a9b0
xor eax, eax
jmp 0x40aba0
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40a9c1
xor eax, eax
inc eax
jmp 0x40ab9f
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40a9d7
cmp ecx, edx
jae 0x40ab1c
cmp dword [eax + 4], 0
je 0x40a9e0
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40a9c8
cmp dword [ebp + 8], 0
je 0x40aa02
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40ab1c
cmp eax, esi
jae 0x40ab1c
mov eax, dword [0x413ab0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40aa27
cmp dword [esi*4 + 0x413ab8], edi
je 0x40ab20
inc esi
cmp esi, eax
jl 0x40aa15
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40ab9c
cmp dword [ebp - 8], 0x1000000
jne 0x40ab9c
test byte [ebp - 0xc], 0xcc
je 0x40aaa5
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40ab9c
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40ab9c
cmp word [eax + 0x18], 0x10b
jne 0x40ab9c
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40ab9c
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40aaa5
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40aaa5
test byte [ecx + 0x27], 0x80
jne 0x40ab1c
push 1
push 0x413af8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40a9b9
mov ecx, dword [0x413ab0]
test ecx, ecx
mov edx, ecx
jle 0x40aad9
lea eax, [ecx*4 + 0x413ab4]
cmp dword [eax], edi
je 0x40aad9
dec edx
sub eax, 4
test edx, edx
jg 0x40aacd
test edx, edx
jne 0x40ab0a
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40aae6
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40aafe
lea eax, [edx*4 + 0x413ab8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40aaec
cmp ecx, 0x10
jge 0x40ab0a
inc ecx
mov dword [0x413ab0], ecx
push 0
push 0x413af8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40a9b9
xor eax, eax
jmp 0x40ab9f
test esi, esi
jle 0x40a9b9
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x413af8
call ebx
test eax, eax
jne 0x40a9b9
cmp dword [esi*4 + 0x413ab8], edi
je 0x40ab76
mov eax, dword [0x413ab0]
lea esi, [eax - 1]
test esi, esi
jl 0x40ab64
cmp dword [esi*4 + 0x413ab8], edi
je 0x40ab60
dec esi
jns 0x40ab54
test esi, esi
jge 0x40ab74
cmp eax, 0x10
jge 0x40ab6f
inc eax
mov dword [0x413ab0], eax
lea esi, [eax - 1]
jmp 0x40ab76
je 0x40ab8e
xor ecx, ecx
test esi, esi
jl 0x40ab8e
lea eax, [ecx*4 + 0x413ab8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40ab7c
push 0
push 0x413af8
call ebx
jmp 0x40a9b9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40af79
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x414c24]
mov eax, dword [0x412060]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x40b13f
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x414c40]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x40b13f
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x40afe3
xor eax, eax
jmp 0x40b153
test al, 0x20
je 0x40aff4
push 2
push edi
push edi
push ecx
call fcn.0040c200
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40b0c9
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x40b110
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x40b056
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40b047
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x40b029
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b096
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x40b0a2
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x40b01d
jmp 0x40b0a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x40b13a
cmp dword [ebp + 0x3a4], edi
je 0x40b110
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x40b102
mov dword [0x4138e4], eax
jmp 0x40b146
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b0f4
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x40b0a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x40b0a4
push dword [ebp + 0x3a4]
call fcn.0040b395
pop ecx
jmp 0x40b150
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40b128
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x40afdc
mov dword [0x4138e0], 0x1c
mov dword [0x4138e4], edi
jmp 0x40b150
sub eax, dword [ebp - 0x7c]
jmp 0x40b153
and dword [0x4138e4], 0
mov dword [0x4138e0], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.0040568b
add ebp, 0x39c
leave
ret
Function at 0x40c300
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00409b80
mov eax, dword [0x412060]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x414c24]
mov dword [ebp - 4], eax
jae 0x40c443
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x414c40]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x40c443
push 1
push esi
push ebx
call fcn.0040aeed
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x40c44d
push 2
push esi
push ebx
call fcn.0040aeed
add esp, 0xc
cmp eax, 0xffffffff
je 0x40c44d
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x40c3ed
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00409d80
push 0x8000
push ebx
call fcn.0040c794
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x40c3ac
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.0040af79
add esp, 0xc
cmp eax, 0xffffffff
je 0x40c3ca
sub edi, eax
test edi, edi
jg 0x40c3a1
jmp 0x40c3e0
cmp dword [0x4138e4], 5
jne 0x40c3dd
mov dword [0x4138e0], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0040c794
pop ecx
pop ecx
jmp 0x40c42d
jge 0x40c42d
push 0
push dword [ebp + 0xc]
push ebx
call fcn.0040aeed
push ebx
call fcn.0040b582
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, 0xffffffff
jne 0x40c42d
mov dword [0x4138e0], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x4138e4], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.0040aeed
add esp, 0xc
mov eax, esi
pop edi
jmp 0x40c450
mov dword [0x4138e0], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.0040568b
leave
ret