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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x460
mov edx, dword [ebp + 0x28]
push edi
xor edi, edi
mov eax, edx
dec eax
mov dword [ebp - 8], edi
je 0x415d69
sub eax, 3
je 0x415d69
sub eax, 4
je 0x415d69
sub eax, 0x10
je 0x415d69
sub eax, 8
je 0x415d69
xor eax, eax
jmp 0x416148
push ebx
push esi
cmp edx, 8
jg 0x415dc4
xor eax, eax
inc eax
mov ecx, edx
shl eax, cl
mov dword [ebp - 0xc], eax
lea ecx, [eax*4 + 0x36]
mov eax, edx
dec eax
je 0x415da0
sub eax, 3
je 0x415d95
sub eax, 4
jne 0x415db1
mov eax, dword [ebp + 0x14]
jmp 0x415db4
mov eax, dword [ebp + 0x14]
inc eax
cdq
sub eax, edx
sar eax, 1
jmp 0x415db4
mov eax, dword [ebp + 0x14]
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
jmp 0x415db4
mov eax, dword [ebp - 0x14]
lea ebx, [eax + 3]
and ebx, 0xfffffffc
mov dword [ebp - 0x14], ebx
jne 0x415de0
push 4
pop ebx
jmp 0x415ddd
mov eax, edx
cdq
and edx, 7
lea ebx, [edx + eax]
sar ebx, 3
imul ebx, dword [ebp + 0x14]
push 0x36
add ebx, 3
pop ecx
and ebx, 0xfffffffc
mov dword [ebp - 0x14], ebx
mov eax, dword [ebp + 0x18]
push edi
mov esi, ebx
imul esi, eax
push pe_nt_image_headers32
push 2
mov dword [ebp - 0x58], eax
push edi
mov edx, 0x4d42
xor eax, eax
mov word [ebp - 0x38], dx
lea edx, [esi + ecx]
push 1
inc eax
push 0xc0000000
push dword [ebp + 8]
mov dword [ebp - 0x36], edx
xor edx, edx
mov dword [ebp - 0x2e], ecx
mov ecx, dword [ebp + 0x14]
mov word [ebp - 0x54], ax
mov ax, word [ebp + 0x28]
mov word [ebp - 0x32], dx
mov word [ebp - 0x30], dx
mov dword [ebp - 0x60], 0x28
mov dword [ebp - 0x5c], ecx
mov word [ebp - 0x52], ax
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
je 0x416143
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 4]
push ecx
push 0xe
lea ecx, [ebp - 0x38]
push ecx
push eax
call edi
test eax, eax
je 0x41612b
cmp dword [ebp - 4], 0xe
jne 0x41612b
push 0
lea eax, [ebp - 4]
push eax
push 0x28
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x41612b
cmp dword [ebp - 4], 0x28
jne 0x41612b
mov eax, dword [ebp + 0x28]
cmp eax, 1
je 0x416046
cmp eax, 4
je 0x416046
cmp eax, 8
je 0x416046
cmp dword [ebp + 0x1c], 0x18
je 0x415ecd
cmp dword [ebp + 0x1c], 0x20
jne 0x415f04
test byte [ebp + 0x20], 2
je 0x415f04
cmp dword [ebp + 0x10], ebx
jne 0x415f04
push 0
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 0xc]
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x41612b
cmp dword [ebp - 4], esi
jne 0x41612b
mov dword [ebp - 8], 1
jmp 0x41612b
push ebx
push 8
push dword [0x482308]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x41612b
mov esi, dword [ebp + 0x18]
and dword [ebp - 0x1c], 0
mov dword [ebp - 8], 1
test esi, esi
jle 0x416030
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x10]
and eax, 2
neg ecx
dec esi
imul esi, dword [ebp + 0x10]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x28], ecx
add esi, eax
cmp dword [ebp - 0x24], 0
mov edi, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
jne 0x415f60
mov ecx, esi
mov eax, dword [ebp + 0x14]
test eax, eax
jle 0x415ff6
mov dword [ebp - 0x20], eax
cmp dword [ebp + 0x1c], 0x20
jne 0x415fc8
movzx eax, byte [ecx + 2]
movzx edx, byte [ecx + 3]
sub eax, 0xff
imul eax, edx
add eax, 0xfe01
cdq
mov ebx, 0xff
idiv ebx
mov byte [edi + 2], al
movzx eax, byte [ecx + 1]
movzx edx, byte [ecx + 3]
sub eax, ebx
imul eax, edx
add eax, 0xfe01
cdq
idiv ebx
mov byte [edi + 1], al
movzx eax, byte [ecx]
movzx edx, byte [ecx + 3]
sub eax, ebx
imul eax, edx
add eax, 0xfe01
cdq
idiv ebx
mov ebx, dword [ebp - 0x14]
add ecx, 4
jmp 0x415fd9
mov al, byte [ecx + 2]
mov byte [edi + 2], al
mov al, byte [ecx + 1]
mov byte [edi + 1], al
mov al, byte [ecx]
add ecx, 3
cmp dword [ebp + 0x28], 0x20
mov byte [edi], al
jne 0x415fea
mov byte [edi + 3], 0
add edi, 4
jmp 0x415fed
add edi, 3
dec dword [ebp - 0x20]
jne 0x415f6e
push 0
lea eax, [ebp - 4]
push eax
push ebx
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41602c
cmp dword [ebp - 4], ebx
jne 0x41602c
mov eax, dword [ebp + 0x10]
inc dword [ebp - 0x1c]
add dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
add esi, dword [ebp - 0x28]
cmp eax, dword [ebp + 0x18]
jl 0x415f52
jmp 0x416030
and dword [ebp - 8], 0
push dword [ebp - 0xc]
push 0
push dword [0x482308]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x41612b
push dword [ebp + 0x24]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0xc]
call fcn.00415563
xor esi, esi
add esp, 0x1c
mov dword [ebp + 0x28], eax
cmp dword [ebp - 0xc], esi
jle 0x416094
add eax, 0x51
mov cl, byte [eax + 1]
mov byte [ebp + esi*4 - 0x45e], cl
mov cl, byte [eax]
mov byte [ebp + esi*4 - 0x45f], cl
mov cl, byte [eax - 1]
mov byte [ebp + esi*4 - 0x460], cl
inc esi
add eax, 4
cmp esi, dword [ebp - 0xc]
jl 0x41606e
mov esi, dword [ebp - 0xc]
push 0
lea eax, [ebp - 4]
push eax
shl esi, 2
push esi
lea eax, [ebp - 0x460]
push eax
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x4160bd
cmp dword [ebp - 4], esi
jne 0x4160bd
mov dword [ebp - 8], 1
test byte [ebp + 0x20], 2
je 0x4160f3
xor esi, esi
cmp dword [ebp + 0x18], esi
jle 0x416122
push 0
lea eax, [ebp - 4]
push eax
push ebx
push esi
push dword [ebp + 0x28]
call fcn.00415b92
pop ecx
pop ecx
push eax
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x41611e
cmp dword [ebp - 4], ebx
jne 0x41611e
inc esi
cmp esi, dword [ebp + 0x18]
jl 0x4160ca
jmp 0x416122
mov esi, dword [ebp + 0x18]
jmp 0x416119
push 0
lea eax, [ebp - 4]
push eax
push ebx
push esi
push dword [ebp + 0x28]
call fcn.00415b92
pop ecx
pop ecx
push eax
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x41611e
cmp dword [ebp - 4], ebx
jne 0x41611e
dec esi
jns 0x4160f8
jmp 0x416122
and dword [ebp - 8], 0
push dword [ebp + 0x28]
call fcn.00415711
pop ecx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], 0
jne 0x416143
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 8]
pop esi
pop ebx
pop edi
leave
ret