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

Disassembly:
mov eax, 0x42327b
call fcn.00415c8c
sub esp, 0x4c
push ebx
push ebp
push esi
xor ebx, ebx
push edi
mov dword [esp + 0x10], ebx
push 0xf
pop esi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov ebp, ecx
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
xor ecx, ecx
inc ecx
mov dword [esp + 0x64], ecx
mov al, byte [ebp + 0x30]
test al, al
je 0x40add1
mov edi, dword [esp + 0x74]
test edi, edi
je 0x40add1
mov esi, dword [esp + 0x7c]
test esi, esi
je 0x40aac0
push esi
lea ecx, [esp + 0x48]
call fcn.00401391
mov byte [esp + 0x64], 3
push 2
pop ebx
jmp 0x40aadc
push ecx
push dword [esp + 0x7c]
lea eax, [esp + 0x1c]
push dword [edi + 0x14]
push eax
call fcn.00411c8a
add esp, 0x10
push 4
pop ebx
mov dword [esp + 0x64], ebx
push eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x14], ebx
call fcn.00411237
mov dword [esp + 0x64], 3
test bl, 4
je 0x40ab07
and ebx, 0xfffffffb
lea ecx, [esp + 0x14]
mov dword [esp + 0x10], ebx
call fcn.00401530
mov dword [esp + 0x64], 1
test bl, 2
je 0x40ab24
and ebx, 0xfffffffd
lea ecx, [esp + 0x44]
mov dword [esp + 0x10], ebx
call fcn.00401530
test esi, esi
jne 0x40aba0
test byte [edi], 1
je 0x40aba0
cmp dword [esp + 0x3c], esi
je 0x40ab41
cmp dword [esp + 0x40], 0x10
lea esi, [esp + 0x2c]
cmovae esi, dword [esp + 0x2c]
lea eax, [ebp + 0x10]
cmp dword [eax + 0x14], 0x10
jb 0x40ab4c
mov eax, dword [eax]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.00413556
pop ecx
pop ecx
mov byte [esp + 0x64], 5
cmp dword [eax + 0x14], 0x10
jb 0x40ab66
mov eax, dword [eax]
push eax
lea eax, [esp + 0x48]
push esi
push eax
call fcn.0041367c
add esp, 0xc
mov byte [esp + 0x64], 6
push eax
lea ecx, [esp + 0x30]
call fcn.00411237
mov byte [esp + 0x64], 5
lea ecx, [esp + 0x44]
call fcn.00401530
mov byte [esp + 0x64], 1
lea ecx, [esp + 0x14]
call fcn.00401530
cmp dword [esp + 0x3c], 0
je 0x40ad9a
cmp dword [edi + 4], 0
je 0x40ada2
cmp dword [esp + 0x40], 0x10
lea eax, [esp + 0x2c]
cmovae eax, dword [esp + 0x2c]
push eax
call fcn.00413f4c
pop ecx
mov ecx, dword [0x4316a8]
lea eax, [ecx + 0x164]
push eax
push 1
call fcn.0040fb3c
xor ecx, ecx
cmp dword [eax], ecx
je 0x40ac21
mov ecx, dword [0x4316a8]
cmp dword [esp + 0x40], 0x10
lea eax, [ecx + 0x164]
push eax
lea esi, [esp + 0x30]
cmovae esi, dword [esp + 0x30]
push 1
call fcn.0040fb3c
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push esi
call dword [eax]
mov esi, eax
xor ecx, ecx
jmp 0x40ac23
mov esi, ecx
cmp esi, 0xffffffff
jne 0x40ac53
mov esi, dword [esp + 0x70]
or ebx, 1
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ecx
mov byte [esi], cl
mov dword [esp + 0x10], ebx
mov byte [esp + 0x64], cl
lea ecx, [esp + 0x2c]
call fcn.00401530
mov eax, esi
jmp 0x40ae27
test dword [edi], 0x100
push 0xfffffffffffffffe
mov dword [esp + 0x78], ecx
pop ebp
je 0x40acce
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
mov byte [esp + 0x64], 7
push dword [edi + 4]
lea eax, [esp + 0x18]
push dword [edi + 0x24]
push eax
call fcn.004110ad
add esp, 0xc
test al, al
je 0x40acbe
mov eax, dword [esp + 0x18]
sub eax, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x78]
push ecx
push eax
push dword [esp + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40acbb
mov eax, dword [esp + 0x18]
sub eax, dword [esp + 0x14]
cmp dword [esp + 0x74], eax
jne 0x40acbb
xor ebp, ebp
jmp 0x40acbe
or ebp, 0xffffffff
mov byte [esp + 0x64], 1
lea ecx, [esp + 0x14]
call fcn.0040530d
jmp 0x40acf5
push ecx
lea eax, [esp + 0x78]
push eax
push dword [edi + 4]
push dword [edi + 0x24]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40acf2
mov eax, dword [esp + 0x74]
cmp eax, dword [edi + 4]
jne 0x40acf2
xor ebp, ebp
jmp 0x40acf5
or ebp, 0xffffffff
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [0x4301a0]
mov edx, dword [0x4301a4]
mov eax, esi
not eax
mov edi, 0x3b9
and eax, edi
neg eax
sbb eax, eax
mov ecx, 0x80000000
and eax, ecx
add eax, ecx
shr esi, 1
or esi, eax
mov eax, 0x13d
cmp edx, eax
cmove edx, eax
mov ecx, esi
not ecx
and ecx, edi
neg ecx
sbb ecx, ecx
neg ecx
lea eax, [esi + esi]
or eax, ecx
inc edx
mov dword [0x4301a0], eax
lea eax, [edi - 0x53]
cmove edx, eax
push 0x1d
inc edx
pop eax
cmove edx, eax
mov dword [0x4301a4], edx
test ebp, ebp
je 0x40ada2
cmp dword [esp + 0x40], 0x10
lea eax, [esp + 0x2c]
cmovae eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [esp + 0x70]
xor eax, eax
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], eax
or ebx, 1
mov byte [esi], al
mov dword [esp + 0x10], ebx
mov byte [esp + 0x64], al
jmp 0x40ac43
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [esp + 0x70]
lea eax, [esp + 0x2c]
and dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
push eax
mov ecx, esi
mov byte [esi], 0
call fcn.00405164
or ebx, 1
mov dword [esp + 0x10], ebx
mov byte [esp + 0x64], 0
jmp 0x40ac43
push 0xb
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], ebx
mov byte [esp + 0x14], bl
mov byte [esp + 0x64], 2
mov ecx, dword [esp + 0x70]
lea eax, [esp + 0x14]
push eax
call fcn.00404bcb
mov dword [esp + 0x10], 1
mov byte [esp + 0x64], 1
lea ecx, [esp + 0x14]
call fcn.00401530
mov byte [esp + 0x64], bl
lea ecx, [esp + 0x2c]
call fcn.00401530
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10