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

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0x68
push 0xffffffffffffffff
push 0x424934
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb8
mov dword [ebp + 4], ecx
mov dword [ebp + 0x64], 0
mov eax, dword [ebp + 4]
mov cl, byte [eax + 0x30]
mov byte [ebp + 0x63], cl
movzx edx, byte [ebp + 0x63]
test edx, edx
je 0x40a874
cmp dword [ebp + 0x74], 0
jne 0x40a8e5
push 0xb
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
push 0
push 0
lea ecx, [ebp - 0x64]
call fcn.00406627
lea eax, [ebp - 0x64]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp + 0x70]
mov dword [ecx + 0x10], 0
mov edx, dword [ebp + 0x70]
mov dword [edx + 0x14], 0
push 0
push 0
mov ecx, dword [ebp + 0x70]
call fcn.00406627
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x70]
call fcn.0040629d
mov ecx, dword [ebp + 0x64]
or ecx, 1
mov dword [ebp + 0x64], ecx
push 0
push 1
lea ecx, [ebp - 0x64]
call fcn.00406627
mov eax, dword [ebp + 0x70]
jmp 0x40ad52
cmp dword [ebp + 0x7c], 0
je 0x40a918
mov edx, dword [ebp + 0x7c]
push edx
lea ecx, [ebp - 0x7c]
call fcn.00405ba6
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0x64]
or ecx, 2
mov dword [ebp + 0x64], ecx
mov edx, dword [ebp - 0x18]
mov dword [ebp + 8], edx
jmp 0x40a946
push 1
mov eax, dword [ebp + 0x78]
push eax
mov ecx, dword [ebp + 0x74]
mov edx, dword [ecx + 0x14]
push edx
lea eax, [ebp - 0xac]
push eax
call fcn.0040bad0
add esp, 0x10
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp + 0x64]
or ecx, 4
mov dword [ebp + 0x64], ecx
mov edx, dword [ebp - 0x28]
mov dword [ebp + 8], edx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], eax
mov dword [ebp + 0x2c], 0
mov dword [ebp + 0x30], 0
push 0
push 0
lea ecx, [ebp + 0x1c]
call fcn.00406627
mov ecx, dword [ebp - 0x20]
push ecx
lea ecx, [ebp + 0x1c]
call fcn.0040629d
mov dword [ebp - 4], 1
mov edx, dword [ebp + 0x64]
and edx, 4
je 0x40a994
and dword [ebp + 0x64], 0xfffffffb
push 0
push 1
lea ecx, [ebp - 0xac]
call fcn.00406627
mov byte [ebp - 4], 2
mov eax, dword [ebp + 0x64]
and eax, 2
je 0x40a9b0
and dword [ebp + 0x64], 0xfffffffd
push 0
push 1
lea ecx, [ebp - 0x7c]
call fcn.00406627
cmp dword [ebp + 0x7c], 0
jne 0x40aabe
mov ecx, dword [ebp + 0x74]
mov edx, dword [ecx]
and edx, 1
je 0x40aabe
cmp dword [ebp + 0x2c], 0
jne 0x40a9d7
mov dword [ebp], 1
jmp 0x40a9de
mov dword [ebp], 0
movzx eax, byte [ebp]
test eax, eax
je 0x40a9ef
mov dword [ebp + 0xc], 0
jmp 0x40aa0f
cmp dword [ebp + 0x30], 0x10
jb 0x40aa03
mov ecx, dword [ebp - 0x38]
mov dword [ebp + 0x38], ecx
mov edx, dword [ebp + 0x1c]
mov dword [ebp + 0x38], edx
jmp 0x40aa09
lea eax, [ebp + 0x1c]
mov dword [ebp + 0x38], eax
mov ecx, dword [ebp + 0x38]
mov dword [ebp + 0xc], ecx
mov edx, dword [ebp + 4]
add edx, 0x10
mov dword [ebp + 0x50], edx
mov eax, dword [ebp + 0x50]
cmp dword [eax + 0x14], 0x10
jb 0x40aa31
mov ecx, dword [ebp - 0x44]
mov dword [ebp + 0x44], ecx
mov edx, dword [ebp + 0x50]
mov eax, dword [edx]
mov dword [ebp + 0x44], eax
jmp 0x40aa37
mov ecx, dword [ebp + 0x50]
mov dword [ebp + 0x44], ecx
mov edx, dword [ebp + 0x44]
push edx
lea eax, [ebp - 0xc4]
push eax
call fcn.0040dc50
add esp, 8
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
mov dword [ebp + 0x3c], ecx
mov byte [ebp - 4], 3
mov edx, dword [ebp + 0x3c]
cmp dword [edx + 0x14], 0x10
jb 0x40aa70
mov eax, dword [ebp - 0x3c]
mov dword [ebp + 0x4c], eax
mov ecx, dword [ebp + 0x3c]
mov edx, dword [ecx]
mov dword [ebp + 0x4c], edx
jmp 0x40aa76
mov eax, dword [ebp + 0x3c]
mov dword [ebp + 0x4c], eax
mov ecx, dword [ebp + 0x4c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x94]
push eax
call fcn.0040c250
add esp, 0xc
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
push ecx
lea ecx, [ebp + 0x1c]
call fcn.00405c2c
push 0
push 1
lea ecx, [ebp - 0x94]
call fcn.00406627
mov byte [ebp - 4], 2
push 0
push 1
lea ecx, [ebp - 0xc4]
call fcn.00406627
cmp dword [ebp + 0x2c], 0
jne 0x40aacd
mov dword [ebp + 0x14], 1
jmp 0x40aad4
mov dword [ebp + 0x14], 0
movzx edx, byte [ebp + 0x14]
test edx, edx
jne 0x40acff
mov eax, dword [ebp + 0x74]
cmp dword [eax + 4], 0
je 0x40acfd
cmp dword [ebp + 0x30], 0x10
jb 0x40ab01
mov ecx, dword [ebp - 0x4c]
mov dword [ebp + 0x48], ecx
mov edx, dword [ebp + 0x1c]
mov dword [ebp + 0x48], edx
jmp 0x40ab07
lea eax, [ebp + 0x1c]
mov dword [ebp + 0x48], eax
mov ecx, dword [ebp + 0x48]
push ecx
call fcn.0040ca20
add esp, 4
cmp dword [ebp + 0x30], 0x10
jb 0x40ab27
mov edx, dword [ebp - 0x48]
mov dword [ebp + 0x40], edx
mov eax, dword [ebp + 0x1c]
mov dword [ebp + 0x40], eax
jmp 0x40ab2d
lea ecx, [ebp + 0x1c]
mov dword [ebp + 0x40], ecx
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
mov edx, dword [ebp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp + 0x58], eax
cmp dword [ebp + 0x58], 0xffffffff
jne 0x40ab96
mov eax, dword [ebp + 0x70]
mov dword [eax + 0x10], 0
mov ecx, dword [ebp + 0x70]
mov dword [ecx + 0x14], 0
push 0
push 0
mov ecx, dword [ebp + 0x70]
call fcn.00406627
mov edx, dword [ebp + 0x64]
or edx, 1
mov dword [ebp + 0x64], edx
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp + 0x1c]
call fcn.00406627
mov eax, dword [ebp + 0x70]
jmp 0x40ad52
mov dword [ebp + 0x5c], 0
mov dword [ebp + 0x54], 0xfffffffe
mov eax, dword [ebp + 0x74]
mov ecx, dword [eax]
and ecx, 0x100
je 0x40ac3b
lea ecx, [ebp - 0x34]
call fcn.0040ad70
mov byte [ebp - 4], 4
mov edx, dword [ebp + 0x74]
mov eax, dword [edx + 4]
push eax
mov ecx, dword [ebp + 0x74]
mov edx, dword [ecx + 0x24]
push edx
lea eax, [ebp - 0x34]
push eax
call fcn.0040eb00
add esp, 0xc
movzx ecx, al
test ecx, ecx
je 0x40ac2d
push 0
lea edx, [ebp + 0x5c]
push edx
lea ecx, [ebp - 0x34]
call fcn.0040adc0
push eax
push 0
lea ecx, [ebp - 0x34]
call fcn.0040ade0
push eax
mov eax, dword [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40ac20
lea ecx, [ebp - 0x34]
call fcn.0040adc0
cmp dword [ebp + 0x5c], eax
jne 0x40ac20
mov dword [ebp + 0x10], 0
jmp 0x40ac27
mov dword [ebp + 0x10], 0xffffffff
mov ecx, dword [ebp + 0x10]
mov dword [ebp + 0x54], ecx
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x34]
call fcn.0040ada0
jmp 0x40ac7e
push 0
lea edx, [ebp + 0x5c]
push edx
mov eax, dword [ebp + 0x74]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp + 0x74]
mov eax, dword [edx + 0x24]
push eax
mov ecx, dword [ebp + 0x58]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40ac71
mov edx, dword [ebp + 0x74]
mov eax, dword [ebp + 0x5c]
cmp eax, dword [edx + 4]
jne 0x40ac71
mov dword [ebp + 0x18], 0
jmp 0x40ac78
mov dword [ebp + 0x18], 0xffffffff
mov ecx, dword [ebp + 0x18]
mov dword [ebp + 0x54], ecx
mov edx, dword [ebp + 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x54], 0
je 0x40acfd
cmp dword [ebp + 0x30], 0x10
jb 0x40aca2
mov eax, dword [ebp - 0x40]
mov dword [ebp + 0x34], eax
mov ecx, dword [ebp + 0x1c]
mov dword [ebp + 0x34], ecx
jmp 0x40aca8
lea edx, [ebp + 0x1c]
mov dword [ebp + 0x34], edx
mov eax, dword [ebp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp + 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp + 0x70]
mov dword [edx + 0x10], 0
mov eax, dword [ebp + 0x70]
mov dword [eax + 0x14], 0
push 0
push 0
mov ecx, dword [ebp + 0x70]
call fcn.00406627
mov ecx, dword [ebp + 0x64]
or ecx, 1
mov dword [ebp + 0x64], ecx
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp + 0x1c]
call fcn.00406627
mov eax, dword [ebp + 0x70]
jmp 0x40ad52
jmp 0x40ad07
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp + 0x70]
mov dword [edx + 0x10], 0
mov eax, dword [ebp + 0x70]
mov dword [eax + 0x14], 0
push 0
push 0
mov ecx, dword [ebp + 0x70]
call fcn.00406627
lea ecx, [ebp + 0x1c]
push ecx
mov ecx, dword [ebp + 0x70]
call fcn.0040629d
mov edx, dword [ebp + 0x64]
or edx, 1
mov dword [ebp + 0x64], edx
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp + 0x1c]
call fcn.00406627
mov eax, dword [ebp + 0x70]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
add ebp, 0x68
mov esp, ebp
pop ebp
ret 0x10