joyce8/EMBER2024-capa huggingface dataset:
Function at 0x412afe
Capabilities:
Delete file
Enumerate files on windows
Get common file path
Move file
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x560
mov dl, byte [0x429084]
push ebx
push esi
push edi
push 0x41
xor eax, eax
and dword [ebp - 4], eax
pop ecx
lea edi, [ebp - 0x10f]
mov byte [ebp - 0x110], dl
rep stosd dword es:[edi], eax
push 0x40
lea edi, [ebp - 0x317]
pop ecx
mov byte [ebp - 0x318], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x318]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ebx, 0x105
lea eax, [ebp - 0x110]
push ebx
push eax
push dword [0x4290a4]
call edi
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
inc dword [ebp - 4]
lea eax, [ebp - 0x110]
push 0x5c
push eax
call fcn.00417fbe
inc eax
push 0x425d78
push eax
call fcn.00417450
add esp, 0x10
lea eax, [ebp - 0x560]
push eax
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x412c9a
lea eax, [ebp - 0x534]
push 0x2e
push eax
call fcn.00417fbe
mov esi, eax
lea eax, [ebp - 0x534]
push 0x2e
push eax
and byte [esi], 0
call fcn.00417fbe
add esp, 0x10
mov byte [esi], 0x2e
test eax, eax
je 0x412c79
sub esi, eax
cmp esi, 4
jne 0x412c79
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.00417450
lea eax, [ebp - 0x420]
push 0x2a
push eax
call fcn.00417fbe
lea ecx, [ebp - 0x534]
push ecx
push eax
call fcn.00417450
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00417450
lea eax, [ebp - 0x214]
push 0x2e
push eax
call fcn.00417fbe
add esp, 0x28
test eax, eax
je 0x412c47
and byte [eax], 0
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x412c79
lea eax, [ebp - 0x214]
push eax
call fcn.00412ce4
pop ecx
lea eax, [ebp - 0x560]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x412bb4
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 4], 1
jne 0x412cd2
lea eax, [ebp - 0x110]
push ebx
push eax
push dword [0x4290a4]
call edi
lea eax, [ebp - 0x110]
push 0x5c
push eax
call fcn.00417fbe
inc eax
push 0x425d64
push eax
call fcn.00417450
add esp, 0x10
jmp 0x412b74
lea eax, [ebp - 0x318]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x412d84
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [esi + 0x5c], eax
mov eax, dword [eax + 0x50]
cmp eax, ebx
je 0x412daa
mov ecx, eax
call fcn.00402193
jmp 0x412dac
xor eax, eax
push ebx
lea ecx, [ebp - 0x118]
push ebx
push ecx
lea ecx, [ebp - 0x21c]
push ecx
push eax
call fcn.00417ceb
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.00417460
add esp, 0x1c
lea eax, [ebp - 0x118]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x21c]
push eax
call edi
mov eax, dword [esi + 0x5c]
add eax, 0x50
mov eax, dword [eax]
cmp eax, ebx
je 0x412e0e
mov ecx, eax
call fcn.00402193
jmp 0x412e10
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 0x150], eax
lea eax, [ebp - 0x118]
push eax
call edi
mov eax, dword [esi + 0x150]
cmp eax, ebx
jne 0x412e3b
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x412ef4
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x425bf4
push eax
call edi
push 0x425db8
mov dword [esi + 0x154], eax
push dword [esi + 0x150]
call edi
push 0x425da4
mov dword [ebp - 4], eax
push dword [esi + 0x150]
call edi
push 0x425d94
mov dword [ebp + 8], eax
push dword [esi + 0x150]
call edi
cmp dword [esi + 0x154], ebx
mov dword [esi + 0x158], eax
je 0x412ef1
cmp dword [ebp - 4], ebx
jne 0x412e94
cmp dword [ebp + 8], ebx
je 0x412ef1
lea eax, [ebp - 0x14]
push eax
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetClientRect]
sub dword [ebp - 0xc], 8
sub dword [ebp - 8], 0x32
cmp dword [ebp + 8], ebx
push 4
pop eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
je 0x412ec6
push dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push eax
push dword [esi + 4]
call dword [ebp + 8]
jmp 0x412ed0
lea eax, [ebp - 0x14]
push eax
push dword [esi + 4]
call dword [ebp - 4]
cmp eax, ebx
mov dword [esi + 0x15c], eax
je 0x412ef1
push 1
push ebx
push dword [esi + 4]
call dword [sym.imp.USER32.dll_InvalidateRect]
push ebx
call fcn.0040a0a0
pop ecx
xor eax, eax
jmp 0x412ef4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x413c09
Capabilities:
Hide graphical window

Disassembly:
push esi
mov esi, ecx
push dword [esi + 4]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x413c4d
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetParent]
cmp eax, dword [esp + 8]
jne 0x413c4d
push 0
push dword [esi + 4]
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [esi + 0xb4]
push dword [esi + 4]
call dword [sym.imp.USER32.dll_SetParent]
lea ecx, [esi + 0x4cc]
call fcn.0040aaa2
xor eax, eax
pop esi
ret 4
Function at 0x41660b
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 0x416661
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0x421874
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x416654
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x416663
xor eax, eax
pop esi
leave
ret 4
Function at 0x41f669
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x429ba8]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0041f5fe
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.0040e280
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x41f6b8
cmp dword [ebp - 0x1c], 5
jb 0x41f6d0
jmp 0x41f6cc
cmp dword [ebp - 0x10], 1
jne 0x41f6d0
cmp dword [ebp - 0x1c], 4
ja 0x41f6cc
jne 0x41f6d0
cmp dword [ebp - 0x18], 0
jbe 0x41f6d0
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4243c8
call fcn.0041f4ef
test eax, eax
jge 0x41f6f1
mov byte [0x42e0bc], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0040cea2
add ebp, 0x78
leave
ret

Function at 0x9ec058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x9ec1a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, pe_nt_image_headers32
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x9ec07e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x9ec06a
add dl, dl
jne 0x9ec089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x9ec0dc
xor eax, eax
add dl, dl
jne 0x9ec096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x9ec17d
add dl, dl
jne 0x9ec0a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x9ec0b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x9ec0bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x9ec0c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x9ec0d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x9ec075
mov eax, 1
add dl, dl
jne 0x9ec0ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x9ec0f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x9ec0e1
sub eax, ebx
mov ebx, 1
jne 0x9ec128
mov ecx, 1
add dl, dl
jne 0x9ec10e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x9ec119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x9ec105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x9ec075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x9ec13f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x9ec14a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x9ec136
cmp eax, 0x7d00
jae 0x9ec16d
cmp eax, 0x500
jb 0x9ec168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x9ec075
cmp eax, 0x7f
ja 0x9ec170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x9ec075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x9ec19e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x9ec075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x40230a
Capabilities:
Allocate or change rwx memory
Create process on windows
Create thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x441b00]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push str.006:107_4:_00007:277_0:_004:_04:_008:_08:_08:_8:_7:2_3:_9:193_4:_
lea ecx, [ebp - 0x1c]
call fcn.00401648
push 0xc
call fcn.00404aab
pop ecx
test eax, eax
je 0x402343
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, eax
call fcn.004016a1
jmp 0x402345
xor eax, eax
mov esi, dword [eax + 4]
shl esi, 2
call dword [sym.imp.ADVAPI32.dll_DuplicateToken]
lea eax, [ebp - 0x20]
mov ebx, 0x4ac
mov edi, 0x441628
sub esi, 0x40
push eax
push 0x40
push ebx
push edi
push 0xffffffffffffffff
mov dword [ebp - 0x20], esi
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push ebx
push edi
mov dword [ebp - 0x24], esi
call fcn.004020fc
push 0x23
push section..data
push 0x1b600
mov esi, 0x426028
push esi
call fcn.00401c27
add esp, 0x18
lea eax, [ebp - 0x24]
push eax
xor eax, eax
push eax
push esi
push 0x4417b0
push eax
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov esi, eax
push 0
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_CreateCaret]
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 1
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
lea ecx, [ebp - 0x1c]
call fcn.00401fb0
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404ae9
leave
ret

Function at 0x4039ed
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x403a0e
jl 0x403a05
test edi, edi
jne 0x403a0e
xor eax, eax
xor edx, edx
jmp 0x403acf
cmp dword [ebx + 0x38], 0
je 0x403a23
push eax
push edi
push dword [ebp + 8]
call fcn.00403ad5
jmp 0x403acf
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x403a6a
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x403a6a
cmp eax, edi
jb 0x403a44
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.00405610
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x403a70
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x403ac4
mov ecx, ebx
call fcn.00403116
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x403aaf
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.0040a942
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x403ac4
jmp 0x403a82
test edx, edx
je 0x403ac4
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.0040a942
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc
Function at 0x1064e058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1064e1a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, pe_nt_image_headers32
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x1064e07e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1064e06a
add dl, dl
jne 0x1064e089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1064e0dc
xor eax, eax
add dl, dl
jne 0x1064e096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1064e17d
add dl, dl
jne 0x1064e0a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1064e0b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1064e0bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1064e0c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x1064e0d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x1064e075
mov eax, 1
add dl, dl
jne 0x1064e0ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1064e0f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1064e0e1
sub eax, ebx
mov ebx, 1
jne 0x1064e128
mov ecx, 1
add dl, dl
jne 0x1064e10e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1064e119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1064e105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1064e075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1064e13f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1064e14a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1064e136
cmp eax, 0x7d00
jae 0x1064e16d
cmp eax, 0x500
jb 0x1064e168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1064e075
cmp eax, 0x7f
ja 0x1064e170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1064e075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x1064e19e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x1064e075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x40158c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0
nop
mov eax, 0
push eax
mov eax, 0
push eax
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_fseek
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
mov eax, 0x20
push eax
mov eax, 1
push eax
mov eax, 0x403660
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov eax, 0
push eax
mov eax, 0x20
push eax
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_fseek
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
mov eax, 2
push eax
mov eax, 1
push eax
mov eax, 0x403680
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov eax, dword [ebp + 8]
push eax
mov eax, 0xfde
push eax
mov eax, 1
push eax
mov eax, 0x40368c
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov eax, 0
push eax
mov eax, 0x1000
push eax
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_fseek
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
mov eax, 2
push eax
mov eax, 1
push eax
mov eax, 0x403682
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov eax, dword [ebp + 8]
push eax
mov eax, 0xffe
push eax
mov eax, 1
push eax
mov eax, 0x40466a
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov eax, 0
push eax
mov eax, 0x2000
push eax
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_fseek
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
mov eax, 4
push eax
mov eax, 1
push eax
mov eax, 0x403684
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov eax, dword [ebp + 8]
push eax
mov eax, 0xff8
push eax
mov eax, 1
push eax
mov eax, 0x405668
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov eax, 0
push eax
mov eax, 0x2ffc
push eax
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_fseek
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
mov eax, 4
push eax
mov eax, 1
push eax
mov eax, 0x403688
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
leave
ret
Function at 0x401939
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
nop
mov eax, 0
mov dword [ebp - 0x218], eax
mov eax, 0
mov dword [ebp - 0x21c], eax
mov eax, 0
mov dword [ebp - 0x220], eax
mov eax, 0
mov dword [ebp - 0x224], eax
mov eax, 0x403238
push eax
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [ebp - 4], eax
cmp eax, 0
jne 0x401997
mov eax, 0
jmp 0x401adf
mov eax, 0x40323b
push eax
mov eax, dword [ebp + 0xc]
push eax
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [ebp - 8], eax
cmp eax, 0
jne 0x4019cb
mov eax, dword [ebp - 4]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, 0
jmp 0x401adf
mov eax, dword [ebp - 0x21c]
shl eax, 9
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00401ddf
add esp, 8
mov eax, dword [ebp - 8]
push eax
mov eax, 0x200
push eax
mov eax, 1
push eax
lea eax, [ebp - 0x208]
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov dword [ebp - 0x220], eax
mov eax, dword [ebp - 0x21c]
mov ecx, eax
add eax, 1
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp - 4]
push eax
mov eax, 0x200
push eax
mov eax, 1
push eax
lea eax, [ebp - 0x208]
push eax
call sub.msvcrt.dll_fread
add esp, 0x10
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x218]
cmp eax, 0
jne 0x401a53
jmp 0x401aa8
mov eax, dword [ebp - 0x21c]
shl eax, 9
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00401ddf
add esp, 8
mov eax, dword [ebp - 0x21c]
mov ecx, eax
add eax, 1
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0x218]
push eax
mov eax, 1
push eax
lea eax, [ebp - 0x208]
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov dword [ebp - 0x220], eax
jmp 0x401a1a
mov eax, dword [ebp - 0x21c]
push eax
mov eax, str._Encode_write_sector___d_n
push eax
call sub.msvcrt.dll_printf
add esp, 8
mov eax, dword [ebp - 4]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, dword [ebp - 8]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, 2
jmp 0x401adf
leave
ret
Function at 0x401ae1
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
nop
mov eax, 0
mov dword [ebp - 0x218], eax
mov eax, 0
mov dword [ebp - 0x21c], eax
mov eax, 0
mov dword [ebp - 0x220], eax
mov eax, 0
mov dword [ebp - 0x224], eax
mov eax, 0x403259
push eax
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [ebp - 4], eax
cmp eax, 0
jne 0x401b3f
mov eax, 0
jmp 0x401c82
mov eax, 0x40325c
push eax
mov eax, dword [ebp + 0xc]
push eax
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [ebp - 8], eax
cmp eax, 0
jne 0x401b73
mov eax, dword [ebp - 4]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, 0
jmp 0x401c82
mov eax, dword [ebp - 4]
push eax
mov eax, 0x200
push eax
mov eax, 1
push eax
lea eax, [ebp - 0x208]
push eax
call sub.msvcrt.dll_fread
add esp, 0x10
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x218]
cmp eax, 0
jne 0x401bac
jmp 0x401c4b
mov eax, dword [ebp - 0x21c]
shl eax, 9
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.00401c84
add esp, 8
movsx eax, byte [0x406f65]
cmp eax, 0
jne 0x401c00
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0x218]
push eax
mov eax, 1
push eax
lea eax, [ebp - 0x208]
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov dword [ebp - 0x220], eax
jmp 0x401c35
mov eax, dword [ebp - 0x21c]
cmp eax, 0
je 0x401c35
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0x218]
push eax
mov eax, 1
push eax
lea eax, [ebp - 0x208]
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov dword [ebp - 0x220], eax
mov eax, dword [ebp - 0x21c]
mov ecx, eax
add eax, 1
mov dword [ebp - 0x21c], eax
jmp 0x401b73
mov eax, dword [ebp - 0x21c]
push eax
mov eax, str._Decode_write_sector___d_n
push eax
call sub.msvcrt.dll_printf
add esp, 8
mov eax, dword [ebp - 4]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, dword [ebp - 8]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, 2
jmp 0x401c82
leave
ret
Function at 0x401c84
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
nop
mov eax, dword [ebp + 0xc]
shr eax, 9
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov ecx, dword [0x403134]
cmp eax, ecx
jne 0x401d1f
mov eax, 7
push eax
mov eax, str.Encrypt
push eax
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_memcmp
add esp, 0xc
mov ecx, 0
cmp ecx, eax
jne 0x401d0f
mov eax, dword [ebp + 8]
add eax, 0xc2
movzx ecx, byte [eax]
cmp ecx, 0
jne 0x401d0f
mov eax, 0x403284
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, dword [ebp + 8]
add eax, 0x67
movzx ecx, byte [eax]
mov byte [0x406f64], cl
mov eax, 1
mov byte [0x406f65], al
jmp 0x401d1a
mov eax, 0
mov byte [0x406f65], al
jmp 0x401ddd
movsx eax, byte [0x406f65]
cmp eax, 1
jne 0x401ddd
mov eax, 0
mov word [ebp - 8], ax
mov eax, dword [ebp - 4]
mov ecx, dword [0x403130]
and eax, ecx
mov dword [ebp - 4], eax
mov eax, 0x403138
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
movzx ecx, byte [0x406f64]
add eax, ecx
and eax, 0xff
mov ecx, dword [ebp - 0xc]
add ecx, eax
movzx eax, byte [ecx]
mov byte [ebp - 5], al
mov eax, dword [ebp - 4]
movzx ecx, word [ebp - 8]
imul eax, ecx
add eax, 1
and eax, 0xff
mov ecx, dword [ebp - 0xc]
add ecx, eax
movzx eax, byte [ecx]
mov byte [ebp - 6], al
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
movzx edx, byte [ebp - 5]
mov dword [ebp - 0x10], eax
movzx eax, byte [ecx]
xor edx, eax
movzx eax, byte [ebp - 6]
xor edx, eax
mov eax, dword [ebp - 0x10]
mov byte [eax], dl
and edx, 0xff
and edx, 0xff
mov byte [ebp - 5], dl
mov eax, dword [ebp + 8]
mov ecx, eax
add eax, 1
mov dword [ebp + 8], eax
movzx eax, word [ebp - 8]
mov ecx, eax
add eax, 1
mov word [ebp - 8], ax
movzx eax, word [ebp - 8]
cmp eax, 0x200
jl 0x401d6b
leave
ret
Function at 0x401ddf
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
nop
mov eax, dword [ebp + 0xc]
shr eax, 9
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov ecx, dword [0x403134]
cmp eax, ecx
jne 0x401eb4
mov eax, 0
push eax
call sub.msvcrt.dll_time
add esp, 4
push eax
call sub.msvcrt.dll_srand
add esp, 4
mov eax, 0
mov word [ebp - 6], ax
movzx eax, word [ebp - 6]
cmp eax, 0x200
jge 0x401e90
jmp 0x401e47
movzx eax, word [ebp - 6]
mov ecx, eax
add eax, 1
mov word [ebp - 6], ax
jmp 0x401e23
movzx eax, word [ebp - 6]
cmp eax, 7
jae 0x401e72
mov eax, dword [ebp + 8]
movzx ecx, word [ebp - 6]
add eax, ecx
mov ecx, str.Encrypt
movzx edx, word [ebp - 6]
add ecx, edx
movzx edx, byte [ecx]
mov byte [eax], dl
jmp 0x401e8e
mov eax, dword [ebp + 8]
movzx ecx, word [ebp - 6]
add eax, ecx
mov dword [ebp - 0xc], eax
call sub.msvcrt.dll_rand
and eax, 0xff
mov ecx, dword [ebp - 0xc]
mov byte [ecx], al
jmp 0x401e38
mov eax, dword [ebp + 8]
add eax, 0xc2
mov ecx, 0
mov byte [eax], cl
mov eax, dword [ebp + 8]
add eax, 0x67
movzx ecx, byte [eax]
mov byte [0x406f64], cl
jmp 0x401f5f
mov eax, 0
mov word [ebp - 0x10], ax
mov eax, dword [ebp - 4]
mov ecx, dword [0x403130]
and eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx ecx, byte [0x406f64]
add eax, ecx
and eax, 0xff
mov ecx, 0x403138
add ecx, eax
movzx eax, byte [ecx]
mov byte [ebp - 0xd], al
mov eax, dword [ebp + 8]
movzx ecx, byte [eax]
mov byte [ebp - 0x11], cl
mov eax, dword [ebp - 4]
movzx ecx, word [ebp - 0x10]
imul eax, ecx
add eax, 1
and eax, 0xff
mov ecx, 0x403138
add ecx, eax
movzx eax, byte [ecx]
mov byte [ebp - 0xe], al
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
movzx edx, byte [ebp - 0xd]
mov dword [ebp - 0x18], eax
movzx eax, byte [ecx]
xor edx, eax
movzx eax, byte [ebp - 0xe]
xor edx, eax
mov eax, dword [ebp - 0x18]
mov byte [eax], dl
movzx eax, byte [ebp - 0x11]
mov byte [ebp - 0xd], al
movzx eax, word [ebp - 0x10]
mov ecx, eax
add eax, 1
mov word [ebp - 0x10], ax
mov eax, dword [ebp + 8]
mov ecx, eax
add eax, 1
mov dword [ebp + 8], eax
movzx eax, word [ebp - 0x10]
cmp eax, 0x200
jl 0x401eea
leave
ret