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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100f4076
mov eax, dword fs:[0]
push eax
mov eax, 0x1020
call fcn.100464c0
mov eax, dword [0x101341c4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x1020]
mov dword [ebp - 0x1028], eax
call fcn.10023230
lea eax, [ebp - 0x1020]
mov dword [ebp - 4], 0
push eax
call fcn.10031020
mov edi, dword [ebp - 0x1020]
add esp, 4
test eax, eax
je 0x1003170e
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
call ebx
push edi
call ebx
push 0
push 0x80
push 1
push 0
push 1
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
mov dword [ebp - 0x1014], ecx
cmp ecx, 0xffffffff
je 0x1003170e
mov ecx, dword [esi + 8]
mov esi, dword [esi + 4]
test esi, esi
je 0x10031598
test ecx, ecx
jle 0x10031598
mov eax, ecx
cdq
and edx, 0xfff
add eax, edx
sar eax, 0xc
mov dword [ebp - 0x101c], eax
and ecx, 0x80000fff
jns 0x100314fc
dec ecx
or ecx, 0xfffff000
inc ecx
xor ebx, ebx
mov dword [ebp - 0x1018], ecx
mov dword [ebp - 0x1024], 0
test eax, eax
jle 0x10031561
push 0x1000
lea eax, [ebp - 0x1010]
push esi
push eax
call fcn.100705d0
add esp, 0xc
lea eax, [ebp - 0x1024]
push 0
push eax
push 0x1000
lea eax, [ebp - 0x1010]
push eax
push dword [ebp - 0x1014]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10031598
inc ebx
add esi, 0x1000
cmp ebx, dword [ebp - 0x101c]
jl 0x10031512
mov ecx, dword [ebp - 0x1018]
test ecx, ecx
jle 0x10031598
push ecx
lea eax, [ebp - 0x1010]
push esi
push eax
call fcn.100705d0
add esp, 0xc
lea eax, [ebp - 0x1024]
push 0
push eax
push dword [ebp - 0x1018]
lea eax, [ebp - 0x1010]
push eax
push dword [ebp - 0x1014]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x1014]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x1018]
call fcn.10023230
lea eax, [ebp - 0x1018]
mov byte [ebp - 4], 1
push eax
call fcn.10031020
mov esi, dword [ebp - 0x1018]
add esp, 4
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
cmp dword [ebp + 0xc], 0
je 0x1003160e
push 0
push esi
push edi
call fcn.100be1d0
add esp, 0xc
test eax, eax
jns 0x10031629
xor ebx, ebx
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10031710
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10031710
test edi, edi
je 0x100315e7
test esi, esi
je 0x100315e7
push esi
push 0x10030ed0
push 0
push edi
call dword [sym.imp.SETUPAPI.dll_SetupIterateCabinetW]
test eax, eax
je 0x100315e7
mov edx, dword [ebp - 0x1028]
lea ebx, [esi - 0x10]
mov eax, dword [edx]
sub eax, 0x10
mov dword [ebp - 0x102c], eax
cmp ebx, eax
je 0x100316fd
cmp dword [eax + 0xc], 0
lea ecx, [eax + 0xc]
mov dword [ebp - 0x1014], ecx
jl 0x100316f2
mov ecx, dword [ebx]
cmp ecx, dword [eax]
jne 0x100316f2
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [ebx + 0xc], 0
mov ecx, eax
lea eax, [ebx + 0xc]
jl 0x1003167b
cmp ecx, dword [ebx]
jne 0x1003167b
lock inc dword [eax]
jmp 0x100316b6
mov eax, dword [ecx]
push 2
push dword [ebx + 4]
call dword [eax]
mov edx, eax
mov dword [ebp - 0x101c], edx
test edx, edx
je 0x1003174f
mov eax, dword [ebx + 4]
mov dword [edx + 4], eax
lea eax, [ebx + 0x10]
mov ecx, dword [ebx + 4]
inc ecx
push ecx
push eax
push ecx
lea eax, [edx + 0x10]
push eax
call fcn.10009460
mov ebx, dword [ebp - 0x101c]
add esp, 0x10
mov ecx, dword [ebp - 0x1014]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x100316d6
mov edx, dword [ebp - 0x102c]
push edx
mov ecx, dword [edx]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x1028]
lea eax, [ebx + 0x10]
push edi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, 1
jmp 0x100315e9
push dword [esi - 0xc]
mov ecx, edx
push esi
call fcn.10008970
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, 1
jmp 0x100315e9
xor ebx, ebx
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1003172f
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100464aa
mov esp, ebp
pop ebp
ret 8
call fcn.100040c0
int3