Function at 0x100173f7
Capabilities:
Delete file
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x6a0
mov eax, dword [0x10086084]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
or eax, 0xffffffff
mov dword [ebp - 0x670], edx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x690], eax
xor eax, eax
push 0x34
push eax
mov dword [ebp - 0x67c], eax
mov ebx, eax
mov dword [ebp - 0x66c], eax
mov esi, eax
mov dword [ebp - 0x694], eax
mov dword [ebp - 0x660], eax
lea eax, [ebp - 0x658]
push eax
mov dword [ebp - 0x65c], ecx
mov dword [ebp - 0x684], edi
call sub.msvcrt.dll_memset
add esp, 0xc
xor eax, eax
push eax
push 0x2200000
push 3
pop ecx
push ecx
push eax
push 1
push eax
push dword [ebp - 0x670]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x678], eax
cmp eax, 0xffffffff
jne 0x100174c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10017496
movzx eax, ax
or eax, 0x80070000
mov edx, dword [ebp - 0x65c]
xor ecx, ecx
push 0x136
push 0x1000414c
push eax
push 0x1000417c
push dword [ebp - 0x670]
inc ecx
call fcn.1002fae3
xor eax, eax
jmp 0x10017767
lea ecx, [ebp - 0x658]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x1001753e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x100174e7
movzx eax, bx
or eax, 0x80070000
push 0x141
push 0x1000414c
push eax
push 0x100041a0
push dword [ebp - 0x670]
mov edx, dword [ebp - 0x65c]
xor ecx, ecx
inc ecx
call fcn.1002fae3
mov edi, dword [ebp - 0x660]
mov eax, dword [ebp - 0x678]
cmp eax, 0xffffffff
je 0x10017523
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x690]
cmp eax, 0xffffffff
je 0x10017727
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10017727
push 0x4000
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x664], esi
test esi, esi
jne 0x10017587
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x10017572
movzx eax, bx
or eax, 0x80070000
push 0x14d
push 0x1000414c
push eax
push 0x100041e4
jmp 0x100174f7
xor ecx, ecx
lea eax, [ebp - 0x67c]
push ecx
push eax
push 0x4000
push esi
push ecx
push ecx
push 0x900a8
push dword [ebp - 0x678]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x10017de4
cmp dword [ebp - 0x67c], 8
jb 0x10017de4
push dword [ebp - 0x678]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x67c]
or dword [ebp - 0x678], 0xffffffff
add eax, 0xfffffff8
cmp dword [esi], 0x80000008
mov word [esi + 4], ax
jne 0x1001787d
cmp ax, 0x24
jne 0x1001787d
mov eax, dword [ebp - 0x65c]
test eax, eax
je 0x100177d9
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x680], eax
test eax, eax
je 0x100177d9
and dword [ebp - 0x668], ebx
lea ecx, [ebp - 0x668]
push 0
push ecx
push dword [ebp - 0x67c]
mov edx, esi
mov ecx, eax
call fcn.1003fa91
test eax, eax
js 0x100177d9
mov eax, dword [ebp - 0x668]
test eax, eax
je 0x100177d9
mov eax, dword [eax + 0xc]
test eax, eax
je 0x100177d9
mov esi, dword [ebp - 0x65c]
xor ecx, ecx
push ecx
push ecx
push ecx
mov ecx, dword [ebp - 0x680]
add eax, 0x14
push eax
mov edx, esi
call fcn.10021541
mov dword [ebp - 0x694], eax
test eax, eax
je 0x100177a0
mov ecx, dword [ebp - 0x668]
mov eax, dword [ecx + 0xc]
test dword [eax + 0x10], 0x400
jne 0x100176a8
and dword [edi + 0x10], 0xfffffbff
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + 0x58]
mov dword [edi + 0x58], eax
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + 0x5c]
mov dword [edi + 0x5c], eax
mov esi, dword [ecx + 0xc]
add edi, 0x14
push 5
pop ecx
add esi, 0x14
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x684]
mov edi, dword [ebp - 0x65c]
push dword [esi + 0x2c]
push dword [esi + 0x28]
push edi
call fcn.1001bd30
mov eax, dword [ebp - 0x668]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x680], eax
test dword [eax + 0x10], 0x400
jne 0x1001771b
cmp dword [eax + 0x58], ebx
jne 0x100176f0
cmp dword [eax + 0x5c], ebx
je 0x1001771b
push dword [ebp - 0x628]
mov edx, dword [ebp - 0x62c]
mov ecx, dword [edi + 0x90]
call fcn.1003a7e4
test eax, eax
je 0x1001777a
push dword [esi + 0x2c]
xor edx, edx
mov ecx, edi
push dword [esi + 0x28]
inc edx
call fcn.10030d34
mov esi, dword [ebp - 0x664]
mov edi, dword [ebp - 0x660]
test esi, esi
je 0x1001773b
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
je 0x10017756
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
je 0x10017761
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x694]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10083b20
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x680]
lea edx, [edi + 0x90]
add eax, 0x14
push eax
push dword [ebp - 0x628]
push dword [ebp - 0x62c]
call fcn.1003a73f
jmp 0x1001771b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x100177b4
movzx eax, bx
or eax, 0x80070000
push 0x1cc
push 0x1000414c
push eax
push 0x10004248
push dword [ebp - 0x670]
xor ecx, ecx
mov edx, esi
inc ecx
call fcn.1002fae3
jmp 0x1001771b
xor eax, eax
push eax
push 0x2000000
push 3
push eax
push 7
push eax
push dword [ebp - 0x670]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x678], eax
cmp eax, 0xffffffff
je 0x1001787d
push 0x34
lea eax, [ebp - 0x658]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x658]
push eax
push dword [ebp - 0x678]
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x1001785e
test dword [ebp - 0x658], 0x400
jne 0x1001785e
cmp dword [ebp - 0x630], 1
mov ebx, 0x1126
jbe 0x10017856
mov eax, dword [ebp - 0x628]
mov dword [edi + 0x58], eax
mov eax, dword [ebp - 0x62c]
mov dword [edi + 0x5c], eax
jmp 0x1001785e
and dword [edi + 0x58], 0
and dword [edi + 0x5c], 0
push dword [ebp - 0x678]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x678], 0xffffffff
cmp ebx, 0x1126
je 0x10017721
mov ecx, dword [ebp - 0x65c]
lea edx, [ebp - 0x66c]
push 0
call fcn.10030a2b
or dword [edi + 0x5c], 0x10000
xor edx, edx
mov ecx, dword [ebp - 0x65c]
call fcn.10030a0e
test eax, eax
je 0x100178ab
mov edx, dword [eax + 0x28]
test dl, dl
jns 0x10017cca
test dword [ebp - 0x66c], 0x100
jne 0x10017cca
cmp dword [esi], 0xa0000003
je 0x100178e1
cmp dword [esi], 0xa000000c
jne 0x10017cca
test byte [esi + 0x10], 1
jne 0x10017cca
push 0x208
lea eax, [ebp - 0x214]
push 0
push eax
call sub.msvcrt.dll_memset
and dword [ebp - 0x66c], 0
add esp, 0xc
mov ecx, dword [ebp - 0x65c]
call fcn.100310f1
mov edx, 0x104
lea ecx, [ebp - 0x214]
push dword [eax]
call fcn.1001a5bc
test eax, eax
js 0x10017cca
lea eax, [ebp - 0x66c]
mov edx, 0x104
push eax
lea ecx, [ebp - 0x214]
call fcn.10015a63
test eax, eax
js 0x10017cca
mov ecx, dword [ebp - 0x66c]
mov dword [ebp - 0x668], ecx
push 0x5c
pop eax
test ecx, ecx
je 0x1001797e
cmp word [ebp + ecx*2 - 0x216], ax
jne 0x1001797e
dec ecx
mov dword [ebp - 0x668], ecx
lea eax, [ecx + ecx]
cmp eax, 0x208
jae 0x10017e19
xor edx, edx
mov word [ebp + eax - 0x214], dx
cmp dword [esi], 0xa0000003
lea edx, [esi + 0x10]
je 0x1001798c
lea edx, [esi + 0x14]
mov ax, word [esi + 8]
shr ax, 1
movzx eax, ax
mov dword [ebp - 0x69c], eax
mov ax, word [esi + 0xa]
shr ax, 1
movzx eax, ax
mov dword [ebp - 0x688], eax
mov ax, word [esi + 0xc]
shr ax, 1
movzx eax, ax
mov dword [ebp - 0x680], eax
mov ax, word [esi + 0xe]
shr ax, 1
cmp word [ebp - 0x688], 0
movzx eax, ax
mov dword [ebp - 0x674], edx
mov dword [ebp - 0x6a0], eax
jbe 0x10017cca
mov eax, dword [ebp - 0x69c]
movzx eax, ax
push 0x5c
lea ecx, [edx + eax*2]
mov dword [ebp - 0x698], ecx
pop ecx
cmp word [edx + eax*2], cx
jne 0x10017cca
push 0x3f
pop edi
cmp word [edx + eax*2 + 2], di
mov edi, dword [ebp - 0x684]
jne 0x10017cca
push 0x3f
pop ecx
cmp word [edx + eax*2 + 4], cx
mov ecx, dword [ebp - 0x668]
jne 0x10017cca
push 0x5c
pop edi
cmp word [edx + eax*2 + 6], di
mov edi, dword [ebp - 0x684]
jne 0x10017cca
cmp word [edx + eax*2 + 0xa], 0x3a
jne 0x10017cca
mov edx, dword [ebp - 0x688]
movzx edi, dx
add edi, 0xfffffffc
movzx edx, cx
cmp edx, edi
jge 0x10017a5c
mov edi, edx
mov edx, dword [ebp - 0x674]
add edx, 8
push edi
lea eax, [edx + eax*2]
push eax
push ecx
lea eax, [ebp - 0x214]
push eax
push 0x10001
push 0x409
call dword [sym.imp.KERNEL32.dll_CompareStringW]
mov edi, dword [ebp - 0x684]
dec eax
sub eax, 1
jne 0x10017cca
push 7
pop eax
cmp word [ebp - 0x688], ax
jbe 0x10017cca
push 0x208
lea eax, [ebp - 0x41c]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x624]
push 0x208
push 0
push eax
call sub.msvcrt.dll_memset
and dword [ebp - 0x68c], 0
lea ecx, [ebp - 0x41c]
and dword [ebp - 0x66c], 0
add esp, 0xc
push 6
push dword [ebp - 0x698]
call fcn.1001a509
test eax, eax
js 0x10017cca
mov edx, dword [ebp - 0x688]
mov eax, dword [ebp - 0x668]
movzx ecx, dx
mov edx, dword [ebp - 0x69c]
sub ecx, eax
sub ecx, 4
push ecx
movzx ecx, dx
add eax, ecx
mov ecx, dword [ebp - 0x674]
add ecx, 8
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x41c]
call fcn.1001a509
test eax, eax
js 0x10017cca
lea eax, [ebp - 0x68c]
mov edx, 0x104
push eax
lea ecx, [ebp - 0x41c]
call fcn.10015a63
test eax, eax
js 0x10017cca
mov eax, dword [ebp - 0x6a0]
push 3
pop ecx
cmp ax, cx
jbe 0x10017cca
movzx ecx, ax
mov eax, dword [ebp - 0x668]
mov edx, eax
cmp eax, ecx
jb 0x10017b79
mov edx, ecx
mov eax, dword [ebp - 0x680]
mov ecx, dword [ebp - 0x674]
movzx edi, ax
mov eax, dword [ebp - 0x668]
push edx
lea ecx, [ecx + edi*2]
push ecx
push eax
lea eax, [ebp - 0x214]
mov dword [ebp - 0x698], ecx
push eax
push 0x10001
push 0x409
call dword [sym.imp.KERNEL32.dll_CompareStringW]
mov edi, dword [ebp - 0x684]
dec eax
sub eax, 1
jne 0x10017cca
push 2
push dword [ebp - 0x698]
lea ecx, [ebp - 0x624]
call fcn.1001a509
test eax, eax
js 0x10017cca
mov edx, dword [ebp - 0x6a0]
mov eax, dword [ebp - 0x668]
movzx ecx, dx
mov edx, dword [ebp - 0x680]
sub ecx, eax
push ecx
movzx ecx, dx
add eax, ecx
mov ecx, dword [ebp - 0x674]
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x624]
call fcn.1001a509
test eax, eax
js 0x10017cca
lea eax, [ebp - 0x66c]
mov edx, 0x104
push eax
lea ecx, [ebp - 0x624]
call fcn.10015a63
test eax, eax
js 0x10017cca
mov ecx, dword [ebp - 0x68c]
xor eax, eax
mov edx, dword [ebp - 0x66c]
mov word [esi + 8], ax
lea eax, [ecx + ecx]
mov word [esi + 0xa], ax
add eax, 2
mov word [esi + 0xc], ax
lea eax, [edx + edx]
lea edx, [ecx + 1]
mov word [esi + 0xe], ax
mov ecx, dword [ebp - 0x674]
lea eax, [ebp - 0x41c]
push edx
push eax
call fcn.1001a4c2
test eax, eax
js 0x10017cfb
mov edx, dword [ebp - 0x66c]
lea eax, [ebp - 0x624]
mov ecx, dword [ebp - 0x68c]
inc edx
push edx
push eax
mov eax, dword [ebp - 0x674]
add eax, 2
lea ecx, [eax + ecx*2]
call fcn.1001a4c2
test eax, eax
js 0x10017cfb
mov eax, dword [ebp - 0x68c]
add eax, dword [ebp - 0x66c]
mov ecx, dword [ebp - 0x674]
add eax, eax
sub eax, esi
add ecx, 0xfffffffc
add eax, ecx
mov word [esi + 4], ax
and dword [edi + 0x5c], 0xfffeffff
mov ecx, dword [ebp - 0x65c]
lea eax, [ebp - 0x660]
push eax
xor edx, edx
call fcn.100372e6
mov ecx, eax
mov dword [ebp - 0x690], ecx
cmp ecx, 0xffffffff
jne 0x10017d37
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jg 0x10017d19
mov ecx, ebx
jmp 0x10017d22
push 0x298
push 0x1000414c
push 0x800700a1
mov ebx, 0xa1
push 0x10004274
jmp 0x100174f7
movzx ecx, bx
or ecx, 0x80070000
push 0x2b3
push 0x1000414c
push ecx
push 0x100042a0
jmp 0x100174f7
push 0
lea eax, [ebp - 0x67c]
push eax
movzx eax, word [esi + 4]
push eax
lea eax, [esi + 8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10017db9
movzx eax, word [esi + 4]
cmp dword [ebp - 0x67c], eax
jne 0x10017db9
mov eax, dword [ebp - 0x690]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
mov dword [ebp - 0x694], 1
or eax, 0xffffffff
mov dword [edi + 0x2c], ecx
mov dword [ebp - 0x690], eax
movzx eax, word [esi + 4]
push ecx
mov dword [edi + 0x28], eax
lea eax, [edi + 0x14]
mov edi, dword [ebp - 0x660]
mov edx, edi
push eax
push ecx
push ecx
mov ecx, dword [ebp - 0x65c]
call fcn.10038413
test eax, eax
jne 0x10017511
and dword [ebp - 0x694], eax
jmp 0x10017511
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jg 0x10017dc7
jmp 0x10017dcf
movzx eax, bx
or eax, 0x80070000
push 0x2c1
push 0x1000414c
push eax
push 0x100042c8
jmp 0x100174f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 0x1126
je 0x1001750b
test ebx, ebx
jle 0x10017e04
movzx eax, bx
or eax, 0x80070000
push 0x15c
push 0x1000414c
push eax
push 0x10004200
jmp 0x100174f7
call fcn.10083f9f
int3