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

Disassembly:
mov eax, 0x4203d2
call fcn.00412d4c
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 0x409ca1
mov edi, dword [esp + 0x74]
test edi, edi
je 0x409ca1
mov esi, dword [esp + 0x7c]
test esi, esi
je 0x4099f2
push esi
lea ecx, [esp + 0x48]
call fcn.00401391
mov byte [esp + 0x64], 3
push 2
pop ebx
jmp 0x409a0e
push ecx
push dword [esp + 0x7c]
lea eax, [esp + 0x1c]
push dword [edi + 0x14]
push eax
call fcn.0040f3ea
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.00409784
mov dword [esp + 0x64], 3
test bl, 4
je 0x409a39
and ebx, 0xfffffffb
lea ecx, [esp + 0x14]
mov dword [esp + 0x10], ebx
call fcn.004015cc
mov dword [esp + 0x64], 1
test bl, 2
je 0x409a56
and ebx, 0xfffffffd
lea ecx, [esp + 0x44]
mov dword [esp + 0x10], ebx
call fcn.004015cc
test esi, esi
jne 0x409ad2
test byte [edi], 1
je 0x409ad2
cmp dword [esp + 0x3c], esi
je 0x409a73
cmp dword [esp + 0x40], 0x10
lea esi, [esp + 0x2c]
cmovae esi, dword [esp + 0x2c]
lea eax, [ebp + 0x10]
cmp dword [eax + 0x14], 0x10
jb 0x409a7e
mov eax, dword [eax]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.004107b3
pop ecx
pop ecx
mov byte [esp + 0x64], 5
cmp dword [eax + 0x14], 0x10
jb 0x409a98
mov eax, dword [eax]
push eax
lea eax, [esp + 0x48]
push esi
push eax
call fcn.004108b8
add esp, 0xc
mov byte [esp + 0x64], 6
push eax
lea ecx, [esp + 0x30]
call fcn.00409784
mov byte [esp + 0x64], 5
lea ecx, [esp + 0x44]
call fcn.004015cc
mov byte [esp + 0x64], 1
lea ecx, [esp + 0x14]
call fcn.004015cc
cmp dword [esp + 0x3c], 0
je 0x409c6a
cmp dword [edi + 4], 0
je 0x409c72
cmp dword [esp + 0x40], 0x10
lea eax, [esp + 0x2c]
cmovae eax, dword [esp + 0x2c]
push eax
call fcn.00410fd8
pop ecx
mov ecx, dword [0x42e660]
lea eax, [ecx + 0x54]
push eax
push 1
call fcn.0040d9d1
xor ecx, ecx
cmp dword [eax], ecx
je 0x409b4d
mov ecx, dword [0x42e660]
cmp dword [esp + 0x40], 0x10
lea eax, [ecx + 0x54]
push eax
lea esi, [esp + 0x30]
cmovae esi, dword [esp + 0x30]
push 1
call fcn.0040d9d1
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push esi
call dword [eax]
mov ebp, eax
xor ecx, ecx
jmp 0x409b4f
mov ebp, ecx
cmp ebp, 0xffffffff
jne 0x409b7f
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.004015cc
mov eax, esi
jmp 0x409cf7
test dword [edi], 0x100
push 0xfffffffffffffffe
mov dword [esp + 0x78], ecx
pop esi
je 0x409bfa
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.0040ebda
add esp, 0xc
test al, al
je 0x409bea
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 0x409be7
mov eax, dword [esp + 0x18]
sub eax, dword [esp + 0x14]
cmp dword [esp + 0x74], eax
jne 0x409be7
xor esi, esi
jmp 0x409bea
or esi, 0xffffffff
mov byte [esp + 0x64], 1
lea ecx, [esp + 0x14]
call fcn.004050c3
jmp 0x409c21
push ecx
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 0x409c1e
mov eax, dword [esp + 0x74]
cmp eax, dword [edi + 4]
jne 0x409c1e
xor esi, esi
jmp 0x409c21
or esi, 0xffffffff
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x409c72
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]
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 0x409b6f
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.00404f1a
or ebx, 1
mov dword [esp + 0x10], ebx
mov byte [esp + 0x64], 0
jmp 0x409b6f
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.00404d8d
mov dword [esp + 0x10], 1
mov byte [esp + 0x64], 1
lea ecx, [esp + 0x14]
call fcn.004015cc
mov byte [esp + 0x64], bl
lea ecx, [esp + 0x2c]
call fcn.004015cc
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