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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2fec
call fcn.00420250
push ebx
xor ebx, ebx
cmp dword [ebp + 0x18], ebx
push edi
jne 0x40dda3
mov dword [ebp + 0x18], 0xa00000
xor eax, eax
push 0x3f
pop ecx
mov byte [ebp - 0x22c], bl
lea edi, [ebp - 0x22b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
push 0x3f
mov byte [ebp - 0x32c], bl
pop ecx
lea edi, [ebp - 0x32b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 0x10]
cmp eax, ebx
mov dword [ebp - 4], 0x50
je 0x40dddf
mov dword [eax], ebx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x32c]
push eax
lea eax, [ebp - 0x22c]
push eax
push dword [ebp + 8]
call fcn.0040db88
add esp, 0x10
test eax, eax
jne 0x40de07
xor al, al
jmp 0x40e101
push esi
push 6
push 1
push 2
call dword [0x455a88]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x22c]
push eax
mov word [ebp - 0x28], 2
call fcn.004121f3
pop ecx
push dword [ebp - 4]
mov dword [ebp - 0x24], eax
call dword [0x455bf0]
mov word [ebp - 0x26], ax
push 0x10
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 8]
call dword [0x455a30]
test eax, eax
jl 0x40e0e6
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x32c]
push eax
push 0x100
lea eax, [ebp - 0x4f4]
push eax
push 0x42db58
call fcn.00411e19
add esp, 0xc
push eax
lea eax, [ebp - 0x2fec]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push ebx
lea eax, [ebp - 0x2fec]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x2fec]
push eax
push dword [ebp - 8]
call dword [0x455b2c]
push 0x2af8
lea eax, [ebp - 0x2fec]
push ebx
push eax
call fcn.004200c0
add esp, 0xc
xor esi, esi
mov dword [ebp - 0x18], 0x12c
mov dword [ebp - 0x14], ebx
mov edi, dword [ebp - 8]
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
lea eax, [ebp - 0x12c]
push eax
lea eax, [edi + 1]
push eax
mov dword [ebp - 0x128], edi
mov dword [ebp - 0x12c], 1
call dword [0x455b44]
lea eax, [ebp - 0x12c]
push eax
push edi
call dword [0x455ae8]
cmp eax, 1
jl 0x40e0e6
push ebx
push 1
lea edi, [ebp + esi - 0x2fec]
push edi
push dword [ebp - 8]
call dword [0x4559d8]
cmp eax, 1
jl 0x40e0e6
cmp esi, 0x2710
jg 0x40df58
cmp byte [edi], 0xa
jne 0x40df52
cmp byte [ebp + esi - 0x2fed], 0xd
jne 0x40df52
cmp byte [ebp + esi - 0x2fee], 0xa
jne 0x40df52
cmp byte [ebp + esi - 0x2fef], 0xd
je 0x40df58
inc esi
jmp 0x40dec9
lea eax, [ebp - 0x2fec]
push eax
mov byte [ebp + esi - 0x2feb], bl
call fcn.0040dd4c
pop ecx
push 0x64
cdq
pop ecx
idiv ecx
cmp eax, 2
jne 0x40e0e6
lea eax, [ebp - 0x2fec]
push eax
lea eax, [ebp - 0x3f4]
push eax
push str.content_length
call fcn.0040dc6a
add esp, 0xc
test al, al
je 0x40e0e6
push 0x2af8
lea eax, [ebp - 0x2fec]
push ebx
push eax
call fcn.004200c0
lea eax, [ebp - 0x3f4]
push eax
call fcn.0042049e
mov esi, eax
add esp, 0x10
cmp esi, 1
jle 0x40e0e6
cmp esi, dword [ebp + 0x18]
ja 0x40e0e6
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x40dfdc
mov dword [eax], esi
cmp dword [ebp + 0xc], ebx
je 0x40e006
push ebx
push 0x80
push 2
push ebx
push 2
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x40e0cf
mov edi, dword [ebp + 0x10]
cmp edi, ebx
mov dword [ebp + 0x18], esi
je 0x40e022
lea eax, [esi + 0x80]
push eax
call fcn.0040fb39
pop ecx
mov dword [edi], eax
mov dword [ebp - 0xc], eax
cmp esi, ebx
jle 0x40e105
mov edi, dword [ebp - 8]
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
lea eax, [ebp - 0x12c]
push eax
xor esi, esi
lea eax, [edi + 1]
inc esi
push eax
mov dword [ebp - 0x128], edi
mov dword [ebp - 0x12c], esi
call dword [0x455b44]
lea eax, [ebp - 0x12c]
push eax
push edi
call dword [0x455ae8]
cmp eax, esi
jl 0x40e0cf
mov eax, 0x1f58
cmp dword [ebp + 0x18], eax
push ebx
jl 0x40e073
push eax
jmp 0x40e076
push dword [ebp + 0x18]
lea eax, [ebp - 0x2fec]
push eax
push edi
call dword [0x4559d8]
mov esi, eax
cmp esi, 1
jl 0x40e0cf
cmp dword [ebp + 0xc], ebx
je 0x40e0a6
push ebx
lea eax, [ebp - 0x10]
push eax
push esi
lea eax, [ebp - 0x2fec]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp + 0x10], ebx
je 0x40e0c1
lea eax, [ebp - 0x2fec]
push esi
push eax
push dword [ebp - 0xc]
call fcn.0041fd80
add esp, 0xc
add dword [ebp - 0xc], esi
sub dword [ebp + 0x18], esi
cmp dword [ebp + 0x18], ebx
jg 0x40e02a
jmp 0x40e108
cmp dword [ebp + 0xc], ebx
je 0x40e0e6
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 8]
call dword [0x455ba4]
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40e0fe
push dword [eax]
call fcn.0040fb80
pop ecx
xor al, al
pop esi
pop edi
pop ebx
leave
ret
mov edi, dword [ebp - 8]
cmp dword [ebp + 0xc], ebx
je 0x40e116
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [0x455ba4]
mov al, 1
jmp 0x40e100