joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40101f
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x248
mov eax, dword [0x40f270]
push ebx
push esi
push edi
mov dword [ebp - 4], eax
push 0x40
pop ecx
xor eax, eax
mov byte [ebp - 0x234], 0
lea edi, [ebp - 0x233]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
pop ecx
xor eax, eax
mov byte [ebp - 0x130], 0
lea edi, [ebp - 0x12f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 7
pop ecx
mov byte [ebp - 0x2c], 0
xor eax, eax
lea edi, [ebp - 0x2b]
rep stosd dword es:[edi], eax
mov esi, 0x800
push esi
push 0
mov ebx, 0x40f920
push ebx
stosb byte es:[edi], al
call fcn.00404a40
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
push esi
push ebx
call fcn.004049e9
add esp, 0x1c
lea eax, [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0x23c]
push eax
movzx eax, word [ebp - 0x23e]
push eax
movzx eax, word [ebp - 0x240]
push eax
movzx eax, word [ebp - 0x242]
push eax
movzx eax, word [ebp - 0x246]
push eax
movzx eax, word [ebp - 0x248]
push eax
lea eax, [ebp - 0x2c]
push str._.4d__.2d__.2d___.2d:_.2d:_.2d
push eax
call fcn.004046f8
add esp, 0x20
push 0x104
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.eintset.txt
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x130]
push str._s_s
push eax
call fcn.004046f8
lea eax, [ebp - 0x130]
push 0x40d1b4
push eax
call fcn.004049d6
add esp, 0x18
test eax, eax
mov dword [ebp - 0x238], eax
jne 0x40113c
push str.open_the_file_error__n
call fcn.0040497b
pop ecx
jmp 0x4011aa
mov esi, 0x40d198
lea edi, [ebp - 0xc]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
xor eax, eax
lea edi, [ebp - 9]
stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [ebp - 0x2c]
push eax
call fcn.004048f0
push eax
lea eax, [ebp - 0x2c]
call section..text
push ebx
call fcn.004048f0
push eax
mov eax, ebx
call section..text
push 2
lea eax, [ebp - 0xc]
call section..text
push ebx
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x2c]
push eax
push str._s_s_s
push dword [ebp - 0x238]
call fcn.004048b4
push dword [ebp - 0x238]
call fcn.00404803
push dword [ebp - 0x238]
call fcn.00404750
add esp, 0x30
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.00404ad1
leave
ret

Function at 0x401312
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x40f270]
push esi
push 0
push 2
mov dword [ebp - 4], eax
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
test esi, esi
je 0x401377
lea eax, [ebp - 0x12c]
push eax
push esi
mov dword [ebp - 0x12c], 0x128
call sub.KERNEL32.dll_Process32First
push dword [ebp + 8]
lea eax, [ebp - 0x108]
push eax
call fcn.0040c18a
test eax, eax
pop ecx
pop ecx
je 0x401384
lea eax, [ebp - 0x12c]
push eax
push esi
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x40134a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [ebp - 4]
pop esi
call fcn.00404ad1
leave
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x401379
Function at 0x40138f
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x40f270]
push ebx
push 0x94
mov dword [ebp - 4], eax
xor ebx, ebx
lea eax, [ebp - 0x98]
push ebx
push eax
call fcn.00404a40
add esp, 0xc
lea eax, [ebp - 0x98]
push eax
mov dword [ebp - 0x98], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x88], 2
jne 0x4013e3
cmp dword [ebp - 0x94], 6
jb 0x4013e3
mov bl, 1
mov ecx, dword [ebp - 4]
mov al, bl
pop ebx
call fcn.00404ad1
leave
ret
Function at 0x4029a5
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push 0xffffffffffffffff
mov esi, str..pipeprobe_inside_msg_QQ_SessionKey
push esi
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
test eax, eax
je 0x402a9b
push ebx
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push edi
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x402a99
push dword [ebp + 8]
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
call fcn.004048f0
inc eax
cmp ax, 0x3ff
pop ecx
mov dword [ebp - 4], eax
jle 0x402a06
mov dword [ebp - 4], 0x3ff
push edi
lea eax, [ebp - 8]
push eax
mov esi, str.acct
push esi
call fcn.004048f0
pop ecx
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call esi
push edi
lea eax, [ebp - 8]
push eax
push 2
lea eax, [ebp - 4]
push eax
push ebx
call esi
push edi
lea eax, [ebp - 8]
push eax
movsx eax, word [ebp - 4]
push eax
push dword [ebp + 8]
push ebx
call esi
push dword [ebp + 0xc]
call fcn.004048f0
inc eax
cmp ax, 0x3ff
pop ecx
mov dword [ebp - 4], eax
jle 0x402a5a
mov dword [ebp - 4], 0x3ff
push edi
lea eax, [ebp - 8]
push eax
push str.sessionkey
call fcn.004048f0
pop ecx
push eax
push str.sessionkey
push ebx
call esi
push edi
lea eax, [ebp - 8]
push eax
push 2
lea eax, [ebp - 4]
push eax
push ebx
call esi
push edi
lea eax, [ebp - 8]
push eax
movsx eax, word [ebp - 4]
inc eax
push eax
push dword [ebp + 0xc]
push ebx
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebx
pop esi
leave
ret
Function at 0x40423c
Capabilities:
Find taskbar

Disassembly:
push esi
push edi
xor edi, edi
push edi
push str.Shell_TrayWnd
call dword [sym.imp.USER32.dll_FindWindowA]
mov esi, dword [sym.imp.USER32.dll_FindWindowExA]
push edi
push str.TrayNotifyWnd
push edi
push eax
call esi
push edi
push str.SysPager
push edi
push eax
call esi
push edi
push str.ToolbarWindow32
push edi
push eax
call esi
pop edi
pop esi
ret

Function at 0x405912
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x410184], esi
push edi
jne 0x405932
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 [0x410180], esi
mov byte [0x41017c], al
jne 0x405998
mov ecx, dword [0x411730]
test ecx, ecx
je 0x405979
mov eax, dword [0x41172c]
sub eax, 4
cmp eax, ecx
jmp 0x405972
mov eax, dword [eax]
test eax, eax
je 0x405964
call eax
mov eax, dword [0x41172c]
sub eax, 4
cmp eax, dword [0x411730]
mov dword [0x41172c], eax
jae 0x40595c
mov eax, 0x40f028
mov esi, 0x40f030
cmp eax, esi
mov edi, eax
jae 0x405998
mov eax, dword [edi]
test eax, eax
je 0x405991
call eax
add edi, 4
cmp edi, esi
jb 0x405989
mov eax, 0x40f034
mov esi, 0x40f03c
cmp eax, esi
mov edi, eax
jae 0x4059b7
mov eax, dword [edi]
test eax, eax
je 0x4059b0
call eax
add edi, 4
cmp edi, esi
jb 0x4059a8
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x4059d1
push dword [ebp + 8]
mov dword [0x410184], 1
call fcn.00405878
pop ebp
ret
Function at 0x405dc2
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x40d470
call fcn.0040718c
mov edi, 0x94
mov eax, edi
call fcn.00405d00
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x410144], ecx
mov eax, dword [esi + 4]
mov dword [0x410150], eax
mov edx, dword [esi + 8]
mov dword [0x410154], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x410148], esi
cmp ecx, 2
je 0x405e22
or esi, 0x8000
mov dword [0x410148], esi
shl eax, 8
add eax, edx
mov dword [0x41014c], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x405e5b
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x405e5b
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x405e73
cmp eax, 0x20b
je 0x405e60
mov dword [ebp - 0x1c], edi
jmp 0x405e87
cmp dword [ecx + 0x84], 0xe
jbe 0x405e5b
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x405e81
cmp dword [ecx + 0x74], 0xe
jbe 0x405e5b
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push edi
call fcn.00409354
pop ecx
test eax, eax
jne 0x405eb3
cmp dword [0x410190], 2
je 0x405ea0
call fcn.00408bee
push 0x1c
call fcn.00408a77
push 0xff
call fcn.00405878
pop ecx
pop ecx
call fcn.00408778
mov dword [ebp - 4], edi
call fcn.0040918f
test eax, eax
jge 0x405ecc
push 0x1b
call fcn.00405d9d
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x411724], eax
call fcn.0040906d
mov dword [0x410188], eax
call fcn.00408fcb
test eax, eax
jge 0x405ef2
push 8
call fcn.00405d9d
pop ecx
call fcn.00408d98
test eax, eax
jge 0x405f03
push 9
call fcn.00405d9d
pop ecx
push 1
call fcn.004058a8
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x405f19
push eax
call fcn.00405d9d
pop ecx
mov eax, dword [0x410164]
mov dword [0x410168], eax
push eax
push dword [0x41015c]
push dword [0x410158]
call fcn.00402085
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], edi
jne 0x405f48
push esi
call fcn.004059d3
call fcn.004059f5
jmp 0x405f7a
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.004071c7
ret
Function at 0x406a3d
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x4105e4]
mov eax, dword [0x40f270]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x406c03
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x410600]
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 0x406c03
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x406aa7
xor eax, eax
jmp 0x406c17
test al, 0x20
je 0x406ab8
push 2
push edi
push edi
push ecx
call fcn.0040a292
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x406b8d
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x406bd4
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x406b1a
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x406b0b
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 0x406aed
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 0x406b5a
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x406b66
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x406ae1
jmp 0x406b68
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x406bfe
cmp dword [ebp + 0x3a4], edi
je 0x406bd4
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x406bc6
mov dword [0x41013c], eax
jmp 0x406c0a
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 0x406bb8
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x406b68
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x406b68
push dword [ebp + 0x3a4]
call fcn.00408800
pop ecx
jmp 0x406c14
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x406bec
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x406aa0
mov dword [0x410138], 0x1c
mov dword [0x41013c], edi
jmp 0x406c14
sub eax, dword [ebp - 0x7c]
jmp 0x406c17
and dword [0x41013c], 0
mov dword [0x410138], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00404ad1
add ebp, 0x39c
leave
ret
Function at 0x408a77
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40f270]
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 + 0x40f6d0]
je 0x408aac
inc eax
cmp eax, 0x13
jb 0x408a9d
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40f6d0]
jne 0x408bd2
mov eax, dword [0x410190]
cmp eax, 1
je 0x408baa
cmp eax, edx
jne 0x408adc
cmp dword [0x40f2b4], 1
je 0x408baa
cmp ecx, 0xfc
je 0x408bd2
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 0x408b12
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00408680
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.004048f0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x408b46
mov eax, edi
push eax
call fcn.004048f0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40d52c
push edi
call fcn.0040a7d0
add esp, 0x10
push edi
call fcn.004048f0
push dword [esi + 0x40f6d4]
mov ebx, eax
call fcn.004048f0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00405d00
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00408680
push edi
push ebx
call fcn.00408690
push 0x40d528
push ebx
call fcn.00408690
push dword [esi + 0x40f6d4]
push ebx
call fcn.00408690
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040a6d4
add esp, 0x2c
jmp 0x408bd2
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40f6d4]
push dword [esi]
call fcn.004048f0
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.00404ad1
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40a6d4
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x4102d8], ebx
push esi
push edi
jne 0x40a754
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40a78f
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x4102d8], eax
je 0x40a78f
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x4102dc], eax
call esi
cmp dword [0x410144], 2
mov dword [0x4102e0], eax
jne 0x40a754
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x4102e8], eax
je 0x40a754
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x4102e4], eax
mov eax, dword [0x4102e4]
test eax, eax
je 0x40a799
call eax
test eax, eax
je 0x40a780
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x4102e8]
test eax, eax
je 0x40a780
test byte [ebp - 8], 1
jne 0x40a799
cmp dword [0x410150], 4
jb 0x40a793
or byte [ebp + 0x12], 0x20
jmp 0x40a7b8
xor eax, eax
jmp 0x40a7c8
or byte [ebp + 0x12], 4
jmp 0x40a7b8
mov eax, dword [0x4102dc]
test eax, eax
je 0x40a7b8
call eax
mov ebx, eax
test ebx, ebx
je 0x40a7b8
mov eax, dword [0x4102e0]
test eax, eax
je 0x40a7b8
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x4102d8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a8f4
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 0x40a922
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 0x40a929
cmp ebx, dword [eax + 4]
jae 0x40a929
xor eax, eax
jmp 0x40ab19
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40a93a
xor eax, eax
inc eax
jmp 0x40ab18
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40a950
cmp ecx, edx
jae 0x40aa95
cmp dword [eax + 4], 0
je 0x40a959
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40a941
cmp dword [ebp + 8], 0
je 0x40a97b
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40aa95
cmp eax, esi
jae 0x40aa95
mov eax, dword [0x4102f0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40a9a0
cmp dword [esi*4 + 0x4102f8], edi
je 0x40aa99
inc esi
cmp esi, eax
jl 0x40a98e
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40ab15
cmp dword [ebp - 8], 0x1000000
jne 0x40ab15
test byte [ebp - 0xc], 0xcc
je 0x40aa1e
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40ab15
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40ab15
cmp word [eax + 0x18], 0x10b
jne 0x40ab15
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40ab15
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40aa1e
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40aa1e
test byte [ecx + 0x27], 0x80
jne 0x40aa95
push 1
push 0x410338
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40a932
mov ecx, dword [0x4102f0]
test ecx, ecx
mov edx, ecx
jle 0x40aa52
lea eax, [ecx*4 + 0x4102f4]
cmp dword [eax], edi
je 0x40aa52
dec edx
sub eax, 4
test edx, edx
jg 0x40aa46
test edx, edx
jne 0x40aa83
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40aa5f
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40aa77
lea eax, [edx*4 + 0x4102f8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40aa65
cmp ecx, 0x10
jge 0x40aa83
inc ecx
mov dword [0x4102f0], ecx
push 0
push 0x410338
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40a932
xor eax, eax
jmp 0x40ab18
test esi, esi
jle 0x40a932
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x410338
call ebx
test eax, eax
jne 0x40a932
cmp dword [esi*4 + 0x4102f8], edi
je 0x40aaef
mov eax, dword [0x4102f0]
lea esi, [eax - 1]
test esi, esi
jl 0x40aadd
cmp dword [esi*4 + 0x4102f8], edi
je 0x40aad9
dec esi
jns 0x40aacd
test esi, esi
jge 0x40aaed
cmp eax, 0x10
jge 0x40aae8
inc eax
mov dword [0x4102f0], eax
lea esi, [eax - 1]
jmp 0x40aaef
je 0x40ab07
xor ecx, ecx
test esi, esi
jl 0x40ab07
lea eax, [ecx*4 + 0x4102f8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40aaf5
push 0
push 0x410338
call ebx
jmp 0x40a932
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40b2e5
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00405d00
mov eax, dword [0x40f270]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x4105e4]
mov dword [ebp - 4], eax
jae 0x40b428
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x410600]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x40b428
push 1
push esi
push ebx
call fcn.004093a5
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x40b432
push 2
push esi
push ebx
call fcn.004093a5
add esp, 0xc
cmp eax, 0xffffffff
je 0x40b432
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x40b3d2
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00404a40
push 0x8000
push ebx
call fcn.0040bf61
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x40b391
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.00406a3d
add esp, 0xc
cmp eax, 0xffffffff
je 0x40b3af
sub edi, eax
test edi, edi
jg 0x40b386
jmp 0x40b3c5
cmp dword [0x41013c], 5
jne 0x40b3c2
mov dword [0x410138], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0040bf61
pop ecx
pop ecx
jmp 0x40b412
jge 0x40b412
push 0
push dword [ebp + 0xc]
push ebx
call fcn.004093a5
push ebx
call fcn.0040a256
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 0x40b412
mov dword [0x410138], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x41013c], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.004093a5
add esp, 0xc
mov eax, esi
pop edi
jmp 0x40b435
mov dword [0x410138], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.00404ad1
leave
ret
Function at 0x40b441
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x4105e4]
push edi
jae 0x40b616
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x410600]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40b616
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x40b4ec
test dl, 2
jne 0x40b4ec
test dl, 0x48
je 0x40b4b6
cmp byte [eax + 5], 0xa
je 0x40b4b6
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40b4ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40b4e7
mov dword [0x41013c], ecx
jmp 0x40b61d
cmp eax, 0x6d
jne 0x40b4f3
xor eax, eax
jmp 0x40b62a
push eax
call fcn.00408800
pop ecx
jmp 0x40b627
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x40b611
test eax, eax
je 0x40b526
cmp byte [ebx], 0xa
jne 0x40b526
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40b52f
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x40b60b
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x40b5fb
cmp al, 0xd
je 0x40b561
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x40b5ed
dec ecx
cmp dword [ebp - 8], ecx
jae 0x40b57b
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40b576
add dword [ebp - 8], 2
jmp 0x40b5cf
mov dword [ebp - 8], eax
jmp 0x40b5e9
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
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 0x40b5a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40b5e9
cmp dword [ebp - 0x10], 0
je 0x40b5e9
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40b5c4
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40b5cf
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40b5ec
cmp ebx, dword [ebp + 0xc]
jne 0x40b5d4
cmp byte [ebp - 1], 0xa
jne 0x40b5d4
mov byte [ebx], 0xa
jmp 0x40b5ec
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004093a5
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40b5ed
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x40b545
jmp 0x40b60b
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40b60b
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x40b62a
and dword [0x41013c], 0
mov dword [0x410138], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret