joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404f40
Capabilities:
Check os version

Disassembly:
sub esp, 0x144
mov eax, dword [0x486d80]
xor eax, esp
mov dword [esp + 0x140], eax
mov eax, dword [0x488590]
test eax, eax
jl 0x404f7d
xor ecx, ecx
test eax, eax
setne cl
mov eax, ecx
mov ecx, dword [esp + 0x140]
xor ecx, esp
call fcn.0044efac
add esp, 0x144
ret 4
xor eax, eax
push esi
push 0x11c
push eax
lea edx, [esp + 0x30]
push edx
mov dword [0x488590], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
call fcn.0044efc0
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
add esp, 0xc
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x2c], 0x11c
call esi
test eax, eax
jne 0x404fed
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x2c], 0x114
call esi
test eax, eax
je 0x405041
push str.GetNativeSystemInfo
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x405041
lea edx, [esp + 4]
push edx
call eax
mov eax, dword [esp + 4]
cmp ax, 9
je 0x40501f
cmp ax, 6
jne 0x405041
mov eax, 1
mov dword [0x488590], eax
pop esi
mov ecx, dword [esp + 0x140]
xor ecx, esp
call fcn.0044efac
add esp, 0x144
ret 4
mov ecx, dword [esp + 0x144]
pop esi
xor ecx, esp
xor eax, eax
call fcn.0044efac
add esp, 0x144
ret 4
Function at 0x40a780
Capabilities:
Enumerate process modules
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0xa0c]
sub esp, 0xa0c
push 0xfffffffffffffffe
push 0x481b38
push 0x450fe0
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, 0x2008
call fcn.0044fef0
mov eax, dword [0x486d80]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0xa08], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, dword [ebp + 0xa14]
mov esi, dword [ebp + 0xa18]
mov dword [ebp - 0x1c], esi
xor ebx, ebx
cmp esi, ebx
je 0x40a934
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40a7f0
sub eax, edx
sar eax, 1
cmp eax, 0x104
ja 0x40a934
mov dword [ebp - 4], ebx
mov eax, dword [edi]
push edi
mov ecx, dword [eax + 8]
call ecx
mov dword [ebp - 4], 0xfffffffe
jmp 0x40a833
push 0x800
push ebx
lea edx, [ebp]
push edx
call fcn.0044efc0
mov dword [ebp - 0x20], ebx
push 0x2000
push ebx
lea eax, [ebp - 0x2020]
push eax
call fcn.0044efc0
add esp, 0x18
lea ecx, [ebp - 0x20]
push ecx
push 0x800
lea edx, [ebp - 0x2020]
push edx
call sub.PSAPI.DLL_EnumProcesses
test eax, eax
je 0x40a934
push 0x104
push esi
lea eax, [ebp + 0x800]
push eax
call fcn.0044ff5b
lea ecx, [ebp + 0x800]
push ecx
call fcn.00451ce0
add esp, 0x10
mov dword [ebp - 0x1c], ebx
cmp dword [ebp - 0x20], ebx
jbe 0x40a934
mov edi, dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, dword [ebp - 0x1c]
lea esi, [ebp + esi*4 - 0x2020]
mov edx, dword [esi]
push edx
lea ebx, [ebp]
call fcn.0040abf0
test eax, eax
je 0x40a924
mov eax, ebx
push eax
call fcn.00451ce0
add esp, 4
mov ecx, ebx
lea eax, [ebp + 0x800]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40a8fc
test dx, dx
je 0x40a8f8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40a8fc
add eax, 4
add ecx, 4
test dx, dx
jne 0x40a8d6
xor eax, eax
jmp 0x40a901
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40a924
mov eax, dword [esi]
push eax
push 0
push 1
call edi
mov esi, eax
test esi, esi
je 0x40a924
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebp - 0x20]
jb 0x40a8aa
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xa08]
xor ecx, ebp
call fcn.0044efac
add ebp, 0xa0c
mov esp, ebp
pop ebp
ret 8
Function at 0x40a960
Capabilities:
Enumerate process modules

Disassembly:
push ebp
lea ebp, [esp - 0xa0c]
sub esp, 0xa0c
push 0xfffffffffffffffe
push 0x481b18
push 0x450fe0
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, 0x2018
call fcn.0044fef0
mov eax, dword [0x486d80]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0xa08], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov ebx, dword [ebp + 0xa14]
mov edi, dword [ebp + 0xa18]
mov dword [ebp - 0x20], edi
mov eax, dword [ebp + 0xa1c]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp + 0xa20]
mov dword [ebp - 0x30], ecx
test edi, edi
je 0x40ab37
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40a9e0
sub eax, edx
sar eax, 1
mov dword [ebp - 0x2c], eax
cmp eax, 4
jl 0x40ab37
cmp eax, 0x104
jg 0x40ab37
mov dword [ebp - 4], 0
mov edx, dword [ebx]
push ebx
mov eax, dword [edx + 8]
call eax
mov dword [ebp - 4], 0xfffffffe
jmp 0x40aa31
push 0x800
push 0
lea ecx, [ebp]
push ecx
call fcn.0044efc0
mov dword [ebp - 0x1c], 0
push 0x2000
push 0
lea edx, [ebp - 0x2030]
push edx
call fcn.0044efc0
add esp, 0x18
lea eax, [ebp - 0x1c]
push eax
push 0x800
lea ecx, [ebp - 0x2030]
push ecx
call sub.PSAPI.DLL_EnumProcesses
test eax, eax
je 0x40ab37
push 0x104
push edi
lea edx, [ebp + 0x800]
push edx
call fcn.0044ff5b
lea eax, [ebp + 0x800]
push eax
call fcn.00451ce0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov esi, eax
mov dword [ebp - 0x28], esi
push esi
call fcn.0040c8c0
mov dword [ebp - 0x20], eax
xor edi, edi
cmp dword [ebp - 0x1c], edi
jbe 0x40ab37
mov eax, dword [ebp + edi*4 - 0x2030]
cmp esi, eax
je 0x40ab31
cmp dword [ebp - 0x20], eax
je 0x40ab31
push eax
lea ebx, [ebp]
call fcn.0040abf0
test eax, eax
je 0x40ab31
mov ecx, ebx
push ecx
call fcn.00451ce0
mov edx, dword [ebp - 0x2c]
push edx
mov eax, ebx
push eax
lea ecx, [ebp + 0x800]
push ecx
call fcn.00451aad
add esp, 0x10
test eax, eax
jne 0x40ab31
mov eax, dword [ebp + edi*4 - 0x2030]
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
je 0x40ab1a
mov esi, eax
call fcn.0040abd0
mov esi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x40ab31
mov edx, dword [ebp - 0x30]
push edx
push edi
mov edx, dword [ebp - 0x1c]
push edx
push eax
lea eax, [ebp]
push eax
call ecx
inc edi
cmp edi, dword [ebp - 0x1c]
jb 0x40aabb
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xa08]
xor ecx, ebp
call fcn.0044efac
add ebp, 0xa0c
mov esp, ebp
pop ebp
ret 0x10
Function at 0x40ab60
Capabilities:
Acquire debug privileges

Disassembly:
sub esp, 0x14
push esi
lea eax, [esp + 4]
push eax
push 0x28
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40abc1
lea ecx, [esp + 0xc]
push ecx
push str.SeDebugPrivilege
push esi
mov dword [esp + 0x14], 1
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov eax, dword [esp + 4]
push esi
push esi
push 0x10
lea edx, [esp + 0x14]
push edx
push esi
push eax
mov dword [esp + 0x2c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov ecx, dword [esp + 4]
push ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
add esp, 0x14
ret 4

Function at 0x40ad20
Capabilities:
Check if file exists

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0x14]
push edi
push str.Registering_dll__s
call fcn.0040c620
add esp, 8
call fcn.004048a0
test eax, eax
jne 0x40ad71
test edi, edi
je 0x40ad7e
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40ad71
push edi
call fcn.00404920
add esp, 4
test eax, eax
jne 0x40ad71
push 1
call fcn.0044eb40
push eax
push edi
call fcn.0044ed50
add esp, 0xc
jmp 0x40ad7e
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
jne 0x40ad94
push edi
push str.Can_not_load__s__return.
call fcn.0040c620
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
ret 8
push ebp
push str.DllRegisterServer
push ebx
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40adb2
call eax
xor ecx, ecx
test eax, eax
setge cl
mov ebp, ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edi
push str.Register__s_done.
call fcn.0040c620
add esp, 8
mov eax, ebp
pop ebp
pop edi
pop esi
pop ebx
ret 8
Function at 0x40b4d0
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x46caa8
mov eax, dword fs:[0]
push eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x486d80]
xor eax, esp
push eax
lea eax, [esp + 0x14]
mov dword fs:[0], eax
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x40b54d
mov ebx, dword [esp + 0x2c]
test ebx, ebx
je 0x40b54d
lea eax, [esp + 0x28]
push eax
call fcn.004081c0
mov dword [esp + 0x1c], 0
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40b565
mov dword [esp + 0x1c], 0xffffffff
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b54d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0xc
mov esi, dword [esp + 0x28]
mov eax, dword [esi - 0xc]
cmp eax, 0x100
jl 0x40b58d
lea eax, [esi - 0x10]
mov dword [esp + 0x1c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40b541
push 0x2a0
push 0
push ebx
call fcn.0044efc0
push 0x100
push esi
push ebx
call fcn.0044ff5b
mov ebp, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov ecx, dword [ebp]
mov eax, dword [ecx + 0x34]
add esp, 0x18
push edx
push ebp
call eax
mov dword [ebx + 0x208], eax
test eax, eax
je 0x40b5f2
mov ecx, dword [ebp]
lea edx, [ebx + 0x28c]
push edx
mov edx, dword [esp + 0x2c]
lea eax, [ebx + 0x288]
push eax
mov eax, dword [ecx + 0x3c]
push edx
push ebp
call eax
mov edi, dword [esp + 0x28]
lea esi, [ebx + 0x218]
call fcn.004149f0
jmp 0x40b61c
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
test eax, eax
je 0x40b61c
mov ecx, dword [ebp + 8]
push ecx
push 0x10
lea edx, [ebx + 0x218]
push edx
push 0
push 0x479564
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov edx, dword [esp + 0x28]
mov eax, dword [ebp]
mov eax, dword [eax + 0x38]
push 0x28
lea ecx, [ebx + 0x238]
push ecx
push edx
push ebp
call eax
lea ecx, [esp + 0x28]
call fcn.00414b00
mov dword [ebx + 0x210], eax
mov dword [esp + 0x1c], 0xffffffff
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov dword [ebx + 0x214], edx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b670
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x40b54f
Function at 0x40bad0
Capabilities:
Check if file exists

Disassembly:
sub esp, 0x68
mov eax, dword [0x486d80]
xor eax, esp
mov dword [esp + 0x64], eax
push esi
mov esi, dword [esp + 0x74]
push edi
mov edi, dword [esp + 0x7c]
xor eax, eax
test edi, edi
je 0x40bb50
mov word [edi], ax
test esi, esi
jne 0x40bb0a
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.0044efac
add esp, 0x68
ret 0x10
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40baf5
push 0x64
lea ecx, [esp + 0xc]
push 0
push ecx
call fcn.0044efc0
add esp, 0xc
lea eax, [esp + 8]
mov ecx, esi
call fcn.004148d0
test eax, eax
je 0x40baf5
mov eax, dword [esp + 0x80]
push ebx
push edi
lea ebx, [esp + 0x10]
call fcn.00414990
add esp, 4
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x6c]
pop edi
pop esi
xor ecx, esp
call fcn.0044efac
add esp, 0x68
ret 0x10

Function at 0x40bcc0
Capabilities:
Shutdown system

Disassembly:
sub esp, 0x14
lea eax, [esp]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40bce2
xor eax, eax
add esp, 0x14
ret 4
lea ecx, [esp + 8]
push ecx
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov eax, dword [esp]
push 0
push 0
push 0
lea edx, [esp + 0x10]
push edx
push 0
push eax
mov dword [esp + 0x1c], 1
mov dword [esp + 0x28], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40bcda
push 0x80020003
push 0x12
call dword [sym.imp.USER32.dll_ExitWindowsEx]
neg eax
sbb eax, eax
neg eax
add esp, 0x14
ret 4

Function at 0x40c060
Capabilities:
Get disk information
Get disk size

Disassembly:
sub esp, 0x14
mov eax, dword [0x486d80]
xor eax, esp
mov dword [esp + 0x10], eax
mov eax, dword [0x479654]
mov ecx, dword [0x479658]
mov dx, word [esp + 0x1c]
mov dword [esp + 8], eax
lea eax, [esp + 8]
push eax
mov dword [esp + 0x10], ecx
mov word [esp + 0xc], dx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
je 0x40c0b0
xor eax, eax
xor edx, edx
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.0044efac
add esp, 0x14
ret 8
xor eax, eax
lea ecx, [esp]
push ecx
push eax
push eax
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x40c09b
mov ecx, dword [esp + 0x10]
mov eax, dword [esp]
mov edx, dword [esp + 4]
xor ecx, esp
call fcn.0044efac
add esp, 0x14
ret 8
Function at 0x40cce0
Capabilities:
Check if file exists

Disassembly:
cmp dword [0x48a244], 0
jne 0x40cd22
call fcn.004048a0
test eax, eax
jne 0x40cd43
test esi, esi
je 0x40cd1f
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40cd43
push esi
call fcn.00404920
add esp, 4
test eax, eax
jne 0x40cd43
push 1
call fcn.0044eb40
push eax
push esi
call fcn.0044ed50
add esp, 0xc
xor eax, eax
ret
call fcn.004048a0
test eax, eax
jne 0x40cd43
test esi, esi
je 0x40cd1f
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40cd43
push esi
call fcn.00404920
add esp, 4
mov eax, 1
ret

Function at 0x40ced0
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x46c628
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x486d80]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
mov edi, dword [esp + 0x1c]
cmp dword [edi + 4], 0
je 0x40cf50
mov eax, dword [0x488d58]
mov edx, dword [eax + 0xc]
mov ecx, 0x488d58
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x18], 0
call fcn.0040d340
test eax, eax
jne 0x40cf67
mov dword [esp + 0x14], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cf50
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0xc
ret 0xc
lea eax, [esp + 0x1c]
call fcn.0040cfd0
test eax, eax
je 0x40cf28
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
push ecx
push edx
push esi
call fcn.0043d020
add esp, 0xc
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esi - 0x10]
mov dword [esp + 0x14], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cfb8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0xc
ret 0xc
Function at 0x40d1e0
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x46c5f8
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x486d80]
xor eax, esp
mov dword [esp + 0x14], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x486d80]
xor eax, esp
push eax
lea eax, [esp + 0x2c]
mov dword fs:[0], eax
mov eax, dword [0x488d58]
mov edx, dword [eax + 0xc]
mov edi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x40]
mov ebp, dword [esp + 0x44]
mov ecx, 0x488d58
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x38], 0
call fcn.0040d340
test eax, eax
jne 0x40d279
mov dword [esp + 0x34], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d272
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0xffffd8ef
jmp 0x40d2f2
lea edx, [esp + 0x14]
mov ecx, edi
call fcn.0040d490
test eax, eax
je 0x40d24a
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x18]
mov ecx, esi
call fcn.004148d0
lea eax, [edi + 0xc]
lea edx, [esp + 0x18]
mov ecx, 0x10
sub edx, eax
mov edi, dword [edx + eax]
cmp edi, dword [eax]
jne 0x40d313
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x40d2a5
push ebp
push ebx
push esi
call fcn.0043d020
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esi - 0x10]
mov dword [esp + 0x34], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d2ed
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0044efac
add esp, 0x24
ret 0xc
lea eax, [esi - 0x10]
mov dword [esp + 0x34], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d337
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0xffffd8ee
jmp 0x40d2f2
Function at 0x40d340
Capabilities:
Check if file exists
Get common file path

Disassembly:
mov eax, 0x1104
call fcn.0044fef0
mov eax, dword [0x486d80]
xor eax, esp
mov dword [esp + 0x1100], eax
push ebx
push ebp
mov ebp, dword [esp + 0x1110]
push esi
push edi
push 0x800
lea eax, [esp + 0x914]
push 0
push eax
call fcn.0044efc0
push 0x800
lea ecx, [esp + 0x120]
push 0
push ecx
call fcn.0044efc0
push 0x100
lea edx, [esp + 0x2c]
push 0
push edx
call fcn.0044efc0
add esp, 0x24
lea eax, [esp + 0x910]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathCombineW]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor esi, esi
mov edx, dword [0x48a250]
mov eax, dword [edx + 0x2c]
push 0x80
lea ecx, [esp + 0x14]
push ecx
push 0x48a250
call eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x914]
push edx
lea eax, [esp + 0x118]
push eax
call edi
lea eax, [esp + 0x110]
add eax, 0xfffffffe
jmp 0x40d400
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x40d400
mov ecx, dword [0x479840]
mov edx, dword [0x479844]
mov dword [eax], ecx
mov dword [eax + 4], edx
lea eax, [esp + 0x110]
push eax
call ebx
test eax, eax
je 0x40d44e
inc esi
cmp esi, 0xa
jl 0x40d3c0
xor eax, eax
mov ecx, dword [esp + 0x1110]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044efac
add esp, 0x1104
ret 4
lea eax, [esp + 0x110]
lea edx, [eax + 2]
jmp 0x40d460
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d460
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x110]
mov ebx, eax
push ecx
mov eax, ebp
call fcn.00402bd0
mov eax, 1
jmp 0x40d433
Function at 0x40d490
Capabilities:
Check if file exists
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x1004
call fcn.0044fef0
mov eax, dword [0x486d80]
xor eax, esp
mov dword [esp + 0x1000], eax
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0x1c]
cmp dword [eax - 0xc], 0
mov ebx, edx
jne 0x40d4d0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1000]
xor ecx, esp
call fcn.0044efac
add esp, 0x1004
ret
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d4b7
mov eax, dword [esi + 0x1c]
push edi
push 0x47986c
push eax
call fcn.00450eff
mov edi, eax
add esp, 8
test edi, edi
jne 0x40d50b
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1000]
xor ecx, esp
call fcn.0044efac
add esp, 0x1004
ret
mov eax, dword [esi + 4]
push 0
push eax
push edi
call fcn.00452894
mov eax, dword [ebx]
push 0x478808
push eax
call fcn.00450eff
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x40d5c9
push 0x1000
lea ecx, [esp + 0x10]
push 0
push ecx
call fcn.0044efc0
mov esi, dword [esi + 8]
mov eax, esi
cdq
and edx, 0xfff
add eax, edx
add esp, 0xc
sar eax, 0xc
and esi, 0x80000fff
jns 0x40d566
dec esi
or esi, 0xfffff000
inc esi
test eax, eax
jle 0x40d59d
push ebp
mov ebp, eax
lea ecx, [ecx]
push edi
push 1
lea edx, [esp + 0x18]
push 0x1000
push edx
call fcn.00450d03
push ebx
push 1
lea eax, [esp + 0x28]
push 0x1000
push eax
call fcn.004509e1
add esp, 0x20
sub ebp, 1
jne 0x40d570
pop ebp
test esi, esi
je 0x40d5c0
push edi
push 1
lea ecx, [esp + 0x14]
push esi
push ecx
call fcn.00450d03
push ebx
push 1
lea edx, [esp + 0x24]
push esi
push edx
call fcn.004509e1
add esp, 0x20
push ebx
call fcn.00450803
add esp, 4
push edi
call fcn.00450803
mov ecx, dword [esp + 0x1010]
add esp, 4
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0044efac
add esp, 0x1004
ret

Function at 0x40d6b0
Capabilities:
Delete file

Disassembly:
push ecx
push esi
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x80
push 1
push 0
push 1
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40d6e0
xor eax, eax
pop esi
pop ecx
ret
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
push eax
push esi
lea edx, [esp + 0xc]
mov dword [esp + 0xc], 0
call fcn.0040d710
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop esi
pop ecx
ret