Function at 0x476a30
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x248
mov eax, dword [0x76d15c]
mov dword [ebp - 0x228], 0
test eax, eax
je 0x477630
lea ebx, [ebp - 0x214]
mov dword [esp], 0x104
mov dword [esp + 4], ebx
call dword [sym.imp.kernel32.dll_GetTempPathA]
lea eax, [ebp - 0x110]
sub esp, 8
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59b207
call dword [sym.imp.kernel32.dll_GetTempFileNameA]
lea eax, [ebp - 0x110]
mov edi, dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x10
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], eax
call edi
sub esp, 0x1c
mov ebx, eax
lea eax, [ebp - 0x22c]
mov dword [esp], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 4
mov dword [esp + 4], 0x59ccfa
call dword [sym.imp.kernel32.dll_WriteFile]
mov eax, dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 0x14
mov dword [esp], ebx
mov dword [ebp - 0x230], eax
call eax
sub esp, 4
mov ebx, dword fs:[0x18]
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], 0xffffffff
call dword [0x76d15c]
mov edx, dword [ebx + 0x34]
sub esp, 0xc
mov esi, eax
mov eax, 0x121b
mov dword [ebp - 0x234], edx
call fcn.0045b740
xor eax, eax
test esi, esi
mov dword [esp + 4], str.SetFileValidData_succeeded_n
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0x121c
call fcn.0045b740
mov edx, dword [ebp - 0x234]
xor eax, eax
mov dword [esp + 4], 0x59cd1b
cmp edx, 6
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 4], 0xffffffff
mov dword [esp + 8], 0xffffffff
mov dword [esp], 0xffffffff
call dword [0x76d15c]
mov edx, dword [ebx + 0x34]
sub esp, 0xc
mov esi, eax
mov eax, 0x1221
mov dword [ebp - 0x234], edx
call fcn.0045b740
xor eax, eax
test esi, esi
mov dword [esp + 4], str.SetFileValidData_succeeded_n
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0x1222
call fcn.0045b740
mov edx, dword [ebp - 0x234]
xor eax, eax
mov dword [esp + 4], 0x59cd1b
cmp edx, 6
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.0045bef0
lea ecx, [ebp - 0x110]
mov dword [esp + 0x18], 0
mov dword [esp], ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80000000
call edi
mov dword [ebx + 0x34], 0xdeadbeef
sub esp, 0x1c
mov esi, eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [0x76d15c]
sub esp, 0xc
mov dword [ebp - 0x234], eax
mov eax, 0x1229
call fcn.0045b740
mov dword [esp + 4], str.SetFileValidData_succeeded_n
xor eax, eax
mov edx, dword [ebp - 0x234]
test edx, edx
sete al
mov dword [esp], eax
call fcn.0045bef0
mov edx, dword [ebx + 0x34]
mov eax, 0x122b
mov dword [ebp - 0x234], edx
call fcn.0045b740
mov edx, dword [ebp - 0x234]
xor eax, eax
mov dword [esp + 4], 0x59cd1b
cmp edx, 5
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp], esi
mov dword [esp + 4], 0xffffffff
mov dword [esp + 8], 0xffffffff
call dword [0x76d15c]
mov ecx, dword [ebx + 0x34]
sub esp, 0xc
mov dword [ebp - 0x238], eax
mov eax, 0x1230
mov dword [ebp - 0x234], ecx
call fcn.0045b740
mov dword [esp + 4], str.SetFileValidData_succeeded_n
xor eax, eax
mov edx, dword [ebp - 0x238]
test edx, edx
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0x1231
call fcn.0045b740
mov ecx, dword [ebp - 0x234]
xor eax, eax
mov dword [esp + 4], 0x59cd1b
cmp ecx, 5
mov dword [esp + 8], ecx
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], esi
mov eax, dword [ebp - 0x230]
call eax
lea eax, [ebp - 0x110]
sub esp, 4
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], eax
call edi
mov dword [ebx + 0x34], 0xdeadbeef
sub esp, 0x1c
mov esi, eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [0x76d15c]
mov ebx, dword [ebx + 0x34]
sub esp, 0xc
mov dword [ebp - 0x234], eax
mov eax, 0x1239
call fcn.0045b740
mov dword [esp + 4], str.SetFileValidData_succeeded_n
xor eax, eax
mov edx, dword [ebp - 0x234]
test edx, edx
sete al
mov dword [esp], eax
call fcn.0045bef0
mov ecx, dword [0x8f0770]
mov dword [ebp - 0x234], ecx
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
mov ecx, dword [ebp - 0x234]
test ecx, ecx
setne cl
movzx ecx, cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x476e79
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x123a
xor eax, eax
cmp ebx, 0x522
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], 0x59cd1b
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x476e40
mov dword [esp], esi
mov eax, dword [ebp - 0x230]
call eax
lea eax, [ebp - 0x228]
mov dword [ebp - 0x224], 1
mov dword [ebp - 0x218], 2
sub esp, 4
mov dword [esp + 8], eax
mov dword [esp + 4], 0x20
mov dword [esp], 0xffffffff
call dword [sym.imp.advapi32.dll_OpenProcessToken]
sub esp, 0xc
test eax, eax
je 0x476efa
lea eax, [ebp - 0x220]
mov dword [esp + 4], str.SeManageVolumePrivilege
mov dword [esp + 8], eax
mov dword [esp], 0
call dword [sym.imp.advapi32.dll_LookupPrivilegeValueA]
sub esp, 0xc
test eax, eax
jne 0x476f40
mov eax, 0x1245
call fcn.0045b740
mov dword [esp], str.cannot_enable_SE_MANAGE_VOLUME_NAME_privilege_n
call fcn.0045bec0
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
mov eax, dword [ebp - 0x230]
call eax
lea eax, [ebp - 0x110]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x224]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_AdjustTokenPrivileges]
mov dword [ebp - 0x234], eax
call eax
sub esp, 0x18
test eax, eax
je 0x476efa
mov ebx, dword fs:[0x18]
cmp dword [ebx + 0x34], 0x514
je 0x476efa
lea eax, [ebp - 0x110]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], eax
call edi
mov dword [ebx + 0x34], 0xdeadbeef
sub esp, 0x1c
mov edi, eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [0x76d15c]
mov edx, dword [ebx + 0x34]
sub esp, 0xc
mov esi, eax
mov eax, 0x124f
mov dword [ebp - 0x238], edx
call fcn.0045b740
xor eax, eax
test esi, esi
mov dword [esp + 4], str.SetFileValidData_succeeded_n
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0x1250
call fcn.0045b740
mov edx, dword [ebp - 0x238]
xor eax, eax
mov dword [esp + 4], 0x59cd1b
cmp edx, 0x57
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp], edi
mov dword [esp + 4], 0xffffffff
mov dword [esp + 8], 0xffffffff
call dword [0x76d15c]
mov edx, dword [ebx + 0x34]
sub esp, 0xc
mov esi, eax
mov eax, 0x1255
mov dword [ebp - 0x238], edx
call fcn.0045b740
xor eax, eax
test esi, esi
mov dword [esp + 4], str.SetFileValidData_succeeded_n
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0x1256
call fcn.0045b740
mov edx, dword [ebp - 0x238]
xor eax, eax
mov dword [esp + 4], 0x59cd1b
cmp edx, 0x57
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp], edi
mov dword [esp + 4], 2
mov dword [esp + 8], 0
call dword [0x76d15c]
mov ebx, dword [ebx + 0x34]
mov esi, eax
mov eax, dword [0x8f0770]
sub esp, 0xc
call fcn.0045b110
jmp 0x477139
mov eax, 0x125b
call fcn.0045b740
xor eax, eax
test esi, esi
mov dword [esp + 4], str.SetFileValidData_succeeded_n
sete al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x477110
mov eax, dword [0x8f0770]
call fcn.0045b110
jmp 0x477196
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x125c
xor eax, eax
cmp ebx, 0x57
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], 0x59cd1b
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x477160
mov dword [esp], edi
mov dword [esp + 4], 4
mov dword [esp + 8], 0
call dword [0x76d15c]
sub esp, 0xc
mov esi, eax
mov eax, 0x125f
call fcn.0045b740
mov ebx, dword fs:[0x18]
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 4], str.SetFileValidData_failed__lu_n
mov dword [esp + 8], eax
call fcn.0045bef0
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp], edi
mov dword [esp + 4], 8
mov dword [esp + 8], 0
call dword [0x76d15c]
mov edx, dword [ebx + 0x34]
sub esp, 0xc
mov esi, eax
mov eax, 0x1264
mov dword [ebp - 0x238], edx
call fcn.0045b740
xor eax, eax
test esi, esi
mov dword [esp + 4], str.SetFileValidData_succeeded_n
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0x1265
call fcn.0045b740
mov edx, dword [ebp - 0x238]
xor eax, eax
mov dword [esp + 4], 0x59cd1b
cmp edx, 0x57
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], edi
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x400
call dword [sym.imp.kernel32.dll_SetFilePointer]
sub esp, 0x10
mov dword [ebp - 0x22c], eax
mov eax, 0x1268
call fcn.0045b740
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.SetFilePointer_failed__lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebp - 0x22c], 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_SetEndOfFile]
sub esp, 4
mov esi, eax
mov eax, 0x126a
call fcn.0045b740
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 4], str.SetEndOfFile_failed__lu_n
mov dword [esp + 8], eax
call fcn.0045bef0
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp], edi
mov dword [esp + 4], 2
mov dword [esp + 8], 0
call dword [0x76d15c]
mov ebx, dword [ebx + 0x34]
mov esi, eax
mov eax, dword [0x8f0770]
sub esp, 0xc
call fcn.0045b110
jmp 0x477359
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x126f
xor eax, eax
test esi, esi
sete al
mov dword [esp + 4], str.SetFileValidData_succeeded_n
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x477328
mov eax, dword [0x8f0770]
call fcn.0045b110
jmp 0x4773b6
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x1270
xor eax, eax
cmp ebx, 0x57
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], 0x59cd1b
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x477380
mov dword [esp], edi
mov dword [esp + 4], 4
mov dword [esp + 8], 0
call dword [0x76d15c]
sub esp, 0xc
mov esi, eax
mov eax, 0x1273
call fcn.0045b740
mov ebx, dword fs:[0x18]
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 4], str.SetFileValidData_failed__lu_n
mov dword [esp + 8], eax
call fcn.0045bef0
mov dword [esp], edi
mov dword [esp + 4], 8
mov dword [esp + 8], 0
call dword [0x76d15c]
sub esp, 0xc
mov esi, eax
mov eax, 0x1276
call fcn.0045b740
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 4], str.SetFileValidData_failed__lu_n
mov dword [esp + 8], eax
call fcn.0045bef0
mov dword [esp], edi
mov dword [esp + 4], 4
mov dword [esp + 8], 0
call dword [0x76d15c]
mov ebx, dword [ebx + 0x34]
mov esi, eax
mov eax, dword [0x8f0770]
sub esp, 0xc
call fcn.0045b110
jmp 0x4774b1
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x127a
xor eax, eax
test esi, esi
sete al
mov dword [esp + 4], str.SetFileValidData_succeeded_n
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x477480
mov eax, dword [0x8f0770]
call fcn.0045b110
jmp 0x4774fe
mov eax, 0x127b
call fcn.0045b740
xor eax, eax
cmp ebx, 0x57
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], 0x59cd1b
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x4774d0
mov dword [esp + 4], 0x400
mov dword [esp + 8], 0
mov dword [esp], edi
call dword [0x76d15c]
sub esp, 0xc
mov ebx, eax
mov eax, 0x127e
call fcn.0045b740
mov esi, dword fs:[0x18]
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.SetFileValidData_failed__lu_n
mov dword [esp + 8], eax
call fcn.0045bef0
mov dword [esp + 4], 0x800
mov dword [esp + 8], 0
mov dword [esp], edi
call dword [0x76d15c]
mov esi, dword [esi + 0x34]
sub esp, 0xc
mov ebx, eax
mov eax, 0x1282
call fcn.0045b740
xor eax, eax
test ebx, ebx
mov dword [esp + 4], str.SetFileValidData_succeeded_n
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0x1283
call fcn.0045b740
xor eax, eax
cmp esi, 0x57
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], 0x59cd1b
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x224]
mov dword [ebp - 0x218], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
mov eax, dword [ebp - 0x234]
call eax
mov eax, dword [ebp - 0x228]
sub esp, 0x18
mov dword [esp], eax
mov esi, dword [ebp - 0x230]
mov eax, esi
call eax
mov eax, esi
sub esp, 4
mov dword [esp], edi
jmp 0x476f1f
mov eax, 0x120f
call fcn.0045b740
mov dword [esp], str.SetFileValidData_is_missing_n
call fcn.0045bec0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret