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

Disassembly:
mov eax, 0x4222cb
call fcn.00414d1c
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 0x40a223
mov edi, dword [esp + 0x74]
test edi, edi
je 0x40a223
mov esi, dword [esp + 0x7c]
test esi, esi
je 0x409f0b
push esi
lea ecx, [esp + 0x48]
call fcn.00401391
mov byte [esp + 0x64], 3
push 2
pop ebx
jmp 0x409f27
push ecx
push dword [esp + 0x7c]
lea eax, [esp + 0x1c]
push dword [edi + 0x14]
push eax
call fcn.00410af2
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.00409c9a
mov dword [esp + 0x64], 3
test bl, 4
je 0x409f52
and ebx, 0xfffffffb
lea ecx, [esp + 0x14]
mov dword [esp + 0x10], ebx
call fcn.0040150a
mov dword [esp + 0x64], 1
test bl, 2
je 0x409f6f
and ebx, 0xfffffffd
lea ecx, [esp + 0x44]
mov dword [esp + 0x10], ebx
call fcn.0040150a
test esi, esi
jne 0x40a02f
test byte [edi], 1
je 0x409fef
cmp dword [esp + 0x3c], esi
je 0x409f90
cmp dword [esp + 0x40], 0x10
lea esi, [esp + 0x2c]
cmovae esi, dword [esp + 0x2c]
lea eax, [ebp + 0x10]
cmp dword [eax + 0x14], 0x10
jb 0x409f9b
mov eax, dword [eax]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.004122d7
pop ecx
pop ecx
mov byte [esp + 0x64], 5
cmp dword [eax + 0x14], 0x10
jb 0x409fb5
mov eax, dword [eax]
push eax
lea eax, [esp + 0x48]
push esi
push eax
call fcn.00412376
add esp, 0xc
mov byte [esp + 0x64], 6
push eax
lea ecx, [esp + 0x30]
call fcn.00409c9a
mov byte [esp + 0x64], 5
lea ecx, [esp + 0x44]
call fcn.0040150a
mov byte [esp + 0x64], 1
lea ecx, [esp + 0x14]
call fcn.0040150a
mov ecx, dword [0x42f1a0]
mov eax, ecx
not eax
and eax, 0x2b2
neg eax
sbb eax, eax
and eax, 0x80000000
add eax, 0x80000000
shr ecx, 1
or ecx, eax
mov eax, dword [0x42f1a4]
shl eax, 0xf
or eax, 0xe00001
push 0x1d
mov dword [0x42f1a0], ecx
inc eax
pop ecx
cmove eax, ecx
mov dword [0x42f1a4], eax
cmp dword [esp + 0x3c], 0
je 0x40a1ec
cmp dword [edi + 4], 0
je 0x40a1f4
cmp dword [esp + 0x40], 0x10
lea eax, [esp + 0x2c]
cmovae eax, dword [esp + 0x2c]
push eax
call fcn.00412d18
pop ecx
mov ecx, dword [0x43069c]
lea eax, [ecx + 0x60]
push eax
push 1
call fcn.004049a8
cmp dword [eax], 0
je 0x40a0a7
mov ecx, dword [0x43069c]
cmp dword [esp + 0x40], 0x10
lea eax, [ecx + 0x60]
push eax
lea esi, [esp + 0x30]
cmovae esi, dword [esp + 0x30]
push 1
call fcn.004049a8
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push esi
call dword [eax]
mov ebp, eax
jmp 0x40a0a9
xor ebp, ebp
cmp dword [0x42f1a4], 0
jne 0x40a0ba
push 0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x42f1a0]
mov eax, ecx
not eax
and eax, 0x2b2
neg eax
sbb eax, eax
mov edx, 0x80000000
and eax, edx
add eax, edx
shr ecx, 1
or ecx, eax
xor eax, eax
mov dword [0x42f1a0], ecx
mov dword [0x42f1a4], 0x10000293
cmp ebp, 0xffffffff
jne 0x40a11c
mov esi, dword [esp + 0x70]
or ebx, 1
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], eax
mov byte [esi], al
mov dword [esp + 0x10], ebx
mov byte [esp + 0x64], al
lea ecx, [esp + 0x2c]
call fcn.0040150a
mov eax, esi
jmp 0x40a279
test dword [edi], 0x100
push 0xfffffffffffffffe
mov dword [esp + 0x78], eax
pop esi
je 0x40a197
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov byte [esp + 0x64], 7
push dword [edi + 4]
lea eax, [esp + 0x18]
push dword [edi + 0x24]
push eax
call fcn.004100ca
add esp, 0xc
test al, al
je 0x40a187
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 ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a184
mov eax, dword [esp + 0x18]
sub eax, dword [esp + 0x14]
cmp dword [esp + 0x74], eax
jne 0x40a184
xor esi, esi
jmp 0x40a187
or esi, 0xffffffff
mov byte [esp + 0x64], 1
lea ecx, [esp + 0x14]
call fcn.00404e1a
jmp 0x40a1be
push eax
lea eax, [esp + 0x78]
push eax
push dword [edi + 4]
push dword [edi + 0x24]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a1bb
mov eax, dword [esp + 0x74]
cmp eax, dword [edi + 4]
jne 0x40a1bb
xor esi, esi
jmp 0x40a1be
or esi, 0xffffffff
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x40a1f4
cmp dword [esp + 0x40], 0x10
lea eax, [esp + 0x2c]
cmovae eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40a0f1
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.00404c71
or ebx, 1
mov dword [esp + 0x10], ebx
mov byte [esp + 0x64], 0
jmp 0x40a10c
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.00404a91
mov dword [esp + 0x10], 1
mov byte [esp + 0x64], 1
lea ecx, [esp + 0x14]
call fcn.0040150a
mov byte [esp + 0x64], bl
lea ecx, [esp + 0x2c]
call fcn.0040150a
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