joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4015e5
Capabilities:
Encode data using xor

Disassembly:
mov eax, edx
dec edx
push esi
mov esi, ecx
test eax, eax
jle 0x401626
push edi
push ebx
lea edi, [edx + 1]
mov eax, dword [0x4052b0]
movzx ebx, byte [esi]
mov dx, word [eax + 0x248]
mov ecx, edx
and ecx, 0xff
xor ecx, ebx
xor ebx, ebx
mov bl, dh
mov cx, word [eax + ecx*2 + 0x40]
xor cx, bx
inc esi
dec edi
mov word [eax + 0x248], cx
jne 0x4015f4
pop ebx
pop edi
mov eax, dword [0x4052b0]
pop esi
mov ax, word [eax + 0x248]
ret

Function at 0x401976
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 8], 0xffffffff
push esi
push edi
mov esi, edx
mov edi, ecx
je 0x4019c7
lea eax, [ebp + 8]
push 0
push eax
push esi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40199f
cmp esi, dword [ebp + 8]
je 0x4019bc
mov eax, dword [0x4052b0]
mov ecx, 0x405040
lea edx, [eax + 0x13b38]
call fcn.0040155d
push 1
pop ecx
call fcn.0040100e
mov edx, esi
mov ecx, edi
call fcn.004015e5
jmp 0x401a0b
mov eax, dword [0x4052b0]
mov cl, byte [eax + 0x3446]
cmp cl, 1
jne 0x4019ec
mov ecx, 0x400
cmp esi, ecx
ja 0x4019e3
lea ecx, [esi + 1]
push ecx
push edi
add eax, 0x17e3c
jmp 0x401a04
cmp cl, 2
jne 0x401a0b
mov ecx, 0x1000
cmp esi, ecx
ja 0x4019fd
lea ecx, [esi + 1]
push ecx
push edi
add eax, 0x1823c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
pop edi
pop esi
pop ebp
ret 4

Function at 0x4024f2
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push ebx
push esi
push edi
lea eax, [ebp - 0x6c]
mov ebx, ecx
push 0x64
push eax
push 0x4051e0
mov edi, dword [ebx]
xor esi, esi
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x40256c
mov cl, byte [ebp - 0x6c]
lea eax, [ebp - 0x6c]
test cl, cl
je 0x402541
cmp cl, 0x2b
je 0x402541
cmp cl, 0x2d
je 0x402541
cmp cl, 0x30
jb 0x40253b
cmp cl, 0x39
jbe 0x402541
mov cl, byte [eax + 1]
inc eax
jmp 0x402523
mov cl, byte [eax]
cmp cl, 0x2d
jne 0x40254e
and dword [ebp - 4], 0
jmp 0x402553
cmp cl, 0x2b
jne 0x402554
inc eax
mov cl, byte [eax]
cmp cl, 0x30
jb 0x40256c
cmp cl, 0x39
ja 0x40256c
movzx ecx, cl
lea edx, [esi + esi*4]
lea esi, [ecx + edx*2 - 0x30]
jmp 0x402553
imul esi, esi, 0xe10
cmp dword [ebp - 4], 0
je 0x40257c
sub edi, esi
jmp 0x40257e
add edi, esi
mov dword [ebx], edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403c0a
Capabilities:
Check os version
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push ebx
lea eax, [ebp - 0x94]
push esi
push eax
mov dword [ebp - 0x94], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push 2
xor ebx, ebx
pop eax
cmp dword [ebp - 0x84], eax
je 0x403c44
xor eax, eax
cmp dword [ebp - 0x84], ebx
setne al
mov esi, dword [ebp + 8]
push 0x192dc
push 0x40
mov dword [0x4052ac], eax
mov dword [0x4052b4], esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [0x4052b0], eax
jne 0x403c83
push 0x2010
push str.LZH
push 0x4050d8
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x403d4e
mov byte [eax + 0x349d], bl
mov eax, dword [0x4052b0]
push 0x104
mov byte [eax + 0x1823c], bl
mov eax, dword [0x4052b0]
mov byte [eax + 0x17e3c], bl
mov eax, dword [0x4052b0]
add eax, 0x13a34
mov dword [0x4052bc], ebx
push eax
push esi
mov dword [0x4052b8], ebx
mov dword [0x4052a8], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call fcn.00403b72
mov eax, dword [0x4052b0]
mov dword [0x4052a4], ebx
push 1
test byte [eax + 0x36a0], 2
pop edx
je 0x403cea
mov dword [0x4052a4], edx
mov ecx, dword [0x4052a8]
cmp ecx, ebx
jne 0x403d04
test byte [eax + 0x36a0], dl
je 0x403d04
mov ecx, edx
mov dword [0x4052a8], ecx
cmp ecx, 0xb
jne 0x403d11
mov dword [0x4052a8], edx
jmp 0x403d1c
cmp ecx, 0xc
jne 0x403d1c
mov dword [0x4052a8], ebx
cmp dword [0x4052bc], 0xa
je 0x403d2e
test byte [eax + 0x36a0], 8
jne 0x403d34
mov dword [0x4052bc], edx
cmp dword [0x4052bc], 0xb
jne 0x403d43
mov dword [0x4052bc], ebx
xor ecx, ecx
call fcn.00402d3f
test eax, eax
jne 0x403d52
xor eax, eax
jmp 0x403da4
mov eax, dword [0x4052b0]
mov edx, 0x4052a0
lea ecx, [eax + 0x349d]
call fcn.004012b4
mov eax, dword [0x4052b0]
add eax, 0x349d
cmp byte [eax], bl
jne 0x403d81
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push ebx
push 0x403807
push ebx
push str.SfxDialog
push esi
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push dword [0x4052b0]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, esi
pop esi
pop ebx
leave
ret 0x10
Function at 0x404860
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, 0x10e0
call fcn.0040e450
push edi
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x65]
mov byte [esp + 0x64], 0
push 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
push 3
stosb byte es:[edi], al
mov eax, dword [esp + 0x10f4]
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
test edi, edi
jne 0x4048ab
pop edi
add esp, 0x10e0
ret
push ebp
lea ecx, [esp + 0xc]
push esi
push ecx
call fcn.004049c0
add esp, 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0x1770
jbe 0x4048d2
mov esi, 0x1770
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test esi, esi
je 0x40492d
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, 0x1000
mov eax, 0x1000
ja 0x4048f8
mov eax, esi
lea edx, [esp + 0xc]
push 0
push edx
push eax
lea eax, [esp + 0xf8]
push eax
push edi
call ebp
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0xec]
push ecx
lea eax, [esp + 0x14]
push edx
push eax
call fcn.004049f0
mov eax, dword [esp + 0x18]
add esp, 0xc
sub esi, eax
jne 0x4048e9
lea ecx, [esp + 0x10]
push ecx
call fcn.00406660
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
xor esi, esi
lea edi, [esp + 0x6c]
xor edx, edx
mov dl, byte [esp + esi + 0x28]
push edx
push str._02x
push edi
call ebp
add esp, 0xc
inc esi
add edi, 2
cmp esi, 0x14
jl 0x40494d
lea edi, [esp + 0x6c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10f4]
not ecx
sub edi, ecx
push eax
mov edx, ecx
mov esi, edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cl, 0x2d
mov byte [eax], 0x7b
mov byte [eax + 9], cl
mov byte [eax + 0xe], cl
mov byte [eax + 0x13], cl
mov byte [eax + 0x18], cl
mov byte [eax + 0x25], 0x7d
mov byte [eax + 0x26], 0
call dword [sym.imp.USER32.dll_CharUpperA]
pop esi
pop ebp
xor eax, eax
pop edi
add esp, 0x10e0
ret

Function at 0x4049c0
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
mov dword [eax + 0x14], ecx
mov dword [eax + 0x58], ecx
ret

Function at 0x4067f0
Capabilities:
Create service

Disassembly:
mov eax, dword [esp + 0xc]
push 0
push 0
push 0
mov ecx, dword [esp + 0x10]
push 0
push 0
push eax
mov eax, dword [esp + 0x20]
push 1
push 3
push 1
push 0xf01ff
push eax
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
jne 0x406820
ret
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
ret
Function at 0x4068a0
Capabilities:
Check os version

Disassembly:
sub esp, 0x40
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0xff
cmp eax, 5
jb 0x4068c4
mov eax, dword [esp + 0x44]
lea ecx, [esp]
push eax
push str..Global_s
push ecx
jmp 0x4068d3
mov edx, dword [esp + 0x44]
lea eax, [esp]
push edx
push str.._s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp]
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x406904
xor eax, eax
add esp, 0x40
ret
mov ecx, dword [esp + 0x48]
test ecx, ecx
je 0x406917
mov dword [ecx], eax
mov eax, 1
add esp, 0x40
ret
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
add esp, 0x40
ret

Function at 0x406930
Capabilities:
Stop service

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
sub esp, 0x1c
push esi
push 0xf01ff
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x406954
pop esi
add esp, 0x1c
ret
lea edx, [esp + 4]
push edi
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
pop edi
pop esi
add esp, 0x1c
ret

Function at 0x406d10
Capabilities:
Read file via mapping

Disassembly:
mov eax, dword [0x4156cc]
test eax, eax
je 0x406d20
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
push eax
push esi
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov dword [0x4156cc], eax
jne 0x406d44
pop esi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4156cc]
push 0
push 0
push 0
push 6
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edx, eax
test edx, edx
je 0x406d93
mov ecx, esi
push ebx
mov ebx, ecx
push edi
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, esi
mov esi, dword [esp + 0x14]
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop ebx
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, 1
pop esi
ret
Function at 0x406e47
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x40edba
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call sub.MFC42.DLL_CFrameWnd::CFrameWnd
xor ebx, ebx
lea ecx, [esi + 0xc0]
mov dword [esp + 0x18], ebx
call sub.MFC42.DLL_CToolBar::CToolBar
lea ecx, [esi + 0x160]
mov byte [esp + 0x18], 1
call fcn.00401000
lea ecx, [esi + 0x1a0]
mov byte [esp + 0x18], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x1a4]
mov byte [esp + 0x18], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x1a8]
mov byte [esp + 0x18], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x1ac]
mov byte [esp + 0x18], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x9c4]
mov byte [esp + 0x18], 6
call fcn.0040c650
lea ecx, [esi + 0x19dc]
mov byte [esp + 0x18], 7
call sub.MFC42.DLL_CString::CString
mov ecx, 0x40
xor eax, eax
mov edi, 0x4156d0
mov dword [esi], 0x411128
push 0x100
push 0x4156d0
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x9b8], ebx
mov dword [esi + 0x19d4], ebx
mov dword [esi + 0x2b4], ebx
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x408920
Capabilities:
Get common file path
Read file on windows
Write file on windows

Disassembly:
mov eax, 0xa114
call fcn.0040e450
mov eax, dword [esp + 0xa118]
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0x414b9c
push eax
mov dword [esp + 0x1c], esi
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x408973
push eax
push 0x4140f4
push 0x414d78
mov ecx, esi
call sub.MFC42.DLL_CWnd::MessageBoxA
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xa114
ret 0x14
mov eax, dword [esp + 0xa12c]
mov ecx, dword [0x4143cc]
mov ebx, dword [esp + 0xa134]
mov edi, dword [esp + 0xa130]
lea esi, [eax + eax*2]
mov ebp, dword [sym.imp.MSVCRT.dll_fseek]
shl esi, 2
push 0
lea edx, [esi + ecx]
lea eax, [edx + ebx - 0xc]
push eax
push edi
call ebp
push edi
push 1
lea ecx, [esp + 0x2c]
push 0xc
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
test eax, eax
jne 0x4089ef
mov ecx, dword [esp + 0x14]
push eax
push 0x4140f4
push 0x414d4c
call sub.MFC42.DLL_CWnd::MessageBoxA
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa114
ret 0x14
mov eax, dword [esp + 0x18]
test eax, eax
ja 0x408a14
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa114
ret 0x14
mov ecx, dword [0x4143cc]
push 0
add esi, ecx
add esi, ebx
push esi
push edi
call ebp
mov ecx, dword [esp + 0x24]
add esp, 0xc
test ecx, ecx
mov ebx, ecx
je 0x408a77
mov esi, dword [sym.imp.MSVCRT.dll_fwrite]
cmp ecx, 0xa000
jbe 0x408a44
mov ecx, 0xa000
push edi
push ecx
lea edx, [esp + 0x12c]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x134]
push ecx
push eax
push 1
push edx
call esi
mov ecx, dword [esp + 0x38]
add esp, 0x20
sub ecx, eax
mov dword [esp + 0x18], ecx
jne 0x408a37
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x24]
add esp, 4
test eax, eax
je 0x408ac8
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x25]
mov byte [esp + 0x24], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x24]
push 0x100
push ecx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov eax, dword [esp + 0xa128]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x24]
push edx
push eax
call fcn.00408f30
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x408af9
mov edi, dword [esp + 0xa128]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0xa138]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0xa114
ret 0x14
Function at 0x408b10
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, 0xa010
call fcn.0040e450
mov eax, dword [esp + 0xa014]
push ebx
push ebp
push esi
push edi
push 0x414b9c
mov ebp, ecx
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x408b5f
push eax
push 0x4140f4
push 0x414d78
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xa010
ret 0x14
mov eax, dword [esp + 0xa028]
mov ecx, dword [ebp + 0x2c0]
mov edi, dword [esp + 0xa030]
mov ebx, dword [esp + 0xa02c]
lea esi, [eax + eax*2]
push 0
shl esi, 2
add ecx, esi
lea edx, [ecx + edi - 0xc]
push edx
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
push 1
lea eax, [esp + 0x28]
push 0xc
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
test eax, eax
jne 0x408bd6
push eax
push 0x4140f4
push 0x414d4c
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa010
ret 0x14
mov eax, dword [esp + 0x14]
test eax, eax
ja 0x408bfb
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa010
ret 0x14
mov eax, dword [ebp + 0x2c0]
push 0
add eax, esi
add eax, edi
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
mov ecx, dword [esp + 0x20]
add esp, 0xc
test ecx, ecx
mov ebp, ecx
je 0x408c5c
mov esi, dword [sym.imp.MSVCRT.dll_fwrite]
cmp ecx, 0xa000
jbe 0x408c2f
mov ecx, 0xa000
push ebx
push ecx
lea ecx, [esp + 0x28]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
mov edx, dword [esp + 0x20]
push edx
push eax
lea eax, [esp + 0x38]
push 1
push eax
call esi
mov ecx, dword [esp + 0x34]
add esp, 0x20
sub ecx, eax
mov dword [esp + 0x14], ecx
jne 0x408c22
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x1c]
add esp, 4
test eax, eax
je 0x408c9b
mov edi, dword [esp + 0xa024]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0xa034]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0xa010
ret 0x14
Function at 0x408cb0
Capabilities:
Get common file path
Read file on windows
Write file on windows

Disassembly:
mov eax, 0xa138
call fcn.0040e450
push ebx
mov ebx, dword [esp + 0xa140]
push ebp
push esi
lea eax, [esp + 0x1c]
push edi
push eax
push ebx
call dword [sym.imp.MSVCRT.dll__stat]
add esp, 8
test eax, eax
jne 0x408e35
mov eax, dword [esp + 0x34]
test eax, eax
je 0x408e35
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x45]
mov byte [esp + 0x44], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x44]
push 0x104
push ecx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, str.xnfsctrl.dll
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x44]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x44]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
mov dword [esp + 0x10], esi
je 0x408d72
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str._XnfsCtrl_IsEncryptFile_12
push esi
call edi
push str._XnfsCtrl_DecryptFile_20
push esi
mov dword [0x4157d4], eax
call edi
mov dword [0x4157d0], eax
jmp 0x408d80
push 0
push 0
push str.LoadLibrary_szXnfsCtrl__error
call sub.MFC42.DLL_AfxMessageBox
mov ecx, dword [esp + 0xa154]
mov edx, dword [esp + 0xa158]
push 0x414c10
push ebx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x408e35
mov edi, dword [esp + 0xa150]
mov eax, dword [esp + 0x34]
push 2
push 0
push edi
mov dword [esp + 0x20], eax
call dword [sym.imp.MSVCRT.dll_fseek]
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
push edi
push 0xc
lea ecx, [esp + 0x28]
push 1
push ecx
call ebx
mov esi, dword [esp + 0x30]
add esp, 0x1c
test esi, esi
je 0x408e1c
cmp esi, 0xa000
mov eax, 0xa000
ja 0x408df5
mov eax, esi
push ebp
push eax
lea edx, [esp + 0x150]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
push edi
push eax
lea eax, [esp + 0x160]
push 1
push eax
call ebx
add esp, 0x20
sub esi, eax
jne 0x408de6
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
je 0x408e35
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa138
ret 0x14
Function at 0x4093d0
Capabilities:
Read file via mapping

Disassembly:
mov eax, dword [esp + 4]
push ebx
push eax
push 0
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov ebx, eax
test ebx, ebx
jne 0x4093ea
pop ebx
ret 0xc
push 0
push 0
push 0
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
jne 0x409401
pop ebx
ret 0xc
mov ecx, dword [esp + 0x10]
push esi
mov edx, ecx
push edi
mov edi, dword [esp + 0x14]
mov esi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
ret 0xc

Function at 0x409440
Capabilities:
Create process on windows
Get common file path
Resume thread

Disassembly:
sub esp, 0x2dc
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1e9]
mov byte [esp + 0x1e8], bl
mov byte [esp + 0xe4], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xe5]
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x1ec]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0xe4]
push 0x100
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0xe4]
push str._sdel.exe__p_5
push edx
call esi
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x65]
mov byte [esp + 0x64], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x64]
push 0x80
lea ecx, [esp + 0x1ec]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
lea edx, [esp + 0x64]
lea eax, [esp + 0xe4]
push edx
push eax
call esi
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x24]
mov ebp, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
rep stosd dword es:[edi], eax
xor ecx, ecx
push 0x100
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], 0x44
mov dword [esp + 0x20], ecx
mov dword [esp + 0x50], 1
mov word [esp + 0x54], bx
call ebp
mov esi, dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push eax
call esi
push 0xf
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push eax
call edi
lea edx, [esp + 0x10]
lea eax, [esp + 0x20]
push edx
push eax
push ebx
push ebx
push 0xc
push ebx
push ebx
lea ecx, [esp + 0x100]
push ebx
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40959e
mov edx, dword [esp + 0x10]
push 0x40
push edx
call esi
mov eax, dword [esp + 0x14]
push 0xfffffffffffffff1
push eax
call edi
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2dc
ret
push 0x20
call ebp
push eax
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2dc
ret
Function at 0x409920
Capabilities:
Delete file
Move file

Disassembly:
push 0xffffffffffffffff
push 0x40f1a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push esi
push str.C:WINDOWS_tmp_read_dir
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], 0
push eax
call fcn.004095c0
add esp, 4
lea ecx, [esp + 0x10]
push 0x4156d0
call sub.MFC42.DLL_CString::CString_1
push str.kerl32.sys
lea ecx, [esp + 0x14]
mov byte [esp + 0x24], 1
call fcn.0040e20c
mov ecx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ecx
call esi
push 0x4156d0
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
push str.kernel32.sys
lea ecx, [esp + 0x10]
mov byte [esp + 0x24], 2
call fcn.0040e20c
mov edx, dword [esp + 0xc]
push edx
call esi
push 0x4156d0
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::CString_1
push str.2_DgCtl_DLL.DLL
lea ecx, [esp + 8]
mov byte [esp + 0x24], 3
call fcn.0040e20c
mov eax, dword [esp + 4]
push eax
call esi
push 0x4156d0
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString_1
push str.dgctl.dll
lea ecx, [esp + 0xc]
mov byte [esp + 0x24], 4
call fcn.0040e20c
mov ecx, dword [esp + 4]
mov edx, dword [esp + 8]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 8
lea ecx, [esp + 8]
mov byte [esp + 0x20], 3
call fcn.0040e170
lea ecx, [esp + 4]
mov byte [esp + 0x20], 2
call fcn.0040e170
lea ecx, [esp + 0xc]
mov byte [esp + 0x20], 1
call fcn.0040e170
lea ecx, [esp + 0x10]
mov byte [esp + 0x20], 0
call fcn.0040e170
lea ecx, [esp + 0x14]
mov dword [esp + 0x20], 0xffffffff
call fcn.0040e170
mov ecx, dword [esp + 0x18]
pop esi
mov dword fs:[0], ecx
add esp, 0x20
ret