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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2fec
call fcn.00421ba0
push ebx
xor ebx, ebx
cmp dword [ebp + 0x18], ebx
push edi
jne 0x40ec69
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 0x40eca5
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.0040ea4e
add esp, 0x10
test eax, eax
jne 0x40eccd
xor al, al
jmp 0x40efc7
push esi
push 6
push 1
push 2
call dword [0x458b74]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x22c]
push eax
mov word [ebp - 0x28], 2
call fcn.004136c9
pop ecx
push dword [ebp - 4]
mov dword [ebp - 0x24], eax
call dword [0x458cdc]
mov word [ebp - 0x26], ax
push 0x10
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 8]
call dword [0x458b1c]
test eax, eax
jl 0x40efa3
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x32c]
push eax
push 0x100
lea eax, [ebp - 0x4f4]
push eax
push 0x42fc10
call fcn.0041321d
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 [0x458c18]
push 0x2af8
lea eax, [ebp - 0x2fec]
push ebx
push eax
call fcn.00421a10
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 [0x458c30]
lea eax, [ebp - 0x12c]
push eax
push edi
call dword [0x458bd4]
cmp eax, 1
jl 0x40efa3
push ebx
push 1
lea edi, [ebp + esi - 0x2fec]
push edi
push dword [ebp - 8]
call dword [0x458ac0]
cmp eax, 1
jl 0x40efa3
cmp esi, 0x2710
jg 0x40ee1e
cmp byte [edi], 0xa
jne 0x40ee18
cmp byte [ebp + esi - 0x2fed], 0xd
jne 0x40ee18
cmp byte [ebp + esi - 0x2fee], 0xa
jne 0x40ee18
cmp byte [ebp + esi - 0x2fef], 0xd
je 0x40ee1e
inc esi
jmp 0x40ed8f
lea eax, [ebp - 0x2fec]
push eax
mov byte [ebp + esi - 0x2feb], bl
call fcn.0040ec12
pop ecx
push 0x64
cdq
pop ecx
idiv ecx
cmp eax, 2
jne 0x40efa3
lea eax, [ebp - 0x2fec]
push eax
lea eax, [ebp - 0x3f4]
push eax
push str.content_length
call fcn.0040eb30
add esp, 0xc
test al, al
je 0x40efa3
push 0x2af8
lea eax, [ebp - 0x2fec]
push ebx
push eax
call fcn.00421a10
lea eax, [ebp - 0x3f4]
push eax
call fcn.00421dee
mov esi, eax
add esp, 0x10
cmp esi, 1
jle 0x40efa3
cmp esi, dword [ebp + 0x18]
ja 0x40efa3
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x40eea2
mov dword [eax], esi
cmp dword [ebp + 0xc], ebx
je 0x40eecc
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 0x40ef95
mov edi, dword [ebp + 0x10]
cmp edi, ebx
mov dword [ebp + 0x18], esi
je 0x40eee8
lea eax, [esi + 0x80]
push eax
call fcn.00410adc
pop ecx
mov dword [edi], eax
mov dword [ebp - 0xc], eax
cmp esi, ebx
jle 0x40efcb
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 [0x458c30]
lea eax, [ebp - 0x12c]
push eax
push edi
call dword [0x458bd4]
cmp eax, esi
jl 0x40ef95
mov eax, 0x1f58
cmp dword [ebp + 0x18], eax
push ebx
jl 0x40ef39
push eax
jmp 0x40ef3c
push dword [ebp + 0x18]
lea eax, [ebp - 0x2fec]
push eax
push edi
call dword [0x458ac0]
mov esi, eax
cmp esi, 1
jl 0x40ef95
cmp dword [ebp + 0xc], ebx
je 0x40ef6c
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 0x40ef87
lea eax, [ebp - 0x2fec]
push esi
push eax
push dword [ebp - 0xc]
call fcn.004216d0
add esp, 0xc
add dword [ebp - 0xc], esi
sub dword [ebp + 0x18], esi
cmp dword [ebp + 0x18], ebx
jg 0x40eef0
jmp 0x40efce
cmp dword [ebp + 0xc], ebx
je 0x40efa3
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 8]
call dword [0x458c90]
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40efbb
push dword [eax]
call fcn.00410b23
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop esi
pop edi
pop ebx
leave
ret
mov edi, dword [ebp - 8]
cmp dword [ebp + 0xc], ebx
je 0x40efdc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [0x458c90]
mov al, 1
jmp 0x40efc6